emmett-framework/granian — reverse-engineered prompt
Reverse engineered prompt
Build me a fast Python web server package powered by Rust. I want to be able to install it with pip and run a simple command like granian main:app to serve Python apps.
It should support the common Python app styles, especially ASGI and WSGI, plus an RSGI style interface if that makes sense. It needs to handle HTTP 1 and HTTP 2, websockets, HTTPS, client certificates, and serving static files directly. Please include a command line interface with sensible defaults for host, port, workers, event loop choice, reload support, and environment variable configuration.
Add small hello world examples for each app style, clear docs, tests, and basic benchmarks so I can compare it with other Python servers. The goal is a single dependable server people can use instead of stitching together several packages, with strong concurrency and good throughput. Look up current docs online if you need to.
Want more depth? Deep Reverse