yayaya
„Ja, ja, YAML schon wieder.“ — Every backend dev in Berlin, probably.
yayaya is a tiny helper for Yet Another YAml YArd (look, the letters lined up and we ran with it). It loads one YAML file—or several merged in order—lets you read nested keys with dot notation, and expands ${ENV_VAR} placeholders so secrets can live in the environment where they belong—not committed next to your instruction: prompts.
No framework. No magic beans. Just pyyaml and the sound of your PM saying jajaja when you tell them config is “basically done.”
Install
pip install yayaya
Or point pip at this repo if you live on the edge.
Quick start
from yayaya import init, get, contains
init("/path/to/config.yaml")
title = get("app.title", default="Untitled")
db_url = get("database.url", required=True)
if contains("features.experimental"):
...
Multiple files (layered config)
Pass a list: earlier files are the base, later ones override. Nested dicts are deep-merged; scalars and lists are replaced entirely by the newer file. Expansion runs once on the merged result.
init(["/etc/myapp/defaults.yaml", "/instance/config.yaml", "/instance/local.yaml"])
Useful for defaults + tenant config + secrets-by-path without copy-pasting huge trees.
${ENV_VAR} expansion
After parsing YAML, all strings are walked recursively. Placeholders like ${API_KEY} are replaced with values from os.environ. Missing variables become empty strings.
# config.yaml
service:
api_key: "${API_KEY}"
port: 8080
import os
from yayaya import init, get
os.environ["API_KEY"] = "secret"
init("config.yaml")
assert get("service.api_key") == "secret"
assert get("service.port") == 8080
You can also run expansion yourself (e.g. on a dict you built elsewhere):
from yayaya import expand_env_placeholders
data = expand_env_placeholders({"x": "${HOME}"}, environ=os.environ)
API
| Function | Purpose |
|---|---|
init(path) |
Load one YAML file, or init([p1, p2, ...]) to merge left → right. |
get(key, default=None, required=False) |
Dot-path lookup ("db.pool.size"). |
contains(key) |
Whether the path exists. |
reload_config() |
Re-read the same path(s) in the same order. |
override_config_path(path) |
Same as init (one path or a list). |
config_paths() |
Absolute paths last passed to init / override_config_path. |
deep_merge(a, b) |
Deep-merge two dict-like trees (lists replaced, not spliced). |
expand_env_placeholders(value, environ=None) |
Recursive ${VAR} substitution. |
Exceptions (all subclass ConfigError): ConfigNotLoadedError, ConfigFileNotFoundError, ConfigKeyNotFoundError.
Development
pip install -e ".[dev]"
python -m unittest discover -s tests -v
License
Whatever the repo owner says—ask Karel if you’re unsure.
If YAML were a conversation, yayaya is the part where you nod three times and actually read the file.
Metadata
Release files for yayaya 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yayaya-0.3.0.tar.gz | 7.9 kB | With provenance | Details for yayaya-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yayaya-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for yayaya-0.3.0-py3-none-any.whl |
Total release size: 13.2 kB
Release files / yayaya-0.3.0.tar.gz
| Download URL | yayaya-0.3.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d1cde665bdc954a6027cc5abd217ebbeabb8cbdc59eb267f25afee76ad4d185
|
|
BLAKE2b-256 checksum How to use checksums |
eb5a638f705fcef5baf04ae8a1283c4248d7f3e27ba5012aad1434e440ddb04e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logRelease files / yayaya-0.3.0-py3-none-any.whl
| Download URL | yayaya-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d626648e23b962a4f8596e2b71cc29398021e4832fd70bca6e44fe438b0ca776
|
|
BLAKE2b-256 checksum How to use checksums |
2536174b5298ca9230657e842fb9e04ad83a123d37b025fb339468ce1e39b83b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logSecurity for yayaya 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for yayaya-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.