Skip to main content

docoptcfg

Love using docopt over argparse or Click? Wish it took care of environment variables and/or config files?

docoptcfg is a wrapper for docopt which handles reading configuration data from environment variables and/or an INI/INF configuration file. You can (1) enable only the environment variable part, (2) only the config file part, (3) or use both at the same time:

  1. args = docoptcfg(__doc__, env_prefix='MYAPP_')

  2. args = docoptcfg(__doc__, config_option='--config')

  3. args = docoptcfg(__doc__, config_option='--config', env_prefix='MYAPP_')

📖 Full documentation: https://docoptcfg.readthedocs.org

  • Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5 supported on Linux and OS X.

  • Python 2.7, 3.3, 3.4, and 3.5 supported on Windows (both 32 and 64 bit versions of Python).

Build Status Windows Build Status Coverage Status Latest Version

Quickstart

Install:

pip install docoptcfg

Changelog

This project adheres to Semantic Versioning.

1.0.2 - 2016-06-28

Fixed
  • Bug where docoptcfg failed to handle positional arguments with repeating args/opts.

1.0.1 - 2016-01-25

Fixed
  • setup.py was previously configured for packages, not modules.

1.0.0 - 2016-01-25

  • Initial release.

Release files for docoptcfg 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docoptcfg 1.0.2
File Size Uploaded
docoptcfg-1.0.2.tar.gz 5.3 kB Details

Release files / docoptcfg-1.0.2.tar.gz

Download URL docoptcfg-1.0.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1a042401c12c1f5fda4e7960cada2e6dd48576f2ac96b66a6f99d151fefb0ce2
BLAKE2b-256 checksum
How to use checksums
c44e1cebb227addfeb151855668d622c333afd15945cc6075a0b3a9140de83c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page