Press enter or click to view image in full size
A year ago we’ve checked the top most popular packages for 2020 in the Django world. Today it’s time to compare it with 2021!
So let’s run the same query over 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%'
GROUP BY file.project
ORDER BY total_downloads DESC
LIMIT 100Our baseline is Django. Django received over 78 millions of downloads in 2021, almost 20% more than in 2020! That number of downloads includes all the manual installation and CI work, so it’s hard to say how many new Django developers there are in the industry. To compare numbers, Flask received over 400 million downloads in the same year, up 120% from 2021. Numpy received more than 835 million, up 40%. The most popular python package — requests has been downloaded more than 1.3 billion times, this number is also up +40% year over year.
NEW Packages in TOP 100
- django-jsonview — Shortcut for the REST API
- django-stubs-ext — Subpackage of django-stubs
- fcm-django — Firebase Cloud Messaging
- django-hosts — Route requests for specific subdomain
- django-migration-linter — Detect backward incompatible migrations
- django-colorfield — Actively developed color field for models and admin
REST
Django Rest Framework is growing at the same rate, and is still used in half of Django installations. To make the data more clear, below I’ll skip all the growth rates of around 16–24% for packages whose downloads are growing in the same way as Django usage
- djangorestframework 40 388 479
- django-cors-headers 22 719 141
- django-rest-framework 5 012 054 +82%
- djangorestframework-simplejwt 5 510 240 +68%
- djangorestframework-jwt 4 133 321 +13%
- django-rest-swagger 3 524 708 -8%
- django-rest-auth 2 238 789
- djangorestframework-csv 2 104 600
- djangorestframework-camel-case 1 644 871
- django-jsonview 1 579 680 NEW
- djangorestframework-filters 1 138 336In 2021 django-tastypiegot out of top 100 packages. No djangorestframework-xml also. An alternative REST implementation django-ninja is far away from the top with 106 588 downloads only.
GraphQL
- graphene-django 2 447 735 +40%Graphene is the only popular GraphQL implementation for Django.And it’s growing twice as fast as Rest Framework. Will GraphQL become more popular than REST?
The other two graphql packages for Django has marginal low downloads counts: strawberry-graphql-django 24187 and ariadne-django 7146
Outside Django world Graphenehas amazing 11 millions downloads with over 87% yearly grows rate, Ariadne just 1 383 676 and strawberry-graphql — 657 736
Stubs
Static typing is the winner in our yearly race. Still not so many Django users do static type checking, but with the same growth rate it would happen very in the next 3–4 years
- django-stubs 3 450 782 +71%
- djangorestframework-stubs 1 531 140
- django-stubs-ext 1 290 978 NEWDevelopment Utilities
Except new helper for migration linting, none of the players are performing above the Django baseline.
- django-extensions 20 561 833
- django-debug-toolbar 13 094 224
- pylint-django 6 609 279
- django-silk 2 514 221
- django-waffle 2 239 980
- django-compat 1 167 273
- django-migration-linter 1 107 595 NEWORM extensions and Form/Serializer fields
Pretty stable results here. Seems Django became more popular for internal tooling, so django-filters , import-export and bulk-update packages got more downloads
- django-filter 21 983 311 +31%
- django-model-utils 7 177 256
- django-timezone-field 6 539 299
- django-import-export 5 466 534 +34%
- django-phonenumber-field 4 574 386
- django-mptt 3 689 898 +4.5%
- django-countries 4 295 559
- django-simple-history 3 553 915
- django-taggit 3 301 470 +32%
- django-mysql 2 223 315 -8.5%
- django-polymorphic 2 656 729 +9.5%
- django-localflavor 2 636 552 +10%
- django-reversion 2 535 925
- django-picklefield 2 205 692 +10%
- django-treebeard 2 371 618 +21%
- django-dirtyfields 2 383 978 +36%
- django-jsonfield 1 382 853 -0.5%
- django-bitfield
- django-bulk-update 1 689 512 +32%
- django-modeltranslation 1 289 156
- django-modelcluster 1 131 366
- django-colorfield 1 081 742 NEWTesting
Built-in Django testing support became better and better with each release, but still pytest usage grows a bit faster
- pytest-django 15 669 424 +29%
- django-nose 3 668 826 +8.6%
- django-coverage-plugin 1 618 325 +32%Forms
This year django-bootstrap3 top 100 packages, and seems all most of users migrated to django-bootstrap4
Get Django Viewflow’s stories in your inbox
Join Medium for free to get updates from this writer.
Django itself got better support for template form rendering, and crispy package has become stale. Perhaps in 2022 we will see a decrease in its use.
- django-crispy-forms 5 702 525 +11%
- django-widget-tweaks 2 510 273 -3.6%
- django-formtools 2 349 509 +0.5%
- django-ckeditor 2 185 180 +27%
- django-autocomplete-light 1 520 720 +6.7
- django-bootstrap4 1 570 073 +40%
- django-tinymce 1 087 195 +13%Cache
We see the stable interest of Django community to Redis usage, and Django 4.0 got Redis cache support out of the box.
- django-redis 12 911 680 +37%
- django-redis-cache 2 244 945 +7%
- django-cacheops 1 317 225 +16%Settings
Almost no grows for dj-database-url and a great boost of django-environ The fraction of users in this category remains stable year after year — 32% of total Django downloads. Is everyone else happy with plain settings.py and os.environ?
- django-environ 8 622 541 +54%
- dj-database-url 7 748 144 +2%
- django-appconf 7 515 049 +10%
- django-constance 1 243 319 +7%Background jobs
celery with 50+ million downloads (+40%) are still the king in the Django world too.django-crontab goes out of the top list.
- django-celery-beat 5 676 928 +28%
- django-celery-results 4 729 748 +42%
- django-celery 1 217 083 -18%
- django-rq 1 093 844 +12%Dramatiq downloads grow more than 50% but still far away from top 100–523 560. Huey grows up to 37% and got 453 811 downloads per year
Authentication and Authorization
social-auth-app-django grows was not enough and it loses first place in this category. django-allauth now is the most popular way to add social accounts authentication for Django
- django-allauth 4 998 753 +40%
- social-auth-app-django 4 716 219 +11.52
- django-oauth-toolkit 3 036 325 +6.5%
- django-otp 2 680 685 +38%
- django-guardian 2 376 722 +32%
- django-auth-ldap 2 292 198 +91%Shortcuts and helpers
There are no big needs for shortcuts and syntactic sugar. django-annoyingis loses almost 10% of its popularity and goes out of the top list. django-braces is also declining
- django-ipware 4 795 396 +16%
- django-braces 2 145 071 -4.7%
- django-user-agents 1 823 622Frvontend tools
Another warning category. Does Django need integration with JS tools? Aren’t JavaScript build pipelines better managed by their own JS builders?
- django-js-asset 4 354 255 +10%
- django-webpack-loader 3 158 250 -9%
- django-compressor 3 024 645 +2%Security
No new players here, no new achievements. Seems Django is secure enough out of the box.
- django-axes 2 125 397 +2%
- django-ratelimit 1 552 483 +15%
- django-csp 1 780 528 +32%Big boost for django-anymail moves it to the first place! Amazon is no longer the default place for hosting, other cloud providers have gotten more attention.
- django-anymail 2 766 768 +49%
- django-ses 2 353 989 +18%Monitoring
sentry-sdk got over 90 million of downloads with +114% boost. Definitely some of those users came with Django. Django-specific monitoring packages also received a lot of attention in 2021
- django-health-check 2 961 658 +53%
- django-prometheus 1 884 262 +8%
- django-log-request-id 1 487 990 +43%Administration
No package has succeeded in customizing Django Admin as much as Grapelli, and even its popularity has declined this year. But the growing interest django-admin-rangefiltershows that the standard admin interface is still popular.
django-admin-sortable2 got only +3% downloads and loses the place on top list.
- django-grappelli 1 327 827 -12%
- django-admin-rangefilter 2 230 739 +61%
- django-object-actions 1 438 011 +41%Search
At the beginning of 2021 we had almost parity in the numbers of downloads, nowadays simple django-elasticsearch-dsl is growing much faster than the fading django-haystack
- django-elasticsearch-dsl 1 288 081 +38%
- django-haystack 1 147 975 -8.5%Other
No great boost for channels usage, it grows the same as Django. Increasing usage of django-fsm is in trend with other packages, helps to use Django as a tool for internal business process automation
- django-storages 15 990 744
- channels 3 842 246
- django-fsm 1 934 169 +38%
- django-tables2 1 525 420 +6%
- fcm-django 1 278 495 NEW
- wagtail 1 216 937
- django-heroku 1 196 737 +0.3%
- django-hosts 1 150 593 NEW
- django-classy-tags 1 068 910Conclusion
In 2021 Django ecosystem shows a stable and steady growth rate. Dear Django devs, this is how we’ve spent 2021. Do you have an idea about what’s going to climb to the top in the next year? What packages are we missing? Have there been any new upcoming tools created recently? Post in the comments to get them raised in the article updates.
Happy coding, Merry Christmas and Happy New Year!