{"id":24817,"library":"vyper-config","title":"Vyper-config","description":"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.","status":"active","version":"1.2.1","language":"python","source_language":"en","source_url":"https://github.com/alexferl/vyper","tags":["configuration","yaml","json","toml","env","viper"],"install":[{"cmd":"pip install vyper-config","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"YAML support (not optional if using YAML)","package":"pyyaml","optional":true},{"reason":"TOML support (not optional if using TOML)","package":"toml","optional":true},{"reason":"HCL support (not optional if using HCL)","package":"hcl2","optional":true}],"imports":[{"note":"The main class is in the 'vyper' module, not 'vyper_config'.","wrong":"from vyper_config import Vyper","symbol":"Vyper","correct":"from vyper import Vyper"}],"quickstart":{"code":"from vyper import Vyper\n\nv = Vyper()\nv.set_config_name(\"config\")\nv.add_config_path(\".\")\nerr = v.read_in_config()\nif err:\n    print(err)\nelse:\n    print(v.get_string(\"key\"))\n# or built-in config name:\nv.set_config_name(\"app\")\nv.add_config_path(\"/etc/app\", \".\")\nerr = v.read_in_config()\nif err:\n    print(err)\nelse:\n    print(v.get(\"key\"))","lang":"python","description":"Initialize Vyper, set config name, add paths, read config, and access values. Use os.environ.get for env vars if needed."},"warnings":[{"fix":"Always check the return value of read_in_config: err = v.read_in_config() if err: handle error.","message":"All 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.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check the changelog: https://github.com/alexferl/vyper/blob/master/CHANGELOG.md","message":"In 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.","severity":"breaking","affected_versions":"0.x -> 1.0.0+"},{"fix":"Replace v.set_config_file('file.yaml') with v.set_config_name('file') and v.add_config_path('.')","message":"'set_config_file' is deprecated. Use 'set_config_name' and 'add_config_path' instead.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install vyper-config; then import vyper (not vyper_config).","cause":"The package installed is 'vyper-config', but import uses 'vyper'.","error":"ModuleNotFoundError: No module named 'vyper'"},{"fix":"Use v.read_in_config() (version >=1.0.0) or check your version.","cause":"Old API used 'read_config' or 'load'. New API uses 'read_in_config'.","error":"AttributeError: 'Vyper' object has no attribute 'read_in_config'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}