This package installs models and middleware used to simplify user tracking across sessions and correlate access to resources to the user requesting such access.
Some of the tools in this project assume you are running in a non-relational environment (so far only Google App Engine is supported) for your views of interest. As such, the project depends on the djangae package. Some day perhaps I will split this into relational and non-relational sub-packages.
Quick start
The easiest way to use django-autometrics-nonrel is to use the RestFrameworkGenericViewSetAutoMetricsMixin to provide built-in recording of user retrieval of entities:
Add the project to your INSTALLED_APPS:
INSTALLED_APPS = [
...
'autometrics_nonrel',
...
]
Add the middleware to MIDDLEWARE_CLASSES anywhere after SessionMiddleware:
MIDDLEWARE_CLASSES = (
...
'django.contrib.sessions.middleware.SessionMiddleware',
'autometrics_nonrel.middleware.UserSessionTrackingMiddleware',
...
)
Use the mixin on your Django REST Framework GenericViewSet (or any viewset derived from GenericViewSet) to automatically log user access to items:
from rest_framework import viewsets
from autometrics_nonrel import mixins
from myapp.models import MyModel
class MyViewSet(
viewsets.ReadOnlyModelViewSet,
RestFrameworkGenericViewSetAutoMetricsMixin
):
model = MyModel
queryset = MyModel.objects.all()
...
Metadata
Release files for django-autometrics-nonrel 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-autometrics-nonrel-1.0.0.tar.gz | 9.1 kB | Without provenance | Details for django-autometrics-nonrel-1.0.0.tar.gz |
Release files / django-autometrics-nonrel-1.0.0.tar.gz
| Download URL | django-autometrics-nonrel-1.0.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb3bb80fd90b6a69eef8d56ddaf6e8d7675cc6d49d3c8ce764af195624547454
|
|
BLAKE2b-256 checksum How to use checksums |
0ff21dcd53258dfda4106babe0e152ab6cb5050c34f16381480b4fbabd580806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-autometrics-nonrel 1.0.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.