APIStats
Simple django module with a middleware to track calls to django backend.
Description
APIStats is a middleware that stores basic information on the requests and responses to Django backend.
Installation
pip install apistats- Add
apistatstoINSTALLED_APPS - Run
./manage.py migrate - Add
'apistats.middlewares.LoggingMiddleware'toMIDDLEWAREinsettings.py
Usage
APIstats adds an admin interface to :
- view / sort / filter records
- view detail of a record and statistics
Model
APIStats stores the following fields:
- user: user account making the request
- record_time: time of the record
- method: method of the request
- domain: first part of the request path
- path: complete path
- query: query parameters for GET requests
- ip: IP of the caller
- delay: nb of milliseconds between request and response
- status: response HTTP status
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
apistats-0.4.1.tar.gz
(7.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apistats-0.4.1.tar.gz.
File metadata
- Download URL: apistats-0.4.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f0c1d08c955b86b0bebd0d5cf3c93ee77e0e4a4c1c0c556ad7905f2776b32cd
|
|
| MD5 |
188677f195ba74094d34f1c3c60ce14e
|
|
| BLAKE2b-256 |
5a0785c260702aa435631c5da30bcb437940eb0079d53d60236a5df3c052c1c5
|
File details
Details for the file apistats-0.4.1-py3-none-any.whl.
File metadata
- Download URL: apistats-0.4.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17b620aeea6fbb000f8cdbba6af3c1bdc8a6bb66146ca4567ae053f83b16c716
|
|
| MD5 |
3042060bc3ea46f27f36622554ec0b8c
|
|
| BLAKE2b-256 |
55b27cda5294ed719219e95b76b4ea120fa06da9861a307dd0cd61431f1362ba
|