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 details)
Built Distribution
File details
Details for the file slimHTTP-1.0.1rc7.tar.gz
.
File metadata
- Download URL: slimHTTP-1.0.1rc7.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa608950b805235deed3c4e1f88816688942351cfacf7c16b46d62854b0fa40d |
|
MD5 | ec5a0a4ad3edacaafd5a79f1ae6acf62 |
|
BLAKE2b-256 | e221a2b3f73574c3d58012e00542772a32e32ec920deab672e78a55c17fd6bfd |
File details
Details for the file slimHTTP-1.0.1rc7-py3-none-any.whl
.
File metadata
- Download URL: slimHTTP-1.0.1rc7-py3-none-any.whl
- Upload date:
- Size: 34.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2538a36a3e3b9725e337990ff56849de3ed4a36410148e995d5e7d5d686020fe |
|
MD5 | 6d4e48b89d0586b596785ca4e72ce243 |
|
BLAKE2b-256 | 8795186a1c912eb209047eff7db7ad12b05ab6eaf7ada5e0762aa14df80ab484 |