14. Publish Package to PyPI¶
In this chapter, you’ll learn how to upload your own package to PyPI.
14.1. Register PyPI account¶
If you do not have a PyPI accout, you need to register an account at https://pypi.org/account/register .
14.2. Install twine
¶
pip install twine
14.3. Build Your Package¶
python setup.py sdist bdist_wheel
Then you will get a new folder dist
:
.
├── PyAudit-1.0-py3-none-any.whl
├── PyAudit-1.0-py3.6.egg
└── PyAudit-1.0.tar.gz
14.4. Upload Your Package¶
twine upload dist/*
During the uploading processing, you need to provide your PyPI account username
and password
:
Enter your username: runawayhorse001
Enter your password:
14.5. Package at PyPI¶
Here is my PyAudit
package at [PyPI](https://pypi.org/project/PyAudit). You can install PyAudit
using:
pip install PyAudit