A flexible event tracker for rapid analysis.
Project description
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-1.2.0.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file pawprint-1.2.0.tar.gz
.
File metadata
- Download URL: pawprint-1.2.0.tar.gz
- Upload date:
- Size: 8.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7d77bf71f1fbd712ece26ece2e24e3a8d021af5cc6da3f399b05f8ebaac29ba |
|
MD5 | 99d2c1c5ad8368eddf992c9a29d1b5b3 |
|
BLAKE2b-256 | 8ba45e4cb7f324593778cc061a46764e029ec6b9d85fc521b0966087dc18e633 |
File details
Details for the file pawprint-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: pawprint-1.2.0-py3-none-any.whl
- Upload date:
- Size: 9.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 739c9a372246b9105ac2444c774723a298dcddf98ecc693a3347c39f27f0cd53 |
|
MD5 | 456485d6b0fb2741869d3bf5f0e7ea2e |
|
BLAKE2b-256 | 6fbd1bd0635b54a10c806d01fdf4a7c4a76280ddf7311c4c31d3a59388114213 |