-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f33a1a9
commit 1130eff
Showing
10 changed files
with
43 additions
and
47 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Examples of using Taipy event notifications to capture and consume *events*. | ||
|
||
# Real-Time GUI Updates with Taipy Event Consumers | ||
|
||
This script defines a custom event consumer class `SpecificCoreConsumer`, which listens | ||
for all events published by Taipy Core and triggers GUI notification based on those events. | ||
It includes determining if the event is published from a `Scenario^` entity or `DataNode^` entity | ||
and if the action is `CREATION` or `UPDATE`. | ||
|
||
|
||
```python linenums="1" | ||
{% | ||
include-markdown "./code-example/user-changes-notifier.py" | ||
comments=false | ||
%} | ||
``` | ||
|
||
This snippet shows a how you can capture and process events to notify user whenever | ||
a new scenario is created or the value of a data node is updated. | ||
For more details, see the [registration](understanding-notifier-register.md) page. | ||
|
||
# External API triggered with Taipy Event Consumers | ||
|
||
This script defines a custom event consumer class `JobFailureCoreConsumer`, which listens | ||
for all events published by Taipy Core, when a `JOB` entity's `status` attribute is `UPDATE`, | ||
and triggers an external API call based on the `JOB`'s `id`. | ||
|
||
|
||
```python linenums="1" | ||
{% | ||
include-markdown "./code-example/external-api-call-notifier.py" | ||
comments=false | ||
%} | ||
``` | ||
|
||
This snippet shows a how you can capture and process `JOB` events when an `UPDATE` is made to the `status` | ||
of the `JOB` and request an external API. | ||
For more details, see the [registration](understanding-notifier-register.md) page. |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters