Skip to main content

A high-speed, production ready, thread pooled, generic WSGI server with SSL support

Project description

WSGIserver is a high-speed, production ready, thread pooled, generic WSGI server with SSL support.

WSGIserver suppport both Python 2 and Python 3.

WSGIserver is developed by Florent Gallaire fgallaire@gmail.com.

Website: http://fgallaire.github.io/wsgiserver.

Download and Install

To install the last stable version from PyPI:

$ sudo pip install wsgiserver

To install the development version from GitHub:

$ git clone https://github.com/fgallaire/wsgiserver
$ cd wsgiserver
$ sudo python setup.py install

Documentation and Caveats

  • WSGIserver support Python 2.6 and above and Python 3.1 and above

  • WSGIserver require six

Usage

Simplest example on how to use WSGIserver:

import wsgiserver

def my_app(environ, start_response):
    status = '200 OK'
    response_headers = [('Content-type','text/plain')]
    start_response(status, response_headers)
    return ['WSGIserver is running!']

server = wsgiserver.WSGIServer(('0.0.0.0', 8070), my_app)
server.start()

WSGIserver can serve as many WSGI applications as you want in one instance by using a WSGIPathInfoDispatcher:

d = wsgiserver.WSGIPathInfoDispatcher({'/': my_app, '/blog': my_blog_app})
server = wsgiserver.WSGIServer(('0.0.0.0', 8070), d)

To add SSL support, just set server.ssl_adapter to an SSLAdapter instance:

server.ssl_adapter = wsgiserver.SSLAdapter('certificate.pem', 'privatekey.pem')

Naming

  • WSGIserver is the project name

  • wsgiserver is the Python module name

  • WSGIServer is the main class name

License

WSGIserver files are released under the GNU LGPLv3 or above license.

WSGIserver codebase from CherryPy by CherryPy Team (team@cherrypy.org) under the 3-clause BSD license.

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

WSGIserver-1.0.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WSGIserver-1.0-py2.py3-none-any.whl (26.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file WSGIserver-1.0.tar.gz.

File metadata

  • Download URL: WSGIserver-1.0.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for WSGIserver-1.0.tar.gz
Algorithm Hash digest
SHA256 fd4399c44b680f41f066b6a2e6bf734e414562fcf5e35639e1932b46e3ce35ab
MD5 8b6f6c86896a5f59356ddad3d327241b
BLAKE2b-256 ffd30c7a0350c6f4aa07c3a830b8c9f3ff19798fb10af231267294ca30dd3958

See more details on using hashes here.

File details

Details for the file WSGIserver-1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for WSGIserver-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2033fa3a4752fc8eeacb0d05b37def085d51695c95c1b8e301e2b84e986accb1
MD5 3195e44682dfd02529fb7ef0ebad665e
BLAKE2b-256 022a1716e15dafa3322a36eb7d9af0672249c60de593651632039ac75811b3a5

See more details on using hashes here.

Supported by

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