* Fixed gzip automatic content-type assignment and added automatic compression setting This implements the fix for detecting the proper content-type even when the file has the ".gz" extension. It further makes sure the compression headers are set properly if a "gz." file is detected, but the compression headers weren't explicitly set by the user. * Added a test for properly auto-determining mime types and setting content encoding header * Modified the gzip file header assignments and following tests according to the feedback. --------- Co-authored-by: Lukáš Kremla <lukas.kremla@bonnel.cz>
microdot
“The impossibly small web framework for Python and MicroPython”
Microdot is a minimalistic Python web framework inspired by Flask. Given its small size, it can run on systems with limited resources such as microcontrollers. Both standard Python (CPython) and MicroPython are supported.
from microdot import Microdot
app = Microdot()
@app.route('/')
async def index(request):
return 'Hello, world!'
app.run()
Migrating to Microdot 2
Version 2 of Microdot incorporates feedback received from users of earlier releases, and attempts to improve and correct some design decisions that have proven to be problematic.
For this reason most applications built for earlier versions will need to be updated to work correctly with Microdot 2. The Migration Guide describes the backwards incompatible changes that were made.
Resources
- Change Log
- Documentation
Roadmap
The following features are planned for future releases of Microdot, both for MicroPython and CPython:
- Support for forms encoded in
multipart/form-dataformat - Authentication support, similar to Flask-Login for Flask
- OpenAPI integration, similar to APIFairy for Flask
In addition to the above, the following extensions are also under consideration, but only for CPython:
- Database integration through SQLAlchemy
- Socket.IO support through python-socketio
Do you have other ideas to propose? Let's discuss them!