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.4.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file event-reporter-1.0.4.tar.gz
.
File metadata
- Download URL: event-reporter-1.0.4.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
6faa8c7253f92b24c3012c7bda82cf252b78d38773bbc06a1912005fe6090e73
|
|
MD5 |
5c91554743add16d54e2114fb39aad64
|
|
BLAKE2b-256 |
247df8c105f4f1566636a5a3743124cb9d74a4be2048b0f50f033e117f2d73a9
|
File details
Details for the file event_reporter-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: event_reporter-1.0.4-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
91ded17cd91509d6ad842ce774a76b9d7fe6ffe6dd484e83d6106d8fae827f01
|
|
MD5 |
cd4356f63e635c53a6d2198971572a81
|
|
BLAKE2b-256 |
fb1039166ffa46ce7ad00a93e05183929d51e41e0a5f2604b300584fb5dac856
|