Skip to main content

django_lair

https://badge.fury.io/py/django_lair.png https://travis-ci.org/narfman0/django_lair.png?branch=master

Analytics and metrics app to both store and display user actions

Documentation

django_lair will ingest user metrics, store in django configured database, and show views for the user. Provides an API in your django application to POST user data in key, value form to support arbitrary types of data.

Clients generate their own UUID and save locally. There is no special authentication or authorization.

Quickstart

Install django_lair:

pip install django_lair

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_lair',
    ...
)

Add django_lair’s URL patterns:

from django_lair import urls as django_lair_urls


urlpatterns = [
    ...
    url(r'^', include(django_lair_urls)),
    ...
]

Migrate app:

./manage.py migrate django_lair

Usage

For the top level dashboard, navigate to <endpoint>/datum/, e.g.:

http://localhost:8000/datum/

To create a new user with metric datum, POST to endpoint /datum/create/ with metric data. Make sure you use the uuid param (it is suggested to always use uuid form):

curl --data "uuid=abcdefgh-1234-1234-9876-abcdefghijkl&name=metric1&value=value1" http://localhost:8000/datum/create/

To add metric data, POST to endpoint /datum/create/ with user, metric name, and metric value information:

curl --data "user=abcdefgh-1234-1234-9876-abcdefghijkl&name=metric1&value=value1" http://localhost:8000/datum/create/

Be sure to include uuid/user, name, and value in the POST for each metric

Features

  • Stores users and shows list view of metrics hit

  • Provides simplistic list view of saved datums including unique user graphs

  • Provides detailed user page with frequency graph

  • Search, sort, and filter paginated tables of user data

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Metadata

Release files for django_lair 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django_lair 1.0.3
File Size Uploaded Provenance
django_lair-1.0.3.tar.gz 9.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django_lair 1.0.3
File Interpreter ABI Platform
django_lair-1.0.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 22.0 kB

Release files / django_lair-1.0.3.tar.gz

Download URL django_lair-1.0.3.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ecdf7f7ffb4f24fcfa77a87e34e0d05fc5d1ed2e445682d848834c2ba373be13
BLAKE2b-256 checksum
How to use checksums
a2df0847e36069010507153cf9fa11cf8b4d7199d84c4f0d965e761385976f70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_lair-1.0.3-py2.py3-none-any.whl

Download URL django_lair-1.0.3-py2.py3-none-any.whl
Size 12.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d928b24cdeb1686301567e58bc5f78759add656a904db193035df6c8e0ef7c90
BLAKE2b-256 checksum
How to use checksums
d81f317851aa22b43d43fa16f6715fb225719c36139a69b1c9f44f77907258af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django_lair 1.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page