envyaml
Simple YAML configuration file parser with easy access for structured data
What it is and what it does
EnvYAML is a lightweight YAML configuration parser that substitutes environment variables into your config files at parse time. It reads a YAML file, replaces placeholders like `$VAR_NAME` with values from your environment, and gives you dot-notation access to nested keys—so `env['database.host']` retrieves a deeply nested value without manual traversal. It also supports default values (e.g., `$VAR|default`) and escaping (e.g., `$$` for a literal `$`).
The package is built on top of PyYAML and adds a thin configuration layer. It's useful when you want to keep secrets and deployment-specific values out of version control but still maintain readable, structured config files. Strict mode (on by default) will raise an error if you reference an undefined environment variable, though you can disable it to allow missing vars to become None.
Use it for:
- Load database credentials from environment variables into a YAML config file without hardcoding secrets
- Build multi-environment configs (dev, staging, prod) by varying environment variables at deploy time
- Access nested configuration sections with dot notation instead of nested dict lookups
- Provide fallback defaults for optional environment variables using the pipe syntax
- Parse complex YAML structures (lists, nested objects) while injecting runtime values
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses YAML configuration files with environment variable substitution, allowing you to inject runtime values and access nested config keys with dot notation.
Yes, if you need environment-aware YAML configuration with dot-notation access and don't mind dormant maintenance. The package is stable and has no known vulnerabilities, but expect no active development—bug fixes or new features will not arrive. It's a good fit for small to medium projects with straightforward config needs; larger systems may prefer more actively maintained alternatives.
Install
envyaml on PyPI
pip
pip install envyamluv
uv add envyamlpoetry
poetry add envyamlInstalling envyaml
Before you install
Low install friction; depends only on PyYAML. Maintenance is dormant—last release was 2022-01-08 and no commits since 2024-07-05, so expect no active bug fixes or feature updates.
License in practice
MIT licensed (permissive), so you can use, modify, and distribute freely with minimal restrictions.
Quickstart
pip install envyaml
from envyaml import EnvYAML
env = EnvYAML('env.yaml')
print(env['database.host'])
print(env.get('redis.port', 5040))
Verify before relying
- Whether strict mode (enabled by default) behavior matches your use case for undefined environment variables
- Python 2.7 support claim (listed in classifiers but package is dormant since 2022)
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — PyYAML |
| Maintenance | dormant — 1,679 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,471,667/month — #3,868 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: envyaml-1.10.211231-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
dynamic-yamlAdds dynamic string interpolation to YAML…
permissive · top 15,000 on PyPI
envsubstSubstitutes environment variables in strings…
permissive · top 15,000 on PyPI
yamaleYamale validates YAML files against a schema…
permissive · top 5,000 on PyPI
pyaml-envParses YAML configuration files and resolves…
permissive · top 15,000 on PyPI
pyymlEmbeds Python expressions directly in YAML…
permissive · top 15,000 on PyPI
docker-composeDocker Compose is a command-line tool for…
permissive · top 5,000 on PyPI
pyyaml-env-tagAdds a custom YAML tag that lets you reference…
permissive · top 5,000 on PyPI
bestconfigLoads configuration from multiple file formats…
permissive · top 15,000 on PyPI
yamlcoreAdds YAML 1.2 Core Schema support to PyYAML,…
permissive · top 15,000 on PyPI
mo-dotsProvides null-safe dot-notation access to…
copyleft · top 15,000 on PyPI