pywry.commands¶
Tauri IPC command handlers and event dispatch.
Command Dispatch¶
pywry.commands.dispatch_command
¶
Dispatch a command to its handler.
| PARAMETER | DESCRIPTION |
|---|---|
command
|
The command name.
TYPE:
|
payload
|
The command payload.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict from the handler. |
pywry.commands.register_commands
¶
Register IPC commands with pytauri.
| PARAMETER | DESCRIPTION |
|---|---|
commands
|
pytauri Commands instance.
TYPE:
|
pywry.commands.serialize_response
¶
Serialize a response to JSON string.
| PARAMETER | DESCRIPTION |
|---|---|
response
|
The response dict.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
JSON string. |
Event Handlers¶
pywry.commands.handle_window_close
¶
Handle window close event - aggressive cleanup.
| PARAMETER | DESCRIPTION |
|---|---|
label
|
The window label.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict. |
pywry.commands.handle_pywry_result
¶
Handle result from JavaScript execution.
| PARAMETER | DESCRIPTION |
|---|---|
label
|
The window label.
TYPE:
|
data
|
The result data.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict indicating success/failure. |
pywry.commands.handle_pywry_event
¶
Handle generic events from JavaScript.
| PARAMETER | DESCRIPTION |
|---|---|
label
|
The window label.
TYPE:
|
event_data
|
The event data including type and payload.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict indicating success/failure. |
pywry.commands.handle_plotly_event
¶
Handle Plotly-specific events.
| PARAMETER | DESCRIPTION |
|---|---|
label
|
The window label.
TYPE:
|
event_data
|
The event data with plotly_event and data fields.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict indicating success/failure. |
pywry.commands.handle_aggrid_event
¶
Handle AG Grid-specific events.
| PARAMETER | DESCRIPTION |
|---|---|
label
|
The window label.
TYPE:
|
event_data
|
The event data with grid_event and data fields.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict indicating success/failure. |
pywry.commands.handle_open_file
¶
Open a file with the system's default application.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
The file path to open.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict indicating success/failure. |
pywry.commands.handle_open_url
¶
Open a URL in the system's default browser.
| PARAMETER | DESCRIPTION |
|---|---|
url
|
The URL to open.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict of str to Any
|
Response dict indicating success/failure. |
Payload Models¶
pywry.commands.GenericEvent
¶
Bases: BaseModel
Generic event for custom event handling.