Principle:Wandb Weave PyPI Publishing
| Knowledge Sources | |
|---|---|
| Domains | Release_Engineering, Distribution |
| Last Updated | 2026-02-14 00:00 GMT |
Overview
A package distribution mechanism that uploads built artifacts to the Python Package Index (PyPI) for public consumption.
Description
PyPI Publishing uploads the built distribution files (sdist and wheel) to PyPI using twine. It supports both production PyPI and Test PyPI for validation, with API key authentication via environment variables.
Usage
Use this as the final step in the release process, after building distribution files. Use --test to validate on Test PyPI before publishing to production.
Theoretical Basis
Package publishing follows the staged release pattern:
- Build: Create distribution artifacts.
- Test Upload (optional): Upload to Test PyPI for validation.
- Production Upload: Upload to production PyPI for public access.
- Authentication: Use API tokens (__token__ username) for secure upload.