tinyweb

Simple and lightweight HTTP async server for micropython

MIT License

Stars
247
Committers
9

Bot releases are visible (Hide)

tinyweb - Release 1.3.5 Latest Release

Published by belyalov over 4 years ago

Firmware

Now based on micropython 1.12

Bug fixes

#24 - Unexpectedly closed connection on non existing URLs (404)

tinyweb - Release 1.3.4

Published by belyalov about 5 years ago

Fixes

  • #20: Properly handle UTF strings restful_resource_handler()
tinyweb - Release 1.3.3

Published by belyalov almost 6 years ago

Frozen examples

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()

tinyweb - Release 1.3.2

Published by belyalov almost 6 years ago

Release images

#18 - This release fixes broken travis script which result in broken release images for esp32 / esp8266

tinyweb - Release 1.3.1

Published by belyalov almost 6 years ago

@resource decorator:

    @app.resource('/user/<id>')
    def user(data, id):
        return {'id': id, 'name': 'foo'}

TCP listen/accept backlog bugfix

Now binaries for esp8266 based on https://github.com/micropython/micropython/commit/4737ff8054e84b3ccd1e7364d773a8c1d14095f5 which contains bugfix for TCP listen/accept backlog

tinyweb - Release 1.3

Published by belyalov almost 6 years ago

Optimizations

  • Get rid of get_mime_type() - mostly useless, however, consumes a lot of memory.
  • Get rid of debug messages.
  • Do not use names for HTTP codes.
  • Minor code cleanup

Chunked encoding

Since HTTP/1.0 does not support Transfer-Encoding: chunked - workaround added: use HTTP/1.1 with Connection: close

Per-connection statistic

Simple counter for processed connections added

tinyweb - Release 1.2.3

Published by belyalov over 6 years ago

Better logging

In order to unify logging mechanism now tinyweb is using logging instead of pure print().

WARNING this may break your app! Consider use of logging module.

P.S. New image already contains logging module frozen.

tinyweb - Release 1.2.2

Published by belyalov over 6 years ago

Now based on top of micropython v1.9.4. release.

  • Added debug. When set - unhandled exception data will be propogated to client as well.
tinyweb - Release 1.2.1

Published by belyalov over 6 years ago

Minor release aimed to fix bug with max_concurrency and refactor implementation of request_timeout.

tinyweb - Release 1.2

Published by belyalov over 6 years ago

New Features

  • Limit concurrently opened connections (max_concurrency param)
  • Close connections by timeout (request_timeout param)

Enhancements

  • Allow REST handler to return simple string (converting from dict to json sometimes too expensive)

Bugfixes

  • Properly handle connection errors (ECONNREST, ECONNABORT, etc)

Misc

  • Replace old styled yield from to async / await
tinyweb - Release 1.1

Published by belyalov over 6 years ago

Mostly bugfixes, including but not limited to

Features

  • Keyword arguments into REST handler: add_resource(self, cls, url, **kwargs). Refer to #10
  • Added content_encoding to send_file()
  • parse_headers parameter replaced with save_headers dict to make it less memory consuming. Refer to #13
  • Switch from os to uos to remove unneeded dependency.
  • Add optional response message: def redirect(self, location, msg=None)

Fixes

  • Run garbage collection before / after REST handler
  • Couple of travis-ci bugfixes
tinyweb - Release 1.0

Published by belyalov over 6 years ago

First stable release of tinyweb.
Supported and tested devices:

  • ESP8266
  • ESP32
tinyweb - Beta2 release v1.0

Published by belyalov over 6 years ago

Bugfixes

  • Content-Length in auto OPTIONS method
  • add_resource() - now accepts either - class or class instance
  • Access-Control-Allow-Methods use comma instead of whitespace
  • Proper handle of Broken Pipe error

Improvements

  • Added simple way to do HTTP redirects: response.redirect()
  • Include simple error message into HTTP errors (like 404, 500, etc)
  • More documentation and unittests :)
tinyweb - Beta release v1.0

Published by belyalov almost 7 years ago

Release 1.0-beta

First working version of tinyweb.

What's included?

  • core functionality (webserver, request, response classes) / unittests
  • static content support
  • RestAPI support for HTTP form types:
    • urlencoded
    • json

What's missed?

  • HTTP/1.1 - currently, there is no any justification to use it on microcontrollers. Maybe in the future.
  • HTTP Authorization

Known issues / limitations

  • HTML form are supported in no so efficient way, probably there is a big room for improvements.
  • Not tested on ESP32 device, however, ESP8266 works fine, but requires frozen bytecode due to RAM limitation.
Package Rankings
Top 8.17% on Proxy.golang.org
Badges
Extracted from project README
Build Status
Related Projects