Skip to main content

Python CGI

This is a fork of the standard library modules cgi and cgitb. They have been removed from the Python standard libary in Python 3.13 by PEP-594.

Installation

Depend upon legacy-cgi in your project. It is recommended to use the marker python_version >= 3.13, as while the package can install for older Python versions, it won’t have effect with a standard Python installation as the built-in modules will take precedence.

For example, in a requirements.txt file:

legacy-cgi; python_version >= '3.13'

Or in a PEP-621 pyproject.toml file:

[project]
...
dependencies = [
    ...,
    "legacy-cgi; python_version >= '3.13'",
]

Purpose

The purpose of this fork is to support existing CGI scripts using these modules. Thus, compatibility is the primary goal.

Contributions are accepted, but should be focused on bug fixes instead of new features or major refactoring.

New applications should look at the ASGI or WSGI ecosystems. There’s a number of highly-polished web frameworks available, and it’s significantly faster in a typical deployment given a new Python process does not need created for each request.

Documentation

See the official documentation for Python 3.12 and earlier for usage:

The modules are not renamed, so code written for Python 3.12 or earlier should work without modification with this package installed.

Metadata

Release files for legacy-cgi 2.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for legacy-cgi 2.6.4
File Size Uploaded Provenance Actions
legacy_cgi-2.6.4.tar.gz 24.6 kB With provenance Details for legacy_cgi-2.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for legacy-cgi 2.6.4
File Interpreter ABI Platform Actions
legacy_cgi-2.6.4-py3-none-any.whl Python 3 none any Details for legacy_cgi-2.6.4-py3-none-any.whl

Total release size: 44.6 kB

Release files / legacy_cgi-2.6.4.tar.gz

Download URL legacy_cgi-2.6.4.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
abb9dfc7835772f7c9317977c63253fd22a7484b5c9bbcdca60a29dcce97c577
BLAKE2b-256 checksum
How to use checksums
f49c91c7d2c5ebbdf0a1a510bfa0ddeaa2fbb5b78677df5ac0a0aa51cf7125b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2025.

Transparency log

Release files / legacy_cgi-2.6.4-py3-none-any.whl

Download URL legacy_cgi-2.6.4-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e235ce58bf1e25d1fc9b2d299015e4e2cd37305eccafec1e6bac3fc04b878cd
BLAKE2b-256 checksum
How to use checksums
8c7ee7394eeb49a41cc514b3eb49020223666cbf40d86f5721c2f07871e6d84a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2025.

Transparency log

Security for legacy-cgi 2.6.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for legacy_cgi-2.6.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page