Skip to main content

Simple django module with a middleware to track calls to django backend.

Project description

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

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

apistats-0.4.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

apistats-0.4.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

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

Hashes for apistats-0.4.1.tar.gz
Algorithm Hash digest
SHA256 8f0c1d08c955b86b0bebd0d5cf3c93ee77e0e4a4c1c0c556ad7905f2776b32cd
MD5 188677f195ba74094d34f1c3c60ce14e
BLAKE2b-256 5a0785c260702aa435631c5da30bcb437940eb0079d53d60236a5df3c052c1c5

See more details on using hashes here.

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

Hashes for apistats-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17b620aeea6fbb000f8cdbba6af3c1bdc8a6bb66146ca4567ae053f83b16c716
MD5 3042060bc3ea46f27f36622554ec0b8c
BLAKE2b-256 55b27cda5294ed719219e95b76b4ea120fa06da9861a307dd0cd61431f1362ba

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page