Economic and financial data readers for pandas, polars, pyarrow, and dask.
Project description
kuznets
Remote data access for economic and financial data — FRED, OECD, Eurostat, World Bank, Fama-French, Yahoo Finance, and more — returned as pandas, polars, pyarrow, or dask frames.
kuznets is a fork of pydata/pandas-datareader.
Installation
Install using pip
pip install kuznets
Usage
import kuznets as kz
kz.get_data_fred('GS10')
Every reader accepts an output_type argument to return polars, pyarrow, or dask frames instead of
pandas, and multi-symbol daily reads fetch concurrently (tune with max_workers):
kz.DataReader(["AAPL", "MSFT"], "stooq", output_type="polars", max_workers=8)
Documentation
Stable documentation is available on github.io. A second copy of the stable documentation is hosted on read the docs for more details.
Development documentation is available for the latest changes in master.
Requirements
Using kuznets requires the following packages:
- pandas>=3.0
- narwhals>=2.0
- lxml
- requests
Non-pandas output backends are optional extras:
pip install kuznets[polars] # or [pyarrow], [dask], [backends]
Building the documentation additionally requires:
- matplotlib
- ipython
- requests_cache
- sphinx
- pydata_sphinx_theme
Development and testing dependencies are defined in pyproject.toml: the dev extra for pip
workflows, and the pixi test/lint features for the pixi workspace.
Install latest development version
python -m pip install git+https://github.com/jessegrabowski/kuznets.git
or
git clone https://github.com/jessegrabowski/kuznets.git
cd kuznets
python setup.py install
Development environment
The repo is a pixi workspace: pixi install creates the dev environment
(editable install, test and lint tools), pixi run test runs the suite, and pixi run -e py314 test runs it on another Python. pip install -e ".[dev]" in a virtualenv works too.
Running the tests
The test suite runs fully offline by default: each reader is replayed against a recorded real
response stored under tests/data/, so no third-party service is contacted.
pytest
Tests marked network are deselected by default. Each one runs a reader against the live service
and asserts the shape of the result (columns, dtypes, non-empty) — an API-drift detector that
skips gracefully when a service is unreachable:
pytest -m network
The offline fixtures are recordings, not hand-written mocks. To regenerate them from the live
services, run the network tests in record mode:
RECORD=1 pytest -m network
This rewrites tests/data/ from the real responses (and a wrong parser fails here, at record time,
rather than being hidden by a fixture built to match it). A weekly GitHub Actions workflow
(refresh-fixtures) does this automatically and opens a PR when a fixture changes, failing if an
upstream shape breaks. A few services can't be recorded and are documented in their tests: Stooq
serves an anti-bot challenge to scripted clients, and the keyed readers (AlphaVantage, Quandl,
Tiingo) need API keys.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kuznets-1.0.tar.gz.
File metadata
- Download URL: kuznets-1.0.tar.gz
- Upload date:
- Size: 613.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96bc04c5019e86967cc4c08dc67f7b527f27eb0a718708bc14e4e1cce8633985
|
|
| MD5 |
72f12d009a1125dedc16f67ed1b03d0e
|
|
| BLAKE2b-256 |
bccac6215de0b761f5f00f34571bcc3ab8be1c6fe1f11473de79a939a79b9af2
|
Provenance
The following attestation bundles were made for kuznets-1.0.tar.gz:
Publisher:
release.yml on jessegrabowski/kuznets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kuznets-1.0.tar.gz -
Subject digest:
96bc04c5019e86967cc4c08dc67f7b527f27eb0a718708bc14e4e1cce8633985 - Sigstore transparency entry: 2338010090
- Sigstore integration time:
-
Permalink:
jessegrabowski/kuznets@4c68d2040cd8565f08c65a0adc90d1148db80ff8 -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/jessegrabowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4c68d2040cd8565f08c65a0adc90d1148db80ff8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kuznets-1.0-py3-none-any.whl.
File metadata
- Download URL: kuznets-1.0-py3-none-any.whl
- Upload date:
- Size: 84.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3e7c8f15856e921f5e6da72aee894fda19d70f51424c72de1069f4c6b7ade7c
|
|
| MD5 |
d46b057c38b5c4bd6be225df22b46e77
|
|
| BLAKE2b-256 |
7b90e51761ed14129102b77103c9daf399bc0ecbb51bae7eb4b99b7c04c12c2e
|
Provenance
The following attestation bundles were made for kuznets-1.0-py3-none-any.whl:
Publisher:
release.yml on jessegrabowski/kuznets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kuznets-1.0-py3-none-any.whl -
Subject digest:
a3e7c8f15856e921f5e6da72aee894fda19d70f51424c72de1069f4c6b7ade7c - Sigstore transparency entry: 2338010113
- Sigstore integration time:
-
Permalink:
jessegrabowski/kuznets@4c68d2040cd8565f08c65a0adc90d1148db80ff8 -
Branch / Tag:
refs/tags/v1.0 - Owner: https://github.com/jessegrabowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4c68d2040cd8565f08c65a0adc90d1148db80ff8 -
Trigger Event:
release
-
Statement type: