Skip to main content

python program configuration option loader

Project description

A CSS naming hierarchy enforcer.

PyPI Version Documentation Status

What is elective?

elective is a Python program configuration option loader, capable of loading options from configuration files (TOML, JSON, YAML), the environment, or the command line, all with the same names and formats. There are many other fine options available, but none offered this combination of formats, configurable precedence, clear code and documentation, or adequate testing. Most also still use the ini format, which elective will not.

Roadmap

  • Implement basic TOML configuration loading from pyproject.toml (bring in from pccc, target: 0.2.0).

  • Consolidate TOML, JSON, and YAML loading (target: 0.2.0).

  • Add argparser (target: 0.4.0).

  • Implement and add environment variable processing (target: 0.5.0).

  • Implement and add *.env file processing (target: 0.6.0).

  • Implement testing, build, documentation, and CI (complete: 0.1.0).

Installation

Install elective with:

pip install elective
pip freeze > requirements.txt

or with poetry:

poetry add elective

Usage

In code:

>>> import elective
>>> conf = elective.Config()

See the source and documentation for more information.

Author

Jeremy A Gray

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

elective-0.1.1.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

elective-0.1.1-py3-none-any.whl (15.8 kB view hashes)

Uploaded Python 3

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