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 theUser-Agentin the HTTP request and thesourcefield in the loganne event.LOGANNE_ENDPOINT: The full URL of the/eventsendpoint of a runninglucos_loganneinstance.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lucos_loganne_pythonclient-2.0.4.tar.gz.
File metadata
- Download URL: lucos_loganne_pythonclient-2.0.4.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533850d6c2ec8ccab79a6926e5fcda2483be7218a5ec9ac0f8a2ffd5d01fb860
|
|
| MD5 |
01f19e564827e96d384241cf31b47982
|
|
| BLAKE2b-256 |
c4e0784cd723f753fea803d482a30b7b576a25d94a7381406eb415817e2b3a4a
|
File details
Details for the file lucos_loganne_pythonclient-2.0.4-py3-none-any.whl.
File metadata
- Download URL: lucos_loganne_pythonclient-2.0.4-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67ed9b7386a9c0abaffce2276ff344dc907f44e46dfc47915dc9de763d84e29a
|
|
| MD5 |
0207f253b8bf3cf0291d6c3a9ec2722c
|
|
| BLAKE2b-256 |
101d5b6740309ac44db855396795822fc3b1a5c95da9b27ab0312947ce7051f4
|