Enables submitting of Librato events in a background thread
Project description
Enables submitting of Librato events in a background thread. Heavily inspired by segment.io’s python library which does the same.
Usage
from librato_bg import Client
# initialize with Librato API tokens
client = Client(username, token)
# track as your normally would, params are event, value and source.
# This is non-blocking, submission will take place in other thread
client.gauge('user_clicked', 1, 'prod')
# when exiting, flush to join threads and make sure everything is sent
client.join()
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
librato_bg-1.0.6.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for librato_bg-1.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 191730de44d1f0dda312684c1e8a855b88cd8aad2c005aa72d590cbe8f90fe3f |
|
MD5 | c0b3898ac6b2db03d5d6f15e5a6fa57e |
|
BLAKE2b-256 | 8c45eeff70e85d3c7cc3f901e8290339bf5a0b28928ac8afd43056021b8699cb |