NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Event tracking handler with encrypted event contents. Provides
functionality for creating encrypted event records, generating
sample event data with fake contents, and decrypting stored
event payloads. Stores events in the track_events table.
ObjData.ObjData
└── ObjEvent
factory.core/ObjEvent.pyObjData.ObjDataObjEvent.yamltrack_events| Method | Description |
|---|---|
__init__(self, DB=0) |
Initialise ObjEvent and ensure track_events table exists |
_encrypt_dict_values(self, data_dict, enc_obj, package) |
Recursively encrypt all values in a dictionary |
_decrypt_dict_values(self, data_dict, enc_obj, package) |
Recursively decrypt all values in a dictionary |
decrypt_event_contents(self, data, package="") |
Decrypt the EventContents dictionary of an event |
encrypt_event_contents(self, event_contents_dict, event_type="SYS", package="") |
Encrypt event contents and return a JSON event record |
generate_event_json(self) |
Generate a sample encrypted event JSON record using fake data |
Event contents are encrypted per-value (not per-record). The
_encrypt_dict_values and _decrypt_dict_values methods walk
the dictionary tree recursively, encrypting or decrypting each
leaf value individually via ObjEncryption. The encryption key
is selected by package name.
Run from the project root:
python factory.core/ObjEvent.py --help
| Command | Description |
|---|---|
fakejson |
Generate a sample encrypted event JSON record |
decrypt |
Decrypt a hardcoded sample event for testing |
encrypt |
Encrypt a sample payload and then decrypt it |
status |
Check that the ObjEvent module is operational |
cythonize -3 -a -i ObjEvent.py
Updated: 2026-03-20