Skip to main content

PDM

Support Frost's Python packaging ecosystem

A modern Python package and dependency manager supporting the latest PEP standards. 中文版本说明

PDM logo

Docs Twitter Follow Discord

Github Actions PyPI codecov Packaging status Downloads pdm-managed trackgit-views

asciicast

What is PDM?

PDM is meant to be a next-generation package manager. It was originally built for personal use. If you feel you are going well with Pipenv or Poetry and don't want to introduce another package manager, just stick to it. But if you are missing something that is not present in those tools, you can probably find some goodness in pdm.

Highlights of features

  • Simple and fast dependency resolver, mainly for large binary distributions.
  • A PEP 517 build backend.
  • PEP 621 project metadata.
  • Flexible and powerful plug-in system.
  • Versatile user scripts.
  • Install Pythons using astral-sh's python-build-standalone.
  • Opt-in, centralized installation cache like pnpm.

Comparisons to other alternatives

Pipenv

Pipenv is a dependency manager that combines pip and venv, as the name implies. It can install packages from a non-standard Pipfile.lock or Pipfile. However, Pipenv does not handle any packages related to packaging your code, so it’s useful only for developing non-installable applications (Django sites, for example). If you’re a library developer, you need setuptools anyway.

Poetry

Poetry manages environments and dependencies in a similar way to Pipenv, but it can also build .whl files with your code, and it can upload wheels and source distributions to PyPI. It has a pretty user interface and users can customize it via a plugin. Poetry uses the pyproject.toml standard.

Hatch

Hatch can also manage environments, allowing multiple environments per project. By default it has a central location for all environments but it can be configured to put a project's environment(s) in the project root directory. It can manage packages but without lockfile support. It can also be used to package a project (with PEP 621 compliant pyproject.toml files) and upload it to PyPI.

This project

PDM can manage virtual environments (venvs) in both project and centralized locations, similar to Pipenv. It reads project metadata from a standardized pyproject.toml file and supports lockfiles. Users can add additional functionality through plugins, which can be shared by uploading them as distributions.

Unlike Poetry and Hatch, PDM is not limited to a specific build backend; users have the freedom to choose any build backend they prefer.

Installation

Packaging status

PDM requires python version 3.10 or higher. Alternatively, you can download the standalone binary from the release assets.

Install the standalone binary directly with the installer scripts:

For Linux/Mac

curl -sSL https://pdm-project.org/install.sh | bash

For Windows

powershell -ExecutionPolicy ByPass -c "irm https://pdm-project.org/install.ps1 | iex"

For alternative installation methods (Python script, package managers, etc.), see the installation section in documentation.

Quickstart

Create a new PDM project

pdm new my-project

Answer the prompts, and a PDM project with a pyproject.toml file will be ready to use., and a PDM project with a pyproject.toml file will be ready to use.

Install dependencies

pdm add requests flask

You can add multiple dependencies in the same command. After a while, check the pdm.lock file to see what is locked for each package.

Badges

Tell people you are using PDM in your project by including the markdown code in README.md:

[![pdm-managed](https://img.shields.io/endpoint?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Fpdm-project%2F.github%2Fbadge.json)](https://pdm-project.org)

pdm-managed

PDM Eco-system

Awesome PDM is a curated list of awesome PDM plugins and resources.

Experimental

Enable PEP 582 for a project:

pdm config python.use_venv False

This makes PDM install packages into a local project folder instead of a venv (similar to how npm installs into node_modules).

Enable uv integration:

pdm config use_uv true

uv is a very fast Python package installer written in Rust.

Note: uv does not work with PEP 582.

Sponsors

Credits

This project is strongly inspired by pyflow and poetry.

License

This project is open sourced under MIT license, see the LICENSE file for more details.

Metadata

Release files for pdm 2.29.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdm 2.29.4
File Size Uploaded Provenance Actions
pdm-2.29.4.tar.gz 2.7 MB Without provenance Details for pdm-2.29.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pdm 2.29.4
File Interpreter ABI Platform Actions
pdm-2.29.4-py3-none-any.whl Python 3 none any Details for pdm-2.29.4-py3-none-any.whl

Total release size: 3.0 MB

Release files / pdm-2.29.4.tar.gz

Download URL pdm-2.29.4.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
48d013ba869b85538fea268107cd7a2c18fd91a6abf785fa4d7ed5951808582d
BLAKE2b-256 checksum
How to use checksums
2540ff5951a327e2552840c75114c170f5115214525eff8c4d6afb1b8a009278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.4 CPython/3.11.17 Linux/6.17.0-1022-azure

Release files / pdm-2.29.4-py3-none-any.whl

Download URL pdm-2.29.4-py3-none-any.whl
Size 308.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
599a299d7fb35195d41610ee8341f65c75c5c97dde9f8cfcf573790b3d1b0cd9
BLAKE2b-256 checksum
How to use checksums
0e004ae8c7c64a8f6712d589edb0c6778dfe1dd62dfef37b98e82e62dda8d2ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.4 CPython/3.11.17 Linux/6.17.0-1022-azure

Security for pdm 2.29.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.29.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page