I propose you my new powerful embedded Web Server for MicroPython (and CPython) that supports route handlers, modules like WebSockets or PyhtmlTemplate and a lot of simultaneous requests.
Mostly used on ESP32, Pycom WiPy, STM32 on Pyboard, ... Robust and efficient (thousands requests on CPython!)
GitHub - Open Source - MIT - Great documentation
- Embed microWebSrv2 into your microcontrollers as a powerful web server.
- Benefit from a fully asynchronous architecture that allows to process many concurrent requests very quickly.
- Use multiple worker threads to parallelize simultaneous processes.
- Adjust settings to fine-tune resources usage and sizing pre-allocated memory.
- Load additional modules to extend the server's functionalities.
- Customize the management of centralized logs.
- Apply SSL/TLS security layer and certificate on web connections (https mode).
- Define web routes with variable arguments in order to be able to process the targeted requests.
- Receive any type of request such as GET, HEAD, POST, PUT, DELETE, OPTIONS, PATCH, ...
- Use the route resolver (from the path) and the path builder (from the route) for convenience.
- Increase loading speed by automatically allowing web clients to cache static files.
- Receive name/value pairs from URL encoded forms.
- Send and receive JSON objects and use them to create a RESTful API style.
- Play with AjAX requests to interact quickly with a web application.
- Verify that a request is successfully authenticated by the Basic or Bearer method.
- Reduce the number of persistent connections per web client with keep-alive mode support.
- Respond to a request by using a data stream as content, sent with known length or in chunked transfer-encoding.
- Use a file to respond to a request that will be treated as on-the-fly content or as an attachment to download.
- Take advantage of the WebSockets module to exchange messages in real time via WS or secured WSS connection.
- Create .pyhtml pages for an HTML rendering with integrated Python using the PyhtmlTemplate module.