Skip to main content

onepm

Picks the right package manager for you.

Don't make me think about which package manager to use when I clone a project from other people. OnePM will pick the right package manager by searching for the lock files and/or the project settings in pyproject.toml.

This project is created in the same spirit as @antfu/ni.

Supported package managers: pip, pipenv, poetry, pdm, uv

Install onepm

Install with pipx:

pipx install onepm

Or use pdm global install:

pdm add -g onepm

Provided Shortcuts

pi - install

pi

# (venv) pip install . or pip install -r requirements.txt
# pipenv install
# poetry install
# pdm install
pi requests

# (venv) pip install requests
# pipenv install requests
# poetry add requests
# pdm add requests

pu - update

pu

# not available for pip
# pipenv update
# poetry update
# pdm update

pr - run

pr ...args

# (venv) ...args
# pipenv run ...args
# poetry run ...args
# pdm run ...args

pun - uninstall

pun requests

# pip uninstall requests
# pipenv uninstall requests
# poetry remove requests
# pdm remove requests

pa - Alias for the package manager

pa

# pip
# pipenv
# poetry
# pdm

If the package manager agent is pip, OnePM will enforce an activated virtualenv, or a .venv under the current directory.

Shims for Package Managers

OnePM also provides shim for the package managers like corepack, so you don't need to install package managers yourself. To enable it, install OnePM with shims extra:

pipx install --include-deps onepm[shims]

OnePM reads the package-manager field under [tool.onepm] table in pyproject.toml, and install the required package manager with the correct version in an isolated environment.

[tool.onepm]
package-manager = "poetry"

Or you can restrict the version range:

[tool.onepm]
package-manager = "poetry>=1.1.0"

For Python package management, OnePM is all you need.

OnePM Management Commands

  • onepm install: Install the package manager configured in project file
  • onepm use $SPEC: Use the package manager given by the requirement spec
  • onepm update|up: Update the package manager used in the project
  • onepm cleanup [$NAME]: Clean up installations of specified package manager or all
  • onepm list|ls $NAME: List all installed versions of the given package manager

Metadata

Release files for onepm-shims 24.1.1

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

Source distribution (sdist)

Source distribution for onepm-shims 24.1.1
File Size Uploaded Provenance Actions
onepm_shims-24.1.1.tar.gz 6.5 kB Without provenance Details for onepm_shims-24.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for onepm-shims 24.1.1
File Interpreter ABI Platform Actions
onepm_shims-24.1.1-py3-none-any.whl Python 3 none any Details for onepm_shims-24.1.1-py3-none-any.whl

Total release size: 10.3 kB

Release files / onepm_shims-24.1.1.tar.gz

Download URL onepm_shims-24.1.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f1d271dfd1ca06026f900bd1f334b8774362b1d5664bc0b442a7a09023dce1c4
BLAKE2b-256 checksum
How to use checksums
fc29bf1b3946b3b8411d21aa55e139278895ec8e88edd8444990fb93ae915029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / onepm_shims-24.1.1-py3-none-any.whl

Download URL onepm_shims-24.1.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a1b3bee2cfe0ebcbdda0c51c9a3f5ab12ca908dd5ad3848a51707c9a9ffb353
BLAKE2b-256 checksum
How to use checksums
3f9cfb9fcb257ec65bd91d1b49bf69c79b6e38ca6084ec9406b3a3cfc2aa8e06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Security for onepm-shims 24.1.1

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

24.1.1 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