An ultra fast WSGI server for Python 3
Project description
FastWSGI
Note: FastWSGI is still under development...
FastWSGI is an ultra fast WSGI server for Python 3.
It is mostly written in C. It makes use of libuv and llhttp under the hood for blazing fast performance.
Installation
Install using the pip package manager.
pip install fastwsgi
Example usage with Flask
See example.py for more details.
import fastwsgi
from flask import Flask
app = Flask(__name__)
@app.get("/")
def hello_world():
return "Hello, World!", 200
if __name__ == "__main__":
fastwsgi.run(wsgi_app=app, host="127.0.0.1", port=5000)
Example usage with uWSGI
def application(environ, start_response):
start_response("200 OK", [("Content-Type", "text/html")])
return [b"Hello, World!"]
if __name__ == "__main__":
fastwsgi.run(wsgi_app=application, host="127.0.0.1", port=5000)
Testing
To run the test suite using pytest, run the following command:
python3 -m pytest
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
TODO
- Comprehensive error handling
- Complete HTTP/1.1 compliance
- Test on multiple platforms (Windows/MacOS)
- Unit tests running in CI workflow
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastwsgi-0.0.1.tar.gz
(43.4 kB
view details)
File details
Details for the file fastwsgi-0.0.1.tar.gz
.
File metadata
- Download URL: fastwsgi-0.0.1.tar.gz
- Upload date:
- Size: 43.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4054bbc0108b1cb55a59871a8c7e3a06dd7abd46af87f613f71a5b5dc8d8f4a |
|
MD5 | 959af0b7fa578e79693ba3fa10e66032 |
|
BLAKE2b-256 | cb323d8c5eb2b652b9777784440679db9a27a8c67803ffd5cb86d6b95c2b39af |