This guide explains how to release a new version of the Volley Python SDK.
-
Ensure all tests pass:
pytest
-
Ensure the code is formatted:
black volley tests examples
-
Update the version in
volley/version.py:__version__ = "1.0.0" # Update to new version
-
Update the version in
setup.py:version="1.0.0", # Update to new version
-
Ensure you have PyPI credentials configured:
# Install twine if not already installed pip install twine # Configure PyPI credentials (if not already done) # Create ~/.pypirc or use environment variables
Update the version in both volley/version.py and setup.py following Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality additions
- PATCH version for backwards-compatible bug fixes
# Clean previous builds
rm -rf dist/ build/ *.egg-info
# Build source distribution and wheel
python setup.py sdist bdist_wheelVerify the package can be installed:
# Test installation from local build
pip install dist/volley-python-1.0.0.tar.gz
# Or test the wheel
pip install dist/volley_python-1.0.0-py3-none-any.whlTag the release with a semantic version (e.g., v1.0.0):
git add volley/version.py setup.py
git commit -m "Bump version to 1.0.0"
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git push origin mainImportant: The tag name must start with v and match the version in volley/version.py and setup.py (without the v prefix).
Test PyPI (recommended first step):
# Upload to Test PyPI
twine upload --repository testpypi dist/*
# Test installation from Test PyPI
pip install --index-url https://test.pypi.org/simple/ volley-pythonProduction PyPI:
# Upload to PyPI
twine upload dist/*- Go to the GitHub repository: https://github.com/volleyhq/volley-python
- Click "Releases" → "Draft a new release"
- Select the tag you just created (e.g.,
v1.0.0) - Add release notes describing the changes
- Publish the release
Test that the release can be installed:
# In a clean environment
pip install volley-python
# Or install specific version
pip install volley-python==1.0.0Follow Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality additions
- PATCH version for backwards-compatible bug fixes
# 1. Update versions
# volley/version.py: __version__ = "1.0.0"
# setup.py: version="1.0.0"
# 2. Format code
black volley tests examples
# 3. Run tests
pytest
# 4. Build
python setup.py sdist bdist_wheel
# 5. Test build
pip install dist/volley-python-1.0.0.tar.gz
# 6. Commit and tag
git add volley/version.py setup.py
git commit -m "Bump version to 1.0.0"
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git push origin main
# 7. Publish to PyPI
twine upload dist/*
# 8. Create GitHub release manually
# Go to GitHub and create a release with the tag- The package name on PyPI is
volley-python - Users can install with:
pip install volley-python - Users can install specific versions:
pip install volley-python==1.0.0 - The package name in
setup.pymust match the PyPI package name - The repository URL in
setup.pymust match the GitHub repository path
The package name volley-python matches:
- PyPI package:
volley-python - GitHub repository:
volleyhq/volley-python - Python import:
import volley