Event SDK for creating Events in the helix architecture
Project description
helix.events.sdk
The helix.events.sdk package facilitates sending strongly typed events within the helix architecure. Currently one type of event, AuditEvent, is supported. The following code snippet shows how to instantiate and send and audit event:
# create the AuditEvent
event = AuditEvent(Source.BWELLBACKEND, Audit(patient_id="1",
user_id="1",
user_role="Patient",
ip_address="192.168.1.1",
action=AuditAction.READ,
action_type=AuditActionType.VIEW,
accessed_resource=ResourceType.DIAGNOSES))
# create an event writer
event_writer = EventWriter(get_logger())
# write the event
event_writer.write_event(event=event)
Currently EventWriter simply logs the event, but in future versions will publish the event to the appropriate event store.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
helix.events.sdk-0.1.0.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for helix.events.sdk-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65f46bb48bd68b73705c4cdff6319c30e3c7519fe21ef6883f90872fa26691a7 |
|
MD5 | 6ade6de5a15be24420d902086448b89b |
|
BLAKE2b-256 | f5e148a295a4d10f4c0086a2005b86a3f2cfd690471d3d95cd97651978902ea9 |