PyPi package

Folder structure

.
├── <package-name>
   
   ├── <data_folder1>
      ├── file1.js
      ├── ... 
      └── fileN.js
   
   ├── <data_folder2>
      └── ... 
   
   ├── modules
      ├── module1.py
      ├── module2.py
      ├── ...
      └── moduleN.py
   
   ├── __main__.py
   └── <package-name>.py
   
├── README.md
├── LICENSE
├── .gitignore
└── pyproject.toml

<package-name>/main.py

.gitignore

pyproject.toml

where:

  • <package-name> is the name of the package you created

  • [tool.setuptools.package-data] defines which other data folders/files are packaged

Setup the machine

Package creation

  • Create the package

  • Install the package locally to test it

Package upload

Enter your PyPI username + password/token.

Package uninstall

Last updated