Top 100 most downloaded Django packages in 2022
The year is coming to an end, and it’s time to our traditional review of what happened in the Django package market in 2022, and a comparison with our 2021 report
Let’s run the same query for the google cloud dataset and see what’s changed
SELECT file.project, COUNT(*) as total_downloads
FROM `the-psf.pypi.file_downloads`
WHERE DATE(timestamp)
BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 360 DAY)
AND CURRENT_DATE()
AND file.project like '%django%'
Gf
Django
itself received more than 94 millions of downloads and showed 20% growth. This is almost the same percentage growth as the previous year. Of course, this number of downloads includes all manual installations and CI work, so it’s hard to say how many new Django developers came into the industry. To compare the numbers, we checked Flask, which was downloaded 872 million times, with the same +120% growth in 2022 as in 2021.
REST
Using the REST API has grown slightly faster than Django itself. More than half of Django downloads occur with the REST framework.
The clear winner in the JSON Web Token package implementations race is the djangorestframework-simplejwt
package which displaced djangorestframework-jwt
- djangorestframework 51 273 701 +27%
- django-cors-headers 31 942 022
- djangorestframework-simplejwt 9 797 288 +77%
- djangorestframework-jwt 4 202 331 +2%
- django-rest-swagger 3 762 319
- djangorestframework-camel-case 2 449 721
- django-rest-auth 3 553 823
- djangorestframework-api-key 1 992 877
- djangorestframework-csv 1 905 630
GraphQL
2022 brings great boost of GraphQL usage, around 20% of Django
downloads happens with graphene-django
Is this a new trend that will replace REST in a couple of years?
- graphene-django 4 543 615 +85%
Stubs
Another big trend in 2022 is static typing and its support in Django
- django-stubs 6 061 569 +76%
- django-stubs-ext 4 827 665 +274
- djangorestframework-stubs 3 148 534 +106%
Development Utilities
Here comes the first major setback — the django-cmpat package has left the TOP 100 list. Recent Django releases keep good backward compatibility from release to release
- django-extensions 23 233 383 +13%
- django-debug-toolbar 17 223 592 +31%
- pylint-django 8 762 937 +32.6
- django-waffle 3 553 251 +59%
- django-silk 2 838 031 +12%
- django-migration-linter 1 496 112 +35%
ORM extensions and Form/Serializer fields
The largest and most stable category for many years. Most packages show the same grows as baseline Django
downloads around 20%, so they data is omitted
- django-filter 29 473 877 +34%
- django-timezone-field 10 697 023
- django-model-utils 8 957 803
- django-import-export 6 583 878
- django-phonenumber-field 6 421 333
- django-countries 4 872 407
- django-mptt 4 472 380
- django-simple-history 5 979 530
- django-taggit 3 991 902
- django-polymorphic 3 481 821
- django-picklefield 3 138 260
- django-localflavor 2 758 203
- django-reversion 2 731 233
- django-treebeard 2 847 794
- django-mysql 2 401 172
- django-modeltranslation 2 168 668
- django-colorfield 1 783 830
- django-money 1 695 171
- django-jsonfield 1 555 477
- django-modelcluster 1 393 489
- django-dirtyfields 1 379 163
Testing
This is the first year we’ve seen such a drop in downloads for a single package in the TOP 100. django-nose is losing its popularity, while pytest-djagno is growing along with Django.
- pytest-django 19 411 939 +24%
- django-nose 2 946 574 -20%
- django-coverage-plugin 2 251 184 +39%
Forms
Two new players here aredjango-multiselect
and django-json-widget
Although Django
has brought many improvements to built-in forms rendering, django-crispy-forms
is still very popular.
- django-crispy-forms 7 504 263 +32%
- django-widget-tweaks 3 471 140 +38%
- django-formtools 3 129 444 +33%
- django-ckeditor 2 858 315 +31%
- django-bootstrap4 1 683 797 +7%
- django-tinymce 1 451 087 +33%
- django-autocomplete-light 2 069 906 +36%
- django-multiselectfield(new) 1 907 464
- django-json-widget(new) 1 667 530
Cache
Steady growth for django-redis and reduced usage for django-redis-cashe
- django-redis 16 939 264 +31%
- django-redis-cache 2 043 590 -9%
- django-cacheops 1 878 902 +42%
Settings
For years we have seen a struggle between plain python settings as shipped with Django
, full-featured environment based configuration with django-environ
and the simple dj-database-url
package.
There is still no clear winner in community preference.
- django-environ 11 622 371 +35%
- dj-database-url 10 556 334 +36%
- django-appconf 9 677 683 +29%
- django-constance 1 841 194 +48%
Background jobs
Celery is still the most popular tool in this category. Most django projects do not need any add-ons to use it, like django-celery, which comes out of the TOP 100.
The closest competitor Dramatiq with over +110% growth reaches 1107845 downloads, but it is difficult to determine if their use occurs within a Django project. We can compare with the huey package with 1541523 downloads and only 19647 for django-huey
- django-celery-beat 9 114 390 +60%
- django-celery-results 6 554 714 +39%
- django-rq 1 498 618 +37%
Authentication and Authorization
Another category without no clear winner. For the second year, race betweendjango-allauth
andsocial-auth-app-django
does not answer the question of which package should be used to add social account authentication to a Django project.
- django-allauth 6 571 609 +32%
- social-auth-app-django 6 4053 75 +36%
- django-oauth-toolkit 4 505 068 +48%
- django-otp 3 374 771 +25%
- django-guardian 2 987 992 +25%
- django-auth-ldap 2 173 418 -5%
Shortcuts and helpers
The Default Django API has gotten better and better year after year, and finally reflected in the django-braces load. You may not need an additional sugar package for your next projects.
- django-ipware 6 597 768 +38%
- django-braces 2 154 025 +0.4%
- django-user-agents 2 422 318 +33%
Front-end tools
There have been no new players here for a long time, and the existing ones are steadily growing. Unlike Rails, we don’t have a standard pipeline for JavaScript asserts in Django, and there doesn’t seem to be much demand from the community.
- django-js-asset 5 966 431 37%
- django-compressor 3 733 195 23%
- django-webpack-loader 3 711 086 17%
Security
django-csp
has shown steady growth over the years and reaches first place in its category
- django-csp 3 209 836 +80%
- django-axes 2 584 736 +22%
- django-ratelimit 2 207 739 +42%
Surprisingly the old django-templated-mail
package appeared in the TOP 100 this year.
- django-anymail 3 740 609 +35%
- django-ses 3 009 662 +28%
- django-templated-mail 1 531 913
Monitoring
The same sustained interest in the Django monitoring application over the years
- django-health-check 4 325 338 +46%
- django-prometheus 2 926 267 +55%
- django-log-request-id 2 520 004 +69%
Administration
No package has succeeded in customizing Django Admin as much as Grapelli, and it is still in the TOP 100 in 2022, django-admin-sortable2 was in the TOP in 2020 and is returning this year.
- django-admin-rangefilter 2 590 010 +16%
- django-grappelli 1 603 749 +20%
- django-nested-admin 1 587 471
- django-admin-sortable2 1 509 512
- django-object-actions 1 462 140 +1.7%
Search
In 2022, we had almost equality in the number of downloads for django-elasticsearch-dsl and django-haystack. The difference between the growth rates is also insignificant, so you still have a hard choice which to use.
- django-elasticsearch-dsl 1 416 060 +10%
- django-haystack 1 350 389 +18%
Other
The broadest category I put those packages that are so good that they have no competitors in their category in the TOP 100 downloads.
It’s nice to see that my django-fsm package, which helps to use Django as a tool for automating internal business processes, is showing high growth rates year after year.
- django-storages 22 988 389 +44%
- channels 5 905 807 +54%
- django-fsm 2 956 468 +53%
- django-tables2 1 874 571 +23%
- fcm-django 1 499 549 +17%
- wagtail 1 421 760 +16%
- django-heroku 1 351 048 +13%
- django-classy-tags 1 422 462 +33%
- django-mathfilters 1 393 387
- optional-django 1 578 641
- django-imagekit 1 365 003
- django-cleanup 1 325 056
Conclusion
Unlike the real world, the Django infrastructure is not facing drastic disasters and big changes in 2022. But a couple of persistent new trends are causing great curiosity about what might happen next year
Dear Django developers, this is how we spent 2022. Stay safe and calm. Happy coding, and I hope the New Year brings an end to disasters for all of us.