Python Packaging

learn python packaging via Packaging Python Projects

view example package at

python3 -m venv .venv
source .venv/bin/activate
mkdir example-pkg-pfeilbr
touch example-pkg-pfeilbr/
python3 -m pip install --user --upgrade setuptools wheel
python3 sdist bdist_wheel
pip install --upgrade pip
pip install wheel
pip install twine
python3 -m twine upload --repository-url dist/*

# testing
mkdir tmp
cd tmp
python3 -m venv .venv
source .venv/bin/activate
pip list
python3 -m pip install --index-url --no-deps example-pkg-pfeilbr

# to install specific version.  did this because it was using 0.0.1 from a cache
python3 -m pip install --index-url --no-deps 'example-pkg-pfeilbr==0.0.2'

pip list

# test using package
echo -e "import example_pkg_pfeilbr\nprint(" | python

Example Package

This is a simple example package. You can use Github-flavored Markdown to write your content.