Registry / serialization / vyper-config

vyper-config

JSON →
library1.2.1pypypi✓ verified 88d ago

Vyper is a Python configuration library inspired by the Viper configuration system for Go. It supports reading configuration from YAML, JSON, TOML, INI, HCL, Java properties, dotenv, and environment variables, with live watching and multiple config sources. Current version: 1.2.1. Release cadence: irregular.

pip install vyper-config
INSTALL
IMPORT
SIG · VYPER-CONFIG
V
vyper-config
serializationpythonv1.2.1
Install
2.0s avg
Import
287ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.2.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.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.290s · 21MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.0s · import 0.284s · 22MB
20MB installed
● package 20MB
Code
Verified usage

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

Vyper
✓ from vyper import Vyper
✗ from vyper_config import Vyper
The main class is in the 'vyper' module, not 'vyper_config'.

Initialize Vyper, set config name, add paths, read config, and access values. Use os.environ.get for env vars if needed.

from vyper import Vyper v = Vyper() v.set_config_name("config") v.add_config_path(".") err = v.read_in_config() if err: print(err) else: print(v.get_string("key")) # or built-in config name: v.set_config_name("app") v.add_config_path("/etc/app", ".") err = v.read_in_config() if err: print(err) else: print(v.get("key"))
Debug
Known issues
gotchaAll Vyper methods return a Result type (success/error tuple) or raise exceptions? Actually they return the value directly or None. But the 'read_in_config' returns a tuple (None, error) if an error. Check the docs: it returns (None, error) on failure, (config, None) on success? The Python version might differ.
fix
Always check the return value of read_in_config: err = v.read_in_config() if err: handle error.
affects: >=1.0.0
breakingIn version 1.0.0, the API changed significantly from pre-1.0. Older versions used different method names and import paths. If upgrading from 0.x, review migration guide.
fix
Check the changelog: https://github.com/alexferl/vyper/blob/master/CHANGELOG.md
affects: 0.x -> 1.0.0+
deprecated'set_config_file' is deprecated. Use 'set_config_name' and 'add_config_path' instead.
fix
Replace v.set_config_file('file.yaml') with v.set_config_name('file') and v.add_config_path('.')
affects: >=1.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'vyper'
The package installed is 'vyper-config', but import uses 'vyper'.
fix
pip install vyper-config; then import vyper (not vyper_config).
AttributeError: 'Vyper' object has no attribute 'read_in_config'
Old API used 'read_config' or 'load'. New API uses 'read_in_config'.
fix
Use v.read_in_config() (version >=1.0.0) or check your version.
Upgrade
Version history
1.2.1latest on PyPI · released Oct 4, 2023
Audit
Dependencies
pyyamloptionalYAML support (not optional if using YAML)
tomloptionalTOML support (not optional if using TOML)
hcl2optionalHCL support (not optional if using HCL)
Agent activity
44 hits · last 30 days
node
40
Anthropic
1
OpenAI (training)
1
Resources
vyper-config — pip install vyper-config · libregistry