Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

dgtl-logging

NEN7513 compliant logging library according to the current scope of DGTL Health BV

Updating

  • update setup.py with new version number
  • push or merge pull request to master branch and a github action will build and publish the package

Installing

pip install dgtl-logging

Usage

EventObject, UserObject and CustomObject

Usage of the EventObject and UserObject are similar and have a validate() method built-in. The CustomObject does not have predefined parameters.

Use the validate() method just before passing the object to your logging function.

from dgtl_logging.dgtl_logging import CustomObject, EventObject, UserObject

event = EventObject()
event.update_parameters(gebeurteniscode='code1')
event.update_parameters(actiecode='action1', utcisodatetime='2023-10-10T00:00:00Z')
event.update_parameters(identificatortype='type1', identificator='id1', aard='typeA')

To validate if all required parameters are filled: event.validate()

Writing to the logging ledger

DGTLLogging can be initiated as follows dgtl_logging = DGTLLogging(log_ledger_table=log_ledger_table, env='test', raise_errors=True). Where log_ledger_table is the logging table in the chosen ledger. env is the environment (i.e. dev, acc, prod, etc.). raise_errors is useful for production workloads and uses logging.error() instead of raising an error and breaking any critical processes due to logging faults.

When all required parameters are added to the EventObject and UserObject you can pass them to resp = dgtl_logging.add_log(event_object=event, user_object=user), which returns True when the insertion was succesful and raises an error otherwise.

Metadata

Release files for dgtl-logging 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dgtl-logging 0.2.0
File Size Uploaded Provenance Actions
dgtl_logging-0.2.0.tar.gz 4.4 kB Without provenance Details for dgtl_logging-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dgtl-logging 0.2.0
File Interpreter ABI Platform Actions
dgtl_logging-0.2.0-py3-none-any.whl Python 3 none any Details for dgtl_logging-0.2.0-py3-none-any.whl

Total release size: 10.1 kB

Release files / dgtl_logging-0.2.0.tar.gz

Download URL dgtl_logging-0.2.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8bd40ef0a1754da1d3edfbf480b6bd5a4755370f361a55ea2d8956ac91f04342
BLAKE2b-256 checksum
How to use checksums
f2b2f54f36e8aea2e7bacedc5caf42d08d445d653333b5f14eb338bb0332a5ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / dgtl_logging-0.2.0-py3-none-any.whl

Download URL dgtl_logging-0.2.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73a3449495cef726ae96c7311755ee517a088a2d8a6e497fd30e8e024f9016be
BLAKE2b-256 checksum
How to use checksums
f0b32e6c799638360ef49b6aa945c7b35b04261b1c5fec19d5217d78164edd99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.6

Security for dgtl-logging 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page