python program configuration option loader
Project description
A CSS naming hierarchy enforcer.
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.
Copyright and License
SPDX-License-Identifier: GPL-3.0-or-later
elective, a CSS naming hierarchy enforcer. Copyright (C) 2021 Jeremy A Gray.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
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 elective-0.1.1.tar.gz
.
File metadata
- Download URL: elective-0.1.1.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83db73a8a3cde6be6918e41e2d56c52803678adb68ebb21b22fa6e6e60ad085e |
|
MD5 | f67d93fbd32d9dcae6c0dd18a8fc78de |
|
BLAKE2b-256 | 0ecd66c78e9d5fb7a6a002901e9ea86a3d56919df29c7ed2df0f530740fb58ac |
File details
Details for the file elective-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: elective-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 051019ceb310dd9d56a82425fb1fc5d52ebc8f8fc967e626156ef8a85a1e78ba |
|
MD5 | c7ab242c3aa1aa17195bba6b88ea65be |
|
BLAKE2b-256 | aa62511872048ef2e21db51216208a4e9ff81f052b3ddd3612706480b8c46e29 |