The usage of YAML files to store configurations and parameters is widely accepted in the Python
community, especially in Data Science environments. DriConfig provides a clean interface between your Python code and these YAML configuration files.
Installation
This project resides in the Python Package Index (PyPI), so it can easily be installed with pip:
pip install driconfig
Usage
You can import the DriConfig class from the driconfig package and create your own configuration classes.
from driconfig import DriConfig
Examples
Let's say we have a YAML configuration file config.yaml with the following data:
With poetry installed, one can install the project dependencies with:
poetry install
Then, to run the project unit tests:
make test
To run the linters (ruff and mypy):
make lint
License
driconfig is distributed under the terms of the
MIT license.
Check the LICENSE file for further details.
FAQs
Pydantic-ish YAML configuration management.
We found that driconfig demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.