confiGOAT is a powerful, flexible, and developer-friendly configuration management tool.
Project description
confiGOAT
confiGOAT is a powerful, flexible, and developer-friendly configuration management tool.
Features:
- Manage all your environment variables or configuration parameters from a single setup.
- Use environment variables for different environments from the same setup.
- Cast values before you use them.
- Allow simple structure to configure nested configurations.
- Load configuration parameters from python scripts.
- Access parameters at every nested level using dynamic module.
- Keep track of all parameters using a single interface.
Installing
confiGOAT can be installed with pip:
$ pip install configoat
Alternatively, you can grab the latest source code from GitHub:
$ git clone https://github.com/aag13/configoat
$ cd configoat
$ pip install .
configoat is powerful and easy to use:
You can initialize the package using the following management command.
$ configoat init
How to Use confiGOAT
Access environment variables using get() inside any python module/script
>>> from configoat import conf
>>> conf.initialize(config="configs/main.yaml", env="dev", module="all_config")
>>> print(conf.get('@.var1', default='test', cast=str))
>>> print(conf.get('@.var1'))
>>> print(conf.get('@.var3'))
>>> print(conf.get('@.var5'))
>>> print(conf.get('@.var7.varAA'))
>>> print(conf.get('@.var7.varBB'))
>>> print(conf.get('@.var7.varCC'))
>>> print(conf.get('@.var8'))
>>> print(conf.get('@.var9.d'))
>>> print(conf.get('@.var9.e'))
Access environment variables using dynamic modules inside any python module/script
>>> import all_config
>>> print(all_config.var1)
>>> print(all_config.var3)
>>> print(all_config.var5)
>>> print(all_config.var7.varAA)
>>> print(all_config.var7.varBB)
>>> print(all_config.var7.varCC)
>>> print(all_config.var8)
>>> print(all_config.var9.d)
>>> print(all_config.var9.e)
Documentation
confiGOAT has usage and reference documentation at confiGOAT.readthedocs.io.
Contributing
confiGOAT happily accepts contributions. Please see our contributing documentation for some tips on getting started.
Maintainers
👋
======= History
0.1.0 (2023-11-15)
- First release on PyPI.
Project details
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 configoat-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b27f0970774f877caca33447140ecced2a21d936454a185168a2a8e86d4046ca |
|
MD5 | e2ef5dc4fc96ca83f2c17f385ff763a5 |
|
BLAKE2b-256 | b46149faa41239b31130ee831e4d457768c292d6e1cb417940a7ac66c8835858 |