pycomposefile
Structured deserialization of Docker Compose files.
What it is and what it does
Pycomposefile is a Python library for reading and deserializing Docker Compose files into structured data. It takes a compose YAML file and converts it into Python objects you can inspect and manipulate programmatically, rather than parsing raw YAML yourself. The package depends only on pyyaml and requires Python 3.9 or later.
The library is intended for tools or scripts that need to inspect or process compose configurations without running Docker itself. It sits in the top 5000 PyPI packages by download volume, suggesting real-world use, but maintenance appears to have slowed—the last release was over a year ago despite recent repository activity.
Use it for:
- Inspect Docker Compose configurations programmatically in CI/CD pipelines or deployment tools.
- Validate or transform compose files before deployment without executing Docker commands.
- Build tooling that reads service definitions, environment variables, or volume mappings from compose files.
- Generate documentation or reports from compose file structure and configuration.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and deserializes Docker Compose files into structured Python objects, enabling programmatic access to compose configuration.
Yes, if you need to parse Docker Compose files in Python and don't require active maintenance. The permissive MIT license and low install friction make it straightforward to adopt. However, the aging maintenance status (no release in 381 days) means you should verify the package handles your compose file version and be prepared to fork or patch if bugs arise.
Install
pycomposefile on PyPI
pip
pip install pycomposefileuv
uv add pycomposefilepoetry
poetry add pycomposefileInstalling pycomposefile
Before you install
Low install friction with a single dependency (pyyaml). Maintenance is aging—last commit was 2025-08-13 but the package hasn't seen a release in 381 days, suggesting the project may not be actively developed despite the repository remaining open.
License in practice
MIT license permits use in proprietary and open-source projects with minimal restrictions, requiring only attribution.
Quickstart
pip install pycomposefile
import pycomposefile
compose_data = pycomposefile.parse('docker-compose.yml')
Requires Python 3.9 or later.
Verify before relying
- Whether the package handles all Docker Compose file versions and schema variations.
- API stability and whether breaking changes are expected in future releases.
- Whether the package is maintained or in maintenance-only mode despite the archived flag being false.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pyyaml |
| Maintenance | aging — 381 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,344,811/month — #1,925 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pycomposefile-0.0.34-py3-none-any.whl
Keywords: docker, compose
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
docker-composeDocker Compose is a command-line tool for…
permissive · top 5,000 on PyPI
podman-composePodman Compose runs Docker Compose…
copyleft · top 15,000 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
yamlableConverts Python objects to YAML and back using…
permissive · top 15,000 on PyPI
poyoParses a restricted subset of YAML into Python…
permissive · top 15,000 on PyPI
py-serializableSerializes and deserializes Python classes to…
permissive · top 1,000 on PyPI
pytest-dockerpytest-docker provides pytest fixtures that…
permissive · top 5,000 on PyPI
ovos-configProvides Python and command-line access to…
permissive · top 15,000 on PyPI
rosdistroParses and manipulates ROS distribution…
permissive · top 15,000 on PyPI
python-evtxParses Windows Event Log files (.evtx) into…
permissive · top 15,000 on PyPI