Releases: Ishanoshada/Microweb
0.2.1
0.2.1
Full Changelog: 0.2.0...0.2.1
0.2.0
Full Changelog: 0.1.9...0.2.0
0.1.9
Full Changelog: 0.1.8...0.1.9
0.1.8
Full Changelog: 0.1.7...0.1.8
0.1.7
Feature Updates
Version 0.1.7 Release Notes
- Wi-Fi Configuration Enhancements:
- Added
mode='wifi'option to connect the ESP32 as a client to an existing Wi-Fi network usinginternet={'ssid': ..., 'password': ...}(e.g.,Dialog 4G 0F8with IP192.168.8.102). Falls back to access point mode if the connection fails. - Improved
config.jsonloading for Wi-Fi credentials, with a default fallback AP (SSID:ESP32-MicroWeb, password:12345678, IP:192.168.4.1).
- Added
- External API Support with
urequests:- Integrated
urequestsfor making HTTP/HTTPS requests to external APIs (e.g.,https://jsonplaceholder.typicode.com/posts/1). - Added error handling for HTTPS requests, which may fail on ESP32 due to limited SSL/TLS support, with fallback to HTML error messages or local templates (e.g.,
/offlineroute).
- Integrated
- Template Engine Improvements:
- Enhanced template rendering with support for
forloops andifconditionals, as demonstrated intests/request_send/index.html. - Improved variable substitution and error handling for robust rendering on resource-constrained ESP32 devices.
- Enhanced template rendering with support for
- Static File Serving:
- Streamlined serving of static files (e.g.,
style.css,script.js) withapp.add_static(). - Optimized file upload process via
microweb run --staticto ensure only changed files are uploaded.
- Streamlined serving of static files (e.g.,
- CLI Improvements:
- Added real-time logging support when running apps with
mpremote connect COM10 run app.py, showing Wi-Fi connection status and IP address. - Improved file validation and dependency checking for templates and static files.
- Added real-time logging support when running apps with
- Example Updates:
- Added
tests/request_send/example demonstratingmode='wifi',urequestsfor API calls, dynamic template rendering, and static file serving. - Updated examples to include
app.get_ip()for retrieving the ESP32’s IP address in responses.
- Added
- Bug Fixes:
- Fixed issues with Wi-Fi connection stability in station mode.
- Resolved template rendering errors for missing variables, ensuring empty string fallback.
- Documentation:
- Updated
README.mdwith detailed examples formode='wifi'andurequestsusage. - Added testing instructions using
curlandmpremotefor debugging.
- Updated
Note: HTTPS requests may require a MicroPython build with SSL/TLS support or a proxy server. For reliable API calls, use HTTP endpoints or local fallbacks (e.g., mirror.html).
0.1.6
added :
app.stop_wifi() # Uncomment to stop Wi-Fi access point
app.start_wifi() # Uncomment to start Wi-Fi access point after stop
0.1.5
MicroWeb Release Notes - Version 0.1.5
Overview
Version 0.1.5 introduces significant enhancements to the MicroWeb framework, focusing on improving the template engine, static file serving, and CLI functionality for MicroPython on ESP32. This release adds support for dynamic template rendering with for loops and conditionals, enhances static file handling for CSS and JavaScript, and improves the create command for generating example applications.
New Features
- Template Engine Enhancements: Added support for
forloops andif/elseconditionals in templates, enabling dynamic rendering of lists and conditional content. - Static File Serving: Improved support for serving static files (e.g.,
style.css,script.js) to enhance web interfaces with consistent styling and interactivity. - CLI Improvements: Enhanced the
microweb createcommand to generate example apps withapp.py,index.html,style.css,script.js, andREADME.md, including aforloop example. - Dynamic Routing: Strengthened dynamic routing with URL parameter handling (e.g.,
/greet/<name>), improving flexibility for API endpoints. - JSON Responses: Optimized
app.json_responsefor consistent API output with properContent-Typeheaders.
Improvements
- Wi-Fi Configuration: Refined Wi-Fi handling with better fallback to access point mode when station mode fails.
- Debugging: Enhanced
debug=Truelogging for template rendering and static file serving errors. - Documentation: Updated
README.mdtemplate in generated apps to include instructions for testingforloops and static files.
Bug Fixes
- Fixed issues with template caching on ESP32, improving performance for repeated renders.
- Resolved errors in
req.formparsing for POST requests with empty or malformed data. - Corrected CLI path handling for Windows environments in the
createcommand.
Upgrade Instructions
- Update MicroWeb to version 0.1.5:
pip install microweb==0.1.5
- For existing apps, ensure templates use the new
{% %}and{{ }}syntax for variables and control structures. - Update static file references in templates to include
.cssand.jsfiles served viaapp.add_static. - Test existing routes with
curlor a browser to verify compatibility with the updated template engine.
Known Issues
- Large template files (>10KB) may cause memory issues on ESP32 due to MicroPython constraints. Consider splitting complex templates.
- Custom Wi-Fi configurations in
config.jsonmay require revalidation after upgrading.
Feedback
Report issues or suggest features at https://github.com/ishanoshada/microweb.
0.1.4
update
0.1.3
Full Changelog: 0.1.2...0.1.3
0.1.2
Full Changelog: 0.1.1V...0.1.2