Skip to main content

A flexible event tracker for rapid analysis.

Project description

Build Status GitHub license

pawprint

pawprint allows you to quickly track events occurring in your application, and analyse them using pandas. For the full API, see the documentation. These are a work in progress.

Write data flexibly

tracker.write(event="server_booted")
tracker.write(event="logged_in", user_id="alice")
tracker.write(event="navigation", user_id="bob", metadata={"to": "dashboard"})
tracker.write(event="invoice", metadata={"details": {"amount": 1214, "from": "Ardbeg"}})
tracker.write(event="invoice", metadata={"details": {"amount": 123, "from": "Lagavulin"}})

Query data intuitively

Read the full dataset.

tracker.read()
    id                    timestamp   user_id           event                                            metadata  
0    1   2017-03-31 15:51:50.590018      None   server_booted                                                None
1    2   2017-03-31 15:51:50.599256     alice       logged_in                                                None
2    3   2017-03-31 15:51:50.610069       bob      navigation                                 {'to': 'dashboard'}
3    4   2017-03-31 15:51:50.620759      None         invoice     {'details': {'from': 'Ardbeg', 'amount': 1214}}
4    5   2017-03-31 15:51:50.629837      None         invoice   {'details': {'from': 'Lagavulin', 'amount': 123}}

List only events where the user was Alice.

tracker.read("event", user_id="alice")
        event
0   logged_in

Query unstructured data to find out who invoiced you and when.

tracker.read("timestamp", "metadata__details__from", event="invoice")
                     timestamp   json_field
0   2017-03-31 15:51:50.620759       Ardbeg
1   2017-03-31 15:51:50.629837    Lagavulin

Perform aggregates over time.

tracker.count("logged_in", resolution="week")
      datetime   count
0   2017-03-27       1

Aggregate JSON subfields.

tracker.sum(event="invoice", field="metadata__details__amount", resolution="year")
      datetime      sum
0   2017-01-01   1337.0

Documentation

For installation, dependencies, API details, and a quickstart, please RTFM !

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

pawprint-2.0.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

pawprint-2.0.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pawprint-2.0.0.tar.gz.

File metadata

  • Download URL: pawprint-2.0.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1.post20191125 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3

File hashes

Hashes for pawprint-2.0.0.tar.gz
Algorithm Hash digest
SHA256 580505db617e76f36756b791ea716888279faee9931862d37832ff431b22be20
MD5 aab9cb7239ccbfeee149fab2bf97fb18
BLAKE2b-256 08e5788bc5fb0554394b0dedf1943b5c5ce332d31144471aece2cc1d9449f355

See more details on using hashes here.

File details

Details for the file pawprint-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pawprint-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1.post20191125 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3

File hashes

Hashes for pawprint-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fe7b8ab436fd4815c534f7d730c2689d8d89b8bd9fb7c5c0d69041085ace5cc
MD5 83cebcf6eb21f7dc67d7e63cfcbfe334
BLAKE2b-256 b83651f97ab7baa64f8e51630948b05ea643738ad8a27820f4764af84b994b89

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page