Simple and lightweight HTTP async server for micropython
Include examples into release firmware - in order to simplify flash-n-try, flash image and simply run example:
>>> import network
# Connect to WiFi
>>> sta_if = network.WLAN(network.STA_IF)
>>> sta_if.active(True)
>>> sta_if.connect('<ssid>', '<password>')
# Run Hello World! :)
>>> import examples.hello_world as hello
>>> hello.run()
@resource
decorator: @app.resource('/user/<id>')
def user(data, id):
return {'id': id, 'name': 'foo'}
Now binaries for esp8266
based on https://github.com/micropython/micropython/commit/4737ff8054e84b3ccd1e7364d773a8c1d14095f5 which contains bugfix for TCP listen/accept backlog
Since HTTP/1.0 does not support Transfer-Encoding: chunked
- workaround added: use HTTP/1.1
with Connection: close
Simple counter for processed connections added
Now based on top of micropython v1.9.4. release.
debug
. When set - unhandled exception data will be propogated to client as well.Minor release aimed to fix bug with max_concurrency
and refactor implementation of request_timeout
.
max_concurrency
param)request_timeout
param)dict
to json
sometimes too expensive)ECONNREST
, ECONNABORT
, etc)yield from
to async / await