Python may be the world's fastest-growing programming language in terms of popularity but what are developers doing with it and which tools are they using?
The Python Software Foundation has shed light on how developers are using Python across the language's three main areas of use: data science, web development and DevOps.
More about Innovation
More than 20,000 professional and hobbyist developers across 150 countries were polled by the foundation and IDE software company JetBrains for the Python Developers Survey 2018 report in the fall of last year.
For the first time, developers are primarily using Python for data analysis, which has overtaken web development as the main role the language is used for.
SEE: Hiring kit: Python developer (Tech Pro Research)
"Data analysis has become more popular than web development, growing from 50% in 2017 to 58% in 2018," says the report.
"Machine learning also grew by 7 percentage points. These types of development are experiencing faster growth than web development, which has only increased by 2 percentage points when compared to previous year."
The finding chimes with a recent Kaggle survey of data scientists flagging Python as their most popular language.
A growing cross section of developers are also using Python to write scripts for handling DevOps and systems administration, typically alongside Bash scripts.
What Python is used for?
Certain frameworks and libraries stand out as the most widely used in each of these fields.
For data science and machine learning, developers typically use NumPy, Pandas, Matplotlib, with machine learning-specific libraries such as scikit-learn, TensorFlow and Keras also being popular. For handling big data, the most popular platform among Python developers was Apache Spark.
Most popular data science frameworks for Python
Among web developers, Flask and Django were by far the most popular frameworks, although one quarter said they used no frameworks at all.
Most popular web frameworks for Python
The most useful software libraries across all Python developers appear to be Requests for managing sending and receiving information via HTTP, the image manipulation library Pillow, and the asyncio library for streamlining code handling asynchronous requests.
Most popular software libraries
The most popular IDE for writing Python was the longstanding PyCharm suite, although Microsoft's VS Code is rapidly gaining ground, jumping to become the second-most popular editor for Python development. Close behind are venerable editor Vim, Sublime and Jupyter Notebook.
Most popular IDEs for Python
Meanwhile the unit-testing framework of choice among developers was pytest and PostgreSQL was the most commonly used database, closely followed by MySQL.
Ewa Jodlowska, director of operations for the Python Software Foundation, said this was the largest survey of Python developers the foundation had ever undertaken and she hoped it would shed light on wider trends for the community.