As a developer, you want to serve files quick and efficiently.
Here is an overview of django-downloadview‘s answer...
Choose the generic view depending on the file you want to serve:
If your use case is a bit specific, you can easily extend the views above or create your own based on mixins.
Learn more in Responses.
Views instanciate a file wrapper and use it to initialize responses.
File wrappers describe files: they carry files properties such as name, size, encoding...
File wrappers implement loading and iterating over file content. Whenever possible, file wrappers do not embed file data, in order to save memory.
Learn more about available file wrappers in File wrappers.
Before WSGI application use file wrapper to load file contents, middlewares (or decorators) are given the opportunity to capture DownloadResponse instances.
Let’s take this opportunity to optimize file loading and streaming!
Learn more in Optimize streaming.
django-downloadview also helps you test the views you customized.
You may also write healthchecks to make sure everything goes fine in live environments.