Skip to main content

live-earnings

Python client for the Live Earnings API: live earnings-call transcripts, each turn's text as it is spoken and then who said it. Python 3.9+.

Install

pip install live-earnings

Quickstart

Your API key (ek_…) covers one call; copy it from the call's API Access tab on https://live-earnings.com/live. Run with LE_KEY=ek_… SLUG=<call-slug>:

import os

from live_earnings import LiveEarningsClient, Transcript

client = LiveEarningsClient(token=os.environ["LE_KEY"])
slug = os.environ["SLUG"]
transcript = Transcript()


def show(turn):
    if turn:
        print(f"{turn.name or '…'}: {turn.text or ''}")


# Everything so far, then live until the call ends.
last = None  # the last seq seen; None = start the stream from now
ended = False
for env in client.events(slug):
    show(transcript.apply(env))
    last = env.seq
    ended = ended or env.event.type == "done"
if not ended:
    for env in client.stream(slug, last_event_id=last):
        if env.event.type == "done":
            break
        show(transcript.apply(env))

A turn prints once when its text arrives (…: text) and again when its speaker is named. Transcript applies the rules: a person's correction beats the model's name, new_name == "unknown" leaves a turn unnamed, basis == "early" marks a provisional name, and a repeated envelope is ignored. apply() returns the turn itself, updated in place as later events arrive.

The client

meta(slug) the call: ticker, fiscal period, status, roster
events(slug, from_=None, to=None, limit=None) every stored envelope, following pagination
stream(slug, last_event_id=None) live envelopes; raises if the connection goes silent for 90 s — resume with the last seq you saw
session_token(slug) a SessionToken (session_token, expires_in) for a browser EventSource (?t=) — call it on your server

Hosts default to https://live-earnings.com (REST) and https://stream.live-earnings.com (streams); override with base_url and stream_url. Both must be https:// unless you pass allow_insecure=True for local development. Errors raise LiveEarningsError (status, body).

Full reference: https://live-earnings.com/live/docs

Changes

0.4.0 — Default hosts (base_url is optional; streams go to the stream host). Transcript folds events into turns. session_token(). events() takes an optional range. Streams deliver each message as it arrives (they were buffered in 512-byte reads). AiInsightEvent is deprecated — the API does not currently send it.

0.3.0 — UnknownEvent.naming == "pending" (the name follows as a TurnSpeakerAmendEvent); amends carry by and may carry basis == "early".

0.2.0 — stt_speaker_change on AttributionEvent and UnknownEvent; ai_insight and turn_speaker_amend decode to their own classes.

Metadata

Release files for live-earnings 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for live-earnings 0.4.0
File Size Uploaded Provenance Actions
live_earnings-0.4.0.tar.gz 14.2 kB Without provenance Details for live_earnings-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for live-earnings 0.4.0
File Interpreter ABI Platform Actions
live_earnings-0.4.0-py3-none-any.whl Python 3 none any Details for live_earnings-0.4.0-py3-none-any.whl

Total release size: 26.4 kB

Release files / live_earnings-0.4.0.tar.gz

Download URL live_earnings-0.4.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
54457cb6176fa06ba0bd0a0680bf908d43461ee6e650f62d856f5dd0730bd464
BLAKE2b-256 checksum
How to use checksums
5c8d350f46bdb4fe5f0d7a62571cd165e4686a5db64b68be94e2d49a50887f74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / live_earnings-0.4.0-py3-none-any.whl

Download URL live_earnings-0.4.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3aa6c5e194cb8a148ef14387febb880bc046160cb73f3312c413f4d220e356b
BLAKE2b-256 checksum
How to use checksums
1ced939da52669ce4a792a3f02ac98d6e0a9baf7927bdab4a5030db8129c3a18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for live-earnings 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page