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.
How to set up
make devsetup- to build the dev setupmake tests- to run all tests under/tests/directory
Examples
- 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))
kafka_brokers = [
"kafkabroker1:9092",
"kafkabroker1:9092"
]
with KafkaEventWriter(
get_logger(), kafka_brokers=kafka_brokers, use_ssl=True
) as kafka_event_writer:
kafka_event_writer.write_event(event=event)
The above code shows how to write an event to Kafka assuming the kafka cluster has two brokers and uses TLS.
Metadata
Release files for helix.events.sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| helix.events.sdk-0.1.1.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| helix.events.sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.4 kB
Release files / helix.events.sdk-0.1.1.tar.gz
| Download URL | helix.events.sdk-0.1.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
adae34fc948a03efb8df516d5e6bde8eed4fe84b6dfe9b2eb566fa1d884c5918
|
|
BLAKE2b-256 checksum How to use checksums |
539ce1897c6616971821704ef947b0e3f3c84a8a88b1b56c7479b759fdec8459
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / helix.events.sdk-0.1.1-py3-none-any.whl
| Download URL | helix.events.sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db87745375761a019ebef9bec6ceb7ac44d5ab057edf33a336fbd48c00d8cdaf
|
|
BLAKE2b-256 checksum How to use checksums |
b0960dc6d9eb60cb143292f71cd7db85c9c5b7cd1ecc7f69de8e4f07d6cb07ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|