Skip to content

Primer on how to package a python library using setuptools.

License

Notifications You must be signed in to change notification settings

hummel/python_packaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages