Construct Checks for Optional Dependencies
Project description
optional_dependencies
Construct Checks for Optional Dependencies
Installation
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file optional_dependencies-0.1.0rc1.tar.gz
.
File metadata
- Download URL: optional_dependencies-0.1.0rc1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55ab5afdfebe84708cb6a92a5bf97b6711b64a9cc29edaa8815cef4336d768b4 |
|
MD5 | 65f769929343e42dcaafbf8367a1765a |
|
BLAKE2b-256 | f2c1c3e2383584d444dd2ee8fb670c502b426916ade24df67a4fea8bc77c572f |
File details
Details for the file optional_dependencies-0.1.0rc1-py3-none-any.whl
.
File metadata
- Download URL: optional_dependencies-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c39f1f77f8aa0c9b5bc3a69246b7d8aef24ce18e7ad0de23fc70fe78c0f35552 |
|
MD5 | c93075aec6164a153b27d1478cad6e4e |
|
BLAKE2b-256 | a1bd41d259bc4fa9b81e5d41529c57b78c0cfb757ececce3ee4642e1a8d00186 |