PDM vs Poetry for CI: Which Python Package Manager?
Both are modern pyproject.toml package managers with lockfiles; PDM leans hardest into PEP standards and flexible install layouts, Poetry into a polished all-in-one flow.
PDM is a fast, standards-driven Python package manager supporting both virtualenv and __pypackages__ layouts, with a pdm.lock lockfile. Poetry is a popular all-in-one manager built around poetry.lock, virtualenvs, and packaging.
| PDM | Poetry | |
|---|---|---|
| Lockfile | pdm.lock | poetry.lock |
| Install layout | Virtualenv or __pypackages__ | Virtualenv |
| Standards focus | High (PEP-driven) | Good, some own schema |
| Resolver | Fast | Reliable |
| Maturity / popularity | Growing | Large, established |
In CI
Both give deterministic installs from a lockfile, which is what CI needs. PDM is fast and standards-first, with a flexible layout that can skip a separate virtualenv step. Poetry is more widely adopted with the deepest documentation and tutorials. Performance is close for typical repos; the choice often comes down to standards preference and existing team familiarity.
Cache it
Cache the dependency cache keyed on pdm.lock or poetry.lock and install from the lock for reproducibility. Installs run on CI runners; faster managed runners help most when cold installs dominate the job.
The verdict
Want a fast, standards-first manager with flexible install layouts: PDM. Want the established, well-documented all-in-one: Poetry. Both lock dependencies - commit the lockfile and install from it on either.