The 10 Most-Used Django Packages (2024)

Updated

Inspired by a past article on The 22 Most-Used Python Packages in the World, I teamed up with Jeff Triplett to investigate the top 10 Django packages based on PyPI (The Python Package Index) downloads. We looked at the past 30 days, though data from the past 365 days is also available.

While it's possible to manually look for Django-related packages, we're using Python, so creating a brief script is the preferred method. Here is the gist if you'd like to recreate or tweak the results for yourself.

Before we dive in, a brief caveat: downloads are not a perfect measure of usage. They are easy to game if one is so inclined. The "real" test would be to filter based on actual live in-production usage. But... that data does not exist. So we'll use PyPI downloads as a rough proxy.


1. Django

13,693,717 downloads

No surprises here! Django clocks in with almost 7 million downloads over the past 30 days. What's interesting is that Flask has 64,383,182 downloads over the same period. Flask is definitely a popular web framework, but it is rumored to be included in AWS builds and as one-off endpoints far more often than Django. In other words, if we could compare web projects head-to-head, I'd wager Django is ahead, but in terms of usage broadly defined, Flask is clearly tops.


2. Django REST Framework

8,052,518 downloads

If ever a third-party package was core to modern Django usage, this is it. Django REST Framework is the default way to quickly add API functionality to an existing Django project. Creator Tom Christie has done a masterful job over the years of continually improving the codebase, managing a community of contributors, and finding a sustainable funding route via Encode.


3. django-cors-headers

5,031,887 downloads

API endpoints aren't very useful without properly configured Cross-Origin Resource Sharing (CORS) server headers. This project, currently maintained by Adam Johnson, greatly simplifies the process.


4. django-filter

4,050,271 downloads

A powerful and reusable Django app for filtering QuerySets based on user selections. It also has robust support for adding filters to Django REST Framework.


5. django-extensions

3,153,578 downloads

The true Swiss Army watch of useful additions to Django. There is a long list of features, of which particular favorites are shell_plus for autoloading database models and runserver_plus for an improved local server powered by Werkzeug.


6. django-storages

2,968,953 downloads

An elegant way to work with custom storage backends like S3 and many more. If you're accepting user-uploaded files or working at a serious scale, this package is a must.


7. pytest-django

2,729,208 downloads

A plug-in for adding pytest to a Django application. I'm a little surprised but pleased to see it rank so high. For many Python and Django developers, pytest is a must.


8. django-redis

2,446,997 downloads

This package provides a full-featured redis cache backend, which has overtaken Memcached as the most popular caching tool for many developers.


9. django-debug-toolbar

2,391,471 downloads

Another mainstay of modern Django development, I'm surprised this doesn't rank higher, to be honest. If you want to properly debug your Django app, this is the go-to choice. It also allows for performance improvements via inspection of local queries, among many other features.


10. django-environ

2,256,006 downloads

An app to handle configuration defaults of packaged Django apps gracefully. It ranks higher than I would have guessed but it does provide a nice, concise way to not repeat your configs for multiple apps.


If you're looking for more Django packages, I curate a list over in the awesome-django repo. There is a lively discussion of the top 5 3rd party packages over on the official Django Forum. Or if you prefer to see all Django packages, take a look at the Django Packages website.