Skip to main content

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.

Files for notifstats, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size notifstats-0.0.6.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View
Filename, size notifstats-0.0.6-py2.py3-none-any.whl (4.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page