This guide explains how to publish the dolphin-utils package to PyPI.
- Install build and upload tools:
pip install build twineBuild the distribution files:
python -m buildThis creates:
dist/dolphin_utils-X.X.X.tar.gz(source distribution)dist/dolphin_utils-X.X.X-py3-none-any.whl(wheel distribution)
- Upload to TestPyPI first:
python -m twine upload --repository testpypi dist/*- Test installation from TestPyPI:
pip install --index-url https://test.pypi.org/simple/ dolphin-utils- Test the CLI command:
dolphin-summarize --helpOnce testing is successful:
- Upload to PyPI:
python -m twine upload dist/*- Verify installation:
pip install dolphin-utils
dolphin-summarize --helpUpdate the version in pyproject.toml before each release:
[project]
name = "dolphin-utils"
version = "0.5.0" # Increment thisThe package provides:
- Package name:
dolphin-utils - CLI command:
dolphin-summarize - Python module:
python -m dolphin_summarize - Import:
import dolphin_summarize
- The package name is
dolphin-utils(with hyphen) - The Python module is
dolphin_summarize(with underscore) - The CLI command is
dolphin-summarize(with hyphen) - This follows Python packaging conventions