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, level, 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.
  • level (str, required): The editorial prominence of the event. Must be one of:
    • detail — mechanical/low-interest churn, hidden from the default feed.
    • routine — regular estate activity (the most common level).
    • notable — worth emphasising in-feed.
    • headline — estate-significant, suitable for a homepage glance.
  • 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",
    level="routine",
    url="https://contacts.example.com/contact/123456"
)

# With extra structured data
updateLoganne(
    type="entityMerged",
    humanReadable="Contact \"Old Name\" merged into \"New Name\"",
    level="notable",
    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-2.0.0.tar.gz (2.7 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-2.0.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for lucos_loganne_pythonclient-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b7473411580a0976c7e4ffd520aabaf38dc6ee5b32f38d4928c196a43987afc5
MD5 8e0f0e6e0b9acd32ad4f6703c3769526
BLAKE2b-256 b30d78a84ec5d519a7647ec5cd9bfa53b77865a253d56db659a4e7306207b00e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lucos_loganne_pythonclient-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1413ac5e27e7f07438ff64983511a566202ca02dd2ad27d25866207c1d66b097
MD5 2e002805d578d899da02d8b85a989fd3
BLAKE2b-256 58ed0b2a0b3673d19868741ba07e96ea946401f4b4c28a8ed598020b8fd7ccc3

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