Skip to main content

Sniff your django models to look for any data issues

Project description

django-data-sniffer

django-data-sniffer provides a set of tools to inspect the data in your service for misconfigurations

Features

  • Configurable warning/alert queries on any database table in your django app
  • A view to see all misconfigured objects in your table
  • Ability to modify your queries via an externally hosted manifest file so that adding a new health check doesn't require a deployment

Coming Soon

  • Filters & grouping
  • Search
  • Pagination
  • Get manifest file from util method instead of URL
  • JSON API response
  • Notifications

Setup

Installation

pip install django_data_sniffer

Add to settings.py

INSTALLED_APPS = (
  ...
  'data_sniffer
  ...
)

DATA_SNIFFER_ENABLED = True
DATA_SNIFFER_MANIFEST_FILE = 'https://path/to/your/manifest/file.json'  # noqa

Configuring the manifest file

Here's an example manifest file

{
    "clients": {
        "name": "Active clients healthcheck",
        "model": "yourapp.Client",
        "queryset": {
            "filters": {
                "status": "active"
            },
            "excludes": null,
            "ordering": null,
            "display_field": "name",
            "extra_display_fields": ["id", "membership_type"]
        },
        "alerts": [
            {
                "level": "WARNING",
                "name": "Missing billing",
                "queryset": {
                    "filters": {
                        "billing_configured": false
                    }
                },
                "message": "Client does not have billing set up"
            },
            {
                "level": "ERROR",
                "name": "Missing billing and getting premium features",
                "queryset": {
                    "filters": {
                        "billing_configured": false,
                        "premium_features_enabled": true
                    },
                    "excludes": {
                        "is_demo": true
                    }
                },
                "message": "Client has invalid feature set"
            }
        ]
    }
}

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

django-data-sniffer-0.4.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_data_sniffer-0.4.1-py2-none-any.whl (9.8 kB view details)

Uploaded Python 2

File details

Details for the file django-data-sniffer-0.4.1.tar.gz.

File metadata

  • Download URL: django-data-sniffer-0.4.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/2.7.15

File hashes

Hashes for django-data-sniffer-0.4.1.tar.gz
Algorithm Hash digest
SHA256 d09af11a8ce5aa91d823aac677c4abe0a0bbd2786478e78619af2a4e5578e039
MD5 6ddfb7c63028787c6669e25c6c55170f
BLAKE2b-256 2fa5608f148d0d66a52701563ccdcc28aca026b3e6188ce5ec09afd800ccf56b

See more details on using hashes here.

File details

Details for the file django_data_sniffer-0.4.1-py2-none-any.whl.

File metadata

  • Download URL: django_data_sniffer-0.4.1-py2-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/2.7.15

File hashes

Hashes for django_data_sniffer-0.4.1-py2-none-any.whl
Algorithm Hash digest
SHA256 37a7208ad781ecd8f307fc783143bf1e1c035a8dc864c79507713ed0beaa0b5b
MD5 698481a58bd87c336cb0008baff692e5
BLAKE2b-256 4901df9714425706659b76296ed605b3104ad9f19b4b9843882c3726afeaf268

See more details on using hashes here.

Supported by

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