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>', category='event_category', action='action_name', 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)
Env vars used
EVENTREPORTER_QUEUE_NAME
(redis key)
UA_ID
(GA UA ID)
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.6.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for event_reporter-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8f83ae40d2f2fdf4be07c36b676c7b147f7e6685789ca63d5541726c77825e0 |
|
MD5 | 027db50285dc60dcdbd13057b4272e8a |
|
BLAKE2b-256 | ec9ad331ccb5b4e4d0ea71185a26a3d03b754381e1cf0aadcaf3fcb19be23389 |