Skip to main content

Pypi Warehoise API manage

Project description

https://raw.githubusercontent.com/Nekmo/pypi-manage/master/logo.png

Latest Travis CI build status Latest PyPI version Python versions Code Climate Test coverage Requirements Status

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_manage.session import PypiSession, get_pypirc_login
from pypi_manage.manage import PypiClient
from pypi_manage.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypi-manage-0.1.0.linux-x86_64.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

pypi_manage-0.1.0-py2.py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page