OpenAI Python Library vs Anthropic Python SDK
In 1,621 Python projects set up for AI coding agents, OpenAI Python Library is a dependency in 247 (15.2%) and Anthropic Python SDK in 115 (7.1%): OpenAI Python Library is 2.1× as common. Among repos created in the last 90 days that use a model sdks tool, OpenAI Python Library is in 50.0% and Anthropic Python SDK in 15.0%, against 57.7% and 27.3% of older ones. 65 projects list both, often a sign of a migration or of a monorepo with several apps.
Model SDKs PyPI Updated Nov 17, 2026
| OpenAI Python Library | 15.2% | |
|---|---|---|
| Anthropic Python SDK | 7.1% |
Share of 1,621 Python projects set up for AI coding agents that list each one as a dependency.
Side by side
| OpenAI Python Library | Anthropic Python SDK | |
|---|---|---|
| Agent projects that use it | 247 | 115 |
| Rank in model sdks | #3 | #6 |
| In new repos with a model sdks tool (last 90 days) | 50.0% | 15.0% |
| In older repos with one | 57.7% | 27.3% |
| Downloads, last 7 days | 90.3M | 49.8M |
| GitHub stars | 32.2K | 4,080 |
| Last push to its repo | Nov 17, 2026 | Nov 16, 2026 |
| License | Apache-2.0 | Apache-2.0 |
| Funding | — | — |
| Projects that list both | 65 | |
Downloads include CI runs and installs as a dependency of other packages. Stars and pushes are from GitHub's API; downloads from PyPI.
By coding agent
| Projects set up for | Python repos | OpenAI Python Library | Anthropic Python SDK |
|---|---|---|---|
| Claude Code | 782 | 13.7% | 10.1% |
| GitHub Copilot | 805 | 14.0% | 5.0% |
| Cursor | 548 | 16.1% | 6.8% |
| Gemini CLI | 83 | 24.1% | 18.1% |
| OpenAI Codex | 78 | 19.2% | 12.8% |
| OpenCode | 53 | 18.9% | 17.0% |
| OpenClaw | 104 | 32.7% | 16.3% |
| Devin Desktop | 60 | 21.7% | 0% |
Share of the Python repos configured for each agent (its config file in the repo) that list the tool. A repo set up for two agents counts for both.
OpenAI Python Library
Official Python SDK to call OpenAI APIs including GPT models and embeddings.
Most often used with it:
| python-dotenv | 70.9% of its projects |
|---|---|
| Pydantic | 56.7% of its projects |
| Uvicorn | 51.8% of its projects |
| FastAPI | 48.6% of its projects |
| Requests | 44.9% of its projects |
pip install openai
Anthropic Python SDK
Official Python library for calling Claude via the Anthropic API.
Most often used with it:
| python-dotenv | 60.9% of its projects |
|---|---|
| OpenAI Python Library | 56.5% of its projects |
| Pydantic | 51.3% of its projects |
| FastAPI | 40.9% of its projects |
| Uvicorn | 40.9% of its projects |
pip install anthropic
More matchups
Anthropic Python SDK vs Google GenAI Python SDKOpenAI Python Library vs Google GenAI Python SDKOpenAI vs Anthropic SDKAnthropic SDK vs Google Generative AIOpenAI vs Google Generative AI
How we count
Projects are public GitHub repos our weekly scan finds through coding-agent config files (CLAUDE.md, AGENTS.md, .cursor/mcp.json and others); a project uses a tool when its package.json, requirements.txt or pyproject.toml lists it. "Same job" was checked for every pair, so add-ons and companions are never paired. Shares by repo age compare repos created in the last 90 days with older ones in the same scan. More on the method.