# What new PyPI packages import: LLM, httpx, pydantic v2

> Source: <https://py-code.org/blog/new-pypi-packages-imports/>
> Published: 2026-11-14 13:28:13+00:00

# What new PyPI packages are made of

[Scripts and results for this post on GitHub](https://github.com/pypi-data/blog/tree/main/new-pypi-packages-imports)

py-code.org reads the code in the latest release of PyPI projects and records every module, function and class it imports. In this post, "new packages" means the latest release of each project released between 13 November 2025 and 13 November 2026: 335,167 projects. A project counts if it had any release in that year, so older projects with a recent release are included.

We counted which of these projects import six LLM SDKs, the MCP SDK, the three main HTTP clients and the two pydantic validator APIs. The HTTP and pydantic comparisons use all 354,763 indexed projects: the 335,167 above plus the most downloaded projects whose latest release is older. We left out each library's own add-on packages, such as the many `langchain-*` integrations and `mcp-*` servers, so every count shows projects built on top of the library.

## The short answer

| Question | Answer | Key number | 
|---|---|---|
| Which AI SDK do the most new packages import? | The MCP SDK ( `mcp` ), ahead of openai | 20,013 vs 12,096 projects | 
| How many new packages import an LLM SDK? | 6.7% over the year, and at most 8.4% in any month | 22,563 projects; peak in April 2026 | 
| requests or httpx? | requests, with httpx slightly behind | 45,752 vs 41,112 of all indexed projects | 
| pydantic v1 or v2 validators? | v2, by a wide margin | 23,696 vs 465 of all indexed projects | 

**Verdict:** new PyPI packages import the MCP SDK more often than any LLM SDK. Across all indexed projects, almost all that use pydantic validators use the v2 ones, and requests still leads httpx, by about 10%.

## Python LLM libraries: at most 8.4% of projects in any month

We counted six LLM SDKs: `openai`, `anthropic`, `litellm`, `langchain` (any module whose name starts with `langchain`), `google-genai` (`google.genai`) and `ollama`. 22,563 of the 335,167 new packages import at least one of them, which is 6.7%. The MCP SDK is not in this count; the next section covers it.

By month of latest release, the share was 5.0% in November 2025, between 8.2% and 8.4% from March to May 2026, and 5.7% in September and October 2026.

**How to read the chart:** Each project counts once, in the month of its latest release. A project that released in March and again in October counts only in October. So the chart is not a count of uploads per month, and it cannot show whether fewer LLM projects were started after May.

## The MCP Python SDK is imported by more projects than openai (20,013 vs 12,096)

The [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) is the official library for the Model Context Protocol, which lets AI apps call tools and read data from other programs. It is imported as `mcp`. We count a project when its own code imports `mcp`. A project's own modules are never counted, so a package that ships its own module named `mcp` does not count as a user of itself.

Among the 335,167 new packages:

- `mcp` : 20,013 projects (6.0%)
- `openai` : 12,096 (3.6%)
- `anthropic` : 7,718 (2.3%)
- `langchain` : 6,721 (2.0%)
- `google-genai` : 3,409,`litellm` : 2,971 and`ollama` : 1,252

The MCP SDK alone is in 20,013 projects, against 22,563 that use any of the six LLM SDKs, each counted once.

LangChain is also the most imported agent framework. The [AI agent frameworks post](https://py-code.org/blog/ai-agent-frameworks-pypi/) compares it with 24 others, including LangGraph, LlamaIndex and CrewAI, across all indexed projects. That post counts 6,779 projects for LangChain, not 6,721, because it also counts older projects. Few LLM projects trace their calls: of all indexed projects that use an LLM SDK or framework, only 4.8% import an observability SDK such as Langfuse or LangSmith, as the [LLM observability SDKs post](https://py-code.org/blog/llm-observability-sdks-pypi/) shows.

**Why:** most of these projects are MCP servers. 17,329 of the 20,013 import `mcp.server`, and 9,902 build their server with the SDK's `FastMCP` class. Only 2,774 use the client API (`mcp.client` or `mcp.ClientSession`). So the count mostly measures projects that offer tools to AI apps, not projects that call an LLM.

## requests vs httpx vs aiohttp: httpx is slightly behind requests

Across all 354,763 indexed projects, 88,302 import at least one of `requests`, `httpx` or `aiohttp`. Of those 88,302 projects:

- `requests` : 45,752 projects (51.8%)
- `httpx` : 41,112 projects (46.6%), about 10% fewer than requests
- `aiohttp` : 9,548 projects (10.8%)

A project can import more than one of the three, so the shares add up to more than 100%.

Weighted by downloads, requests leads by more. The 88,302 projects had 7.3 billion downloads in the 30 days before the scan. Projects that import requests account for 73.6% of those downloads, aiohttp for 49.9% and httpx for 26.4%. These shares overlap too, because a project can import more than one library. Download counts exist only for the 60,000 most downloaded projects, and the rest count as zero, so this measure reflects the large, established packages.

## pydantic v1 vs v2: 23,696 projects use only v2 validators, 465 only v1

pydantic v2 replaced the `@validator` and `@root_validator` decorators with `@field_validator` and `@model_validator`, and the [pydantic migration guide](https://docs.pydantic.dev/latest/migration/) marks the old ones as deprecated. So the decorators show which API a project's code is written for. Of the 58,358 indexed projects that import pydantic:

- 23,696 use only the v2 decorators (40.6%)
- 465 use only the v1 decorators (0.8%)
- 619 use both
- 563 import `pydantic.v1` , the copy of the v1 API that pydantic v2 ships for old code. We count these separately, as neither v1 nor v2 use.

The other projects import pydantic but use neither kind of validator decorator.

**Key point:** by project count, v2-only projects outnumber v1-only projects about 50 to 1.

By downloads the gap looks smaller, but two projects dominate the numbers. v2-only projects account for 42.8% of the 3.0 billion monthly downloads of pydantic users, and v1-only projects for 14.6%. huggingface-hub and openai make up 96% of those v1-only downloads. openai uses `root_validator` only in code that runs when pydantic v1 is installed, and huggingface-hub imports `validator` only to check that pydantic can be imported.

## How to run these queries yourself

There are four ways, from quickest to most exact: the search on py-code.org, the command-line tool, the SQL console on Hugging Face in your browser, and DuckDB on your own computer. Only DuckDB, and the scripts below it, read the exact snapshot this post used.

### On py-code.org

Each finding above has a search page. The search covers all 354,763 indexed projects, and includes each library's own packages, so its counts for the SDKs are higher than the counts for new packages in this post.

### From a terminal or Claude Code

The [py-code-org command-line tool](https://py-code.org/cli/) runs the same lookup. This lists the most downloaded packages that use `httpx.AsyncClient`, with the file and line where each one first uses it:

``` bash
$ uvx py-code-org who-uses httpx.AsyncClient
```

To let Claude Code look names up while you work, add the MCP server:

``` bash
$ claude mcp add py-code -- uvx py-code-org mcp
```

### In your browser, on Hugging Face

The full index is a [dataset of Parquet files on Hugging Face](https://huggingface.co/datasets/pypi-data/py-code), and its SQL console runs DuckDB inside your browser. You need no account and nothing installed. [Open the SDK query in the console](https://huggingface.co/datasets/pypi-data/py-code/viewer?sql_console=true&views%5B%5D=refs&views%5B%5D=projects&sql=SELECT+sdk%2C+count%28DISTINCT+project%29+AS+projects%0AFROM+%28%0A++SELECT+project%2C%0A+++++++++CASE+WHEN+module+LIKE+%27langchain%25%27+THEN+%27langchain%27%0A++++++++++++++WHEN+module+%3D+%27google%27+THEN+%27google-genai%27%0A++++++++++++++ELSE+module+END+AS+sdk%0A++FROM+refs%0A++WHERE+module+IN+%28%27openai%27%2C+%27anthropic%27%2C+%27litellm%27%2C+%27ollama%27%2C+%27mcp%27%29%0A+++++OR+module+LIKE+%27langchain%25%27%0A+++++OR+name+%3D+%27google.genai%27+OR+name+LIKE+%27google.genai.%25%27%0A%29%0AJOIN+projects+USING+%28project%29%0AWHERE+upload_time+%3E%3D+%272025-11-13%27%0A++--+leave+out+each+SDK%27s+own+packages+%28langchain-%2A%2C+mcp-%2A%29+and+the+iflow-mcp+copies%0A++AND+NOT+starts_with%28lower%28project%29%2C+%27iflow-mcp%27%29%0A++AND+NOT+%28replace%28replace%28lower%28project%29%2C+%27_%27%2C+%27-%27%29%2C+%27.%27%2C+%27-%27%29+%3D+sdk%0A+++++++++++OR+starts_with%28replace%28replace%28lower%28project%29%2C+%27_%27%2C+%27-%27%29%2C+%27.%27%2C+%27-%27%29%2C+sdk+%7C%7C+%27-%27%29%29%0AGROUP+BY+sdk%0AORDER+BY+projects+DESC%3B): the link fills in the query below and runs it. The first run can stop with "Table with name refs does not exist", because it starts before the tables have loaded. Click **Run Query** again: the console then loads `refs` and `projects` and runs the query. To type a query yourself:

1. Open the [dataset viewer](https://huggingface.co/datasets/pypi-data/py-code/viewer) and click**SQL Console** .
2. Under **Subsets and Splits** , click`refs` and`projects` to load them as tables. Then write the query using the subsets as table names:`refs` has one row per name a project uses (`project` ,`name` ,`module` ), and`projects` has one row per project (`project` ,`version` ,`upload_time` ,`downloads_30d` and more).
3. Click **Run Query** .

```
SELECT sdk, count(DISTINCT project) AS projects
FROM (
  SELECT project,
         CASE WHEN module LIKE 'langchain%' THEN 'langchain'
              WHEN module = 'google' THEN 'google-genai'
              ELSE module END AS sdk
  FROM refs
  WHERE module IN ('openai', 'anthropic', 'litellm', 'ollama', 'mcp')
     OR module LIKE 'langchain%'
     OR name = 'google.genai' OR name LIKE 'google.genai.%'
)
JOIN projects USING (project)
WHERE upload_time >= '2025-11-13'
  -- leave out each SDK's own packages (langchain-*, mcp-*) and the iflow-mcp copies
  AND NOT starts_with(lower(project), 'iflow-mcp')
  AND NOT (replace(replace(lower(project), '_', '-'), '.', '-') = sdk
           OR starts_with(replace(replace(lower(project), '_', '-'), '.', '-'), sdk || '-'))
GROUP BY sdk
ORDER BY projects DESC;
```

In our tests the first run took 3 to 4 minutes, most of it loading the 40 million rows of `refs` into the browser. Once the data had loaded, the query itself took 5 seconds.

**Tip:** the console always reads the latest build of the dataset, which is rebuilt weekly. It matched this post on 14 November 2026. After the next rebuild its counts will drift, so use DuckDB with the pinned revision below to get this post's numbers.

### With DuckDB, on the exact snapshot

DuckDB can read the same Parquet files from Hugging Face in place. The `@9d81d70d…` in each path pins the 13 November 2026 build, so this query always gives the numbers in the SDK chart:

```
SELECT sdk, count(DISTINCT project) AS projects
FROM (
  SELECT project,
         CASE WHEN module LIKE 'langchain%' THEN 'langchain'
              WHEN module = 'google' THEN 'google-genai'
              ELSE module END AS sdk
  FROM 'hf://datasets/pypi-data/py-code@9d81d70d6519d77f4dee4811b3e3a5d88379c17d/refs.parquet'
  WHERE module IN ('openai', 'anthropic', 'litellm', 'ollama', 'mcp')
     OR module LIKE 'langchain%'
     OR name = 'google.genai' OR name LIKE 'google.genai.%'
)
JOIN 'hf://datasets/pypi-data/py-code@9d81d70d6519d77f4dee4811b3e3a5d88379c17d/projects.parquet' USING (project)
WHERE upload_time >= '2025-11-13'
  -- leave out each SDK's own packages (langchain-*, mcp-*) and the iflow-mcp copies
  AND NOT starts_with(lower(project), 'iflow-mcp')
  AND NOT (replace(replace(lower(project), '_', '-'), '.', '-') = sdk
           OR starts_with(replace(replace(lower(project), '_', '-'), '.', '-'), sdk || '-'))
GROUP BY sdk
ORDER BY projects DESC;
```

Run it in the DuckDB shell, or from Python with `duckdb.sql(query).show()`. In our test it took about a minute over the network and returned:

```
┌──────────────┬──────────┐
│     sdk      │ projects │
│   varchar    │  int64   │
├──────────────┼──────────┤
│ mcp          │    20013 │
│ openai       │    12096 │
│ anthropic    │     7718 │
│ langchain    │     6721 │
│ google-genai │     3409 │
│ litellm      │     2971 │
│ ollama       │     1252 │
└──────────────┴──────────┘
```

### Reproduce every number in this post

The scripts behind every number and chart here are in the [pypi-data/blog repository](https://github.com/pypi-data/blog/tree/main/new-pypi-packages-imports), with the results they gave. With DuckDB installed, one command reads the same pinned snapshot from Hugging Face and writes the post's numbers to `out/new-packages.json`. It took 36 seconds in our test:

``` bash
$ git clone https://github.com/pypi-data/blog
$ cd blog/new-pypi-packages-imports
$ pip install duckdb
$ python3 blog_data.py
```

The October check is in the same folder, as `october_check.py`. It asks PyPI for each sampled project's release history, so its results can change slightly if a project deletes old releases.

## How the numbers were counted

- **How the code is read.** For each project the scanner reads the`.py` files of its latest release, parses them with Python's`ast` module without running them, and keeps the imported names, not the code.
- **Latest release only.** The index keeps one release per project, the latest one, and reads its Python files. Imports in older releases are not counted.
- **Months are latest-release months.** Counts of projects by the month of their latest release overstate growth: 33,260 projects have their latest release in September 2026 and 56,685 in October. We sampled 300 projects per month and read their full release history from[PyPI's JSON API](https://docs.pypi.org/api/json/) . The estimated number of projects created was 19,011 in August, 22,273 in September and 24,524 in October, and the error bands (two standard errors) of the three months overlap. These estimates cover only projects still in the index.
- **Static imports only.** The scanner reads`import` statements and attribute access on imported names. Imports through`importlib` or`__import__` , and names reached through variables, are missed.
- **Own packages left out.** A project whose name is a library's name, or starts with it followed by a hyphen, is not counted for that library:`langchain-openai` does not count as a LangChain user, and`mcp-server-git` does not count as an MCP SDK user. This leaves out 973 projects for LangChain and 1,342 for the MCP SDK, and fewer than 70 for each other SDK and HTTP library (228 for pydantic). The same rule is used in the[AI agent frameworks](https://py-code.org/blog/ai-agent-frameworks-pypi/) and[LLM observability SDKs](https://py-code.org/blog/llm-observability-sdks-pypi/) posts.
- **Copies left out.** We also dropped the 2,144`iflow-mcp*` projects from every count. They are copies of other people's MCP servers republished under one prefix, and 1,627 of them are recent projects that import the MCP SDK.
- **No other filtering.** Every other project with a release in the year counts, including test uploads and very small packages.
- **Downloads.** Download counts are for the 30 days before the scan, from ClickHouse's public PyPI dataset, and exist only for the 60,000 most downloaded projects.

## Frequently asked questions

## Is httpx used more than requests?

No. Across the 354,763 indexed projects, 45,752 import requests and 41,112 import httpx, about 10% fewer. aiohttp is imported by 9,548.

## What is the most imported LLM SDK on PyPI?

Among the six LLM SDKs counted here, openai: 12,096 of the 335,167 projects with a release between 13 November 2025 and 13 November 2026 import it. The MCP Python SDK, which is counted separately, is imported by more projects: 20,013, and 17,329 of them import mcp.server.

## What share of new PyPI packages use an LLM SDK?

22,563 of the 335,167 new packages, or 6.7%, import openai, anthropic, litellm, langchain, google-genai or ollama. Counted by the month of their latest release, the share peaked at 8.4% in April 2026.

## How many projects still use pydantic v1 validators?

465 projects use only the v1 decorators, validator and root_validator, and 23,696 use only the v2 decorators, field_validator and model_validator. Another 619 use both.

## How can I query PyPI imports without BigQuery?

The py-code.org index is a set of Parquet files on Hugging Face. You can query it in your browser with the dataset's SQL console, or with DuckDB on your own computer using hf:// paths. The search on py-code.org and the py-code-org command-line tool answer the same questions without SQL.

## How many PyPI projects does py-code.org index?

354,763: the latest release of the 335,167 projects released between 13 November 2025 and 13 November 2026, plus the most downloaded projects whose latest release is older.

## Sources

- [py-code.org dataset on Hugging Face](https://huggingface.co/datasets/pypi-data/py-code) , revision`9d81d70d` (13 November 2026)
- [pypi-data/py-code](https://github.com/pypi-data/py-code) , the scanner that builds the index
- [pypi-data/blog](https://github.com/pypi-data/blog/tree/main/new-pypi-packages-imports) , the scripts and results for this post
- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)
- [pydantic migration guide](https://docs.pydantic.dev/latest/migration/)
- [PyPI JSON API](https://docs.pypi.org/api/json/)
- [DuckDB: reading Hugging Face datasets](https://duckdb.org/docs/stable/core_extensions/httpfs/hugging_face)
- [ClickHouse PyPI downloads (ClickPy)](https://clickpy.clickhouse.com/)
