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)

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.

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"
)

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.25.tar.gz (2.1 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.25-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for lucos_loganne_pythonclient-1.0.25.tar.gz
Algorithm Hash digest
SHA256 a83f86751846bcd45f7eda491d8ec9b68d1770bb59cf0b22d1eb386591c8eaba
MD5 60da3c48fa405e56d84bf733eae4f686
BLAKE2b-256 bed113d0aef44ff5417d985586b06393bc7a87d82350dbc16e216e14d321e980

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lucos_loganne_pythonclient-1.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 d42d1460bc2b8e7f9ac243fc8683bf096319c1a4d2c4f2ecfdcdb7e8452e7945
MD5 45e810869b851b6e6fbb65eed97f4ee7
BLAKE2b-256 9ca895282d73c5d6db8c4afee25f235957237349037f77e2d292b08b92da79d9

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