Skip to main content

A minimalistic non-threaded HTTP server written in Python. Supports REST & WebSockets¹.

Project description

drawing

A simple, minimal and flexible Python HTTP server.
Supports: REST, WebSocket¹, vhost's, reverse proxy and static file delivery.

Features

  • REST routes (@http.route('/some/endpoint'))
  • websockets using plugin spiderWeb ¹
  • Can emulate files via @http.route('/example.html')
  • vhosts
  • tls
  • reverse proxy
  • .py extensions in web-root/vhosts without having to use FastCGI
  • No threads used by default (fully relies on epoll() (select() on Windows))
  • flexible runtime configuration and re-configuration (using @http.configuration annotation to achieve this)

Minimal example

import slimHTTP

http = slimHTTP.host(slimHTTP.HTTP)
http.run()

Serves any files under /srv/http by default in HTTP mode.

Footnote

It's not pretty down here. But it'll do in a pinch.

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

slimHTTP-1.0.1rc5.tar.gz (17.5 kB view hashes)

Uploaded Source

Built Distribution

slimHTTP-1.0.1rc5-py3-none-any.whl (30.5 kB view hashes)

Uploaded Python 3

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