This is the fifth official annual Python Developers Survey, conducted as a collaborative effort between the Python Software Foundation and JetBrains. In fall 2021, more than 23,000 Python developers and enthusiasts from almost 200 countries/regions took the survey to reveal the current state of the language and the ecosystem around it.
For the last 4 years the share of developers who use Python as their main language remains at the pretty same level of 84-85%.
JavaScript is the most popular language used together with Python. However, for developers who use Python as a secondary language, C/C++ are about as popular as JavaScript. HTML/CSS, Bash/Shell, and SQL are also widespread, each being used by more than a third of Python developers.
Web development refers to people who selected “Web development” in response to the question “What do you use Python for the most?”. Data science refers to people who selected “Data analysis” or “Machine Learning” in the same question.
Unsurprisingly, the most popular languages used along with Python by web developers are JavaScript (69%) and HTML/CSS (60%), while developers involved in data-related tasks more often use SQL (42%). Also, the share of developers who don’t use any additional languages is three times higher among those who are involved in data-related tasks, compared to web developers.
In this section, we asked questions to find out what people use Python for, what types of development they are involved in, and how they combine their various uses.
There are no great changes in the distribution of Python use cases over the years. Data analysis, machine learning, web development, and DevOps are still the most popular fields for Python usage.
A quarter of developers who use Python as their main language primarily use it for web development. Among those for whom Python is a secondary language, only 12% do so.
Interestingly, data analysis as a primary field for Python usage is reported by nearly the same share of developers both for whom it is the main programming language (17%) and as a secondary one (16%).
This question was only answered by respondents who are involved in Data analysis and Machine learning.
Only 29% of the Python developers involved in data analysis and machine learning consider themselves to be Data Scientists.
On average, the share of Python 2 users decreases by 5 percentage points each year, and now only 5 developers out of 100 use it.
It is interesting that compared to Python 3, Python 2 is more often applied to computer graphics, games, and mobile development.
Note: Enthought got less than 0.5% and has been merged to Others.
More than half of Windows users get Python from Python.org, while among Linux users only a third do so. Unsurprisingly, Linux and macOS users most often install and update Python using OS-provided options. At the same time, for macOS users, pyenv and Docker containers are also fairly popular ways of getting Python.
Among Python developers, 75% use some tools to isolate Python environments. Interestingly, Conda is the most popular tool for it among developers who use Jupyter Notebook (50%), while other developers prefer Virtualenv and Docker.
Flask, Django, and FastAPI are still the top-3 Python web frameworks. FastAPI, initially released at the end of 2018, shows the fastest growth, having grown by 9 percentage points compared to the previous year. At the same time, compared to 2020, the share of Flask users decreased by 5 percentage points.
You can find more about the Django framework landscape in the Django Developers Survey 2021, conducted in partnership with Django Software Foundation.
10% of Python developers simultaneously use 7 or more data science frameworks and libraries, while about a half of them use 2 or fewer frameworks.
The majority of other frameworks are more popular among web-developers than among data scientists, who use Tkinker and PyQT significantly more often.
The popularity of different Python unit-testing frameworks remains nearly the same compared to last year.
While only 56% of solo-developers use them, 75% of respondents from companies of 5,000 or more employees report using unit-testing frameworks.
SQLAlchemy is the most popular ORM among all database users.
It is interesting that 52% of Redis users use Django ORM, while generally it is used by less than a third of Python devs. Also noteworthy is that 20% of Amazon Redshift users use SQLObject, while in the general population this number is only about 5%.
Among data scientists 80% use databases, while among web developers 98% do so.
Those who are involved in web development use PostgreSQL 32 percentage points more often, Redis 25 percentage points more often, and SQLite 12 percentage points more often than those who are involved in data science. At the same time, data scientists report to use Oracle Database twice more often than web developers.
The distribution of big data tools remains nearly the same compared to last year. Generally, data scientists use them 13 percentage points more often than other developers, and Apache Spark and Dask are about twice as popular among them.
of Python developers use cloud platforms.
This question was only answered by respondents who use cloud platforms.
Interestingly, Visual Basic, C#, and C/C++ users use AWS nearly half as often as Python developers in general.
This question was only answered by respondents who use cloud platforms.
Virtual machines continue to lose their popularity. While in 2018 they had a share of 47% and were the most popular choice, now only 41% of Python developers use them.
This question was only answered by respondents who use cloud platforms.
Local Python development with virtualenv is extremely popular among those who are involved in web development, DevOps, and software prototyping (61-65%). Docker containers usage is mostly popular among web-devs (54%).
Virtual machines are widely used by developers involved in DevOps, machine learning, and network programming (26-27%). Interestingly, those involved in DevOps and machine learning also use remote development environments more often than all other respondents.
Compared to 2020, Linux and macOS popularity decreased by 5 percentage points each, while Windows usage has risen by 10 percentage points.
Introduced in 2018, GitHub Actions quickly gained popularity and now is in first place in the list of CI systems, being used by slightly less than a third of Python developers.
Another growing CI system is Gitlab CI – its usage has risen by 4 percentage points since 2018. At the same time, Travis CI is rapidly losing its popularity, with a decrease of 13% from 2018. Jenkins/Hudson have also lost 8 percentage points in three years.
of Python programmers use documentation tools. The most popular one is Sphinx.
Those who use Python as a primary language use a Python profiler and code coverage 8 percentage points more frequently, and Python virtual environments 10 percentage points more frequently, for their projects than developers who use Python as a secondary language.
The combined share of the PyCharm Community and Professional editions is 31%, which is close to last year's result. VS Code has grown by 6 percentage points compared to last year.
Interestingly, PyCharm and VS Code are equally popular among web developers (39%), while data scientists prefer VS Code by 9 percentage points more as their main IDE.
To identify the most popular editors and IDEs, we asked a single-answer question “What is the main editor you use for your current Python development?”.
Web development refers to people who selected “Web development” in response to the question “What do you use Python for the most?”. Data science refers to people who selected “Data analysis” or “Machine Learning” in the same question.
The most popular ways Python developers learn about their main IDE are learning activities, their friends/colleagues recommendations, or search engines.
Interestingly, only 1% of respondents reported advertising was a source of discovering the tool.
57% of those using Jupyter Notebook first learn about it in School/University or on online courses, while overall 25% of respondents learn about their tool the same way.
VS Code, Jupyter Notebook, and PyCharm are the most popular to use in addition to the main IDE, with each being used by more than 20% of Python developers.
VS Code, Jupyter Notebook, and PyCharm are the most popular to use in addition to the main IDE, with each being used by more than 20% of Python developers.
Those who use Jupyter Notebook as their main IDE additionally use Spyder about four times more often than other Python developers.
In 2021, The Python Software Foundation appointed a new Developer-in-Residence to work full-time on the Python programming language and support its developer community.
Core developer Łukasz Langa was hired to the CPython DIR role in July. Langa is working to help clear the backlog, investigate project priorities, and look into other areas of interest.
23% of Python developers already know about the Developer-in-Residence role, and 91% of them find this initiative good.
Moreover, 30% of developers who are aware of the Developer-in-Residence role already see the impact of this innovation.
Only 19% of Python users have ever reported its bugs. Interestingly, using bugs.python.org is not the most popular way to report them – about twice as many programmers prefer to ask elsewhere or submit a pull request to GitHub.
Of those who reported bugs, 73% got their issue solved, and only 7% of respondents say they have never heard back from anybody.
This question was only answered by respondents who have already reported issues.
of Python developers use containers, and 59% of them use a virtual environment in them.
45% of Python developers use some tools for version pinning of application dependencies. The most common way to store it is in requirements.txt, which is used by three quarters of developers.
This question was only answered by respondents who use some tools for managing precise/exact versions of application dependencies.
This question was only answered by respondents who use some tools for managing precise/exact versions of application dependencies.
90% of developers report they use pip to install Python packages. The Python Package Index is the most popular place to get the packages from.
of Python developers say they develop applications, and Setuptools is the most popular tool for this purpose, used by 46% of developers.
This question was only answered by respondents who develop applications.
While more than half of Python users develop applications, only 40% of them have already published these apps to a package repository.
This question was only answered by respondents who develop Python libraries.
34% of respondents develop Python libraries, and for them Setuptools is the most common way to package it, used by 71%.
Interestingly, only 27% of Python library developers have already published them to a package repository.
This question was only answered by respondents who published their packaged Python libraries.
The Python Package Index is the most popular place to publish developed libraries and application packages, while the Private PyPI is used about half as often.
This question was only answered by respondents who are employed in companies.
This question was only answered by respondents who are employed in companies.
This question was only answered by respondents who are employed in companies.
This question was only answered by respondents who are employed in companies.
This question was only answered by respondents who are employed.
Want to dig further into the data? Download the anonymized survey responses and see what you can learn! Share your findings and insights by mentioning @jetbrains and @ThePSF on Twitter with the hashtag #pythondevsurvey.
The data set includes responses only from official Python Software Foundation channels. After filtering out duplicate and unreliable responses, the data set includes more than 23,000 responses collected between October 11 and December 6, 2021, through the promotion of the survey on python.org, the PSF blog, the PSF’s Twitter and LinkedIn accounts, official Python mailing lists, and Python-related subreddits. In order to prevent the survey from being slanted in favor of any specific tool or technology, no product, service, or vendor-related channels were used to collect responses.
The data is anonymized, with no personal information or geolocation details. To prevent the identification of any individual respondents by their verbatim comments, all open-ended fields have been deleted.
To help you better understand the logic of the survey, we are sharing the data set, the survey questions, and the survey logic. We used different ordering methods for answer options (alphabetic, randomized, and direct). The order of the answers is specified for each question.
At least two of the following:
Once again, on behalf of both the Python Software Foundation and JetBrains, we’d like to thank everyone who took part in this survey. With your help, we’re able to map the landscape of the Python community more accurately!
Contribute to the PSF’s Recurring Giving Campaign. The PSF is a non-profit organization entirely supported by its sponsors, members & the public.
Check out the Python Developer Survey results in 2020, 2019, 2018, and 2017.
Discover the other large-scale survey reports by JetBrains!
We hope you found our report useful. Share this report with your friends and colleagues.
If you have any questions about this survey or suggestions for future ones, please contact us at surveys@jetbrains.com or psf@python.org.