A minimalistic non-threaded HTTP server written in Python. Supports REST & WebSockets¹.
Project description
A simple, minimal and flexible Python HTTP server.
Usecases may be: REST, WebSocket¹, reverse proxy and static file delivery.
- slimHTTP documentation
- slimHTTP discord server
Supports
- REST routes (
@http.route('/some/endpoint')
) - websockets if
@http.on_upgrade
is defined using spiderWeb ¹ - Static file emulation with
@http.route('/example.html')
- vhosts
- ssl/tls
- reverse proxy
- python module proxy
- No threading or threads used (fully relies on
epoll()
(select()
on Windows)) - flexible configuration in runtime via
@http.configuration
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
Release history Release notifications | RSS feed
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.1rc4.tar.gz
(17.5 kB
view hashes)
Built Distribution
Close
Hashes for slimHTTP-1.0.1rc4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b5a69e1ed5a4d8d941c90abb83ff81e551f0cdcd901b87ec3d1ebfded577153 |
|
MD5 | 0b958ddcb689760af2a1f362933b2cb0 |
|
BLAKE2b-256 | c3a83faa7d9f1ffbdbc59ea5b819a0000e21700fc78391cf730f8b99701074c3 |