PDM: Python Package and Dependency Manager
PDM is a Python package and dependency manager that implements the modern PEP 517/518 build-system interface and reads PEP 621 project metadata from pyproject.toml.
When to use PDM
Use PDM when you have an existing project built around its workflow and want a standards-compliant package manager with lockfile support and dependency groups. PDM’s strict adherence to the PEP 517/518 build-system interface and PEP 621 project metadata makes it a good fit for teams that prioritize alignment with official Python packaging standards. For new projects, uv provides faster performance and broader functionality; PDM’s standalone build backend, pdm-backend, can still be used in uv projects without adopting the full PDM CLI.
Key Features
- Dependency management with lockfile support
- Virtual environment management
- Build backend for packaging projects
- Plugin system for extensibility
- Centralized installation cache (similar to pnpm)
- Python installation via python-build-standalone
pdm-backend
pdm-backend is PDM’s build backend, distributed as a separate package. It can be used independently of the pdm CLI in any Python project, including uv projects:
uv init --build-backend pdm my-libThis generates a pyproject.toml with pdm-backend as the build backend:
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"pdm-backend supports editable installs, dynamic versioning from SCM tags, and file inclusion/exclusion patterns. It reads standard PEP 621 metadata from pyproject.toml.
See the pdm-backend documentation for configuration options.
Using uv as the installer
PDM has experimental support for using uv as its resolver and installer. Enable it with:
pdm config use_uv truePDM will detect the uv binary on your system and use it for dependency resolution and installation. This is faster than PDM’s default installer, without changing the rest of your PDM workflow. See How to use uv to speed up PDM for a full walkthrough, or the PDM uv documentation for limitations.
Pros
- Modern standards compliance (PEP 517/518 build interface and PEP 621 metadata)
- No need to create/activate virtual environments
- Supports dependency groups
- Fast dependency resolver
- Lockfile support
Cons
- Smaller community and ecosystem than uv or Poetry
- Slower resolution and installation than uv unless uv-mode is enabled