Metadata-Version: 2.4
Name: thesma
Version: 0.10.0.0
Summary: Python SDK for the Thesma API — developer-friendly access to SEC EDGAR financial data
Project-URL: Homepage, https://thesma.dev
Project-URL: Documentation, https://api.thesma.dev/docs
Project-URL: Repository, https://github.com/thesma-dev/thesma-python
Author-email: Thesma <support@thesma.dev>
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: click<9.0,>=8.0
Requires-Dist: eval-type-backport>=0.2.0; python_version < '3.10'
Requires-Dist: httpx<1.0,>=0.24.0
Requires-Dist: pydantic<3.0,>=2.0
Requires-Dist: tabulate<1.0,>=0.9
Provides-Extra: dev
Requires-Dist: datamodel-code-generator>=0.25; extra == 'dev'
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: respx>=0.20; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: types-tabulate>=0.9; extra == 'dev'
Description-Content-Type: text/markdown

# Thesma Python SDK

[![PyPI version](https://img.shields.io/pypi/v/thesma.svg)](https://pypi.org/project/thesma/)
[![CI](https://github.com/thesma-dev/thesma-python/actions/workflows/ci.yml/badge.svg)](https://github.com/thesma-dev/thesma-python/actions/workflows/ci.yml)

Python SDK for the [Thesma API](https://thesma.dev) -- developer-friendly access to US-GAAP and IFRS financial data from SEC EDGAR — every US-listed public company on NYSE and NASDAQ.

## Installation

```bash
pip install thesma
```

## Quickstart

```python
from thesma import ThesmaClient

client = ThesmaClient(api_key="gd_live_...")

# List companies
companies = client.companies.list()
for company in companies:
    print(company.ticker, company.name)

# Get financial statements
financials = client.financials.get("0000320193", statement="income", period="annual")
```

```python
# IFRS filers return native-currency financials with taxonomy metadata
spot = client.financials.get("0001639920", statement="income", period="annual")
print(spot.data.taxonomy)                         # "ifrs-full"
print(spot.data.currency)                         # "EUR"
print(spot.data.reporting_notes.presentation_format)  # "by_nature" | "by_function" | "unknown"
print(spot.data.reporting_notes.ifrs_18_applied)  # True | False
```

## Async usage

```python
from thesma import AsyncThesmaClient

async with AsyncThesmaClient(api_key="gd_live_...") as client:
    companies = await client.companies.list()
```

## CLI

```bash
export THESMA_API_KEY=gd_live_...
thesma companies list
thesma financials list AAPL --period annual --format json
```

## Typed responses

`response.taxonomy`, `response.currency`, and `response.reporting_notes.presentation_format`
are declared as typed attributes on `FinancialStatementResponse` — callers get IDE
autocomplete and mypy-checked access instead of reaching into `.model_extra` for
the IFRS-01 fields.

## Documentation

Full documentation is available at [docs.thesma.dev](https://docs.thesma.dev).

## License

MIT
