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)EVENTREPORTER_TTL(int: controls whether to set expire time for redis keys)HONEYCOMB_WRITEKEY(optional)
Testing
export UA_ID='My_UA_ID'
nosetests -s
Dispatch Types
ga: GAhoney: honeycomb.ioslack: slack
Example slack event: Simple message
er.store('slack', 'event', '<uuid4>', webhook='<slack_webhook_uri>', message='text')
Example slack event: Blocks message
er.store('slack', 'event', '<uuid4>', webhook='<slack_webhook_uri>', blocks=<list_of_dicts>)
Example slack blocks format
[
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Hello
}
}
]
.. and check your GA property, honeycomb dash, or slack channel to see the data.
Metadata
Release files for event-reporter 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| event-reporter-1.1.0.tar.gz | 4.8 kB | Without provenance | Details for event-reporter-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| event_reporter-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for event_reporter-1.1.0-py3-none-any.whl |
Total release size: 10.9 kB
Release files / event-reporter-1.1.0.tar.gz
| Download URL | event-reporter-1.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4e6cced8efefe0a020d6699d3bc1cc1fc20958d5ca9d4882b040e3a949aa31e
|
|
BLAKE2b-256 checksum How to use checksums |
5e8f6c355e77faabe3aa5f3e33972665b9953e16548000965f34849eb7ad174c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.5
|
Release files / event_reporter-1.1.0-py3-none-any.whl
| Download URL | event_reporter-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5cb660c4b1aaef4a5148c75be0f871f929fcf16ba63d1cec7f21500e54177eaa
|
|
BLAKE2b-256 checksum How to use checksums |
aa680ee445a75c226ce7166328b6528e09e533c73e247039790a6365d3bbd7a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.5
|
Security for event-reporter 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.