A no-dependency, simple, minimal and flexible HTTP server written in Python.
Supports: REST, WebSocket¹, vhosts, reverse proxy and static file delivery.
- slimHTTP documentation
- slimHTTP discord server
- No dependencies or additional requirements
- REST routes (
@http.route('/some/endpoint')
) - websockets using plugin spiderWeb ¹
- Can emulate files via
@http.route('/example.html')
- vhosts
- TLS (SSL)
- reverse proxy
.py
extensions in web-root/vhosts without having to use FastCGI- No threads used by default (fully relies on
epoll()
andselect()
on Windows) - flexible runtime configuration and re-configuration (using annotation
@http.configuration
)
The project is hosted on PyPi and can be installed with pip
.
sudo pip install slimHTTP
But it can also be cloned manually (or downloaded)
git clone https://github.com/Torxed/slimHTTP
import slimHTTP
http = slimHTTP.host(slimHTTP.HTTP)
http.run()
Serves any files under /srv/http
by default in HTTP
mode.
It's not pretty down here. But it'll do in a pinch.