Skip to main content

WSGI server written in Rust.

Project description

Pyruvate WSGI server

https://gitlab.com/tschorr/pyruvate/badges/master/pipeline.svg https://codecov.io/gl/tschorr/pyruvate/branch/master/graph/badge.svg http://img.shields.io/pypi/v/pyruvate.svg

Pyruvate is a WSGI server written in Rust. It’s not yet ready for production so use with caution.

Features

Development Installation

  • Install Rust

  • Install and activate Rust nightly (needed by PyO3)

  • Install and activate a Python 3 (> 3.5) virtualenv

  • Install pyruvate, e.g. using pip:

    $ pip install -e git+https://gitlab.com/tschorr/pyruvate#egg=pyruvate

Using Pyruvate in your WSGI application

From Python

A hello world WSGI application using pyruvate listening on 127.0.0.1:7878 and using 2 worker threads looks like this:

import pyruvate

def application(environ, start_response):
    """Simplest possible application object"""
    status = '200 OK'
    response_headers = [('Content-type', 'text/plain')]
    start_response(status, response_headers, None)
    return [b"Hello world!\n"]

pyruvate.serve(application, "127.0.0.1:7878", 2)

Using PasteDeploy

Again listening on 127.0.0.1:7878 and using 2 worker threads:

[server:main]
use = egg:pyruvate#main
socket = 127.0.0.1:7878
workers = 2

0.1.0 (2020-02-10)

  • Initial release

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyruvate, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size pyruvate-0.1.0-cp36-cp36m-manylinux1_x86_64.whl (2.9 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size pyruvate-0.1.0-cp37-cp37m-manylinux1_x86_64.whl (1.5 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size pyruvate-0.1.0-cp38-cp38-manylinux1_x86_64.whl (4.4 MB) File type Wheel Python version cp38 Upload date Hashes View hashes
Filename, size pyruvate-0.1.0.tar.gz (20.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page