Skip to content

About

Primer on how to package a python library using setuptools.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Python Packaging Primer

Leveling up from writing ugly scripts to building shareable python libraries.

I strongly recommend the following resources for more details on this process:

Level 0: Ugly scripts

We all start making scripts like this. Basically, taking command entered in the python REPL, and saving them to a file.

Level 1: Modules

Level up to writing pretty scripts that can be imported as modules.

Adding an __init__.py file allows for the creation of hierarchical modules.

We can then install these modules locally by introducing a setup.py file and running pip install -e ..

Level 4: Building a Package

Use python's setuptools to turn your module into an acutal installable artifact: python setup.py sdist

Level 5: Uploading to pypi.org

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

About

Primer on how to package a python library using setuptools.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages