pythonpipopen-sourcepypi

Create PyPi package from Project


I have made an Open Source AI Coding Assistant in python: https://github.com/00-Python/AI-Debug

I am new to making PyPi Packages to be able to install my project with pip.

Im not sure where to start, can somebody point me in the right direction?


Solution

  • python.org has exactly the documentation you're looking for: https://packaging.python.org/en/latest/tutorials/packaging-projects/

    In sum, you'll go through roughly the following steps:

    1. Adjust your directory structure (as needed) to create a src dir for the code you want in the package (leaving out extra files not needed in an install, e.g. automated tests)
    2. Create a pyproject.toml file that defines metadata and build system info for your package
    3. Build the package
    4. Use twine to upload the package to pypi (you'll need to create a pypi account if you haven't already)