wirerope


Namewirerope JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/youknowone/wirerope
Summary'Turn functions and methods into fully controllable objects'
upload_time2025-01-16 11:01:25
maintainerNone
docs_urlNone
authorJeong, YunWon
requires_pythonNone
licenseBSD 2-Clause License
keywords ring methodtools hack method
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            wirerope
========

.. image:: https://github.com/youknowone/wirerope/actions/workflows/python-package.yml/badge.svg
.. image:: https://codecov.io/gh/youknowone/wirerope/graph/badge.svg
    :target: https://codecov.io/gh/youknowone/wirerope


The concepts:

- `wirerope.rope.WireRope` is a wrapper interface for python callable.
- Custom `wirerope.wire.Wire` class provides user-defined behavior.
  A subclass of this class is working similar to a *decorator function* body.
- A wire object is associated with a bound method.
- Rope is dispatching types.

`wirerope.rope.WireRope` is the wrapper for callables. By wrapping a
function with `WireRope` with a custom subclass of the `wirerope.wire.Wire`
class, the wire object will be created by each function or bound method.

`Wire` is the most important part. The given class will be instantiated and
bound to each function or bound method - which fits the concept of *instance
cmethod* of human.
For example, when `f` is a free function or staticmethod, the wire also will
be a single object. When `f` is a method or property, wires will be created for
each method owner object `self`. When `f` is a classmethod, wires will be
created for each method owner class `cls`. Yes, it will detect the owner
and bound to it regardless of the calling type.

`Rope` is internal dispatcher. It will be helpful when creating a complex
object for decorated callable instead of simple callable feature.


See also
--------

- See [documentation](https://wirerope.readthedocs.io/en/latest/) - though it
  is not yet written very well.
- See `tests/test_wire.py` for simple example.
- See [methodtools](https://github.com/youknowone/methodtools) for practical
  example.


Python2 support
---------------

wirerope 1.0 stops to support Python 2. If you need Python 2 support, use 0.4.7 the latest version for Python 2.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/youknowone/wirerope",
    "name": "wirerope",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ring, methodtools, hack, method",
    "author": "Jeong, YunWon",
    "author_email": "wirerope@youknowone.org",
    "download_url": "https://files.pythonhosted.org/packages/8e/f1/d0a4c936ba77eb1050da6ea5e7cd80aa36add343d9e5f7f9cf79a206c5b8/wirerope-1.0.0.tar.gz",
    "platform": null,
    "description": "wirerope\n========\n\n.. image:: https://github.com/youknowone/wirerope/actions/workflows/python-package.yml/badge.svg\n.. image:: https://codecov.io/gh/youknowone/wirerope/graph/badge.svg\n    :target: https://codecov.io/gh/youknowone/wirerope\n\n\nThe concepts:\n\n- `wirerope.rope.WireRope` is a wrapper interface for python callable.\n- Custom `wirerope.wire.Wire` class provides user-defined behavior.\n  A subclass of this class is working similar to a *decorator function* body.\n- A wire object is associated with a bound method.\n- Rope is dispatching types.\n\n`wirerope.rope.WireRope` is the wrapper for callables. By wrapping a\nfunction with `WireRope` with a custom subclass of the `wirerope.wire.Wire`\nclass, the wire object will be created by each function or bound method.\n\n`Wire` is the most important part. The given class will be instantiated and\nbound to each function or bound method - which fits the concept of *instance\ncmethod* of human.\nFor example, when `f` is a free function or staticmethod, the wire also will\nbe a single object. When `f` is a method or property, wires will be created for\neach method owner object `self`. When `f` is a classmethod, wires will be\ncreated for each method owner class `cls`. Yes, it will detect the owner\nand bound to it regardless of the calling type.\n\n`Rope` is internal dispatcher. It will be helpful when creating a complex\nobject for decorated callable instead of simple callable feature.\n\n\nSee also\n--------\n\n- See [documentation](https://wirerope.readthedocs.io/en/latest/) - though it\n  is not yet written very well.\n- See `tests/test_wire.py` for simple example.\n- See [methodtools](https://github.com/youknowone/methodtools) for practical\n  example.\n\n\nPython2 support\n---------------\n\nwirerope 1.0 stops to support Python 2. If you need Python 2 support, use 0.4.7 the latest version for Python 2.\n",
    "bugtrack_url": null,
    "license": "BSD 2-Clause License",
    "summary": "'Turn functions and methods into fully controllable objects'",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/youknowone/wirerope"
    },
    "split_keywords": [
        "ring",
        " methodtools",
        " hack",
        " method"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "422d3557ee32d8268b04ce8aada3212b0d49f2ddcf86dc200f3999a772262dc5",
                "md5": "03e92832aebeb1750766372f2c421b46",
                "sha256": "59346555c7b5dbd1c683a4e123f8bed30ca99df646f6867ea6439ceabf43c2f6"
            },
            "downloads": -1,
            "filename": "wirerope-1.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "03e92832aebeb1750766372f2c421b46",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 9166,
            "upload_time": "2025-01-16T11:01:23",
            "upload_time_iso_8601": "2025-01-16T11:01:23.507131Z",
            "url": "https://files.pythonhosted.org/packages/42/2d/3557ee32d8268b04ce8aada3212b0d49f2ddcf86dc200f3999a772262dc5/wirerope-1.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ef1d0a4c936ba77eb1050da6ea5e7cd80aa36add343d9e5f7f9cf79a206c5b8",
                "md5": "dbb8f826e78bf4eff2513bc525ba7a50",
                "sha256": "7da8bb6feeff9dd939bd7141ef0dc392674e43ba662e20909d6729db81a7c8d0"
            },
            "downloads": -1,
            "filename": "wirerope-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dbb8f826e78bf4eff2513bc525ba7a50",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10930,
            "upload_time": "2025-01-16T11:01:25",
            "upload_time_iso_8601": "2025-01-16T11:01:25.427334Z",
            "url": "https://files.pythonhosted.org/packages/8e/f1/d0a4c936ba77eb1050da6ea5e7cd80aa36add343d9e5f7f9cf79a206c5b8/wirerope-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-16 11:01:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "youknowone",
    "github_project": "wirerope",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "wirerope"
}
        
Elapsed time: 0.40830s