Skip to main content

A python client for sending events to lucos_loganne

Project description

lucos_loganne_pythonclient

A python client for sending events to lucos_loganne.

Environment Variables

The following environment variables must be set for the package to function:

  • SYSTEM: A unique identifier for the system or service sending the events. This is used as the User-Agent in the HTTP request and the source field in the loganne event.
  • LOGANNE_ENDPOINT: The full URL of the /events endpoint of a running lucos_loganne instance.

API

The package exposes a single function:

updateLoganne(type, humanReadable, url=None, **extra_data)

Sends an event to the Loganne service.

  • type (str, required): The type of event being logged.
  • humanReadable (str, required): A description of the event that is easy for humans to understand.
  • url (str, optional): A link to a human-readable page regarding the item the event pertains to. Defaults to None.
  • **extra_data (optional): Any additional keyword arguments are forwarded as extra fields in the event payload. Useful for attaching structured data to events (e.g. multiple URIs, identifiers, or other context).

Usage

from loganne import updateLoganne

# Ensure SYSTEM and LOGANNE_ENDPOINT env vars are set
updateLoganne(
    type="contactUpdated",
    humanReadable="The Contact \"John Doe\" has been updated",
    url="https://contacts.example.com/contact/123456"
)

# With extra structured data
updateLoganne(
    type="entityMerged",
    humanReadable="Contact \"Old Name\" merged into \"New Name\"",
    url="https://contacts.example.com/contact/789",
    sourceUri="https://contacts.example.com/contact/123",
    targetUri="https://contacts.example.com/contact/789",
)

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

lucos_loganne_pythonclient-1.0.34.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lucos_loganne_pythonclient-1.0.34-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file lucos_loganne_pythonclient-1.0.34.tar.gz.

File metadata

File hashes

Hashes for lucos_loganne_pythonclient-1.0.34.tar.gz
Algorithm Hash digest
SHA256 f19cdf1e2a71d1c191b1c5d213f617c5091eac592f9e2d497498458a12c35229
MD5 f4d3b3623313dc4091ab3734814aecdf
BLAKE2b-256 75722b14040e1c29eb5f01863e1aed4c22e39adff91026b1afc184917450b606

See more details on using hashes here.

File details

Details for the file lucos_loganne_pythonclient-1.0.34-py3-none-any.whl.

File metadata

File hashes

Hashes for lucos_loganne_pythonclient-1.0.34-py3-none-any.whl
Algorithm Hash digest
SHA256 7e359c9e4e02e02ae53ed66c670ab5c2b18f591ca940be06860d29df7b636f64
MD5 5864d109a38cc5309c792996e60c3632
BLAKE2b-256 96b91f7c9269706b34cb01f5659540538e535e8ce224868ec6318aab1b3f7135

See more details on using hashes here.

Supported by

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