explaingit

pdm-project/pdm

8,619PythonAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

Command-line tool for managing Python project dependencies using the standard pyproject.toml file, like Poetry but letting you choose any build backend and optionally using a fast Rust installer.

Mindmap

mindmap
  root((pdm))
    What it does
      Dependency management
      Lock file creation
      Virtual environments
    Key features
      pyproject.toml based
      Any build backend
      uv integration
    Compared to
      Pipenv
      Poetry
    Audience
      Python developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Start a new Python project with one command that sets up pyproject.toml, a virtual environment, and a lock file.

USE CASE 2

Switch a team project from pip and requirements.txt to PDM so every developer gets the exact same package versions.

USE CASE 3

Add new dependencies with a single command and have PDM resolve version conflicts and update the lock file.

USE CASE 4

Speed up package installs on a slow CI pipeline by enabling the optional uv Rust-based installer.

Tech stack

PythonRust

Getting it running

Difficulty · easy Time to first run · 5min
MIT license, use freely for any purpose including commercial projects, keeping the copyright notice.

In plain English

PDM is a command-line tool for managing Python projects and their dependencies. When you build a Python project, you typically need a way to install the libraries your code depends on, keep track of exactly which versions are installed, and share that information with others working on the same code. PDM handles all of that. At its core, PDM reads and writes a file called pyproject.toml, which has become the standard place for Python project configuration. It also creates a lock file that records the precise version of every installed package, so that anyone else who sets up the project gets the same environment. You can add a new dependency with a single command like pdm add requests flask, and PDM resolves which versions work together and updates both files. The README positions PDM alongside two other popular tools, Pipenv and Poetry. Pipenv manages environments but cannot build packages for distribution. Poetry can build and publish packages but locks users into its own build backend. PDM aims to cover the same ground as Poetry while letting developers choose any build backend they prefer, rather than imposing one. PDM can manage virtual environments the way Pipenv does, keeping them inside the project folder or in a central location. It also supports an experimental mode based on a Python standards proposal (PEP 582) where packages are installed directly into a local project folder rather than a virtual environment, similar to how JavaScript projects install packages into a node_modules folder. An optional integration with a fast Rust-based package installer called uv is available for faster installs. Installation is done through a one-line script for Linux, Mac, or Windows, or via a standalone binary download. PDM requires Python 3.9 or higher. It is open source under the MIT license.

Copy-paste prompts

Prompt 1
I have a Python project with pip and requirements.txt, walk me through migrating it to PDM with a pyproject.toml and lock file.
Prompt 2
Show me the PDM commands to create a new project, add Flask and SQLAlchemy, and generate a lock file.
Prompt 3
How do I configure PDM to use uv as the installer for faster package resolution on my machine?
Prompt 4
I need to publish my Python package to PyPI using PDM, what build backend should I choose and what commands do I run?
Open on GitHub → Explain another repo

← pdm-project on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.