--- id: django-grip version: "3.5.2" license: MIT license_treatment: permissive maintenance: aging --- # django-grip — Django GRIP library License: permissive · Maintenance: aging · Downloads: 78.2K/mo ## 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 above — 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 pip install django-grip uv add django-grip 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: unspecified - Install friction: high - Maintenance: aging - Downloads: 78.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django websocket proxy, grip middleware django, long-polling django, http streaming django, pushpin django integration, fastly fanout django, websocket-over-http django, real-time, proxy-delegation, websocket-over-http [View on SkillFed](https://skillfed.io/packages/django-grip) · [View on PyPI](https://pypi.org/project/django-grip/)