A simple, yet capable configuration library for Python
Project description
pyfig
A Python configuration system that's powerful enough to meet complex requirements, while being simple enough so new contributors to your software can confidently make changes without worrying how to get everything setup.
Features
- 📂 Hierarchical overrides
- ✅ Validation powered by pydantic
- 📝 Extensible templating for variables
- 🛠️ Types, defaults, validation, and docs: all in one place directly in your code
Note: pyfig does not inherently support changes to the config at runtime. This feature is not planned.
Installation
pip install jpyfig
Requirements
Strictly, only pydantic is required.
To make full use of the all features, you may also need some of:
These can be independently installed as necessary.
Usage
- Install pyfig
- Create a class tree of subclasses of
Pyfig(*). Provide all attributes, types, docs, and defaults in your.py's - Create overriding configs that can be applied hierarchically based on your requirements
- Load your configuration:
- Using either the built-in 'metaconf' feature, or
- By creating your own implementation and calling
pyfig.load_configuration(...)appropriately
Tutorial
There is a small tutorial ready to walk you through the features and patterns when using Pyfig. Click me
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jpyfig-0.2.0.tar.gz.
File metadata
- Download URL: jpyfig-0.2.0.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
060b4c90f036b532c184219ab480372b2e04cbe91de3ee251acc754680833b80
|
|
| MD5 |
00cdec76dd27d55e2f4d290c6428be07
|
|
| BLAKE2b-256 |
71ba9bbfa4f448edfe41854652f28542832919993121306dc92350b7f41a7df2
|
File details
Details for the file jpyfig-0.2.0-py3-none-any.whl.
File metadata
- Download URL: jpyfig-0.2.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b3338d881bd734f545ff97d1084acd7d6f3c7d2ea0a7c74a2255659fc28d4bb
|
|
| MD5 |
7be2cecda2ad6b4a6379a9d11256a994
|
|
| BLAKE2b-256 |
0ca392c491cf93c809715b8d80093809d81f88f3a0ff9a1fa290c15521de6af7
|