Skip to main content

Construct Checks for Optional Dependencies

Project description

optional_dependencies

Construct Checks for Optional Dependencies

Installation

PyPI platforms PyPI version

pip install optional_dependencies

Documentation

This package allows for easy construction of checks for optional dependencies. As every Python project can have its own unique set of optional dependencies, optional_dependencies provides an enum.Enum base class for enumerating the optional dependencies.

from optional_dependencies import OptionalDependencyEnum, auto

# Note that `auto` is just a re-export of enum.auto


class OptDeps(OptionalDependencyEnum):
    PACKAGING = auto()


OptDeps.PACKAGING
# <OptDeps.PACKAGING: <Version('...')>>

OptDeps.PACKAGING.is_installed
# True

OptDeps.PACKAGING.version
# <Version('...')>

Citation

DOI

If you found this library to be useful and want to support the development and maintenance of lower-level code libraries for the scientific community, please consider citing this work.

Development

codecov Actions Status

We welcome contributions!

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

optional_dependencies-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

optional_dependencies-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: optional_dependencies-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for optional_dependencies-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e32f1c3d48c32bf796dd95d98f7b0238b29631293b05bcc0cb65341c5fda4f3
MD5 9f3a44e5d6d155a2bfc0a0939f84e49e
BLAKE2b-256 cad3b004dd08409b6f8847c93655140f78f983c17059cf21feceb37b097b4650

See more details on using hashes here.

File details

Details for the file optional_dependencies-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for optional_dependencies-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de15649e7194129b619e7e2185ce0f051b12c7476585e238442ea30db3a2e44a
MD5 20f3825a64b2b2dc3e2b45de7dd229c5
BLAKE2b-256 43f45951f0cd3768dbe101fe83bf1d4587ae45e48719a34b0c781acb0eeea903

See more details on using hashes here.

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