PDM - Python Development Master

2.26.7 · active · verified Thu Apr 09

PDM is a modern Python package and dependency manager that supports the latest PEP standards, including PEP 582 for local package directories. It offers robust dependency resolution, a unified `pyproject.toml` interface, and flexible virtual environment management. Currently at version 2.26.7, PDM maintains an active release cadence with frequent minor updates and bug fixes.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates initializing a PDM project, adding a dependency, and running a command within the isolated project environment. PDM automatically creates and manages virtual environments.

# 1. Initialize a new PDM project
pdm init

# 2. Add a dependency
pdm add requests

# 3. Run a command within the project's environment
pdm run python -c "import requests; print('Requests is installed!')"

# 4. (Optional) Install development dependencies
pdm add pytest --dev

# 5. (Optional) Activate the virtual environment directly
pdm venv activate
# Then run: python -c "import requests; print('Requests is installed!')"
# deactivate # To exit the virtual environment

view raw JSON →