Mastering Python Packaging: A Comprehensive Guide to Setuptools and PyInstaller
Simplify Your Python Deployment with Setuptools and Create Standalone Executables with PyInstaller
Packaging in python makes it easy to publish your work in simplest manner to others. Packaging also removes the system dependency and make your code look like a binary. This is very good way to remove dependency and make your code work in any environment independent of operating system kind dependency.
As a name suggests, we want to consolidate our code into one file so that it becomes easier to distribute your code. We have multiple options to do so. First option is to bundle your code and you can use the code by importing that or running to use it. And, another way is to package it as binary or executable which will make your code like running a program or app.
Tool/Library used for this purpose are : setuptools and pyinstaller
Using setuptools
Setuptools is capable of providing distributable code in packaged form to share and install. You can streamline the process and bring uniformity in setting up your code.
There are some prerequisite for achieving this: