skillfed

django-ranged-response

Modified Django FileResponse that adds Content-Range headers.

django-ranged-response v0.2.0 166.3K downloads/30d#10,498 on PyPI20
Permissive license MIT Abandoned released

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-response

uv

uv add django-ranged-response

poetry

poetry add django-ranged-response

Installing 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

django file range requestshttp content-range header djangodjango ranged file responsehttp range request supportdjango partial content downloadsafari audio streaming django
file-streamingdjango-views

More Dynamic Content packages