Cheat Sheet about Python

In order to publish a python package on PyPI, follow these steps:

  1. Create an account on PyPI.
  2. Create an account on PyPI test.
  3. Write a setup.py. (Example will follow below)
  4. Execute python setup.py dist. (This need some more detail, e.g. sdist, wheel and so on should be explained)
  5. Run twine upload --repository-url https://test.pypi.org/legacy/ dist/* and check the results on PyPI test.
  6. If fine, execute twine upload dist/*.

Congratulations! You published a package on PyPI!