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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e8180b5272f5fc60008c4a11f145e462719d584dfe449bf24e6b6c6a1e2613a |
|
MD5 | 9680e4f2a3bd7bc2098c42316f859670 |
|
BLAKE2b-256 | 336377ddd7e7238efe352002f2cf63d4ae60e53619fe1e159118ba4d0255f616 |
Close
Hashes for django_data_sniffer-0.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbbd36bbcd6b5dff9c20c6f847f6829c45b44dcf0cced265a72ef0d61cc44a30 |
|
MD5 | 8aa7f2682d1911220ec3f3811ebe5147 |
|
BLAKE2b-256 | 2e3e410b6aa7b6d9992772cdc7df2843df7dc183885b1341c52e49f2d4f57150 |