BestConfig is a Python library for easy project configuration management. It supports loading configuration from YAML, JSON, Python files, environment variables, and CLI arguments. Version 1.3.6 is the latest release.
pip install bestconfigNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a Config object; automatically loads from config.yml, config.json, environment variables, and CLI args.
Use config.get('missing_key', default='fallback') instead of config.missing_keyReplace config.get_config('key') with config.key or config.get('key')Set Config(env_prefix='MYAPP_') to only load variables starting with 'MYAPP_'
Use config.get('key', default) or check with 'key' in configEnsure the key exists in your config files or use .get() to avoid AttributeError
Create a config.yml or pass a custom path to Config(file='my_config.yml')