configmanager 1.32.0
pip install configmanager==1.32.0
Released:
Forget about configparser, YAML, or JSON parsers. Focus on configuration.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Jazeps Basko
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
Project description
Don’t let standard library’s configparser drive your configuration value access design. Let it do what it does best – parse and write configuration files. And let configmanager do the rest.
Main Features
Every configuration item is an object with a type, a default value, a custom value and other metadata
No sections required
Any depth of sections allowed
INI (ConfigParser), JSON, YAML formats
click framework integration
Designed for humans
Documentation
Source Code and Issue Tracking
Quick Start
Install from Python Package index with pip install configmanager.
Declare your configuration, the sources, and off you go. Remember, every configuration item is an object, not just a plain configuration value. If you don’t need the rich features of configuration items, use configmanager.PlainConfig instead.
import warnings
from configmanager import Config
config = Config({
'uploads': {
'threads': 1,
'enabled': False,
'db': {
'user': 'root',
'password': {
'@default': 'root',
'@envvar': 'MY_UPLOADER_DB_PASSWORD',
},
}
}
}, load_sources=[
'/etc/my-uploader/config.ini',
'~/.config/my-uploader/config.json',
], auto_load=True)
if config.uploads.db.user.is_default:
warnings.warn('Using default db user!')
if config.uploads.enabled.get():
connect_to_database(
user=config.uploads.db.user.get(),
password=config.uploads.db.password.get(),
)
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Jazeps Basko
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
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
File details
Details for the file configmanager-1.32.0.tar.gz
.
File metadata
- Download URL: configmanager-1.32.0.tar.gz
- Upload date:
- Size: 54.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aa8422c606a78ed4f24946c27abf6429ac73022ff3c14b195a87afc490a2704 |
|
MD5 | 6cce22af7f9dceffa06de8d2ca1ae1e8 |
|
BLAKE2b-256 | 98f9d2927eac05faf3994cfc2349379d8623f8f18be65ee9c376f6354aa9ceed |