pyyaml-include
An extending constructor of PyYAML: include other YAML files into current YAML document
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you need to split YAML configuration across files and want a lightweight, actively maintained solution. The low install friction and broad Python support make it straightforward to adopt. However, the GPLv3+ copyleft license restricts use in proprietary closed-source projects—verify license compatibility before committing. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires PyYAML; for remote file access (HTTP, S3, SFTP), additional fsspec extras must be installed (e.g., fsspec[http], fsspec[s3]).
- Low friction: pure Python wheel with three straightforward dependencies (PyYAML, fsspec, typing-extensions).
- Active maintenance with recent commits; repository shows ongoing development.
License · maintenance · safety
GPLv3+ (copyleft) — GPLv3+ copyleft license: you must license any derivative work under GPLv3 or later if you distribute it. Acceptable for internal use and open-source projects compatible with GPL, but restrictive for proprietary software.
last release 2024-11-09 (643 days) · last repo commit 2026-04-12 · 93 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,327,704 downloads/mo, #2,118 on PyPI
Alternatives
Verify before relying
pip install pyyaml-include
# In your Python code, register a constructor and load YAML
with open('config.yml') as f:
data = yaml.full_load(f)- Performance characteristics when including many large files or using wildcards on large directory trees.
- Memory consumption patterns with deeply nested or recursive includes.
- Compatibility with all fsspec backends beyond HTTP, S3, and SFTP.
What it is and what it does
pyyaml-include is an extension to PyYAML that lets you split YAML configuration across multiple files and include them into a single document at parse time. Instead of managing one monolithic YAML file, you register a custom constructor that tells PyYAML to load and merge external files wherever you place the include tag. It works with local files, shell-style wildcards (*, ?, **), and remote sources like HTTP, S3, and SFTP via fsspec.
The package is useful for large configuration systems where you want to organize settings by component or environment. You can include files in mappings (as key-value pairs) or sequences (as list items), and the included YAML is parsed and merged into the document tree. Version 2.0 introduced fsspec support, making it possible to include files from cloud storage or web servers without manual downloads.
Use it for
- Organize application configuration across multiple YAML files by feature or environment, then include them all in a main config file.
- Load configuration fragments from a remote HTTP server or S3 bucket at runtime without manual downloads.
- Use wildcards to automatically include all YAML files matching a pattern from a directory.
- Build layered configuration systems where base settings are in one file and environment-specific overrides are included conditionally.
- Modularize Kubernetes manifests or Docker Compose definitions by splitting them into separate files and including them in a root manifest.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you need to split YAML configuration across files and want a lightweight, actively maintained solution. The low install friction and broad Python support make it straightforward to adopt. However, the GPLv3+ copyleft license restricts use in proprietary closed-source projects—verify license compatibility before committing. No known security vulnerabilities.
Install
pyyaml-include on PyPI
Before you install
Low friction: pure Python wheel with three straightforward dependencies (PyYAML, fsspec, typing-extensions). Active maintenance with recent commits; repository shows ongoing development. Supports Python 3.8 through 3.13.
Requires PyYAML; for remote file access (HTTP, S3, SFTP), additional fsspec extras must be installed (e.g., fsspec[http], fsspec[s3]).
License in practice
GPLv3+ copyleft license: you must license any derivative work under GPLv3 or later if you distribute it. Acceptable for internal use and open-source projects compatible with GPL, but restrictive for proprietary software.
Quickstart
pip install pyyaml-include
# In your Python code, register a constructor and load YAML
with open('config.yml') as f:
data = yaml.full_load(f)
Verify before relying
- Performance characteristics when including many large files or using wildcards on large directory trees.
- Memory consumption patterns with deeply nested or recursive includes.
- Compatibility with all fsspec backends beyond HTTP, S3, and SFTP.
Package facts
| License | GPLv3+ copyleft |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesPyYAMLfsspectyping-extensions |
| Maintenance | Actively maintained 643 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,327,704 / month, #2,118 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup |
Evidence: pyyaml_include-2.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “yaml file inclusion”
- pyyaml-includeExtends PyYAML to include other YAML files into a current YAML…
- draccusDraccus parses command-line arguments and configuration files into…
- mdx-includeA Markdown extension that embeds local or remote files into Markdown…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also aspy.yaml · HyperPyYAML · yamlcore · PyYAML-ft · yamlloader · types-PyYAML · pyyml · HiYaPyCo · pyyaml-env-tag