skillfed

django-grip

Django GRIP library

django-grip v3.5.2 78.2K downloads/30d#14,463 on PyPI86
Permissive license MIT AGING released

What it is and what it does

Django GRIP is middleware that bridges Django applications with external GRIP-compatible proxies like Pushpin or Fastly Fanout. Instead of holding connections in your Django process, the middleware delegates long-lived HTTP and WebSocket connections to a specialized proxy, freeing your application to handle requests more efficiently. The proxy manages the actual connection lifetime while your Django views respond quickly and let the middleware handle the protocol translation.

You configure it by adding GripMiddleware to your Django settings and pointing it at your GRIP proxy via GRIP_URL. Your views then use helper functions to subscribe clients to channels or broadcast updates. The middleware handles parsing GRIP headers, converting WebSocket-Over-HTTP events, and managing subscriptions—your code sees a simplified interface while the proxy handles the heavy lifting of keeping connections alive.

Use it for:

  • Build HTTP streaming endpoints that push data to many clients without blocking Django worker processes
  • Implement long-polling endpoints that hold client requests until data changes, then deliver updates efficiently
  • Create WebSocket-like bidirectional communication in Django without running a separate WebSocket server
  • Scale real-time features across multiple Django instances by offloading connection management to a proxy layer
  • Reduce memory and CPU overhead by delegating connection hold-time to a specialized proxy

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates Django with GRIP-compatible proxies (Pushpin, Fastly Fanout) to delegate long-lived HTTP and WebSocket connection management away from the application.

Yes, if you have a GRIP proxy (Pushpin or Fastly Fanout) already deployed and need to add real-time features to Django. The middleware is straightforward to integrate and offloads connection management cleanly. No, if you lack the proxy infrastructure or prefer a self-contained solution—the external dependency is non-negotiable. The aging release cycle (508 days since last update) is acceptable for stable middleware but warrants checking compatibility with your Django version before committing.

Install

django-grip on PyPI

pip

pip install django-grip

uv

uv add django-grip

poetry

poetry add django-grip

Installing django-grip

Before you install

High install friction; no runtime dependencies but requires external GRIP proxy infrastructure (Pushpin or Fastly Fanout) to function. Package is aging (last release 508 days old) but repository is active and not archived.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.

Quickstart

pip install django-grip

# In settings.py:
MIDDLEWARE = ['django_grip.GripMiddleware', ...]
GRIP_URL = 'http://localhost:5561'

# In views.py:
from django_grip import set_hold_stream, publish

def myendpoint(request):
    if not request.grip_proxied:
        return HttpResponse('Not Implemented', status=501)
    resp = HttpResponse('[stream open]\n')
    set_hold_stream(request, 'test')
    return resp

Requires a running GRIP proxy (Pushpin or Fastly Fanout) configured and accessible at the GRIP_URL; Django app will not handle long-lived connections without it.

Verify before relying

  • Minimum Python version and Django version compatibility (requires_python is unspecified in metadata)
  • Whether the package works with current Django LTS versions
  • Performance characteristics and scalability limits for high-concurrency scenarios

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance aging — 508 days since the last release
Last repo commit
First released
Downloads 78,183/month — #14,463 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django-grip-3.5.2.tar.gz

License :: OSI Approved :: MIT LicenseTopic :: Utilities

Tags

django websocket proxygrip middleware djangolong-polling djangohttp streaming djangopushpin django integrationfastly fanout djangowebsocket-over-http django
real-timeproxy-delegationwebsocket-over-http

More Utilities packages