Registry / devops / asgiproxy

asgiproxy

JSON →
library0.2.0pypypiunverified

Tools for building HTTP and WebSocket proxies for the asynchronous ASGI protocol. Version 0.2.0, requires Python >=3.8. Stable but infrequent releases.

pip install asgiproxy
INSTALL
IMPORT
SIG · ASGIPROXY
A
asgiproxy
devopspythonv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ProxyMiddleware
from asgiproxy import ProxyMiddleware
from asgiproxy.middleware import ProxyMiddleware

Create a simple ASGI proxy that forwards requests to an upstream URL.

from asgiproxy.middleware import ProxyMiddleware from asgiproxy.config import ProxyConfig import os config = ProxyConfig( upstream_url=os.environ.get('UPSTREAM_URL', 'http://localhost:8000'), ) app = ProxyMiddleware(config) # Use with an ASGI server, e.g. uvicorn: uvicorn mymodule:app
Debug
Known issues
gotchaProxyMiddleware does not handle WebSocket upgrades by default; you must configure WebSocket proxy separately if needed.
fix
Use ProxyMiddleware with websocket=True in ProxyConfig or handle WebSocket manually.
affects: all
gotchaThe config object is mutable; modifying it after middleware initialization may cause undefined behavior.
fix
Set config values before passing to ProxyMiddleware and avoid mutating after.
affects: all
breakingIn version 0.2.0, ProxyConfig no longer has a 'rewrite_host_header' option; it was removed without deprecation.
fix
Use a custom ASGI middleware to rewrite headers if needed.
affects: 0.2.0
Upgrade
Version history
0.2.0latest on PyPI · released Feb 7, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
asgiproxy — pip install asgiproxy · libregistry