RL005: PyPIPublished

Overview

Property Value
ID RL005
Name PyPIPublished
Group release
Severity NOTE

Description

Checks whether the package has been published to PyPI (Python Package Index).

Being on PyPI makes your package easily installable via pip install.

What it checks

The check queries PyPI’s API to determine if a package with the project name exists:

  • Reads the project name from pyproject.toml
  • Queries https://pypi.org/pypi/{package_name}/json
  • Reports if the package is found or not

Why it matters

  • Discoverability - Users can find your package on PyPI
  • Easy Installation - pip install package-name just works
  • Dependency Resolution - Other packages can depend on yours
  • Trust - PyPI-published packages appear more established
  • Version Management - PyPI tracks all published versions

How to fix

Publishing to PyPI

  1. Create a PyPI account at pypi.org

  2. Configure your build backend in pyproject.toml:

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "my-package"
version = "1.0.0"
# ... other metadata
  1. Build your package:
pip install build
python -m build
  1. Upload to PyPI:
pip install twine
twine upload dist/*

Test on TestPyPI first

Before publishing to PyPI, test on TestPyPI:

twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ my-package

Configuration

Skip this check

[tool.pycmdcheck]
skip = ["RL005"]

CLI

pycmdcheck --skip RL005