Django dev survey shows growing use of HTMX, Tailwind CSS, background workers approved

Django dev survey shows growing use of HTMX, Tailwind CSS, background workers approved

A survey of 4,000 Django developers shows strong growth in use of HTMX, Tailwind CSS and GitHub Actions – and that a third of these devs also use Flask or FastAPI.

Django is a Python web framework which is more than 20 years old but still a current favourite, with version 5.0 released late last year. The most recent StackOverflow survey placed it just below Flask among Python web frameworks, and well ahead of FastAPI, though this last (as its name implies) is dedicated solely for building APIs. 

Note that many survey results allowed developers to tick multiple options, in which case percentage figures sum to more than 100.

Although Django is primarily a web framework, there is a popular Django REST framework which enables API building, and according to the new survey, 61 percent of respondents make use of this, versus 73 percent who build full-stack applications.

A notable trend in the new survey, which was conducted by the Django Foundation in conjunction with JetBrains (via its PyCharm IDE), is the growing use of htmx, now used by 23 percent of respondents, up from 16 percent the previous year.  HTMX extends HTML to enable many features, such as AJAX (asynchronous JavaScript) requests, to be defined in markup rather than with JavaScript code.

The survey shows growing use of htmx

Tailwind CSS is also growing in popularity. Bootstrap remains the most popular (56 percent) but Tailwind CSS has grown from 15 percent in 2021 to 29 percent in the current survey, while Bootstrap has declined. According to Tim Kamanin, creator of a Tailwind CSS package for Django, Tailwind “gives you all the building blocks you need to build designs without any annoying opinionated styles you have to fight to override (which happens quite often while working with CSS frameworks like Bootstrap, Foundation or Bulma).”

Another trend is rising use of GitHub Actions for continuous integration (CI), now at 45 percent of respondents and above GitLab CI at 25 percent and Jenkins/Hudson at 11 percent. These figures suggest that the CI built into cloud platforms is good enough for many developers.

Despite the JetBrains sponsorship, 47 percent of respondents use VS Code as their primary editor, versus 29 percent for PyCharm – with this likely overstating PyCharm use. The third most popular Python editor is Vim.

Django developers love Linux, with 36 percent of respondents designating it as their primary operating system, above macOS at 32 percent and Windows at 29 percent.

When it comes to container orchestration, AWS ECS/Fargate is the most popular single orchestration service in this community (19 percent) but the sum of self-managed Kubernetes, Amazon EKS (Elastic Kubernetes Service), GKE (Google Kubernetes Engine) and AKS (Azure Kubernetes Service) totals 43 percent so this is somewhat misleading; Kubernetes in all its forms is the overall winner.

The survey is a reminder that although Python owes much of its popularity to the AI boom, it remains a very popular general-purpose language.

In other Django news, the background worker proposal was approved last week, aiming to provide an “interface and implementation for long-running background tasks in Django.” This means that implementation can begin.