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.
Raw data
{
"_id": null,
"home_page": "https://github.com/youknowone/wirerope",
"name": "wirerope",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "ring,methodtools,hack,method",
"author": "Jeong YunWon",
"author_email": "wirerope@youknowone.org",
"download_url": "https://files.pythonhosted.org/packages/9f/e9/66f1058f20a77e62bf42fd72d07de34b928b1d485ff17dc66810dc2596a0/wirerope-0.4.7.tar.gz",
"platform": null,
"description": "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",
"bugtrack_url": null,
"license": "BSD 2-Clause License",
"summary": "'Turn functions and methods into fully controllable objects'",
"version": "0.4.7",
"split_keywords": [
"ring",
"methodtools",
"hack",
"method"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9fe966f1058f20a77e62bf42fd72d07de34b928b1d485ff17dc66810dc2596a0",
"md5": "032d4a0f6750d16de51d10fe10e2b846",
"sha256": "f3961039218276283c5037da0fa164619def0327595f10892d562a61a8603990"
},
"downloads": -1,
"filename": "wirerope-0.4.7.tar.gz",
"has_sig": false,
"md5_digest": "032d4a0f6750d16de51d10fe10e2b846",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8476,
"upload_time": "2023-02-05T13:08:05",
"upload_time_iso_8601": "2023-02-05T13:08:05.165165Z",
"url": "https://files.pythonhosted.org/packages/9f/e9/66f1058f20a77e62bf42fd72d07de34b928b1d485ff17dc66810dc2596a0/wirerope-0.4.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-05 13:08:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "youknowone",
"github_project": "wirerope",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"lcname": "wirerope"
}