METADATA 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Metadata-Version: 2.2
  2. Name: wirerope
  3. Version: 1.0.0
  4. Summary: 'Turn functions and methods into fully controllable objects'
  5. Home-page: https://github.com/youknowone/wirerope
  6. Author: Jeong, YunWon
  7. Author-email: wirerope@youknowone.org
  8. License: BSD 2-Clause License
  9. Keywords: ring,methodtools,hack,method
  10. Classifier: License :: OSI Approved :: BSD License
  11. Classifier: Programming Language :: Python :: 3
  12. Classifier: Programming Language :: Python :: 3.4
  13. Classifier: Programming Language :: Python :: 3.5
  14. Classifier: Programming Language :: Python :: 3.6
  15. Classifier: Programming Language :: Python :: 3.7
  16. Classifier: Programming Language :: Python :: 3.8
  17. Classifier: Programming Language :: Python :: 3.9
  18. Classifier: Programming Language :: Python :: 3.10
  19. Classifier: Programming Language :: Python :: 3.11
  20. Classifier: Programming Language :: Python :: 3.12
  21. Classifier: Programming Language :: Python :: 3.13
  22. License-File: LICENSE
  23. Requires-Dist: six>=1.11.0
  24. Requires-Dist: inspect2>=0.1.0; python_version < "3"
  25. Requires-Dist: singledispatch>=3.4.0.3; python_version < "3.4"
  26. Provides-Extra: test
  27. Requires-Dist: pytest>=4.6.7; extra == "test"
  28. Requires-Dist: pytest-cov>=2.6.1; extra == "test"
  29. Requires-Dist: pytest-checkdocs>=1.2.5; python_version < "3" and extra == "test"
  30. Requires-Dist: pytest-checkdocs>=2.9.0; python_version >= "3" and extra == "test"
  31. Provides-Extra: doc
  32. Requires-Dist: sphinx; extra == "doc"
  33. wirerope
  34. ========
  35. .. image:: https://github.com/youknowone/wirerope/actions/workflows/python-package.yml/badge.svg
  36. .. image:: https://codecov.io/gh/youknowone/wirerope/graph/badge.svg
  37. :target: https://codecov.io/gh/youknowone/wirerope
  38. The concepts:
  39. - `wirerope.rope.WireRope` is a wrapper interface for python callable.
  40. - Custom `wirerope.wire.Wire` class provides user-defined behavior.
  41. A subclass of this class is working similar to a *decorator function* body.
  42. - A wire object is associated with a bound method.
  43. - Rope is dispatching types.
  44. `wirerope.rope.WireRope` is the wrapper for callables. By wrapping a
  45. function with `WireRope` with a custom subclass of the `wirerope.wire.Wire`
  46. class, the wire object will be created by each function or bound method.
  47. `Wire` is the most important part. The given class will be instantiated and
  48. bound to each function or bound method - which fits the concept of *instance
  49. cmethod* of human.
  50. For example, when `f` is a free function or staticmethod, the wire also will
  51. be a single object. When `f` is a method or property, wires will be created for
  52. each method owner object `self`. When `f` is a classmethod, wires will be
  53. created for each method owner class `cls`. Yes, it will detect the owner
  54. and bound to it regardless of the calling type.
  55. `Rope` is internal dispatcher. It will be helpful when creating a complex
  56. object for decorated callable instead of simple callable feature.
  57. See also
  58. --------
  59. - See [documentation](https://wirerope.readthedocs.io/en/latest/) - though it
  60. is not yet written very well.
  61. - See `tests/test_wire.py` for simple example.
  62. - See [methodtools](https://github.com/youknowone/methodtools) for practical
  63. example.
  64. Python2 support
  65. ---------------
  66. wirerope 1.0 stops to support Python 2. If you need Python 2 support, use 0.4.7 the latest version for Python 2.