Skip to main content

safin SDK — sunset shim. The hosted API was retired on 2026-05-06.

Project description

safin Python SDK

🛑 Sunset (2026-05-06). safin>=0.2.0 is a sunset shim — instantiating Client() raises RuntimeError. Version 0.1.0 is yanked. See SUNSET.md for rationale and defrost criteria.

Python SDK for safin, the hosted Seeking Alpha market-data API.

pip install safin
from safin import Client

sa = Client(contact="you@example.com")

quote = sa.quote("GRAB")
ratios = sa.metrics_ratios("GRAB", fields=["pe_ratio", "ps_ratio"])
valuation = sa.valuation("GRAB")
history = sa.historical_prices("GRAB", start="2026-04-01", end="2026-05-05")
chain = sa.options_chain(ticker_id=605799, expiration_date="2026-05-15")

The default base URL is the verified Worker deployment:

https://safin-api.crombiesamuel.workers.dev

Override it with SAFIN_BASE_URL or Client(base_url=...). The configured custom domain target is https://api.safin.bluedoor.sh once DNS is live.

Public Methods

  • Discovery: health(), endpoints(), openapi()
  • Quotes: quote(symbol), quotes(symbols), quotes_by_id(sa_ids)
  • Options: options_by_symbols(symbols), options_chain(ticker_id, expiration_date), options_expirations(symbol)
  • Metrics and fundamentals: metrics_ratios(symbol), metrics_market(symbol), symbol_data(symbol), valuation(symbol), estimates(ticker_id), fundamentals(symbol), fundamentals_metrics(symbol)
  • History and ownership: historical_prices(symbol), shares(symbol)
  • News: news(symbol)

All methods return the hosted API's JSON envelope as a dict.

Identity

  • Anonymous: works without configuration.
  • Contact tier: Client(contact="you@example.com") sends X-Safin-Contact.
  • Manual API key tier: Client(api_key="...") sends Authorization: Bearer ....

Environment variables: SAFIN_BASE_URL, SAFIN_CONTACT, SAFIN_API_KEY.

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

safin-0.2.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

safin-0.2.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file safin-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for safin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 98805a277168690bb0bb5574128f226d4ce897b9a4cb6233bee371409ff98305
MD5 a2172a50695bdfc6efeca058d364655a
BLAKE2b-256 deadb3139fcd169f65ae9286d2851eb25167ca06166c4ae68f3e5dcc4a1bbce8

See more details on using hashes here.

Provenance

The following attestation bundles were made for safin-0.2.0.tar.gz:

Publisher: publish-safin-python.yml on bluedoor-ai/safin

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

File details

Details for the file safin-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for safin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0846201c159897b2d37b108b4ae8f40f2ed46416bf63c4478548ecb64087136e
MD5 18f02c43d683bdac86b0348a5230fd14
BLAKE2b-256 7e18bef00ac37b712e8e5d57a230b72a245141758f9110f9cf9e2ccc4771cd9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for safin-0.2.0-py3-none-any.whl:

Publisher: publish-safin-python.yml on bluedoor-ai/safin

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