{"id":24407,"library":"pystaticconfiguration","title":"PyStaticConfiguration","description":"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.","status":"maintenance","version":"0.11.1","language":"python","source_language":"en","source_url":"https://github.com/dnephin/PyStaticConfiguration","tags":["configuration","yaml","json","static"],"install":[{"cmd":"pip install pystaticconfiguration","lang":"bash","label":"standard"}],"dependencies":[{"reason":"for loading YAML config files","package":"pyyaml","optional":true}],"imports":[{"note":"pystaticconfiguration is the package name; the module is staticconf.","wrong":"import pystaticconfiguration","symbol":"Configuration","correct":"from staticconf.config import Configuration"},{"note":"YamlLoader is in staticconf.loader, not staticconf directly.","wrong":"from staticconf import YamlLoader","symbol":"YamlLoader","correct":"from staticconf.loader import YamlLoader"},{"note":"Correct import.","wrong":null,"symbol":"JsonLoader","correct":"from staticconf.loader import JsonLoader"},{"note":"Correct import.","wrong":null,"symbol":"PythonLoader","correct":"from staticconf.loader import PythonLoader"}],"quickstart":{"code":"import os\nfrom staticconf.config import Configuration\nfrom staticconf.loader import YamlLoader\n\nconfig = Configuration()\nloader = YamlLoader('config.yaml')\nconfig.update_from_loader(loader)\nprint(config.get('key', default='not found'))","lang":"python","description":"Loads a YAML config file and retrieves a key."},"warnings":[{"fix":"Use 'from staticconf.config import Configuration' not 'from pystaticconfiguration import ...'.","message":"The package name is 'pystaticconfiguration', but the Python module is 'staticconf'. Import from 'staticconf' directly.","severity":"gotcha","affected_versions":">=0.10.0"},{"fix":"In test setup, do 'config = Configuration(); config.clear()' or use 'config.reset()'.","message":"Configuration must be reset between tests: call Configuration.reset() to clear previous settings, otherwise you may see stale defaults.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace 'from staticconf import build' with 'from staticconf.config import Configuration'.","message":"Using 'staticconf.build' (the old module) is deprecated. Use 'staticconf.config' instead.","severity":"deprecated","affected_versions":">=0.10.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install pystaticconfiguration' and then import as 'import staticconf'.","cause":"The package is installed as 'pystaticconfiguration', but the import uses 'staticconf'.","error":"ModuleNotFoundError: No module named 'staticconf'"},{"fix":"Use 'from staticconf.loader import YamlLoader'.","cause":"YamlLoader is in staticconf.loader submodule, not directly in staticconf.","error":"AttributeError: module 'staticconf' has no attribute 'YamlLoader'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}