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.0.tar.gz (43.0 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.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: contextclass-0.1.0.tar.gz
  • Upload date:
  • Size: 43.0 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.0.tar.gz
Algorithm Hash digest
SHA256 edabfbd10958bf715a3bdb8e0c94584ae93434d4c201f2b2a7acacd40167aa5b
MD5 f9c69711a4409b7dbb8a1a4544ab1ee9
BLAKE2b-256 f6f472acb8f03123681a055a788ee81e9ecbdab712f811acae6c81636f061fe7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: contextclass-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6f714b4bc9860ef4276209c8ee668b70b070ed311e22641d9e2359e96258013
MD5 7491590314975dea1c717e9cae57f60e
BLAKE2b-256 ef2a39ad546c4b9fc2fdeb3de80e02d77908a70bdb836ec717c8604628ba309b

See more details on using hashes here.

Provenance

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