A simple python configuration lib.
Project description
As You Wish
A simple python configuration library that works like Minecraft Forge's Config classes.
I was fed up by the fact that the configparser
library had little to no support for comments on values
and also support for restoring configurations from a corrupted state.
I also wanted a library that would validate that certain config values where of the correct type, so this is it.
Backends
The only current backend is the configparser
library, but I would might add support for more,
such as yaml, json, toml, etc.
Installation
Run pip install as-you-wish
to use this project.
Usage
Example program usage:
from as_you_wish import Config
settings = Config()
settings.define('service.api_key', 'YOUR_API_KEY', 'needed to connect to the api service')
settings.load('settings.ini')
print(f"API_KEY={settings.get('service.api_key')}")
Also check out the docs and tests for more api usage.
Contributing
We'd love the help. Unfortunately we don't have a Contributing.md document yet, but if you find an issue/bug/feature request, feel free to submit it with a PR or under the Issues tab.
Thanks for checking us out! (The Kingdom of Florin 🏰 is yours.)
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
Hashes for as_you_wish-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0a56415f2c2aad0455dc239ba7d7810b4f3cfc87fed3ddad6fa6bbb43af3b0f |
|
MD5 | 916576966325dfd1ec01a2a97f4b5c48 |
|
BLAKE2b-256 | 26101f288b5b889dc7e461ab2cdadb220b527da8254fd3f87774cab607891fe0 |