Registry / communication / django-twilio

django-twilio

JSON →
library0.14.3.4pypypiunverified

A Django library for integrating Twilio telephony services, supporting SMS, voice, and MMS. Current version 0.14.3.4 is in maintenance mode; no active development since 2018.

pip install django-twilio
INSTALL
IMPORT
SIG · DJANGO-TWILIO
D
django-twilio
communicationpythonv0.14.3.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

twilio_view
from django_twilio.decorators import twilio_view
from django_twilio.decorators import twilio_view

Basic SMS reply view using the twilio_view decorator. Requires TwiML from twilio SDK.

# views.py from django_twilio.decorators import twilio_view from twilio.twiml.messaging_response import MessagingResponse @twilio_view def sms(request): r = MessagingResponse() r.message('Hello from Django!') return r
Debug
Known issues
breakingdjango-twilio does not support Twilio SDK >=6.x's new TwiML classes (e.g., MessagingResponse). You must use twilio.twiml and set `content_type` manually or adapt the decorator.
fix
Use `from twilio.twiml.messaging_response import MessagingResponse` and return a TwilioResponse object (the decorator expects a TwilioResponse-like object).
affects: >=0.14
deprecatedThe `TwilioResponse` and `twilio_view` from django_twilio are deprecated in favor of Twilio SDK's own TwiML.
fix
Import `MessagingResponse` from `twilio.twiml.messaging_response` and use `@twilio_view` with Django views returning TwiML.
affects: >=0.14
gotchaThe `@twilio_view` decorator expects a callable that returns a TwilioResponse-like object; if you return a Django HttpResponse, it may not set the correct content type.
fix
Ensure your view returns a TwilioResponse object (or a Django HttpResponse with content_type='text/xml').
affects: all
Upgrade
Version history
0.14.3.4latest on PyPI · released Jan 9, 2026
Audit
Dependencies
djangorequiredCore framework requirement (tested with Django 2.x)
twiliorequiredTwilio SDK for API calls
django-phonenumber-fieldoptionalUsed for phone number validation in models
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
django-twilio — pip install django-twilio · libregistry