A library for reading / writing Missim config files
Project description
Missim Config
Configuration management for MISSIM, backed by fluxconf.
Config is stored in ~/.config/greenroom/missim.yml.
Install
pip install -e ./packages/missim_config
Usage
Reading config
from missim_config import config_io
config = config_io.read()
Writing config
from missim_config import config_io, MissimConfig
config = MissimConfig()
config_io.write(config)
Getting the config path
from missim_config import config_io
path = config_io.get_path()
Generating schemas
After changing the dataclasses, you can generate the schemas with:
python3 -m missim_config.generate_schemas
Migrations
Schema migrations live in missim_config/migrations/. To add a migration:
- Create a file named
N_description.py(e.g.1_add_new_field.py) - Define a
migrate(data: dict) -> dictfunction that transforms the raw config dict - The
versionfield is managed automatically by fluxconf
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
missim_config-3.5.0.tar.gz
(9.5 kB
view details)
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 missim_config-3.5.0.tar.gz.
File metadata
- Download URL: missim_config-3.5.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f0da3e51dff60573ed68e7e16e83fc9f863522087dda7e736d74c8228237ffb
|
|
| MD5 |
e14a09223fb356162add2dec47daf1e6
|
|
| BLAKE2b-256 |
0ca18fa18e17e53750ccdc093a54d8853e7f51f6a4ae26cf8f8ae5925864ebb1
|
File details
Details for the file missim_config-3.5.0-py3-none-any.whl.
File metadata
- Download URL: missim_config-3.5.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd1f3cbedb6f66ead7a476fd5860d97bcb679dd0152abb460be568333d3d1f21
|
|
| MD5 |
8a3e3b5e78a7ab7b64c168df40eb04e3
|
|
| BLAKE2b-256 |
949a8c969faca8494c8e29751d77c1352320d76c636849b5e8cc221d7383ee7d
|