Skip to main content

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


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.0.9.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

helix.events.sdk-0.0.9-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page