pypi-publish

Publish Python packages to PyPI using configured credentials and built artifacts.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/domattioli/DomI --skill pypi-publish-domattioli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pypi-publish
Source: https://github.com/domattioli/DomI/tree/main/skills/pypi-publish
Command: npx skills add https://github.com/domattioli/DomI --skill pypi-publish-domattioli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires build, twine, and includes scripts (resource) components.

What problem does it solve?

Publish a Python package to PyPI using credentials from ~/.pypirc or environment variables, enabling automated releases.

Core Features & Use Cases

  • Builds the distribution with python -m build when dist/ is missing or incomplete.
  • Uploads packages to PyPI using twine with exponential backoff retry and verification.

Quick Start

Publish the current package to PyPI using your configured credentials.

Frequently Asked Questions about pypi-publish

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish a Python package to PyPI using twine?

You can publish a Python package to PyPI by building artifacts with the build module and uploading them via twine, using credentials stored in ~/.pypirc or set as environment variables.

What do I need to publish a Python package to PyPI?

To publish a Python package to PyPI, you need a valid pyproject.toml, configured PyPI credentials, and the build and twine Python tooling to create and upload the distribution artifacts.

Does twine automatically build Python packages before uploading to PyPI?

While twine only uploads packages, this workflow runs python -m build to create the distribution artifacts automatically when the dist/ directory is missing or incomplete before the PyPI upload.

Can I use environment variables for PyPI credentials instead of a .pypirc file?

Yes, you can configure PyPI credentials using environment variables instead of a .pypirc file, allowing twine to securely authenticate and upload Python packages during automated release workflows.

What happens if a PyPI upload fails during the package publishing process?

When a PyPI upload fails, the process applies exponential backoff retry logic to re-attempt the twine upload, ensuring reliable package delivery and verifying the final release.