Skip to content

Document Downloads API (#2750) - #3201

Open
reddy895 wants to merge 1 commit into
python:mainfrom
reddy895:fix/2750-document-downloads-api
Open

reddy895 wants to merge 1 commit into
python:mainfrom
reddy895:fix/2750-document-downloads-api

Conversation

@reddy895

Copy link
Copy Markdown

Description

This PR adds official Sphinx documentation for the python.org Downloads REST API, resolving #2750.

The documentation covers:

  • Architecture: Overview of both the Tastypie (/api/v1/downloads/) and Django REST Framework (/api/v2/downloads/) endpoints.
  • Authentication & Permissions: Public read-only access for published releases vs. staff token/API key authentication for writes and draft visibility.
  • Resource Specifications:
    • Operating Systems (/api/v{1,2}/downloads/os/): query parameters, serializers, JSON examples.
    • Releases (/api/v{1,2}/downloads/release/): version enum mapping, pre-release/published filtering, JSON examples.
    • Release Files (/api/v{1,2}/downloads/release_file/): download URLs, GPG/Sigstore signatures, SBOM metadata, checksums, batch deletion endpoints.
  • Security Constraints: Explicit documentation of the https://www.python.org/ prefix and sidecar file extension naming requirements.
  • Navigation Integration: Links to downloads_api.rst from the root documentation index (docs/source/index.rst).

Verification

  • Verified documentation build with uv run --only-group docs sphinx-build -M html docs/source docs/_build -E -a -j auto --keep-going -W (succeeded with zero warnings or errors).
  • Ran full apps.downloads test suite with 123 tests (uv run python ./manage.py test apps.downloads). All 123 tests passed.
  • Ran code formatters and linters: uv run ruff check ., uv run ruff format --check ., and uv run pyproject-fmt --check pyproject.toml (all clean).

Closes

Closes #2750

Add comprehensive documentation for python.org Downloads REST API (v1 Tastypie and v2 DRF).
Covers endpoints for OS, Release, and ReleaseFile models, including query parameters,
filtering, serialization fields, authentication, pagination, batch deletion, and URL
validation rules.
@reddy895
reddy895 requested a review from JacobCoffee as a code owner October 26, 2026 05:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: document Downloads API

1 participant