platypush/platypush/message
Fabio Manganiello 245472a4c5
Better event hooks filters.
- Support for nested attributes on event hook conditions. Things like
  these are now possible:

```
from platypush.event.hook import hook
from platypush.message.event.entities import EntityUpdateEvent

@hook(EntityUpdateEvent, entity={"external_id": "system:cpu"})
def on_cpu_update_event(event: EntityUpdateEvent, **_):
    print(event.args["entity"]["percent"])
```

- The scoring/regex extraction/partial string match logic in
  `_matches_argument` is actually only needed for
  `SpeechRecognizedEvent`. Other events don't need these features, and
  event hooks may be actually triggered unexpectedly in case of partial
  matches. Therefore, the "complex" `_matches_argument` has been moved
  as an override only for `SpeechRecognizedEvent`, and all the other
  events will perform simple key-value matching.
2023-04-26 01:45:58 +02:00
..
event Better event hooks filters. 2023-04-26 01:45:58 +02:00
request Replaced `disable_logging` with a more generic `logging_level`. 2022-12-11 11:46:37 +01:00
response Converted `system.processes` to the new data model. 2023-04-23 02:08:43 +02:00
__init__.py Fixed dataclass JSON serialization 2023-04-24 01:18:33 +02:00