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.2.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.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: missim_config-3.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 fb7b762b7b66b537a851416e1a095f5b04272d1a64ca351aed5afac2b07ad824
MD5 f538d7679e5ec69113cbcfc8c47d8a27
BLAKE2b-256 53f3f9cf4561e0d8e48eca40659e50c66a0aa8cf16ffc52900e30b24bb849b11

See more details on using hashes here.

File details

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

File metadata

  • Download URL: missim_config-3.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2ef94fc5db54f66d05106e25255cb37030d20bb6f7c19b0178927f4821d2a806
MD5 fd19d3b57a12e1ae85cddcf08134b25c
BLAKE2b-256 345f120f79cd8d3b3adf6d9b93ab80e95364e132f938a6d25da76df0e082927e

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