Notification statistic collector
Project description
Stats collector
Notification event collector
Instalation
Install with pip:
$ pip install notifstats
API
capture_event
receives two arguments:
data
: Analytic data to be captured. See Usage section.
is_production
: Default to True. If False, the data will be sent to staging BigQuery.
Usage
Requires google-cloud-bigquery>=1.20.0
from datetime import datetime
from notifstats import capture_event
if __name__ == "__main__":
data = {
"notification_id": "test-12345",
"event_type": "sent_to_slackbot",
"object_id": "test-67890",
"taxonomy_id": "test-2345",
"created_at": datetime.now().isoformat(),
"notification_type": "segmented",
}
capture_event(data=data, is_production=False)
Available events_type:
available_events = [
"notification_requested",
"notification_sent_to_onesignal",
"notification_statistic_stored",
"notification_history_written",
"sent_to_slackbot",
]
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
notifstats-0.0.5.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for notifstats-0.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad3bdbe5bb72533c8fad2bc71dc9048efa49b7945ecad894e97321298405d1ce |
|
MD5 | 0b1919c8de45424ddadb4ca09c8982df |
|
BLAKE2b-256 | 80167ba59ad1a9808b32a47b51ff5876d85e2280066602cdabdb0c2efad012c0 |