Installation¶
Python¶
# Core library (zero runtime dependencies)
pip install financial-ratios
# With data fetchers (Yahoo Finance, httpx)
pip install "financial-ratios[fetchers]"
# With REST API (FastAPI + uvicorn)
pip install "financial-ratios[api]"
# With MCP server for AI agents (Claude Desktop)
pip install "financial-ratios[mcp]"
# With Pandas/Polars DataFrame integration
pip install "financial-ratios[pandas]"
# Everything
pip install "financial-ratios[all]"
Requires Python ≥ 3.9
TypeScript / JavaScript¶
Requires Node.js ≥ 18
Verify Installation¶
Zero Dependencies (Core)¶
The core ratio functions have no runtime dependencies in either Python or TypeScript. You only need to install extras if you want:
| Feature | Python extra | TypeScript |
|---|---|---|
| Data fetchers | [fetchers] |
built-in (uses fetch) |
| REST API | [api] |
— |
| MCP server | [mcp] |
— |
| DataFrame integration | [pandas] |
— |