The 10 Most-Used Django Packages

Will Vincent - Feb 5 '20 - - Dev Community

Inspired by a recent 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. See Jeff's gist here 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

3,831,882 downloads

No surprises here! Django clocks in with almost 4 millions downloads over the past 30 days. What's interesting is that Flask has over 10 million downloads over the same period. I would love to know what percentage of that is one-off Flask API endpoints or Python beginners playing around versus actual in-production usage on a site. I love Flask, as well as Django, but I highly suspect Django has deeper real-world penetration. Alas, the PyPI stats don't agree.


2. Django REST Framework

1,792,469 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

944,291 downloads

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


4. django-filter

877,311 downloads

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


5. django-redis

815,821 downloads

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


6. django-extensions

814,693 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.


7. pytest-django

698,664 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-storages

695,562 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 serious scale, this package is a must.


9. django-debug-toolbar

643,937 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-appconf

411,202 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.

The interesting thing, if you look at this list, is that versions of these packages also rank highly in the Rails, Laravel, and other web framework communities. Which makes sense: the web isn't that different when you get down to it and with experience, the common patterns and challenges are more readily apparent than they are to an overwhelmed beginner.

Let me know if I've missed any packages on here!

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .