backend reporting via a worker/queue system
Project description
event-reporter
A Python wrapper for backend reporting via a worker/queue system.
System flow:
Store event quickly on webserver [e.g. within a flask endpoint]:
from event_reporter import EventReporter
from redis import StrictRedis
er = EventReporter(conn=StrictRedis())
er.store('ga', 'event', '<uuid4 clientid>', aip='1', uip='1.2.3.4', ds='web')
Fetch event within worker and dispatch to final destination:
from event_reporter import EventReporter
from redis import StrictRedis
er = EventReporter(conn=StrictRedis())
r = er.fetch()
er.dispatch(r)
Testing
export UA_ID='My_UA_ID'
nosetests -s
.. and check your GA property to see the data.
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
event-reporter-1.0.2.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for event_reporter-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b7bffbe987152fd1cc554b724d90ff49267c6c958828cff1398f2b8ddc67ddb |
|
MD5 | d2976f2032f1a76eb29cbc85adb7d46c |
|
BLAKE2b-256 | dbdccb6219c83d2c4a6448073fd728d6193679613fa0f9da44ad93aebc771054 |