class documentation
Settings management for Picoware.
| Method | __init__ |
Initialize settings, loading from storage if present. |
| Method | anthropic |
Set the Anthropic API key. |
| Method | dark |
Set dark mode. |
| Method | debug |
Set debug mode. |
| Method | deepseek |
Set the DeepSeek API key. |
| Method | exit |
Set the exit button setting. |
| Method | gemini |
Set the Gemini API key. |
| Method | gmt |
Set GMT offset. |
| Method | local |
Set the local URL. |
| Method | lvgl |
Set LVGL mode. |
| Method | onscreen |
Set onscreen keyboard. |
| Method | openai |
Set the OpenAI API key. |
| Method | screen |
Set the screen brightness. |
| Method | server |
Set the server settings. |
| Method | theme |
Set the theme color. |
| Method | usb |
Set USB streaming. |
| Method | wifi |
Set the WiFi settings. |
| Method | xai |
Set the xAI API key. |
| Class Variable | __slots__ |
Undocumented |
| Property | anthropic |
Return the current Anthropic API key. |
| Property | dark |
Return True if dark mode is enabled, False otherwise. |
| Property | debug |
Return True if debug mode is enabled, False otherwise. |
| Property | deepseek |
Return the current DeepSeek API key. |
| Property | exit |
Return the current exit button setting. |
| Property | gemini |
Return the current Gemini API key. |
| Property | gmt |
Return the current GMT offset. |
| Property | local |
Return the current local URL. |
| Property | lvgl |
Return True if LVGL mode is enabled, False otherwise. |
| Property | onscreen |
Return True if onscreen keyboard is enabled, False otherwise. |
| Property | openai |
Return the current OpenAI API key. |
| Property | screen |
Return the current screen brightness. |
| Property | server |
Return the current server settings. |
| Property | settings |
Return all settings as a dictionary. |
| Property | theme |
Return the current theme color. |
| Property | usb |
Return True if USB streaming is enabled, False otherwise. |
| Property | wifi |
Return the current WiFi settings. |
| Property | xai |
Return the xAI API key. |
| Method | __fetch |
Fetch a setting value from storage. |
| Method | __save |
Save settings to storage. |
| Instance Variable | _path |
Undocumented |
| Instance Variable | _settings |
Undocumented |
| Instance Variable | _storage |
Undocumented |
Initialize settings, loading from storage if present.
| Parameters | |
storage:Storage | The storage instance for reading and writing settings. |
Fetch a setting value from storage.
| Parameters | |
path:str | The storage path of the settings file. |
key:str | The setting key to look up. |
default:object | Value returned when the setting is missing. Defaults to "". |
| Returns | |
object | The fetched setting value or the default. |