Skip to main content

An ultra fast WSGI server for Python 3

Project description

Tests Language grade: C/C++ Language grade: Python

FastWSGI

:construction: FastWSGI is still under development.

FastWSGI is an ultra fast WSGI server for Python 3.

It is a sub 1000 line Python extension written in C. It uses libuv and llhttp under the hood for blazing fast performance.

Supported Platforms

Platform Supported
Linux :white_check_mark:
MacOS :white_check_mark:
Windows :white_check_mark:

Installation

Install using the pip package manager.

pip install fastwsgi

Quick start

python3 example.py

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

import fastwsgi

def application(environ, start_response):
    headers = [('Content-Type', 'text/plain')]
    start_response('200 OK', headers)
    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
  • Unit tests running in CI workflow

Project details


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.3.tar.gz (406.1 kB view details)

Uploaded Source

File details

Details for the file fastwsgi-0.0.3.tar.gz.

File metadata

  • Download URL: fastwsgi-0.0.3.tar.gz
  • Upload date:
  • Size: 406.1 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

Hashes for fastwsgi-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e82843ee1031248b05c1d1eeb0146224ebd38c9ffafa4880fd05a16bc3f5ba68
MD5 38658dd99296b11bf4cd5808489a86c9
BLAKE2b-256 b5f66e692fa8dc10269c777c9ccc60e038c949e3e09e6862a57f826f432f914a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page