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][zenodo-badge]][zenodo-link]

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

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.0rc1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for optional_dependencies-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 55ab5afdfebe84708cb6a92a5bf97b6711b64a9cc29edaa8815cef4336d768b4
MD5 65f769929343e42dcaafbf8367a1765a
BLAKE2b-256 f2c1c3e2383584d444dd2ee8fb670c502b426916ade24df67a4fea8bc77c572f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for optional_dependencies-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 c39f1f77f8aa0c9b5bc3a69246b7d8aef24ce18e7ad0de23fc70fe78c0f35552
MD5 c93075aec6164a153b27d1478cad6e4e
BLAKE2b-256 a1bd41d259bc4fa9b81e5d41529c57b78c0cfb757ececce3ee4642e1a8d00186

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