python-dotenv vs Pydantic Settings
In 1,621 Python projects set up for AI coding agents, python-dotenv is a dependency in 570 (35.2%) and Pydantic Settings in 217 (13.4%): python-dotenv is 2.6× as common. Among repos created in the last 90 days that use a dev workflow and config tool, python-dotenv is in 56.4% and Pydantic Settings in 20.5%, against 66.7% and 25.4% of older ones. 125 projects list both, often a sign of a migration or of a monorepo with several apps.
Dev workflow and config PyPI Updated Nov 17, 2026
| python-dotenv | 35.2% | |
|---|---|---|
| Pydantic Settings | 13.4% |
Share of 1,621 Python projects set up for AI coding agents that list each one as a dependency.
Side by side
| python-dotenv | Pydantic Settings | |
|---|---|---|
| Agent projects that use it | 570 | 217 |
| Rank in dev workflow and config | #3 | #7 |
| In new repos with a dev workflow and config tool (last 90 days) | 56.4% | 20.5% |
| In older repos with one | 66.7% | 25.4% |
| Downloads, last 7 days | 179M | 12M |
| GitHub stars | 8,921 | 1,503 |
| Last push to its repo | Nov 9, 2026 | Nov 13, 2026 |
| License | BSD-3-Clause | MIT |
| Funding | — | — |
| Projects that list both | 125 | |
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 | python-dotenv | Pydantic Settings |
|---|---|---|---|
| Claude Code | 782 | 30.4% | 14.7% |
| GitHub Copilot | 805 | 35.7% | 14.2% |
| Cursor | 548 | 35.0% | 13.5% |
| Gemini CLI | 83 | 30.1% | 15.7% |
| OpenAI Codex | 78 | 25.6% | 14.1% |
| OpenCode | 53 | 30.2% | 11.3% |
| OpenClaw | 104 | 37.5% | 13.5% |
| Devin Desktop | 60 | 38.3% | 16.7% |
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.
python-dotenv
Load environment variables from .env files in Python applications.
Most often used with it:
| Pydantic | 49.5% of its projects |
|---|---|
| Uvicorn | 43.9% of its projects |
| Requests | 42.5% of its projects |
| FastAPI | 39.5% of its projects |
| OpenAI Python Library | 30.7% of its projects |
pip install python-dotenv
Pydantic Settings
Settings management and configuration from environment variables using Pydantic.
Most often used with it:
| Pydantic | 84.3% of its projects |
|---|---|
| Uvicorn | 71.4% of its projects |
| FastAPI | 68.2% of its projects |
| python-dotenv | 57.6% of its projects |
| python-multipart | 41.9% of its projects |
pip install pydantic-settings
More matchups
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.