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.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: optional_dependencies-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 391bc2c782d40c80869dffa83ad1f8b8abc9ecc864fef3ac220efff8c65ee410
MD5 0a480648d3df46113556d8cc6497d13f
BLAKE2b-256 61e57a3e0e596f1d486788e39952590f6a105123f68090a486b589d695d8022b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for optional_dependencies-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d26c72f3fa958454d725c8eb558a4d1cef2f0cc035ee7b98b7172eca229f7c6
MD5 d42738720a939c9bb8763b8d4287b6cc
BLAKE2b-256 c3226e8da26a5107e946bf79637703681c74d0e1afbc9e12a9db0eed7c2f7e2f

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