File streaming

Helpers to serve files managed with Django using various optimizations (x-sendfile, x-accel, ...)

10 Packages
11 Features

Search & Filter

The Web framework for perfectionists with deadlines.

87,434
Stars
33,841
Forks
435
Usage
Py3
Status Production/Stable
Version 6.0.5
Updated 7 May 2026
License BSD-3-Clause
Commits
Features
Files in local filesystem
Files in storage
Files in models (FileField)
Files at URL
Text-based files (bytes, unicode, StringIO)
Generated files (yield)
Lighttpd's X-Sendfile
Apache's X-Sendfile
Nginx's X-Accel-Redirect
mod_wsgi's internal redirect
Multiple "rewrite rules"

Serve files with Django.

401
Stars
56
Forks
4
Usage
Py3
Status Production/Stable
Version 2.5.0
Updated 5 May 2026
License BSD
Commits
Features
Files in local filesystem
Files in storage
Files in models (FileField)
Files at URL
Text-based files (bytes, unicode, StringIO)
Generated files (yield)
Lighttpd's X-Sendfile
Apache's X-Sendfile
Nginx's X-Accel-Redirect
mod_wsgi's internal redirect
Multiple "rewrite rules"

Private media file storage for Django projects

351
Stars
62
Forks
2
Usage
Py3
Status Production/Stable
Version 3.1.3
Updated 5 Oct 2025
License Custom
Commits
Features
Files in local filesystem
Files in storage
Files in models (FileField)
Files at URL
Text-based files (bytes, unicode, StringIO)
Generated files (yield)
Lighttpd's X-Sendfile
Apache's X-Sendfile
Nginx's X-Accel-Redirect
mod_wsgi's internal redirect
Multiple "rewrite rules"

The first Python validation package uses type, mime, extension, magic numbers, and size to validate files. ✅

75
Stars
5
Forks
1
Usage
Py3
Status Production/Stable
Version 1.0.9
Updated 16 Feb 2025
License MIT license
Commits
Features
Files in local filesystem
Files in storage
Files in models (FileField)
Files at URL
Text-based files (bytes, unicode, StringIO)
Generated files (yield)
Lighttpd's X-Sendfile
Apache's X-Sendfile
Nginx's X-Accel-Redirect
mod_wsgi's internal redirect
Multiple "rewrite rules"

Features Being Compared

11 features

Files in local filesystem

Serve files located on local filesystem, given an absolute or relative path.

Files in storage

Serve files managed in Django storages (local or remote).

Files in models (FileField)

Serve files in models (FileField, ImageField), given a model instance and a field name.

Files at URL

Proxy remote files, given an arbitrary URL.

Text-based files (bytes, unicode, StringIO)

Serve files which whole content is dynamically created in memory.

Generated files (yield)

Serve files which are dynamically generated via a generator (yield statement)

Lighttpd's X-Sendfile

Delegate actual streaming to Lighttp via X-Sendfile.

Apache's X-Sendfile

Delegate actual streaming to Apache via X-Sendfile.

Nginx's X-Accel-Redirect

Delegate actual streaming to Nginx via X-Accel-Redirect.

mod_wsgi's internal redirect

Set Location with 200 code to trigger internal redirect (daemon mode mod_wsgi only)

Multiple "rewrite rules"

Several rules can be configured to capture files from several locations then optimize their streaming.s