The Settings and Configuration on ideal practices for app development.
Project description
ConfigAlchemy
The Settings and Configuration on ideal practices for app development.
Free software: MIT license
Documentation: https://configalchemy.readthedocs.io.
Installation
$ pipenv install configalchemy
✨🍰✨
Only Python 3.6+ is supported.
Example
from configalchemy import BaseConfig
class DefaultConfig(BaseConfig):
TEST = "test"
config = DefaultConfig()
config.TEST # attribute style access
>>> 'test'
config['TEST'] # dict item style access
>>> 'test'
config.get('TEST') # dict get style access
>>> 'test'
config.get('HOST', 'local') # Providing defaults
>>> 'local'
Features
Configurable dynamic configurator
Configuration-Oriented Development
Define default config value and its type which is used in your project
Use class to support inheritance to explicitly define configurable config
Override config value from multiple source with priority supported
Callable function return value
File (json)
Environment Variables
Proper Typecast before overriding
Generic Config Type Support by custom typecast
Extension
Full Apollo - A reliable configuration management system Features Support
TODO
Add More Proper Log
History
0.2.* (2019-08)
Change global variable to weak reference
Remove Lock (Prepare to implement optimistic raw lock if necessary)
Improve Priority Data Structure
Improve Field Validation
Use OOP to define call function
Properer validation and typecast
Improve Type Annotations
Import JSON type
0.1.0 (2019-08-01)
Init Project.
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 configalchemy-0.2.11-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f01086f61a97c370ea1fe5b69a29f7bfb4b0dd59274a280b27d84b4822bf606 |
|
MD5 | d08c9c3e112578d298c6d0af56d66074 |
|
BLAKE2b-256 | f7c13d211a0359cb43e897b2b43ebe70de26dd8b27681387572877ec99774567 |