FastPySGI is an ultra fast WSGI/ASGI server for Python 3.
Its written in C and uses libuv and llhttp under the hood for blazing fast performance.
None
| Platform | Linux | MacOs | Windows |
|---|---|---|---|
| Support | ✅ | ✅ | ✅ |
FastPySGI is one of the fastest general use WSGI/ASGI servers out there!
Benchmark results: www.http-arena.com/leaderboard
For a comparison against other popular WSGI servers, see PERFORMANCE.md
Install using the pip package manager.
pip install fastpysgiCreate a new file example.py with the following:
import fastpysgi
def app(environ, start_response):
headers = [ ('Content-Type', 'text/plain') ]
start_response('200 OK', headers)
return [ b'Hello, World!\n' ]
if __name__ == '__main__':
fastpysgi.run(app, host='0.0.0.0', port=5000)Run the server using:
python3 example.pyOr, by using the fastpysgi command:
fastpysgi example:appimport fastpysgi
from flask import Flask
app = Flask(__name__)
@app.get('/')
def hello_world():
return 'Hello, World!\n', 200
if __name__ == '__main__':
fastpysgi.run(app, host='127.0.0.1', port=5000)import fastpysgi
from fastapi import FastAPI
from fastapi.responses import PlainTextResponse
app = FastAPI()
@app.get("/")
async def hello_world():
return PlainTextResponse(b"Hello, World!\n")
if __name__ == '__main__':
fastpysgi.run(app, host='127.0.0.1', port=5000)To run the test suite using pytest, run the following command:
python3 -m pytestResults of testing for compliance with HTTP/1.x standards: https://www.http-probe.com/probe-results/
