Skip to main content

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

WSGIserver suppport both Python 2 (2.6 and above) and Python 3 (3.1 and above) and has no dependency.

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

Or you can just use the wsgiserver.py file alone, nothing more needed!

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(my_app)
server.start()

Then point your browser to this URL: http://localhost:8080

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(d)

To specify an host or a port:

server = wsgiserver.WSGIServer(my_app, host='0.0.0.0', port=8080)

To add SSL support, just specify a certfile and a keyfile:

server = wsgiserver.WSGIServer(my_app, certfile='cert.pem', keyfile='privkey.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.

Metadata

Release files for WSGIserver 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for WSGIserver 1.3
File Size Uploaded
WSGIserver-1.3.tar.gz 40.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for WSGIserver 1.3
File Interpreter ABI Platform
WSGIserver-1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 66.1 kB

Release files / WSGIserver-1.3.tar.gz

Download URL WSGIserver-1.3.tar.gz
Size 40.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1220145eba20262358a7556adb7447dd5c6a736079982623a4f1d2fe69ac5f0e
BLAKE2b-256 checksum
How to use checksums
b876adaa6544746bd11c6bab6c9b4be0a40054835ef1c92c4487c28c7509ddc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / WSGIserver-1.3-py2.py3-none-any.whl

Download URL WSGIserver-1.3-py2.py3-none-any.whl
Size 26.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1069fd004322f693e4d0b0b336b6785346abb4674a196f851e7d4e601052e383
BLAKE2b-256 checksum
How to use checksums
94436d579a54c12f79f037c245d8bb4692d0c3691b2c8391c5db9f9ddd071712
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.3 This release

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page