pdm


Namepdm JSON
Version 2.15.1 PyPI version JSON
download
home_pageNone
SummaryA modern Python package and dependency manager supporting the latest PEP standards
upload_time2024-04-25 01:56:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords packaging dependency workflow
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# PDM

A modern Python package and dependency manager supporting the latest PEP standards.
[中文版本说明](README_zh.md)

![PDM logo](https://raw.githubusercontent.com/pdm-project/pdm/main/docs/assets/logo_big.png)

[![Docs](https://img.shields.io/badge/Docs-mkdocs-blue?style=for-the-badge)](https://pdm-project.org)
[![Twitter Follow](https://img.shields.io/twitter/follow/pdm_project?label=get%20updates&logo=twitter&style=for-the-badge)](https://twitter.com/pdm_project)
[![Discord](https://img.shields.io/discord/824472774965329931?label=discord&logo=discord&style=for-the-badge)](https://discord.gg/Phn8smztpv)

![Github Actions](https://github.com/pdm-project/pdm/workflows/Tests/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/pdm?logo=python&logoColor=%23cccccc)](https://pypi.org/project/pdm)
[![codecov](https://codecov.io/gh/pdm-project/pdm/branch/main/graph/badge.svg?token=erZTquL5n0)](https://codecov.io/gh/pdm-project/pdm)
[![Packaging status](https://repology.org/badge/tiny-repos/pdm.svg)](https://repology.org/project/pdm/versions)
[![Downloads](https://pepy.tech/badge/pdm/week)](https://pepy.tech/project/pdm)
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)
<a href="https://trackgit.com">
<img src="https://us-central1-trackgit-analytics.cloudfunctions.net/token/ping/l4eztudjnh9bfay668fl" alt="trackgit-views" />
</a>

[![asciicast](https://asciinema.org/a/jnifN30pjfXbO9We2KqOdXEhB.svg)](https://asciinema.org/a/jnifN30pjfXbO9We2KqOdXEhB)

</div>

## What is PDM?

PDM is meant to be a next generation Python package management tool.
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 [indygreg's python-build-standalone](https://github.com/indygreg/python-build-standalone).
- Opt-in centralized installation cache like [pnpm](https://pnpm.io/motivation#saving-disk-space-and-boosting-installation-speed).

[pep 517]: https://www.python.org/dev/peps/pep-0517
[pep 621]: https://www.python.org/dev/peps/pep-0621
[pnpm]: https://pnpm.io/motivation#saving-disk-space-and-boosting-installation-speed

## Comparisons to other alternatives

### [Pipenv](https://pipenv.pypa.io)

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](https://python-poetry.org)

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,
but it does not follow the standard specifying how metadata should be represented in a pyproject.toml file ([PEP 621]),
instead using a custom `[tool.poetry]` table. This is partly because Poetry came out before PEP 621.

### [Hatch](https://hatch.pypa.io)

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

PDM requires python version 3.8 or higher.

### Via Install Script

Like Pip, PDM provides an installation script that will install PDM into an isolated environment.

**For Linux/Mac**

```bash
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
```

**For Windows**

```powershell
(Invoke-WebRequest -Uri https://pdm-project.org/install-pdm.py -UseBasicParsing).Content | py -
```

For security reasons, you should verify the checksum of `install-pdm.py`.
It can be downloaded from [install-pdm.py.sha256](https://pdm-project.org/install-pdm.py.sha256).

The installer will install PDM into the user site and the location depends on the system:

- `$HOME/.local/bin` for Linux
- `$HOME/Library/Python/<version>/bin` for MacOS
- `%APPDATA%\Python\Scripts` on Windows

You can pass additional options to the script to control how PDM is installed:

```
usage: install-pdm.py [-h] [-v VERSION] [--prerelease] [--remove] [-p PATH] [-d DEP]

optional arguments:
  -h, --help            show this help message and exit
  -v VERSION, --version VERSION | envvar: PDM_VERSION
                        Specify the version to be installed, or HEAD to install from the main branch
  --prerelease | envvar: PDM_PRERELEASE    Allow prereleases to be installed
  --remove | envvar: PDM_REMOVE            Remove the PDM installation
  -p PATH, --path PATH | envvar: PDM_HOME  Specify the location to install PDM
  -d DEP, --dep DEP | envvar: PDM_DEPS     Specify additional dependencies, can be given multiple times
```

You can either pass the options after the script or set the env var value.

### Alternative Installation Methods

If you are on macOS and using `homebrew`, install it by:

```bash
brew install pdm
```

If you are on Windows and using [Scoop](https://scoop.sh/), install it by:

```
scoop bucket add frostming https://github.com/frostming/scoop-frostming.git
scoop install pdm
```

Otherwise, it is recommended to install `pdm` in an isolated environment with `pipx`:

```bash
pipx install pdm
```

Or you can install it under a user site:

```bash
pip install --user pdm
```

With [asdf-vm](https://asdf-vm.com/)

```bash
asdf plugin add pdm
asdf install pdm latest
```

## Quickstart

**Initialize a new PDM project**

```bash
pdm init
```

Answer the questions following the guide, and a PDM project with a `pyproject.toml` file will be ready to use.

**Install dependencies**

```bash
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:

```markdown
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)
```

[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)


## Packaging Status

[![Packaging status](https://repology.org/badge/vertical-allrepos/pdm.svg)](https://repology.org/project/pdm/versions)

## PDM Eco-system

[Awesome PDM](https://github.com/pdm-project/awesome-pdm) is a curated list of awesome PDM plugins and resources.

## Sponsors

<p align="center">
    <a href="https://cdn.jsdelivr.net/gh/pdm-project/sponsors/sponsors.svg">
        <img src="https://cdn.jsdelivr.net/gh/pdm-project/sponsors/sponsors.svg"/>
    </a>
</p>

## Credits

This project is strongly inspired by [pyflow] and [poetry].

[pyflow]: https://github.com/David-OConnor/pyflow
[poetry]: https://github.com/python-poetry/poetry

## License

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pdm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "packaging, dependency, workflow",
    "author": null,
    "author_email": "Frost Ming <mianghong@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ff/55/baf970b59fea776bd6e6257c521e36b2d3c3d11a76cd050720a60f50344b/pdm-2.15.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# PDM\n\nA modern Python package and dependency manager supporting the latest PEP standards.\n[\u4e2d\u6587\u7248\u672c\u8bf4\u660e](README_zh.md)\n\n![PDM logo](https://raw.githubusercontent.com/pdm-project/pdm/main/docs/assets/logo_big.png)\n\n[![Docs](https://img.shields.io/badge/Docs-mkdocs-blue?style=for-the-badge)](https://pdm-project.org)\n[![Twitter Follow](https://img.shields.io/twitter/follow/pdm_project?label=get%20updates&logo=twitter&style=for-the-badge)](https://twitter.com/pdm_project)\n[![Discord](https://img.shields.io/discord/824472774965329931?label=discord&logo=discord&style=for-the-badge)](https://discord.gg/Phn8smztpv)\n\n![Github Actions](https://github.com/pdm-project/pdm/workflows/Tests/badge.svg)\n[![PyPI](https://img.shields.io/pypi/v/pdm?logo=python&logoColor=%23cccccc)](https://pypi.org/project/pdm)\n[![codecov](https://codecov.io/gh/pdm-project/pdm/branch/main/graph/badge.svg?token=erZTquL5n0)](https://codecov.io/gh/pdm-project/pdm)\n[![Packaging status](https://repology.org/badge/tiny-repos/pdm.svg)](https://repology.org/project/pdm/versions)\n[![Downloads](https://pepy.tech/badge/pdm/week)](https://pepy.tech/project/pdm)\n[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)\n<a href=\"https://trackgit.com\">\n<img src=\"https://us-central1-trackgit-analytics.cloudfunctions.net/token/ping/l4eztudjnh9bfay668fl\" alt=\"trackgit-views\" />\n</a>\n\n[![asciicast](https://asciinema.org/a/jnifN30pjfXbO9We2KqOdXEhB.svg)](https://asciinema.org/a/jnifN30pjfXbO9We2KqOdXEhB)\n\n</div>\n\n## What is PDM?\n\nPDM is meant to be a next generation Python package management tool.\nIt was originally built for personal use. If you feel you are going well\nwith `Pipenv` or `Poetry` and don't want to introduce another package manager,\njust stick to it. But if you are missing something that is not present in those tools,\nyou can probably find some goodness in `pdm`.\n\n## Highlights of features\n\n- Simple and fast dependency resolver, mainly for large binary distributions.\n- A [PEP 517] build backend.\n- [PEP 621] project metadata.\n- Flexible and powerful plug-in system.\n- Versatile user scripts.\n- Install Pythons using [indygreg's python-build-standalone](https://github.com/indygreg/python-build-standalone).\n- Opt-in centralized installation cache like [pnpm](https://pnpm.io/motivation#saving-disk-space-and-boosting-installation-speed).\n\n[pep 517]: https://www.python.org/dev/peps/pep-0517\n[pep 621]: https://www.python.org/dev/peps/pep-0621\n[pnpm]: https://pnpm.io/motivation#saving-disk-space-and-boosting-installation-speed\n\n## Comparisons to other alternatives\n\n### [Pipenv](https://pipenv.pypa.io)\n\nPipenv is a dependency manager that combines `pip` and `venv`, as the name implies.\nIt can install packages from a non-standard `Pipfile.lock` or `Pipfile`.\nHowever, Pipenv does not handle any packages related to packaging your code,\nso it\u2019s useful only for developing non-installable applications (Django sites, for example).\nIf you\u2019re a library developer, you need `setuptools` anyway.\n\n### [Poetry](https://python-poetry.org)\n\nPoetry manages environments and dependencies in a similar way to Pipenv,\nbut it can also build .whl files with your code, and it can upload wheels and source distributions to PyPI.\nIt has a pretty user interface and users can customize it via a plugin. Poetry uses the `pyproject.toml` standard,\nbut it does not follow the standard specifying how metadata should be represented in a pyproject.toml file ([PEP 621]),\ninstead using a custom `[tool.poetry]` table. This is partly because Poetry came out before PEP 621.\n\n### [Hatch](https://hatch.pypa.io)\n\nHatch 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.\n\n### This project\n\nPDM 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.\n\nUnlike Poetry and Hatch, PDM is not limited to a specific build backend; users have the freedom to choose any build backend they prefer.\n\n## Installation\n\nPDM requires python version 3.8 or higher.\n\n### Via Install Script\n\nLike Pip, PDM provides an installation script that will install PDM into an isolated environment.\n\n**For Linux/Mac**\n\n```bash\ncurl -sSL https://pdm-project.org/install-pdm.py | python3 -\n```\n\n**For Windows**\n\n```powershell\n(Invoke-WebRequest -Uri https://pdm-project.org/install-pdm.py -UseBasicParsing).Content | py -\n```\n\nFor security reasons, you should verify the checksum of `install-pdm.py`.\nIt can be downloaded from [install-pdm.py.sha256](https://pdm-project.org/install-pdm.py.sha256).\n\nThe installer will install PDM into the user site and the location depends on the system:\n\n- `$HOME/.local/bin` for Linux\n- `$HOME/Library/Python/<version>/bin` for MacOS\n- `%APPDATA%\\Python\\Scripts` on Windows\n\nYou can pass additional options to the script to control how PDM is installed:\n\n```\nusage: install-pdm.py [-h] [-v VERSION] [--prerelease] [--remove] [-p PATH] [-d DEP]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -v VERSION, --version VERSION | envvar: PDM_VERSION\n                        Specify the version to be installed, or HEAD to install from the main branch\n  --prerelease | envvar: PDM_PRERELEASE    Allow prereleases to be installed\n  --remove | envvar: PDM_REMOVE            Remove the PDM installation\n  -p PATH, --path PATH | envvar: PDM_HOME  Specify the location to install PDM\n  -d DEP, --dep DEP | envvar: PDM_DEPS     Specify additional dependencies, can be given multiple times\n```\n\nYou can either pass the options after the script or set the env var value.\n\n### Alternative Installation Methods\n\nIf you are on macOS and using `homebrew`, install it by:\n\n```bash\nbrew install pdm\n```\n\nIf you are on Windows and using [Scoop](https://scoop.sh/), install it by:\n\n```\nscoop bucket add frostming https://github.com/frostming/scoop-frostming.git\nscoop install pdm\n```\n\nOtherwise, it is recommended to install `pdm` in an isolated environment with `pipx`:\n\n```bash\npipx install pdm\n```\n\nOr you can install it under a user site:\n\n```bash\npip install --user pdm\n```\n\nWith [asdf-vm](https://asdf-vm.com/)\n\n```bash\nasdf plugin add pdm\nasdf install pdm latest\n```\n\n## Quickstart\n\n**Initialize a new PDM project**\n\n```bash\npdm init\n```\n\nAnswer the questions following the guide, and a PDM project with a `pyproject.toml` file will be ready to use.\n\n**Install dependencies**\n\n```bash\npdm add requests flask\n```\n\nYou can add multiple dependencies in the same command. After a while, check the `pdm.lock` file to see what is locked for each package.\n\n## Badges\n\nTell people you are using PDM in your project by including the markdown code in README.md:\n\n```markdown\n[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)\n```\n\n[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm-project.org)\n\n\n## Packaging Status\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/pdm.svg)](https://repology.org/project/pdm/versions)\n\n## PDM Eco-system\n\n[Awesome PDM](https://github.com/pdm-project/awesome-pdm) is a curated list of awesome PDM plugins and resources.\n\n## Sponsors\n\n<p align=\"center\">\n    <a href=\"https://cdn.jsdelivr.net/gh/pdm-project/sponsors/sponsors.svg\">\n        <img src=\"https://cdn.jsdelivr.net/gh/pdm-project/sponsors/sponsors.svg\"/>\n    </a>\n</p>\n\n## Credits\n\nThis project is strongly inspired by [pyflow] and [poetry].\n\n[pyflow]: https://github.com/David-OConnor/pyflow\n[poetry]: https://github.com/python-poetry/poetry\n\n## License\n\nThis project is open sourced under MIT license, see the [LICENSE](LICENSE) file for more details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A modern Python package and dependency manager supporting the latest PEP standards",
    "version": "2.15.1",
    "project_urls": {
        "Changelog": "https://pdm-project.org/latest/dev/changelog/",
        "Documentation": "https://pdm-project.org",
        "Homepage": "https://pdm-project.org",
        "Repository": "https://github.com/pdm-project/pdm"
    },
    "split_keywords": [
        "packaging",
        " dependency",
        " workflow"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df8a57c34148b0a72596febfa8d0743cea8eb80b0972cfae025ed49f2aa0d876",
                "md5": "8a8428f0799ed7dcc7b27cea51f2e0b4",
                "sha256": "4a6cb2061796ac03760b2d3a546c3b9029ba6fa37e494fc0c9503b26e3fa93a5"
            },
            "downloads": -1,
            "filename": "pdm-2.15.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a8428f0799ed7dcc7b27cea51f2e0b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 257139,
            "upload_time": "2024-04-25T01:56:12",
            "upload_time_iso_8601": "2024-04-25T01:56:12.558335Z",
            "url": "https://files.pythonhosted.org/packages/df/8a/57c34148b0a72596febfa8d0743cea8eb80b0972cfae025ed49f2aa0d876/pdm-2.15.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff55baf970b59fea776bd6e6257c521e36b2d3c3d11a76cd050720a60f50344b",
                "md5": "190ac7f08502b3a2ea1170a7c9a0de1a",
                "sha256": "1c9cd049c1016633a23ef92ec1fc782da8ae0743142ef33faf7d48872f874b39"
            },
            "downloads": -1,
            "filename": "pdm-2.15.1.tar.gz",
            "has_sig": false,
            "md5_digest": "190ac7f08502b3a2ea1170a7c9a0de1a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 2612654,
            "upload_time": "2024-04-25T01:56:15",
            "upload_time_iso_8601": "2024-04-25T01:56:15.586244Z",
            "url": "https://files.pythonhosted.org/packages/ff/55/baf970b59fea776bd6e6257c521e36b2d3c3d11a76cd050720a60f50344b/pdm-2.15.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-25 01:56:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pdm-project",
    "github_project": "pdm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pdm"
}
        
Elapsed time: 0.24874s