Django-Care
Goal
Provide tool which help finding performance issues in django projects.
Installation
Install requirements:
pip install -r requirements.txt
Install django-care:
pip install django-care
or current development version:
pip install hg+https:://bitbucket.org/kidosoft/django-care
Configuration
INSTALLED_APPS = (
...
'care',
...
)
Usage
Checking for queries run at startup
Running command below will statistics about queries run at project startup.
$ python manage.py check_startup_queries -o queries.txt
Enabling SQL queries annotations
In order to get sql queries annotated with path and view in which it occured add middleware as below.
MIDDLEWARE_CLASSES += ('care.middleware.AnnotateSQLMiddleware',)
Issued queries will have comment appended in the form:
<original query> -- path: <request path> | view: <resolved view>
For example:
SELECT `id`, `username` FROM `auth_user` WHERE `id` = 1 -- path: / | view: base.index
It can help with searching for source of slow queries from slow.log.
Supported Django versions
Tested with:
Django 1.2.7 on python2.7
Django 1.3.7 on python2.7
Django 1.4.16 on python2.7
Django 1.5.11 on python2.7, python3.2, python3.3, python3.4
Django 1.6.8 on python2.7, python3.2, python3.3, python3.4
Django 1.7.1 on python2.7, python3.2, python3.3, python3.4
Documentation
Metadata
Release files for django-care 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-care-0.1.0.tar.gz | 7.8 kB | Without provenance | Details for django-care-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_care-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for django_care-0.1.0-py2.py3-none-any.whl |
Total release size: 20.0 kB
Release files / django-care-0.1.0.tar.gz
| Download URL | django-care-0.1.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fc59d37c63fac709edd2856634bba2f0c9df124444979ae61150bac87c173d5
|
|
BLAKE2b-256 checksum How to use checksums |
6e4e9a441a3dd732296a69548f14e8515dd03215d1370088953455b39b4207c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_care-0.1.0-py2.py3-none-any.whl
| Download URL | django_care-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fb58221ceb6b354cb80db74151a200a69279560eca24a0c8b0e43c6d1ce4aadc
|
|
BLAKE2b-256 checksum How to use checksums |
025f6235d89395d97b3f42cc9e67dac9bcadcec7fd0f9663cad27269fc91c6b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-care 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.