API¶
Pyrig plugin that integrates PyPI publishing into a pyrig project.
rig ¶
Mirrored namespace extending pyrig's project scaffolding for PyPI publishing.
configs ¶
Configuration files this plugin adds or overrides for PyPI publishing.
Mirrors pyrig's config-file discovery namespace, so configurations defined here extend or override the base project's managed configuration.
pyproject ¶
PyPI-specific extensions to the project's pyproject.toml configuration.
PyprojectConfigFile ¶
Bases: PyprojectConfigFile
Pyproject config that adds PyPI trove classifiers and keywords.
classifiers_configs ¶
Build the PyPI trove classifiers for the project.
Includes a Programming Language :: Python :: X.Y classifier for every
Python minor version the project supports, alongside fixed classifiers
declaring the project as Python 3 only, OS independent, and typed.
Returns:
| Type | Description |
|---|---|
list[str]
|
Trove classifier strings for the |
Source code in src/pyrig_pypi/rig/configs/pyproject.py
version_control ¶
PyPI-specific overrides of version control configuration.
remote ¶
PyPI-specific overrides for the project's GitHub-hosted remote configuration.
configure ¶
PyPI-specific extension of .github/configure.sh.
Bases: ConfigureRepositoryConfigFile
Configure script extended to sync the repository's GitHub topics.
apply_topics_script() -> str
Return the topics shell function as a multi-line string.
Returns:
| Type | Description |
|---|---|
str
|
Function definition that wraps the |
str
|
file into the body the GitHub topics endpoint expects, then |
str
|
|
Source code in src/pyrig_pypi/rig/configs/version_control/remote/configure.py
settings ¶
PyPI-specific extension of GitHub repository settings.
workflows ¶
PyPI-specific overrides of the project's GitHub Actions workflow configuration.
Deploy workflow extended to build the package and publish it to PyPI.
Bases: DeployWorkflowConfigFile
Deploy workflow that also builds the package and publishes it to PyPI.
Build the job that builds the package and publishes it to PyPI.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dict mapping the derived job ID to its configuration. |
Source code in src/pyrig_pypi/rig/configs/version_control/remote/workflows/deploy.py
Build a step that packages the project into distributable artifacts.
Runs uv build to produce wheel and source distributions in the
dist/ directory.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Step that runs |
Source code in src/pyrig_pypi/rig/configs/version_control/remote/workflows/deploy.py
Build a step that publishes the built distributions to PyPI.
Runs uv publish using GitHub Actions OIDC trusted publishing.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Step that publishes to PyPI using trusted publishing. |
Source code in src/pyrig_pypi/rig/configs/version_control/remote/workflows/deploy.py
tools ¶
Tool wrappers this plugin adds or overrides for PyPI publishing.
packages ¶
Tool wrappers this plugin adds or overrides for the project's PyPI package.
index ¶
PyPI index integration for the project's badges and links.
PackageIndex ¶
Bases: Tool
PyPI badge and metadata for the project's package index listing.
Badges the project with its current PyPI version and links to the project's PyPI page.
manager ¶
Package manager tool wrapper customized for PyPI publishing.
Extends the base package manager tool with the arguments needed to publish a package to the PyPI index.
PackageManager ¶
Bases: PackageManager
Package manager that adds PyPI publishing arguments to uv commands.
publish_args(*args: str) -> Args
Construct Args for publishing the package to PyPI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*args
|
str
|
Additional arguments for the publish command. |
()
|
Returns:
| Type | Description |
|---|---|
Args
|
Args for |
Source code in src/pyrig_pypi/rig/tools/packages/manager.py
published_trusted_args(*args: str) -> Args
Construct Args for PyPI trusted publishing with uv.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*args
|
str
|
Additional arguments for the publish command. |
()
|
Returns:
| Type | Description |
|---|---|
Args
|
Args for |