django-ranged-response
Modified Django FileResponse that adds Content-Range headers.
What it is and what it does
django-ranged-response wraps Django's FileResponse to add proper HTTP Content-Range header handling for authenticated file downloads. When a browser sends a range request (HTTP_RANGE header), the package ensures the response includes the correct Content-Range header, allowing browsers to properly stream audio and video files instead of failing or re-downloading from the start.
The package was created to work around a Django limitation documented in ticket #22479. It has no runtime dependencies and integrates directly into your Django views. However, the project is abandoned—last released in 2017 with no active maintenance—so compatibility with modern Django and Python versions is uncertain.
Use it for:
- Serve audio files without playback issues caused by missing range request support in older Django.
- Enable video streaming in authenticated views where users can seek within the file.
- Support resumable downloads in browsers that send HTTP_RANGE headers for partial content.
- Work around Django's historical lack of Content-Range header support in FileResponse.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds HTTP Content-Range header support to Django file downloads, enabling proper audio/video streaming in browsers that send range requests.
No. The package is abandoned (last release 2017-07-18, last commit 2022-11-10) with no active maintenance. Modern Django versions likely have native range request support or better alternatives. Before installing, verify whether your Django version already handles Content-Range headers natively, and check compatibility with your current Python and Django versions.
Install
django-ranged-response on PyPI
pip
pip install django-ranged-responseuv
uv add django-ranged-responsepoetry
poetry add django-ranged-responseInstalling django-ranged-response
Before you install
High install friction with no runtime dependencies. Package is abandoned—last release 2017-07-18 and last commit 2022-11-10 with no active maintenance.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution.
Quickstart
pip install django-ranged-response
from ranged_fileresponse import RangedFileResponse
def some_proxy_view(request):
filename = 'myfile.wav'
response = RangedFileResponse(request, open(filename, 'r'), content_type='audio/wav')
response['Content-Disposition'] = 'attachment; filename="%s"' % filename
return response
Requires Django >= 1.4; file handle must be opened before passing to RangedFileResponse.
Verify before relying
- Compatibility with modern Django versions (1.4 was released in 2012; current support unclear)
- Whether the underlying Django ticket #22479 has since been resolved in Django itself
- Python version compatibility (requires_python field is empty in fact sheet)
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,314 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 166,309/month — #10,498 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django-ranged-response-0.2.0.tar.gz
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
playsoundPlays audio files (MP3, WAV) and URLs from…
permissive · top 15,000 on PyPI
audiofileReads and writes audio files across formats…
permissive · top 15,000 on PyPI
django-queryset-csvExports Django QuerySet data to CSV format with…
copyleft · top 15,000 on PyPI
pyrfc6266Parses RFC 6266 Content-Disposition headers to…
permissive · top 15,000 on PyPI
fake-headersGenerates realistic User-Agent strings and HTTP…
permissive · top 15,000 on PyPI
drf-excelAdds an Excel spreadsheet (xlsx) renderer to…
permissive · top 15,000 on PyPI
zipstream-newGenerates zip archives as iterators of byte…
copyleft · top 15,000 on PyPI
django-private-storageProvides a Django storage backend that…
permissive · top 15,000 on PyPI
zipstreamGenerates zip archives as an iterator of byte…
unclear · top 15,000 on PyPI