pypi-manage
Manage your Pypi warehouse account from console or using a awesome Python API. For example use the command line to create an upload token for an app:
$ pypi-manage tokens create "Token name" my-project
Use this command with other programs. For example you can use it together with Travis:
$ travis encrypt $(pypi-manage tokens create "Token name" my-project)
Create a token from Python:
from pypi_admin.session import PypiSession, get_pypirc_login
from pypi_admin.manage import PypiClient
from pypi_admin.exceptions import PypiTwoFactorRequired
session = PypiSession(*get_pypirc_login()) # get username/password from pypirc
# Optional: use session.restore_session() instead session.login()
try:
session.login()
except PypiTwoFactorRequired:
session.two_factor(input('Insert TOTP: '))
# Optional: use session.save_session()
manage = PypiClient(session)
token = manage.tokens.create('Token name', 'my-project')
print(f'{token.token_id}: {token.token}')
To install pypi-manage, run this command in your terminal:
$ python -m pip -U install pypi-manage
This is the preferred method to install pypi-manage, as it will always install the most recent stable release.
Current features
List, create or delete tokens. Get help using pypi-manage tokens --help.
List project collaborators. Use pypi-manage collaborators <project name> all.
List project history (events). Use pypi-manage events <project name> all.
List project releases. Use pypi-manage releases <project name> all.
List projects. Use pypi-manage projects.
Metadata
Release files for pypi-admin 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypi-admin-0.1.0.tar.gz | 20.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypi_admin-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 32.8 kB
Release files / pypi-admin-0.1.0.tar.gz
| Download URL | pypi-admin-0.1.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc7ca781ecc61e01f15f8e61c4fcdf68faa45b791704831fa46c6966ad549c17
|
|
BLAKE2b-256 checksum How to use checksums |
c56a0bbca6968ef0b3daf525cb42e33a3f2d573d897891679dc19e98f26aef43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.8
|
Release files / pypi_admin-0.1.0-py2.py3-none-any.whl
| Download URL | pypi_admin-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dacc5ded0e5cc1b8a43d58699cf2a0dc521e633deb1dc214c0d66a7a6735d6c0
|
|
BLAKE2b-256 checksum How to use checksums |
9555323f00b61d11f1a2e8a9257bed05ac26d0ba740ce6dc5752bed1d83dc72f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.8
|