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-3.1.1.tar.gz (9.8 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-3.1.1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for missim_config-3.1.1.tar.gz
Algorithm Hash digest
SHA256 69a35c8bf4ff5189955a006b942bd13e8965fab6b9fd49fffb1371c8862b99d8
MD5 f170a69a77e38026e4d7bf8e85e1abe9
BLAKE2b-256 27bae3d09108e978d6fae894d923be02127dbc437f9eeaf9b4986c1fbf1983ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: missim_config-3.1.1-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.19

File hashes

Hashes for missim_config-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fec59defc0c86545e172a1bc8f26581c4171afbf85e6d8b600ebbb31c7eb34b6
MD5 61c28f3b8508221edfdaeeafc9e3d74c
BLAKE2b-256 ce862e30f05d723bf46004252b3ea4ef0d44509a20a0e504eeeaa3b8c094cd1b

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