Skip to main content

Finnhub connector for the parsimony framework

Project description

parsimony-finnhub

Finnhub source for parsimony: equity quotes, company fundamentals, news, and calendars.

Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-finnhub.

Connectors

Group Connectors
Discovery finnhub_search
Market data finnhub_quote
Company finnhub_profile, finnhub_peers, finnhub_recommendation, finnhub_earnings, finnhub_basic_financials
News finnhub_company_news, finnhub_market_news
Calendars finnhub_earnings_calendar, finnhub_ipo_calendar
Enumerator enumerate_finnhub (full US symbol list)

12 connectors total. Free tier covers all of the above; some adjacent endpoints (/stock/candle, /forex/rates, /stock/splits, /stock/dividend, /stock/price-target) require a paid Finnhub plan and are not exposed here.

Install

pip install parsimony-finnhub

Pulls in parsimony-core>=0.7,<0.8 automatically. Verify discovery:

python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"

Configuration

export FINNHUB_API_KEY="<your-key>"

Get a key at https://finnhub.io. Free tier: 60 calls/min.

Quick start

import os
from parsimony_finnhub import load

connectors = load(api_key=os.environ["FINNHUB_API_KEY"])
result = connectors["finnhub_quote"](symbol="AAPL")
print(result.data.head())

The API key is declared as a secret (stripped from provenance) and bound off the call surface via load(api_key=...) (or Connector.bind). As a dev fallback it is read from FINNHUB_API_KEY. A missing key raises UnauthorizedError naming the env var.

For multi-plugin composition:

from parsimony import discover
connectors = discover.load_all()

Provider

License

See LICENSE.

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

parsimony_finnhub-0.0.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

parsimony_finnhub-0.0.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_finnhub-0.0.1.tar.gz.

File metadata

  • Download URL: parsimony_finnhub-0.0.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_finnhub-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2f7d95558532115a8191771d22ccd4cbb619163d86dd1aff74030a9ae836aff6
MD5 480e2ba164880f56d1a1ed8d44b7fab9
BLAKE2b-256 6f99dcd8027619b6efe5f6ee45e88021ff55f14df502d51e2b2926fb20461b4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_finnhub-0.0.1.tar.gz:

Publisher: release.yml on ockham-sh/parsimony-connectors

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

File details

Details for the file parsimony_finnhub-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for parsimony_finnhub-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3e8ff3b895465b7591b63b4027046f669d52b72c2017b6d08c40cae15bf1371
MD5 12ccd34f6e28441d8c3445c02396e26e
BLAKE2b-256 06c25db3400acf980ab224dba45f8922607e541042ee239753616fa9beaa2b25

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_finnhub-0.0.1-py3-none-any.whl:

Publisher: release.yml on ockham-sh/parsimony-connectors

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