Skip to main content

'Turn functions and methods into fully controllable objects'

Project description

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

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

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.

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-1.0.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wirerope-1.0.0-py2.py3-none-any.whl (9.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: wirerope-1.0.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for wirerope-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7da8bb6feeff9dd939bd7141ef0dc392674e43ba662e20909d6729db81a7c8d0
MD5 dbb8f826e78bf4eff2513bc525ba7a50
BLAKE2b-256 8ef1d0a4c936ba77eb1050da6ea5e7cd80aa36add343d9e5f7f9cf79a206c5b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for wirerope-1.0.0.tar.gz:

Publisher: release.yml on youknowone/wirerope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: wirerope-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for wirerope-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 59346555c7b5dbd1c683a4e123f8bed30ca99df646f6867ea6439ceabf43c2f6
MD5 03e92832aebeb1750766372f2c421b46
BLAKE2b-256 422d3557ee32d8268b04ce8aada3212b0d49f2ddcf86dc200f3999a772262dc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for wirerope-1.0.0-py2.py3-none-any.whl:

Publisher: release.yml on youknowone/wirerope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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