beginner
5 minQuickstart: First Query in 60 Seconds
Install valuein-sdk, authenticate, and pull your first 10 years of Apple revenue data.
SDKDuckDBfundamentals
## Install the SDK
Install `valuein-sdk` from PyPI. Either `pip` or `uv` works in any virtual environment — the SDK requires Python 3.10+ and ships DuckDB transitively. **No API key required to start** — the SDK falls back to the SAMPLE dataset (S&P 500, last 5 years) automatically.
bash
# pip (universal)python -m venv .venv && source .venv/bin/activatepip install valuein-sdk # uv (faster — https://docs.astral.sh/uv/)uv venv && source .venv/bin/activateuv pip install valuein-sdk## Authenticate and Run Your First Query
python
from valuein_sdk import ValueinClient, ValueinError try: with ValueinClient() as client: # Pull AAPL annual revenue, last 10 years df = client.run_query(""" SELECT fiscal_year, period_end, numeric_value / 1e9 AS revenue_bn FROM fact WHERE standard_concept = 'TotalRevenue' AND entity_id = '0000320193' -- AAPL CIK AND fiscal_period = 'FY' ORDER BY fiscal_year DESC LIMIT 10 """) print(df)except ValueinError as e: print(f"Error: {e}")Output
fiscal_year period_end revenue_bn
0 2024 2024-09-28 391.04
1 2023 2023-09-30 383.29
2 2022 2022-09-24 394.33
3 2021 2021-09-25 365.82
4 2020 2020-09-26 274.52Try it yourself
Get your API token and run this notebook against 111M+ real SEC EDGAR facts.