Skip to main content

'Turn functions and methods into fully controllable objects'

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wirerope-0.4.7.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

wirerope-0.4.7-py2.py3-none-any.whl (9.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file wirerope-0.4.7.tar.gz.

File metadata

  • Download URL: wirerope-0.4.7.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for wirerope-0.4.7.tar.gz
Algorithm Hash digest
SHA256 f3961039218276283c5037da0fa164619def0327595f10892d562a61a8603990
MD5 032d4a0f6750d16de51d10fe10e2b846
BLAKE2b-256 9fe966f1058f20a77e62bf42fd72d07de34b928b1d485ff17dc66810dc2596a0

See more details on using hashes here.

Provenance

File details

Details for the file wirerope-0.4.7-py2.py3-none-any.whl.

File metadata

  • Download URL: wirerope-0.4.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.1

File hashes

Hashes for wirerope-0.4.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 332973a3be6898f02fd0e73b2e20414c5102cc6c811d75856a938206677495c8
MD5 4b9805f72b38e39f1e349bfdf2c43211
BLAKE2b-256 d4a3e6963baa7a884915831c80ca31f0ca18f776c2298639b4978834ec1d9288

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page