Skip to main content

Python SDK for the Thesma API — developer-friendly access to SEC EDGAR financial data

Project description

Thesma Python SDK

PyPI version CI

Python SDK for the Thesma API -- developer-friendly access to US-GAAP and IFRS financial data from SEC EDGAR — every US-listed public company on NYSE and NASDAQ.

Installation

pip install thesma

Quickstart

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")
# 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

from thesma import AsyncThesmaClient

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

CLI

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.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thesma-0.11.0.1.tar.gz (210.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thesma-0.11.0.1-py3-none-any.whl (89.5 kB view details)

Uploaded Python 3

File details

Details for the file thesma-0.11.0.1.tar.gz.

File metadata

  • Download URL: thesma-0.11.0.1.tar.gz
  • Upload date:
  • Size: 210.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for thesma-0.11.0.1.tar.gz
Algorithm Hash digest
SHA256 6f393d3c1a34de1929f268a7ec1766c3dbffd2ac9a10577a652d3ca8bc175f4a
MD5 4ec8a747bfd60efb73e48a20fe911e64
BLAKE2b-256 325ca6e4901d4bbe670a0ad13e5da4aa5919fee67edfc31ff944f25672190671

See more details on using hashes here.

Provenance

The following attestation bundles were made for thesma-0.11.0.1.tar.gz:

Publisher: publish.yml on thesma-dev/thesma-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thesma-0.11.0.1-py3-none-any.whl.

File metadata

  • Download URL: thesma-0.11.0.1-py3-none-any.whl
  • Upload date:
  • Size: 89.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for thesma-0.11.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e7eddd1d8e90ce2c08952e1471f16eb31be8de81c6e045061f5cf7f5c728792
MD5 8b6d0a5f5d686bdae8352d323f940bdd
BLAKE2b-256 2d1e4146221c8f666968b2a2ecbe11ce0176af5ba2fa718b581b80c3105b4275

See more details on using hashes here.

Provenance

The following attestation bundles were made for thesma-0.11.0.1-py3-none-any.whl:

Publisher: publish.yml on thesma-dev/thesma-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page