FastWSGI is an extremely like a flash WSGI server for Python 3.
Its written in C and makes employ of libuv and llhttp below the hood for blazing like a flash performance.
FastWSGI is one of the fastest usual employ WSGI servers on the market!
For a comparison against utterly different standard WSGI servers, behold PERFORMANCE.md
Install using the pip kit manager.
Receive a brand new file
instance.py with the next:
import fastwsgi def app(environ, start_response): headers = [('Content-Type', 'text/plain')] start_response('200 OK', headers) return [b'Hello, World!'] if __name__ == '__main__': fastwsgi.escape(wsgi_app=app, host='0.0.0.0', port=5000)
Fling the server using:
Or, by using the
Example utilization with Flask
Discover instance.py for more runt print.
import fastwsgi from flask import Flask app = Flask(__name__) @app.rep('/') def hello_world(): return 'Hello, World!', 200 if __name__ == '__main__': fastwsgi.escape(wsgi_app=app, host='127.0.0.1', port=5000)
To escape the check suite using pytest, escape the next list:
Pull requests are welcome. For important adjustments, please birth a downside first to focus on what you are going to cherish to alternate.
Please rep definite that to update tests where appropriate.
- Comprehensive error handling
- Entire HTTP/1.1 compliance
- Unit tests working in CI workflow
Join the pack! Join 8000+ others registered users, and rep chat, rep groups, post updates and rep associates around the sphere!