Giter VIP home page Giter VIP logo

rustgi's Introduction

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

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

rustgi's People

Contributors

dependabot[bot] avatar tcmits avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

h4mid2019

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.