ModYml
📦 Project Introduction
ModYml is a lightweight Python configuration management library designed for modular and reusable configurations. With YAML file support, it enables configuration inheritance, parameter overriding, and alias systems, making complex configuration management simple and intuitive.
✨ Key Features
- Modular Configs: Split configurations into reusable modules
- Dynamic Inheritance: Reference other configs using
$module.keysyntax - Parameter Overriding: Modify parameters at runtime with
$module.key(param=value) - Alias System: Create short aliases for config items
key(alias) - Namespace Isolation: Automatic namespace management for config items
- Dot-access: Returns
EasyDictobjects for attribute-style access
⚙️ Installation
pip install modyml
🚀 Quick Start
- Create module config (
modules/optimizers.yml):
adam:
type: Adam
params:
learning_rate(lr): 0.001
weight_decay(wd): 0.0001
- Create experiment config (
experiments/E01.yml):
training:
base_optimizer: $optimizers.adam
custom_optimizer: $optimizers.adam(lr=0.002)
special_optimizer($optimizers.adam):
params:
wd: 0.01
- Load configuration:
from modyml import load
config = load(
"experiments/E01.yml",
module_files=["modules/optimizers.yml"],
base_dir="configs/"
)
print(config.training.base_optimizer.params.lr) # Output: 0.001
print(config.training.custom_optimizer.params.lr) # Output: 0.002
print(config.training.special_optimizer.params.wd) # Output: 0.01
🧪 Testing
pytest tests/
Author: Yuyao Huang (Sam) License: MIT
Metadata
Release files for modyml 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modyml-0.1.0.tar.gz | 2.9 kB | Without provenance | Details for modyml-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modyml-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for modyml-0.1.0-py3-none-any.whl |
Total release size: 6.5 kB
Release files / modyml-0.1.0.tar.gz
| Download URL | modyml-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edd03552484611dc45133aa366b38d5a6c5a72ba0d8e820670738467ae95294c
|
|
BLAKE2b-256 checksum How to use checksums |
db0119140202f8603bbf191fff83f99c720d7ffd0979fee562d91408bfb1afed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|
Release files / modyml-0.1.0-py3-none-any.whl
| Download URL | modyml-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ee7b0e9c5f810de0af218a866b699883c89cab527abeb61ea3ad2e63b85dc76
|
|
BLAKE2b-256 checksum How to use checksums |
15836446b79bc5d96eb49228a4749b959af3a7ab1fc7328b6bb8fd76e92b0fff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|
Security for modyml 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.