Creating your own modules

If you do not mind, please read this article on Medium.

In this lesson, you will learn how to create your own module and deploy it on PyPi so anyone can install and use it. First, make sure you have the pip command added to PATH as shown here.

  1. Create an account at PyPi.
  2. In the account settings, generate an API token and save it for later.
  3. Download all the necessary files from here. Customize the setup.py, README.rst, MANIFEST.in, and LICENSE.txt files. Your classes go in the __init__.py file.
  4. Install the setuptools and twine modules using the pip install command.
  5. Go to the folder with customized files in CMD using the cd command.
  6. Execute the following commands: python setup.py sdist, python -m twine upload dist/*. The second command will ask you for authorization using the API token. After these commands finished executing, your module will be ready.
  7. Install your module using the pip install command and enjoy! Its documentation (the README.rst content) will be available on the PyPi website.