Registry / serialization / pystaticconfiguration

pystaticconfiguration

JSON →
library0.11.1pypypi✓ verified 82d ago

A Python library for loading static configuration from YAML, JSON, and Python files. Current version 0.11.1, released July 2021. Infrequently updated; supports Python >=3.6.

pip install pystaticconfiguration
INSTALL
IMPORT
SIG · PYSTATICCONFIGURAT
P
pystaticconfiguration
serializationpythonv0.11.1
Install
1.7s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AutoConfiguration
from staticconf import AutoConfiguration
from staticconf.config import Configuration
config
from staticconf import config
get
from staticconf import get

Loads a YAML config file and retrieves a key.

import os from staticconf.config import Configuration from staticconf.loader import YamlLoader config = Configuration() loader = YamlLoader('config.yaml') config.update_from_loader(loader) print(config.get('key', default='not found'))
Debug
Known issues
gotchaThe package name is 'pystaticconfiguration', but the Python module is 'staticconf'. Import from 'staticconf' directly.
fix
Use 'from staticconf.config import Configuration' not 'from pystaticconfiguration import ...'.
affects: >=0.10.0
gotchaConfiguration must be reset between tests: call Configuration.reset() to clear previous settings, otherwise you may see stale defaults.
fix
In test setup, do 'config = Configuration(); config.clear()' or use 'config.reset()'.
affects: all
deprecatedUsing 'staticconf.build' (the old module) is deprecated. Use 'staticconf.config' instead.
fix
Replace 'from staticconf import build' with 'from staticconf.config import Configuration'.
affects: >=0.10.0
Upgrade
Version history
0.11.1latest on PyPI · released Oct 22, 2022
Audit
Dependencies
pyyamloptionalfor loading YAML config files
Agent activity
17 hits · last 30 days
node
14
Amazon
1
Resources
pystaticconfiguration — pip install pystaticconfiguration · libregistry