skillfed

pycomposefile

Structured deserialization of Docker Compose files.

pycomposefile v0.0.34 6.3M downloads/30d#1,925 on PyPI6
Permissive license MIT AGING released

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 pycomposefile

uv

uv add pycomposefile

poetry

poetry add pycomposefile

Installing 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

docker compose file parserparse docker-compose yamldocker compose deserializationcompose file structuredocker compose configuration reader
dockerconfiguration-parsing

More Build Tools packages