Kolo

raw JSON →
3.1.0 verified Fri May 01 auth: no python

Kolo is a Django development tool that captures and displays everything happening in your running Django app, including SQL queries, HTTP requests, template rendering, and cache operations. Current version: 3.1.0. Supports Python >=3.8. Active development with frequent releases.

pip install kolo
error ModuleNotFoundError: No module named 'kolo'
cause Kolo is not installed in the current environment.
fix
Run 'pip install kolo' to install it.
error ImportError: cannot import name 'KoloMiddleware' from 'kolo'
cause Trying to import KoloMiddleware directly from the top-level kolo package instead of kolo.middleware.
fix
Use 'from kolo.middleware import KoloMiddleware'.
error django.core.exceptions.ImproperlyConfigured: The Kolo middleware is not enabled.
cause KoloMiddleware is not listed in MIDDLEWARE settings, or the wrong import path was used.
fix
Add 'kolo.middleware.KoloMiddleware' to your MIDDLEWARE list in Django settings.
deprecated The old style of import (import kolo) and direct usage of kolo functions (e.g., kolo.capture()) is deprecated. Use the middleware approach instead.
fix Remove old kolo function calls and add 'kolo.middleware.KoloMiddleware' to MIDDLEWARE.
gotcha Kolo only works with Django. Using it in non-Django projects (Flask, FastAPI) will not capture anything and may cause errors.
fix Only use Kolo in Django projects. For Flask, consider alternatives like flask-debugtoolbar.
gotcha KoloMiddleware must be placed early in the MIDDLEWARE list (before any middleware that might modify or short-circuit requests) to capture all request information.
fix Place 'kolo.middleware.KoloMiddleware' as the first item in the MIDDLEWARE list.

Add KoloMiddleware to your Django MIDDLEWARE list to start capturing requests, queries, and more.

# 1. Install: pip install kolo
# 2. Add to MIDDLEWARE in settings.py:
MIDDLEWARE = [
    'kolo.middleware.KoloMiddleware',
    # ... other middleware
]
# 3. Run your Django app, visit any page, and open Kolo UI at /kolo/ in your browser.