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
We welcome contributions!
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.0rc2.tar.gz
.
File metadata
- Download URL: optional_dependencies-0.1.0rc2.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 | f336432d6baf74831b4f26b99392806c68eb520f4191d01d31474d990a73c151 |
|
MD5 | f10ea4929326df61788f1ce10799dfab |
|
BLAKE2b-256 | eb462c8e1e41bbf3bb7e97d8e03af8cb691364e600c9c2a11f3ac46a18d6b09b |
File details
Details for the file optional_dependencies-0.1.0rc2-py3-none-any.whl
.
File metadata
- Download URL: optional_dependencies-0.1.0rc2-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 | b6ef6e013f48398f3d78decfe4a92443c577391ba734269e26ac686f19ae6279 |
|
MD5 | 6730b231817bd8bee7de8d5c6b579e21 |
|
BLAKE2b-256 | b0b02fdebe2949a1b3d943f8e6581117847ec1cd41ab45ab73db0960ef81e6e5 |