Skip to main content

A nice interface to context variables

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

contextclass

Alternative interface to context variables for practical scenarios.

>>> class Foo(ContextClass):
...     x: int | None = None

>>> with Foo.context(x=1):
...     print(Foo.current.x)

Works with type hints:

image image image

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

contextclass-0.1.2.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

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

contextclass-0.1.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file contextclass-0.1.2.tar.gz.

File metadata

  • Download URL: contextclass-0.1.2.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for contextclass-0.1.2.tar.gz
Algorithm Hash digest
SHA256 53a9895af9241feee79289608d3ec0f9bf7c47a16c337d52818b3afa482279fb
MD5 5deba0f3fe40dde7349fc68e6541b157
BLAKE2b-256 9416ee5ce4b33c54b0d7e487da2c52f0a512a356782499eff35c045a5e851e7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for contextclass-0.1.2.tar.gz:

Publisher: ci.yml on johnslavik/contextclass

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

File details

Details for the file contextclass-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: contextclass-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for contextclass-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ef66ab49046048e6e0ef07e17270e9b204b8d636d0738672c48148b41aa2969
MD5 c102e7445b312995b81ba9e7db6f9ff0
BLAKE2b-256 19c9cef8b4262ff845949881ef3ea9e26eb494f14b6f2f7bf525dd9cc79204f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for contextclass-0.1.2-py3-none-any.whl:

Publisher: ci.yml on johnslavik/contextclass

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