Python projects don't switch libraries. New ones pick FastAPI, httpx and Typer
Scripts and results for this post on GitHub
Most packages uploaded to PyPI list the libraries they require. We counted how many projects require each library in every year from 2018 to 2026. Typer, httpx and FastAPI grew every year from 2020 on. To find where that growth comes from, we split the projects that released in 2026 into new and older ones, and checked whether older projects switched.
- Typer, httpx and FastAPI grew every year. From 2020 to 2026, httpx went from 0.5% of projects to 15.1%, Typer from 0.5% to 6.9% and FastAPI from 0.4% to 4.9%. FastAPI passed Flask in 2024 and Django in 2025, and httpx passed requests in 2026.
- The growth comes from new projects. Among projects first released in 2026, Typer leads Click (15,442 to 13,057), httpx leads requests (34,876 to 21,190) and FastAPI leads Django (10,852 to 2,221).
- Older projects keep the library they had. Among projects that already existed and released again in 2026, 6,209 require Click and 3,078 Typer, and 16,210 require requests and 5,673 httpx.
- Few projects switch. Of the projects that required Click in 2024 and released again in 2026, 1.2% moved to Typer. For requests to httpx the figure is 2.1%, and for pandas to Polars it is 0.4%.
- Some older libraries keep their lead. pandas (28,787 projects) and Matplotlib (18,488) are far ahead of Polars (3,012) and Plotly (2,974) in 2026. TensorFlow fell from 1.6% of projects in 2020 to 0.3%, against 3.8% for PyTorch.
The short answer
| Comparison | Share of all projects, 2020 → 2026 | Projects first released in 2026 | Older projects, released in 2026 | Switched since 2024 |
|---|---|---|---|---|
| Typer vs Click | Typer 0.5% → 6.9%, Click 7.9% → 7.2% | Typer 15,442, Click 13,057 ▲ Typer 18% | Typer 3,078, Click 6,209 ▲ Click 2.0× | 1.2% moved to Typer |
| httpx vs requests | httpx 0.5% → 15.1%, requests 19.7% → 13.9% | httpx 34,876, requests 21,190 ▲ httpx 65% | httpx 5,673, requests 16,210 ▲ requests 2.9× | 2.1% moved to httpx |
| FastAPI vs Django | FastAPI 0.4% → 4.9%, Django 3.6% → 1.7% | FastAPI 10,852, Django 2,221 ▲ FastAPI 4.9× | FastAPI 2,416, Django 2,293 close | 0 of 1,214 moved to FastAPI |
| Polars vs pandas | Polars 0.0% → 1.1%, pandas 12.4% → 10.7% | Polars 1,966, pandas 16,066 ▲ pandas 8.2× | Polars 1,046, pandas 12,721 ▲ pandas 12.2× | 0.4% moved to Polars |
| PyTorch vs TensorFlow | PyTorch 2.1% → 3.8%, TensorFlow 1.6% → 0.3% | PyTorch 7,184, TensorFlow 342 ▲ PyTorch 21.0× | PyTorch 3,114, TensorFlow 371 ▲ PyTorch 8.4× | 5.3% moved to PyTorch |
Verdict: Typer, httpx and FastAPI grew because new projects pick them. Few projects that already use Click, requests, Flask or Django switch: 2.2% or less of each group did between 2024 and 2026. So among older projects, Click and requests stay ahead, and FastAPI and Django are close. pandas and PyTorch lead in new and in older projects.
How the libraries were counted
- Data. PyPI publishes the metadata of every uploaded file in a public BigQuery table,
bigquery-public-data.pypi.distribution_metadata. We read it on 2 December 2026. - What counts. A project counts for a year if a file it uploaded that year lists the library as a required dependency. Optional dependencies (extras) are left out, and so are projects that have since been deleted from PyPI.
- Shares. A share is the library's projects as a percentage of all projects that uploaded with at least one required dependency that year: 268,692 in 2026 and 167,119 in 2025.
- Years, and new and older projects. The charts give every year from 2018 to 2026. For 2026, the projects are also split in two: a project is new if its first upload to PyPI was in 2026, and older if it first uploaded before 2026. 2026 runs to 2 December 2026.
Existing projects almost never switch
We took the projects that required the older library in 2024, without the newer one, and that uploaded again in 2026. Then we checked what their 2026 uploads require.
| Old → new | Released again in 2026 | Switched to the new one | Use both | Kept the old one only | Dropped the old one, without the new one |
|---|---|---|---|---|---|
| Click → Typer | 2,654 | 32 (1.2%) | 29 | 2,358 | 235 |
| requests → httpx | 7,765 | 161 (2.1%) | 235 | 6,826 | 543 |
| Flask → FastAPI | 686 | 15 (2.2%) | 13 | 563 | 95 |
| Django → FastAPI | 1,214 | 0 (0.0%) | 3 | 1,187 | 24 |
| pandas → Polars | 6,182 | 23 (0.4%) | 99 | 5,581 | 479 |
| Matplotlib → Plotly | 4,017 | 8 (0.2%) | 61 | 3,591 | 357 |
| TensorFlow → PyTorch | 228 | 12 (5.3%) | 12 | 140 | 64 |
| toml → tomli | 602 | 28 (4.7%) | 8 | 457 | 109 |
Key point: in every pair, fewer than 6% of the projects switched, and for most pairs it was under 3%. Most projects kept the old library: 2,358 of the 2,654 Click projects and 6,826 of the 7,765 requests projects. Not one Django project dropped Django for FastAPI.
TensorFlow to PyTorch has the highest rate, 5.3%, but the group is small: 12 of 228 projects.
FastAPI vs Flask vs Django: FastAPI passed Flask in 2024 and Django in 2025
The numbers by year
| Library | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Projects, 2026 |
|---|---|---|---|---|---|---|---|---|---|---|
| FastAPI | 0.0% | 0.1% | 0.4% | 0.7% | 1.0% | 1.6% | 2.1% | 3.5% | 4.9% | 13,268 |
| Django | 4.1% | 3.7% | 3.6% | 2.9% | 2.9% | 2.5% | 2.5% | 2.2% | 1.7% | 4,514 |
| Flask | 2.7% | 2.7% | 2.6% | 2.2% | 2.0% | 1.8% | 2.0% | 1.7% | 1.1% | 2,906 |
FastAPI's share grew every year, from 0.4% of projects in 2020 to 4.9% in 2026. Django fell from 4.1% in 2018 to 1.7%, and Flask from 2.7% to 1.1%. In 2026, 13,268 projects require FastAPI, 4,514 Django and 2,906 Flask.
The lead comes from new projects: 10,852 of the FastAPI projects were first released in 2026, against 2,221 for Django and 1,622 for Flask. Among older projects, FastAPI (2,416) and Django (2,293) are close. Another 7,722 projects list FastAPI only as an optional dependency, and 1,686 list Flask that way.
Why: on PyPI, FastAPI is far ahead of Flask, with 4.9% of projects against 1.1%. In the 2024 Python Developers Survey, with more than 25,000 responses, the three are close: 38% of developers used FastAPI, 35% Django and 34% Flask. The two count different things. Web apps are rarely published on PyPI, so the PyPI counts on this page show packages built with or for each framework, such as plugins and API servers. The survey counts the developers who use each framework, including for apps.
httpx vs requests: httpx leads in new projects, requests in older ones
The numbers by year
| Library | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Projects, 2026 |
|---|---|---|---|---|---|---|---|---|---|---|
| httpx | 0.0% | 0.1% | 0.5% | 1.0% | 1.4% | 2.2% | 3.3% | 7.0% | 15.1% | 40,549 |
| requests | 18.7% | 19.1% | 19.7% | 19.3% | 18.7% | 18.1% | 19.0% | 19.5% | 13.9% | 37,400 |
| aiohttp | 1.6% | 1.9% | 2.3% | 2.9% | 2.8% | 3.0% | 3.4% | 4.1% | 3.1% | 8,382 |
| httpx2 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.5% | 1,444 |
From 2018 to 2025, about one project in five required requests: 19.5% in 2025. httpx grew from 0.5% in 2020 to 7.0% in 2025 and 15.1% in 2026. Over all of 2026, httpx is slightly ahead, by 8%: 40,549 projects against 37,400.
The difference is larger when new and older projects are counted apart. 34,876 projects first released in 2026 require httpx and 21,190 require requests. Among older projects, requests leads with 16,210 against 5,673.
httpx had no release between 0.28.1 in December 2024 and 0.29.0 in November 2026 (changelog). In May 2026 Pydantic released httpx2, which its README describes as Pydantic "picking up stewardship" of HTTPX. 1,444 projects require httpx2 so far.
Typer vs Click: new projects now pick Typer
The numbers by year
| Library | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Projects, 2026 |
|---|---|---|---|---|---|---|---|---|---|---|
| Typer | 0.0% | 0.0% | 0.5% | 1.1% | 1.7% | 2.1% | 2.3% | 3.9% | 6.9% | 18,520 |
| Click | 7.1% | 7.4% | 7.9% | 7.5% | 7.1% | 6.6% | 6.3% | 7.3% | 7.2% | 19,266 |
Click's share has stayed between 6.3% and 7.9% since 2018. Typer, first released in December 2019 (PyPI), grew from 0.5% in 2020 to 6.9% in 2026. Over all of 2026 the two are close: 19,266 projects require Click and 18,520 require Typer.
In projects first released in 2026, Typer is ahead: 15,442 against 13,057. In older projects, Click has about twice as many: 6,209 against 3,078.
How to read the chart: Typer was built on Click. Up to version 0.25.1, Typer listed Click as a dependency, so every Typer install also installed Click. Since Typer 0.26.0 (26 May 2026), Typer includes its own copy of Click's code (release notes). This page counts only the libraries each project lists itself, so a Typer project counts for Click only if it also lists Click, before and after that change.
Polars vs pandas: pandas is still about 10 times more common
The numbers by year
| Library | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Projects, 2026 |
|---|---|---|---|---|---|---|---|---|---|---|
| pandas | 6.9% | 9.4% | 12.4% | 13.1% | 14.2% | 14.4% | 15.5% | 14.8% | 10.7% | 28,787 |
| Polars | 0.0% | 0.0% | 0.0% | 0.0% | 0.1% | 0.3% | 0.6% | 1.0% | 1.1% | 3,012 |
In 2026, 28,787 projects require pandas and 3,012 require Polars, so pandas has 9.6 times as many. Polars grew from 0.1% of projects in 2022 to 1.1% in 2026. pandas peaked at 15.5% in 2024 and fell to 10.7% in 2026, because the projects new in 2026 require it less often: 8.8% of them, against 14.6% of older projects. Of the 6,182 projects that required pandas in 2024 and released again in 2026, 23 switched to Polars and 99 now require both.
The survey shows the same order: 80% of the developers in the 2024 Python Developers Survey used pandas and 15% used Polars.
Matplotlib vs Seaborn vs Plotly: Matplotlib leads, and Seaborn stays ahead of Plotly
The numbers by year
| Library | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Projects, 2026 |
|---|---|---|---|---|---|---|---|---|---|---|
| Matplotlib | 5.1% | 6.8% | 8.4% | 8.7% | 9.2% | 8.9% | 9.9% | 9.6% | 6.9% | 18,488 |
| Seaborn | 0.8% | 1.2% | 1.6% | 1.8% | 1.9% | 1.9% | 2.3% | 2.3% | 1.3% | 3,606 |
| Plotly | 0.3% | 0.4% | 0.8% | 1.0% | 1.1% | 1.2% | 1.4% | 1.6% | 1.1% | 2,974 |
In 2026, 18,488 projects require Matplotlib, 3,606 Seaborn and 2,974 Plotly. Seaborn has been ahead of Plotly every year since 2018, though Seaborn has had no release since 0.13.2 in January 2024 (PyPI). Projects often list plotting libraries as optional dependencies, which these counts leave out. In 2026, a further 8,782 projects list Matplotlib only as optional, 1,421 list Seaborn and 1,953 list Plotly.
PyTorch vs TensorFlow: TensorFlow fell from 1.6% of projects in 2020 to 0.3%
The numbers by year
| Library | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Projects, 2026 |
|---|---|---|---|---|---|---|---|---|---|---|
| PyTorch | 0.4% | 1.0% | 2.1% | 2.7% | 2.9% | 3.6% | 4.3% | 4.6% | 3.8% | 10,298 |
| TensorFlow | 0.8% | 1.2% | 1.6% | 1.4% | 1.2% | 0.9% | 0.9% | 0.6% | 0.3% | 713 |
PyTorch passed TensorFlow in 2020 and has stayed ahead. In 2026, 10,298 projects require PyTorch and 713 require TensorFlow, so PyTorch has about 14 times as many. Google's TensorFlow 2.21 post (March 2026) says the team will focus on security and bug fixes and dependency updates, and it recommends Keras 3, JAX and PyTorch for new generative AI work.
Also rising: Pydantic in 18.4% of projects and Rich in 10.1%
The numbers by year
| Library | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | Projects, 2026 |
|---|---|---|---|---|---|---|---|---|---|---|
| Pydantic | 0.0% | 0.3% | 1.1% | 2.5% | 3.9% | 5.8% | 8.4% | 13.7% | 18.4% | 49,361 |
| Rich | 0.0% | 0.0% | 0.5% | 1.4% | 2.6% | 3.2% | 3.9% | 6.7% | 10.1% | 27,121 |
Pydantic is required by 49,361 projects in 2026, more than any other library counted here, and Rich, the library for coloured terminal output, by 27,121. For the other groups we counted, the table gives the projects that require each library in 2026 and its share in 2024 and 2026.
| Group | Projects in 2026 (share in 2024 → 2026) |
|---|---|
| ORMs | sqlalchemy 6,253 (2.3% → 2.3%), sqlmodel 670 (0.2% → 0.2%), peewee 200 (0.1% → 0.1%), tortoise-orm 67 (0.0% → 0.0%), pony 7 (0.0% → 0.0%) |
| Task queues | celery 644 (0.3% → 0.2%), rq 72 (0.0% → 0.0%), huey 42 (0.0% → 0.0%), arq 40 (0.0% → 0.0%), dramatiq 36 (0.0% → 0.0%) |
| Logging | loguru 4,384 (2.1% → 1.6%), structlog 2,755 (0.3% → 1.0%) |
| TOML | tomli 5,056 (1.0% → 1.9%), toml 1,679 (1.3% → 0.6%), tomlkit 1,548 (0.4% → 0.6%) |
| Async | anyio 3,453 (0.7% → 1.3%), trio 137 (0.1% → 0.1%) |
| Data models | pydantic 49,361 (8.4% → 18.4%), attrs 2,086 (1.5% → 0.8%), msgspec 840 (0.2% → 0.3%), marshmallow 332 (0.4% → 0.1%), cattrs 236 (0.1% → 0.1%) |
| Terminal | rich 27,121 (3.9% → 10.1%), textual 4,016 (0.3% → 1.5%) |
What the new projects are: one in six requires an LLM SDK
241,097 projects made their first upload to PyPI in 2026, 1.9 times as many as in 2025 (125,863). Of the 181,644 new projects with required dependencies, 31,267 (17%) require an LLM SDK. The 12 SDKs counted are openai, anthropic, mcp, fastmcp, litellm, langchain, langchain-core, google-genai, ollama, llama-index, crewai and pydantic-ai.
About a third of the new projects that require httpx (33%), FastAPI (34%) or Pydantic (32%) also require an LLM SDK. For Typer it is 24%, for Click 21% and for requests 18%. For pandas, Matplotlib and PyTorch it is under 10%.
LLM projects lean towards the newer libraries, but they do not explain the whole shift: two thirds of the new httpx and FastAPI projects require no LLM SDK. The data shows which libraries new projects require, not why their authors chose them.
Check a library yourself
Tip: py-code.org shows which projects use a library in their code, ranked by downloads, with the file and line. Try typer, httpx or polars, or run uvx py-code-org who-uses typer in a terminal.
The py-code.org index gives a second count, from the code itself: how many of the 314,947 projects with a 2026 release, as of 13 November 2026, import each library. This total includes projects without dependency metadata and stops on 13 November, so it differs from the totals above. For requests, httpx, Click and Typer, the import counts are within 8% of the dependency counts. The import counts are higher for the web frameworks, pandas and Polars, which projects often list only as optional dependencies: 37% of the projects that list FastAPI list it only as optional, against 5% for Typer.
| Library | Require it (metadata) | Import it (code) |
|---|---|---|
| requests | 37,400 | 40,230 |
| httpx | 40,549 | 39,798 |
| Click | 19,266 | 19,245 |
| Typer | 18,520 | 17,902 |
| FastAPI | 13,268 | 18,191 |
| Django | 4,514 | 6,974 |
| Flask | 2,906 | 4,620 |
| pandas | 28,787 | 33,246 |
| Polars | 3,012 | 3,849 |
To count dependencies yourself, run the query below in BigQuery. Each run reads about 6.8 GB, and the BigQuery sandbox allows 1 TB of queries a month for free. Set @libraries to the PyPI names you want, such as ['typer', 'click']. The query drops deleted projects by joining a table of the names on PyPI's simple index. Our script, adoption_data.py fetch, creates that table in your Google Cloud project, and PROJECT in the query stands for that Google Cloud project's ID. To run the query without the table, delete the live AS line and every JOIN live USING (project), and deleted projects are then counted too.
-- Projects per year that list each library as a required dependency.
-- One row per uploaded file is in pypi.distribution_metadata; a project counts once per year.
-- `PROJECT.libtrends.existing` holds the names on PyPI's simple index today (deleted projects dropped).
WITH files AS (
SELECT REGEXP_REPLACE(LOWER(name), r'[-_.]+', '-') AS project,
EXTRACT(YEAR FROM upload_time) AS year, upload_time, requires_dist
FROM `bigquery-public-data.pypi.distribution_metadata`
WHERE upload_time IS NOT NULL
),
first_upload AS (
SELECT project, EXTRACT(YEAR FROM MIN(upload_time)) AS first_year FROM files GROUP BY project
),
live AS (SELECT name AS project FROM `PROJECT.libtrends.existing`),
deps AS (
SELECT project, year,
REGEXP_REPLACE(LOWER(REGEXP_EXTRACT(dep, r'^\s*([A-Za-z0-9][A-Za-z0-9._-]*)')), r'[-_.]+', '-') AS library,
REGEXP_CONTAINS(dep, r'extra\s*==') AS optional -- an extra, such as mylib[plot]
FROM files, UNNEST(requires_dist) AS dep
)
SELECT d.year, d.library,
COUNT(DISTINCT IF(NOT d.optional, d.project, NULL)) AS projects, -- required
COUNT(DISTINCT IF(NOT d.optional AND f.first_year = d.year, d.project, NULL)) AS new_projects,
COUNT(DISTINCT d.project) AS listed_at_all -- required or optional
FROM deps d JOIN live USING (project) JOIN first_upload f USING (project)
WHERE d.library IN UNNEST(@libraries)
GROUP BY d.year, d.library
UNION ALL
-- Every project that uploaded that year, to show how many carry dependency metadata.
SELECT f.year, '*uploaded*', COUNT(DISTINCT f.project), COUNT(DISTINCT IF(u.first_year = f.year, f.project, NULL)), NULL
FROM files f JOIN live USING (project) JOIN first_upload u USING (project)
GROUP BY f.year
UNION ALL
-- The denominator: projects that uploaded that year with any required dependency.
SELECT d.year, '*any*', COUNT(DISTINCT d.project), COUNT(DISTINCT IF(f.first_year = d.year, d.project, NULL)), NULL
FROM deps d JOIN live USING (project) JOIN first_upload f USING (project)
WHERE NOT d.optional
GROUP BY d.year
The script that fetched and charted every number in this post, with the queries for switching and LLM SDKs and the results it got, is in the pypi-data/blog repository.
Limits of this data
- Declared, not imported. The counts come from the dependencies each project lists. A project that imports a library without listing it is not counted, and a project that lists a library it never imports is.
- Required only. Optional dependencies (extras) are left out. This lowers the counts for libraries that projects often make optional, such as plotting libraries.
- Older years have less metadata. In 2016, 13% of the projects that uploaded had dependency metadata, against 43% in 2018 and 79% in 2026, so the charts start in 2018.
- Every project counts the same. A package with millions of downloads counts once, and so does a package nobody installs. Spam and copies are included unless PyPI deleted them.
- 2026 is not over. It runs from 1 January to 2 December 2026.
Frequently asked questions
Is FastAPI more popular than Flask?
Among PyPI projects, yes, since 2024. In 2026, 13,268 projects require FastAPI, 4,514 require Django and 2,906 require Flask. In the 2024 Python Developers Survey, 38% of developers used FastAPI, 35% Django and 34% Flask.
Is httpx replacing requests?
In new projects, yes: 34,876 projects first released in 2026 require httpx and 21,190 require requests. Older projects stay with requests. Of the 7,765 projects that required requests in 2024 and released again in 2026, 161 (2.1%) switched to httpx.
Is Typer more popular than Click?
In projects first released in 2026, yes: 15,442 require Typer and 13,057 require Click. Across all projects that released in 2026 the two are close, with 18,520 for Typer and 19,266 for Click.
Is Polars replacing pandas?
Not yet. 28,787 projects that released in 2026 require pandas and 3,012 require Polars. Of the 6,182 projects that required pandas in 2024 and released again in 2026, 23 switched to Polars.
Is TensorFlow still used?
Much less than in 2020. TensorFlow is required by 0.3% of the projects that released in 2026, down from a peak of 1.6% in 2020, and PyTorch by 3.8%. Google's TensorFlow 2.21 post says the team will focus on security and bug fixes and recommends Keras 3, JAX and PyTorch for new generative AI work.
Sources
- PyPI: BigQuery datasets, the
distribution_metadatatable, read on 2 December 2026 - pypi-data/blog, the script and results for this post
- py-code.org dataset on Hugging Face, the import counts (data as of 13 November 2026)
- Python Developers Survey 2024, PSF and JetBrains
- Typer release notes (0.26.0, 26 May 2026)
- httpx changelog and httpx2 on PyPI
- Google: What's new in TensorFlow 2.21 (March 2026)
- seaborn release history on PyPI
- Google Cloud: BigQuery sandbox