wsgi_app
¶
CircuitPython framework for creating WSGI server compatible web applications. This does not include server implementation, which is necessary in order to create a web application with this library.
- Circuit Python implementation of an WSGI Server for ESP32 devices: https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI.git
- Author(s): Matthew Costi
Implementation Notes¶
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
-
class
adafruit_wsgi.wsgi_app.
WSGIApp
¶ The base WSGI Application class.
-
on_request
(methods, rule, request_handler)¶ Register a Request Handler for a particular HTTP method and path. request_handler will be called whenever a matching HTTP request is received.
- request_handler should accept the following args:
- (Dict environ)
- request_handler should return a tuple in the shape of:
- (status, header_list, data_iterable)
Parameters:
-
route
(rule, methods=None)¶ A decorator to register a route rule with an endpoint function. if no methods are provided, default to GET
-