The public Python client library for the EarningsCall developer API, published
to PyPI as earningscall. It is a
thin requests-based SDK: all calls hit https://v2.api.earningscall.biz (domain
overridable via EARNINGSCALL_DOMAIN), plus https://earningscall.biz/exchanges.json
for the exchange list. Auth is an apikey query param resolved from
earningscall.api_key, then the ECALL_API_KEY / EARNINGSCALL_API_KEY env
vars, defaulting to "demo" (AAPL-only sample access; other symbols raise
InsufficientApiAccessError). Public surface (see earningscall/__init__.py):
get_company, get_all_companies, get_sp500_companies, get_calendar,
Symbols, load_symbols, exchanges, and module-level config
(api_key, enable_requests_cache, retry_strategy).
earningscall/api.py— HTTP layer. Endpoint wrappers (events,transcript,audio,slides,calendar,symbols-v2.txt,symbols/sp500.txt), retry with backoff on 429/5xx, 401 →InvalidApiKeyError, optionalrequests-cachesqlite cache (.earningscall_cachein the temp dir, on by default).earningscall/exports.py— the top-level functions re-exported by__init__.py.earningscall/company.py—Company:events(),get_transcript()(levels 1–4),download_audio_file(),download_slide_deck(). Maps 404 →None/[]and 403 →InsufficientApiAccessError.earningscall/symbols.py—CompanyInfo/Symbols; parses the tab-separatedsymbols-v2.txtindex; cached in a module-level singleton.earningscall/exchanges.py,sectors.py— index↔name tables; exchanges load dynamically fromexchanges.jsonwith a hardcoded fallback list.earningscall/transcript.py,event.py,calendar.py—dataclasses_jsonresponse models.errors.py— exception types.tests/— pytest +responses; recorded YAML fixtures intests/data, no live network.scripts/— runnable examples (python -m scripts.<name>).
- Build/test/lint via Hatch (hatchling backend) — commands in
DEVELOPMENT.md. CI (
.github/workflows/test.yml) runshatch run lint:all(ruff, black, mypy),hatch run cov(Coveralls), and a containerized matrixhatch run all:teston Python 3.10–3.14. - Releases: bump the static
versioninpyproject.toml[project], add a## Release \X.Y.Z` - YYYY-MM-DDentry toCHANGELOG.md, then push avX.Y.Ztag..github/workflows/release.ymlbuilds and publishes to PyPI via trusted publishing (OIDC,pypienvironment), signs with Sigstore, and creates the GitHub Release. Merges tomaster` build but do not publish.
[tool.hatch.version]in pyproject points athatch_init/__about__.py, which does not exist — dead template config (version is not indynamic). The real version is[project] version. The--cov=hatch_initscript there is equally dead;hatch.toml[envs.default]overrides it. Don't "fix" either by creatinghatch_init/.- Module-level singletons (
symbols._symbols,exchanges._exchanges_in_order) and the on-disk requests cache persist stale data across calls; useclear_symbols()/api.purge_cache()in tests (see the autouse fixture intests/test_helper.py).