how to make a package in python code example

Example 1: how to make a python exe

pip install pyinstaller

cd YourFilePath

pyinstaller --onefile YourFileName

Example 2: how to make python package

# This is too much for a grepper answer, so here is a link to the tutorial:
# https://towardsdatascience.com/how-to-build-your-first-python-package-6a00b02635c9

Example 3: how to create a list in python

# Create a list
new_list = []

# Add items to the list
item1 = "string1"
item2 = "string2"

new_list.append(item1)
new_list.append(item2)

# Access list items
print(new_list[0])  
print(new_list[1])

Example 4: python upload to pip

1. Create files:
    __init__.py   setup.py   README.md   LICENSE
2. Check for setuptools and wheel:
    pip install --user --upgrade setuptools wheel
3. Generate package:
    py setup.py sdist bdist_wheel
4. Upload to pip:
    twine upload dist/*

Example 5: create python package

python3 setup.py sdist bdist_wheel

Example 6: package in python

A package is basically a directory with Python files and a file with the name __init__.py