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)
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.3.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for event_reporter-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e88c5c214527d8b86badfa4db43385e7bee26180e74e661ec84e0d88ce975ed |
|
MD5 | cb5f541280f72a869c63e1eee2cc18fe |
|
BLAKE2b-256 | 3657b9ecf928ddc0f3ff66967dea8a04bb6c8b2b274fe10faf32a6b3b2f0ceee |