Skip to main content

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 apistats to INSTALLED_APPS
  • Run ./manage.py migrate
  • Add 'apistats.middlewares.LoggingMiddleware' to MIDDLEWARE in settings.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

Metadata

Release files for apistats 0.4.1

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

Source distribution (sdist)

Source distribution for apistats 0.4.1
File Size Uploaded
apistats-0.4.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apistats 0.4.1
File Interpreter ABI Platform
apistats-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / apistats-0.4.1.tar.gz

Download URL apistats-0.4.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8f0c1d08c955b86b0bebd0d5cf3c93ee77e0e4a4c1c0c556ad7905f2776b32cd
BLAKE2b-256 checksum
How to use checksums
5a0785c260702aa435631c5da30bcb437940eb0079d53d60236a5df3c052c1c5
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / apistats-0.4.1-py3-none-any.whl

Download URL apistats-0.4.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17b620aeea6fbb000f8cdbba6af3c1bdc8a6bb66146ca4567ae053f83b16c716
BLAKE2b-256 checksum
How to use checksums
55b27cda5294ed719219e95b76b4ea120fa06da9861a307dd0cd61431f1362ba
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

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