PDM: Python Package and Dependency Manager
A Python package and dependency manager. PDM implements modern Python packaging standards like PEP 517/518 and uses PEP 621 metadata in pyproject.toml.
Key Features
- PEP 582 local package directory support (experimental)
- Dependency management with lockfile support
- Virtual environment management
- Build backend for packaging projects
- Plugin system for extensibility
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/621)
- No need to create/activate virtual environments
- Supports dependency groups
- Fast dependency resolver
- Lockfile support
Cons
- Limited adoption compared to other tools
- Less mature than alternatives
- PEP 582 support is experimental
- No integrated Python version management
- No automated package publishing workflow
Learn More
Also Mentioned In
- How do uv and Poetry compare?
- How Python tools adopt uv under the hood
- How to use uv to speed up PDM
- How to write self-contained Python scripts using PEP 723 inline metadata
- pyproject.toml: Python Project Configuration File
- Twine: Python Package Upload Tool
- Understanding uv init Project Types
- What is a build frontend?
- What is a lockfile?
- What is PEP 517/518 compatibility?
- What is PEP 660?
- What is PEP 751?
- What is PyPA (Python Packaging Authority)?
- Which Python package manager should I use?
- Why are there so many Python packaging tools?
- Why Should I Choose pyproject.toml over requirements.txt for managing dependencies?
Get Python tooling updates
Subscribe to the newsletter