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.5.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file event-reporter-1.0.5.tar.gz
.
File metadata
- Download URL: event-reporter-1.0.5.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 |
2e12f474f4c74cdcf962df0d1a87bf65b10f48b569f539b6f93fe7a94e0eaec4
|
|
MD5 |
661f7c81935be255e5e7f46dcf21eb9f
|
|
BLAKE2b-256 |
7becfc6b62edbd8af5ce17ceff19c902e0f99a2ee4de2b631b24f9954656a567
|
File details
Details for the file event_reporter-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: event_reporter-1.0.5-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 |
3ba126b844b058ce6f973a7dccf18c077d63aaff3819be1c212a9bd246af1758
|
|
MD5 |
bc900915f83f8d46898ca037efa21596
|
|
BLAKE2b-256 |
37f94458a2b3784f8c77cfc348cdf3100efac19a03c37a440ec7f8720a9f52dd
|