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.1.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.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: contextclass-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3bea0a17c7dceaabc0d1d559a040832453c9a9274493c29460da6d89d7870682
MD5 b498795c772be3cdc3f2a91be7b88bd3
BLAKE2b-256 39400cd0ba68e01eae528dc9b8d879c805ef1d3a5806ee7665e03c91907390ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for contextclass-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: contextclass-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4344648fba0caf50e82f85e5c5d46c65bfeca82bcc4207a9438f94c0ba583a91
MD5 4126b2ae7e34fb5dd6397eb431aae8a4
BLAKE2b-256 1bcf46219e95996a0ff99a87441202a70bd6c983eb33fccec6a62f8aa191bfa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for contextclass-0.1.1-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