skillfed

envyaml

Simple YAML configuration file parser with easy access for structured data

envyaml v1.10.211231 1.5M downloads/30d#3,868 on PyPI78
Permissive license MIT DORMANT released

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 envyaml

uv

uv add envyaml

poetry

poetry add envyaml

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

yaml config with environment variablesconfiguration file parserenv variable substitution yamlnested config accessyaml environment interpolationdotted key config accessstructured yaml parsing
configuration-managementenvironment-variablesyaml-parsing

More Python Modules packages