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 fileonepm use $SPEC: Use the package manager given by the requirement speconepm update|up: Update the package manager used in the projectonepm cleanup [$NAME]: Clean up installations of specified package manager or allonepm list|ls $NAME: List all installed versions of the given package manager
Metadata
Release files for onepm 24.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| onepm-24.3.tar.gz | 13.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| onepm-24.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.6 kB
Release files / onepm-24.3.tar.gz
| Download URL | onepm-24.3.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c87cb50db2de304de335e14caac28fbd86913b5e1f7de0b1b8b5dcd81b0ef401
|
|
BLAKE2b-256 checksum How to use checksums |
ea34c5ecb02dd5f71599d2e232b814cbed56ebd6dcd4bc576e5d3e58a3000dab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / onepm-24.3-py3-none-any.whl
| Download URL | onepm-24.3-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0615ba64fc821dfed614307c713b1c6cfcdf46a16f1aae9d835f9e898a9e1a8
|
|
BLAKE2b-256 checksum How to use checksums |
0a56553d4b4b6c2ccc0d7faa1584f0b2f0343b093c84403acb4c36c32b7a8b74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for onepm 24.3
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.