Configuration file reader with some nifty bells and whistles added
Project description
AllConf the All-Knowing Config Reader
Generic Configuration file reader/parser with a bunch of nifty extra features, most notably:
- File Inclusion & Extension
- Internal variable reference parsing
- Nested fault-tolerant fetching of non-existing values
- Environment variable embedding
- On-demand external secret credential embedding (untested in this new fork thus far)
- Python script result embedding
- Single-file rendering of parsed config file (via CLI)
- Python dataclass stub generation (via CLI)
- JSON, YAML & custom support
- ...and more
Note
This was forked from the alviss
package
in order to continue development and support.
The TL;DR...
Given this my_cfg.yaml
config file example:
app:
name: MyApp
environment: dev
log_level: INFO
This is how you load and use it with allconf
:
from allconf import quickloader
cfg = quickloader.autoload('my_cfg.yaml')
assert cfg.app.name == 'MyApp'
assert cfg.app.environment == 'dev'
assert cfg.app.log_level == 'INFO'
And that's basically it really!
Read on for description of more features in order of "quality of life" impact for you as a programmer (as gauged by myself) and it goes more or less like this:
- File Inclusion & Extension
- Internal variable reference parsing
- Nested fault-tolerant fetching of non-existing values
- Environment variable embedding
- On-demand external secret credential embedding (untested in this new fork thus far)
- Python script result embedding
- Single-file rendering of parsed config file (via CLI)
- Python dataclass stub generation (via CLI)
- JSON, YAML & custom support
...I'll document this later!
Check out the (_OLD_README.md
)[_OLD_README.md] file for the old documentation (which may or may not be up to date)!
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 allconf-4.0.0.tar.gz
.
File metadata
- Download URL: allconf-4.0.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8102ba7f96a3a87eb137d9a7b5cbccd3a82c92db36cd893c0193872a367c8f82 |
|
MD5 | 8b19a7df6c1864271ff8cbe9aae7e601 |
|
BLAKE2b-256 | 498d363a1eba7c39a424ae11d3505d6937c3c1937c59245ab709b4f6baae0b23 |
File details
Details for the file allconf-4.0.0-py3-none-any.whl
.
File metadata
- Download URL: allconf-4.0.0-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc79cca8670ead384e60e5e5a74fecb416ad066f1cae160eed079634c0a019f0 |
|
MD5 | 09979611367b588eebe53a60d7b8c0b6 |
|
BLAKE2b-256 | 9da2ded042b6913af9fce20dd7d66c708c0c04c11d7cda540b31f0e4e0e5c136 |