To publish the SafeView package to PyPI, follow these steps:
- Make sure you have
buildandtwineinstalled:
pip install build twineUpdate the version number in pyproject.toml:
[project]
version = "0.2.0" # Update this before publishinguv build
# or
python -m buildtwine upload --repository testpypi dist/*twine upload dist/*Before publishing, ensure:
- All dependencies are properly listed in
pyproject.toml - The README renders correctly on PyPI
- The package builds without errors
- The command-line interface works correctly
- All necessary metadata is included (author, description, classifiers, etc.)
After successfully publishing to PyPI, users can install SafeView with:
pip install safe-view- Always test on Test PyPI first
- Make sure version numbers follow semantic versioning
- Consider creating a GitHub release alongside PyPI publication