twine

Table of Contents

Overview

$ pip install twine
$ python setup.py sdist bdist_wheel

# Test
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*

# Release
$ twine upload dist/*

Use keyring to store your credentials:

$ pip install keyring
$ keyring set https://test.pypi.org/legacy/ your-username
$ keyring set https://upload.pypi.org/legacy/ your-username

You need to install keyring into the same virtualenv that twine is installed

Here are some environment variables:

TWINE_USERNAME
the username to use for authentication to the repository.
TWINE_PASSWORD
the password to use for authentication to the repository.
TWINE_REPOSITORY
the repository configuration, either defined as a section in .pypirc or provided as a full URL.
TWINE_REPOSITORY_URL
the repository URL to use.
TWINE_CERT
custom CA certificate to use for repositories with self-signed or untrusted certificates.