Skip to main content

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:

  1. Create a file named N_description.py (e.g. 1_add_new_field.py)
  2. Define a migrate(data: dict) -> dict function that transforms the raw config dict
  3. The version field is managed automatically by fluxconf

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

missim_config-4.0.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

missim_config-4.0.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file missim_config-4.0.0.tar.gz.

File metadata

  • Download URL: missim_config-4.0.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for missim_config-4.0.0.tar.gz
Algorithm Hash digest
SHA256 98f500304ebb9cea83f4f39f4acd9e9bb645435cc3ec2831e231ed9d7da5aae5
MD5 2b19f54c9b1bc14c130b46036048f8e2
BLAKE2b-256 b79d3540db4993a914c8522c8a5691dbc6c2d967b1f47040b5065c42113d8412

See more details on using hashes here.

File details

Details for the file missim_config-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: missim_config-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for missim_config-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14d03f080d8ce89c6ccb8cd10101ce26a3fc6d35c3677097f587b8b5dc3e8bc1
MD5 efd005c54cb0e4f9fa8f7310e913fae9
BLAKE2b-256 5da8a30ba26548bb53a0c64eb069c487d4fab5b82944f1d2efb05848e5f9a9fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page