This release is a pre-release and may not be stable for production use.
✨ asgi-cgi-handler ✨
-
run cgi scripts inside an asgi server
-
simple usage
import uvicorn
from asgi_cgi import HTTPCGIHandler, WebsocketCGIHandler
uvicorn.run(HTTPCGIHandler())
- A more complex example
from fastapi import FastAPI
from asgi_cgi import HTTPCGIHandler, WebsocketCGIHandler
app = FastAPI(title="CGI Server")
app.mount("/cgi-bin", HTTPCGIHandler()) # type: ignore
app.mount("/ws", WebsocketCGIHandler()) # type: ignore
As you can see, we have websocket support, which is inspired by websocketd. Currently, more tests are needed.
The WebsocketCGIHandler route requests to endpoint executables and feed websocket data
into process's stdin and send stdout to client line by line.
Apis
ErrHandler = Callable[[bytes], Union[Awaitable[None], None]]
class HTTPCGIHandler:
def __init__(self, directory: str=..., error_handler: ErrHandler=...) -> None: ...
class WebsocketCGIHandler:
def __init__(self, directory: str=..., error_handler: ErrHandler=...) -> None: ...
Metadata
Release files for asgi-cgi-handler 0.0.1.dev1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asgi-cgi-handler-0.0.1.dev1.tar.gz | 6.3 kB | Without provenance | Details for asgi-cgi-handler-0.0.1.dev1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asgi_cgi_handler-0.0.1.dev1-py3-none-any.whl | Python 3 | none | any | Details for asgi_cgi_handler-0.0.1.dev1-py3-none-any.whl |
Total release size: 13.0 kB
Release files / asgi-cgi-handler-0.0.1.dev1.tar.gz
| Download URL | asgi-cgi-handler-0.0.1.dev1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a24b3f597489c0370ddc34088ee1919b752081cf1f0d702d9dd9a57fd9922097
|
|
BLAKE2b-256 checksum How to use checksums |
aee1f82577188500cbd9aa3bdc7b3be5b1029d52545a4e2b0b3bdbc42bfd1b58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.8.2 requests/2.24.0 setuptools/60.9.3 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.8.5
|
Release files / asgi_cgi_handler-0.0.1.dev1-py3-none-any.whl
| Download URL | asgi_cgi_handler-0.0.1.dev1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51a65ddfbe10ce52f1cabede053e56c8a2aa63ec6a4f7a29855193d3e625b1c7
|
|
BLAKE2b-256 checksum How to use checksums |
08da0926550ab46e87a4ed33baf74a5f2d4d9c4e19fb7fa287e4d48fa887e03d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.8.2 requests/2.24.0 setuptools/60.9.3 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.8.5
|
Security for asgi-cgi-handler 0.0.1.dev1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.