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
Built Distribution
Close
Hashes for django-data-sniffer-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc2319ab061d20c38194bd1e68571a5696ad2ff3500775a8477f0b6bc78cdfa6 |
|
MD5 | 3e6ac5e5be36d5328a58e6e471dfd54b |
|
BLAKE2b-256 | a9d2b2e3ab7adb47e142388ce59cc8a156ab77f7877b016531216309975ba47b |
Close
Hashes for django_data_sniffer-0.3.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9af7434c3d6539cb2796f8fd7bc5dc2745991eba3cff10876a702e6e7e5d649b |
|
MD5 | c011ac7e10d30a21a028896946c7ec03 |
|
BLAKE2b-256 | 99ecb7657718d2f3b23c65c1a255614958f924d1c5aac458fc63de2562dd61ab |