You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Web Server library for `Micropython`: Simple, easy-to-use, versatile, highly compatible
6
+
- Web Server Library for Micropython: Easy to use, versatile, highly compatible
5
7
6
8
### Features
7
-
- Aims to mimic the style of the `Flask` framework as much as possible
8
-
- Integrates commonly used functionalities such as parsing GET requests, form parsing, HTML rendering, and file sending
9
+
- Aims to mimic the style of the Flask framework as much as possible
10
+
- Integrates common functionalities such as GET request parameter parsing, form parsing, HTML rendering, file sending, cookie setting, cookie retrieval, dynamic routing, and more.
9
11
10
-
### Usage Instructions
11
-
- There are three versions of files available in this project, please choose according to your specific needs:
12
-
-`thread`: `/libs/easyweb_thread.py` implemented using multi-threading
13
-
-`asyncio`: `/libs/easyweb.py` implemented using asynchronous programming, with good compatibility and reliability
14
-
-`single`: `/libs/easyweb_single.py` implemented using single-threaded looping, with good compatibility
12
+
### Instructions
13
+
- There are three versions of the project files, please choose the one that suits your needs:
14
+
-`thread`: `/libs/easyweb_thread.py`- implemented with multithreading
15
+
-`asyncio`: `/libs/easyweb.py`- implemented with asynchronous support, provides better compatibility and reliability
16
+
-`single`: `/libs/easyweb_single.py`- implemented with a single thread loop, provides good compatibility
15
17
16
18
### Compatibility
17
19
#### Tested Devices
18
20
-`ESP-01S`: `single`
19
21
-`ESP32-C3`: `single`, `thread`, `asyncio`
20
22
21
-
### Example Code
23
+
### Sample Code
24
+
- Here we use [micropython-easynetwork](https://github.com/funnygeeker/micropython-easynetwork) as an example to connect to the local network (it can also work in AP mode, allowing other devices to connect to the development board).
22
25
```python
23
-
from libs.easyweb import EasyWeb
26
+
import time
27
+
from libs.easynetwork import Client
28
+
from libs.easyweb import EasyWeb, render_template, send_file, make_response
29
+
30
+
client = Client()
31
+
client.connect("ssid", "password") # or client.connect("ssid", "")
0 commit comments