A minimalistic non-threaded HTTP server written in Python. Supports REST & WebSockets¹.
Project description
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
Features
- 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
)
Installation
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
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.1rc7.tar.gz
(22.2 kB
view hashes)
Built Distribution
Close
Hashes for slimHTTP-1.0.1rc7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2538a36a3e3b9725e337990ff56849de3ed4a36410148e995d5e7d5d686020fe |
|
MD5 | 6d4e48b89d0586b596785ca4e72ce243 |
|
BLAKE2b-256 | 8795186a1c912eb209047eff7db7ad12b05ab6eaf7ada5e0762aa14df80ab484 |