The 10 Most-Used Django Packages

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


No surprises here! Django clocks in with almost 7 millions downloads over the past 30 days. What's interesting is that Flask has 29,581,477 over 9 million downloads over the same period. I wonder 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


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


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

4. django-filter


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


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


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.

7. django-debug-toolbar


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.

8. pytest-django


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.

9. django-redis


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

10. django-environ


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.

Join My Newsletter

Subscribe to get the latest tutorials/writings by email.

    No spam. Unsubscribe at any time.