module documentation
WiFi Server - Host a web server over WiFi.
| Class | |
Simple HTTP Server for MicroPython WiFi Devices |
| Function | run |
Run the app. |
| Function | start |
Start the app and begin serving. |
| Function | stop |
Stop the app and clean up. |
| Constant | SERVER |
Undocumented |
| Constant | SERVER |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Variable | box |
Undocumented |
| Variable | current |
Undocumented |
| Variable | current |
Undocumented |
| Variable | just |
Undocumented |
| Variable | menu |
Undocumented |
| Variable | save |
Undocumented |
| Variable | server |
Undocumented |
| Variable | settings |
Undocumented |
| Function | __add |
Add a new page to the server. |
| Function | __add |
Callback for when a page field is saved during add page. |
| Function | __box |
Start the textbox for server output. |
| Function | __callback |
Callback for when a page field is saved. |
| Function | __delete |
Delete a page from the server info file. |
| Function | __edit |
Edit a page field given its index. |
| Function | __edit |
Edit a setting using the keyboard. |
| Function | __get |
Get the list of current pages from the server info file. |
| Function | __get |
Get the page info for a given index from the server info file. |
| Function | __get |
Get a setting from the server info file. |
| Function | __menu |
Run the server. |
| Function | __menu |
Show a menu to select from options. |
| Function | __save |
Save a setting to the server info file. |
| Function | __server |
Start the server app. |
| Function | __setting |
Callback for when a setting is saved. |
| Function | __toggle |
Toggle between AP and STA mode. |
Run the app.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
Start the app and begin serving.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
| Returns | |
bool | True if the app started, False on failure. |
Stop the app and clean up.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
Add a new page to the server.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
| Returns | |
bool | True if editing continues or the page was saved, False otherwise. |
Start the textbox for server output.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
Delete a page from the server info file.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
index:int | The page index to delete. |
def __edit_page(view_manager, index:
int, key: str, return_status: bool = True, return_state: int = STATE_PAGE_MENU) -> bool:
¶
Edit a page field given its index.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
index:int | The page index to edit. |
key:str | The field key to edit. |
returnbool | Whether to return to the edit page menu after saving. Defaults to True. |
returnint | The state to return to after saving. Defaults to STATE_PAGE_MENU. |
| Returns | |
bool | True if editing continues, False otherwise. |
Edit a setting using the keyboard.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
settingstr | The setting key to edit. |
| Returns | |
bool | True if editing continues or the setting was saved, False otherwise. |
Get the list of current pages from the server info file.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
| Returns | |
list[str] | The page URLs. |
Get the page info for a given index from the server info file.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
index:int | The page index. |
| Returns | |
dict | The page info. |
Get a setting from the server info file.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
key:str | The setting key. |
default:str | The value returned if the key is missing. Defaults to "". |
| Returns | |
str | The setting value. |
Run the server.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
Show a menu to select from options.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
Save a setting to the server info file.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
key:str | The setting key. |
value:str | The setting value. |
Start the server app.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
| Returns | |
bool | True if the server started, False otherwise. |
Toggle between AP and STA mode.
| Parameters | |
viewViewManager | The view manager instance for display and storage access. |
selection:int | 0 for AP mode, otherwise STA mode. |