Skip to main content

No project description provided

Project description

rustgi

rustgi is a fast, lightweight, single-thread Web Server Gateway Interface (WSGI) that allows you to run Python web applications using Rust. It provides a high-performance and efficient environment for hosting WSGI-compatible applications.

Features

  • serve WSGI
  • set max body size

Getting Started

Prerequisites

Before running rustgi, make sure you have Rust and Cargo installed on your system. You can install them by following the official Rust installation guide

Installation

You can install rustgi with pip

pip install rustgi

Usage

import rustgi
from app import application

rustgi.serve(
    application,
    rustgi.RustgiConfig().set_address("0.0.0.0:8000"),
)

Benchmarks

rustgi

└❯ wrk -t4 -c1000 -d30s --latency http://0.0.0.0:8000
Running 30s test @ http://0.0.0.0:8000
  4 threads and 1000 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.03ms  353.39us  10.73ms   87.20%
    Req/Sec    12.42k     1.90k   19.36k    53.62%
  Latency Distribution
     50%    4.97ms
     75%    5.14ms
     90%    5.35ms
     99%    6.53ms
  1487223 requests in 30.10s, 127.65MB read
  Socket errors: connect 751, read 81, write 0, timeout 0
Requests/sec:  49403.93
Transfer/sec:      4.24MB

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

rustgi-0.1.8.tar.gz (19.5 kB view hashes)

Uploaded Source

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