yfinance-pl
English | 日本語 | 中文 | 한국어 | Español
A Python wrapper for yfinance-rs using PyO3 and Polars.
Get stock market data with a yfinance-compatible API, but with Polars DataFrames instead of pandas.
Features
- yfinance-compatible API - Familiar interface for yfinance users
- Polars DataFrames - Returns
pl.DataFrameinstead ofpd.DataFrame - Rust backend - Fast data fetching powered by yfinance-rs
- Type-safe API - IDE autocompletion for
period,interval, and return types
Installation
From PyPI
pip install yfinance-pl
From Source
git clone https://github.com/rmc8/yfinance-pl.git
cd yfinance-pl
pip install maturin
maturin develop --release
Quick Start
import yfinance_pl as yf
ticker = yf.Ticker("AAPL")
history = ticker.history(period="1mo")
print(history)
API Reference
Price History
| Method/Property | Return Type | Description |
|---|---|---|
history(period, interval, start, end) |
pl.DataFrame |
Historical price data (Date column as Datetime) |
Parameters for history():
period: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, maxinterval: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mostart: Start date (YYYY-MM-DD)end: End date (YYYY-MM-DD)
Company Info
| Property | Return Type | Description |
|---|---|---|
info |
dict |
Full company information |
fast_info |
dict |
Quick access to key metrics |
calendar |
dict |
Upcoming events (earnings dates, etc.) |
Dividends & Corporate Actions
| Property | Return Type | Description |
|---|---|---|
dividends |
pl.DataFrame |
Dividend history |
splits |
pl.DataFrame |
Stock split history |
actions |
pl.DataFrame |
Combined dividends and splits |
capital_gains |
pl.DataFrame |
Capital gains (for funds/ETFs) |
Financial Statements
| Property | Return Type | Description |
|---|---|---|
income_stmt |
pl.DataFrame |
Annual income statement |
quarterly_income_stmt |
pl.DataFrame |
Quarterly income statement |
balance_sheet |
pl.DataFrame |
Annual balance sheet |
quarterly_balance_sheet |
pl.DataFrame |
Quarterly balance sheet |
cashflow |
pl.DataFrame |
Annual cash flow statement |
quarterly_cashflow |
pl.DataFrame |
Quarterly cash flow statement |
earnings |
dict |
Earnings summary |
Shareholders
| Property | Return Type | Description |
|---|---|---|
major_holders |
pl.DataFrame |
Major holders summary |
institutional_holders |
pl.DataFrame |
Institutional holders |
mutualfund_holders |
pl.DataFrame |
Mutual fund holders |
insider_transactions |
pl.DataFrame |
Insider transactions |
insider_roster_holders |
pl.DataFrame |
Insider roster |
Analyst Recommendations
| Property | Return Type | Description |
|---|---|---|
recommendations |
pl.DataFrame |
Analyst recommendations summary |
upgrades_downgrades |
pl.DataFrame |
Rating changes history |
Options (US stocks only)
| Property/Method | Return Type | Description |
|---|---|---|
options |
list[str] |
Available expiration dates |
option_chain(date) |
OptionChain |
Option chain for expiration date |
The option_chain() method returns an OptionChain named tuple:
chain = ticker.option_chain("2024-01-19")
chain.calls # pl.DataFrame
chain.puts # pl.DataFrame
Other
| Method | Return Type | Description |
|---|---|---|
get_isin() |
str |
ISIN identifier |
Examples
See the examples/ directory for detailed usage examples:
01_quick_start.py- Minimal example02_history.py- Price history options03_company_info.py- Company information04_dividends_splits.py- Corporate actions05_financials.py- Financial statements06_holders.py- Shareholder information07_analysis.py- Analyst recommendations08_options.py- Options data
Run examples:
uv run python examples/01_quick_start.py
Development
# Install dependencies
uv sync
# Build Rust module (run after changes)
uv run maturin develop
# Release build
uv run maturin develop --release
# Format and lint
uv run ruff format .
uv run ruff check .
Differences from yfinance
| Aspect | yfinance | yfinance-pl |
|---|---|---|
| DataFrame type | pd.DataFrame |
pl.DataFrame |
| Backend | Python | Rust (yfinance-rs) |
| Series type | pd.Series |
pl.DataFrame |
License
MIT
Metadata
Release files for yfinance-pl 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yfinance_pl-0.9.1.tar.gz | 87.5 kB | With provenance | Details for yfinance_pl-0.9.1.tar.gz |
Built distributions (wheels)
Total release size: 188.0 MB
Release files / yfinance_pl-0.9.1.tar.gz
| Download URL | yfinance_pl-0.9.1.tar.gz |
|---|---|
| Size | 87.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c565a50d8d963952748aa2172277cb7d3f2370b960586066f39e9cb19a636d48
|
|
BLAKE2b-256 checksum How to use checksums |
8b584f302e13548041119ae78aa826367ffc7cccdcda3ddc26526bf6cdacc62e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp313-cp313-win_amd64.whl
| Download URL | yfinance_pl-0.9.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 15.5 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
aef0916e51dba40513419aa2515ed3ff367e6615ad708284876c43d13321f1b7
|
|
BLAKE2b-256 checksum How to use checksums |
410c9bc389d7ad71fe496f6b5a93a279c758a084c6adffffbef868459abed44d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp313-cp313-manylinux_2_39_x86_64.whl
| Download URL | yfinance_pl-0.9.1-cp313-cp313-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 16.5 MB |
| Tags | CPython 3.13 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
8e420216bdeb436bfeffab1b98ab1c15817c2be091e96730890844e0b60c962e
|
|
BLAKE2b-256 checksum How to use checksums |
21d7fd66c3fee4d85145e2bb43c6141ef3a3ed0cdae44064c63280dfe14a60b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | yfinance_pl-0.9.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 15.0 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8e72a4c68790305001079d8857b3c425092c1f28a9850a4fbc8d9d73cb52c380
|
|
BLAKE2b-256 checksum How to use checksums |
a356414e3bf7414b69dce9f0a892a7742de0fd814dfb80ac3cdb7b0a1c795bf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp312-cp312-win_amd64.whl
| Download URL | yfinance_pl-0.9.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 15.5 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
03d35ccbdbfe97c20b5ec8254399acdadbd8d56699786a9ed3972f1f154f2882
|
|
BLAKE2b-256 checksum How to use checksums |
9815a36bee4fbb7a3befa89cea7e06bf707d8a4c28824e7233098eb64a641df4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | yfinance_pl-0.9.1-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 16.5 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
3fc08bbd49c2beb2d3cba951bc8649a90ad297825ca977bff667e3a625c506ab
|
|
BLAKE2b-256 checksum How to use checksums |
7cb2aefa925dc403a0f1a975653ff1bde0454ca5e855ed7643956dadfddd7592
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | yfinance_pl-0.9.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 15.0 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
202cbac025c620751019e14a3e7c3b1131b3705b791f443b21f4317371635739
|
|
BLAKE2b-256 checksum How to use checksums |
25fc5bbc1ef2936d48770c771a21555addcdca083a9c092e748f3c9f0b115d01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp311-cp311-win_amd64.whl
| Download URL | yfinance_pl-0.9.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 15.5 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1c11f60d17fcc102d701cc99aaa1f04ef0348031cab362e2aa53b4de3fef320c
|
|
BLAKE2b-256 checksum How to use checksums |
60edfae944d25f9472803499b59cb9249c5b8c712e2106e02aa01564d9132579
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp311-cp311-manylinux_2_39_x86_64.whl
| Download URL | yfinance_pl-0.9.1-cp311-cp311-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 16.5 MB |
| Tags | CPython 3.11 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
67352a24cdf4dae204f0863d952012c7fb3415af6aee0c1605f5278c827dcc4e
|
|
BLAKE2b-256 checksum How to use checksums |
8adc261ababfa415591dd67e94ec192451317d6db0aed5135885c510ae0afc23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | yfinance_pl-0.9.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 15.0 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
66957c1e3dc9dd700bb0c93b7262c850b41742e917926473653e98eb9a1722cc
|
|
BLAKE2b-256 checksum How to use checksums |
c9ed5ce63a3972522c45272c57d664a271dffbee00e779efa9a6bb1c40f61bb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp310-cp310-win_amd64.whl
| Download URL | yfinance_pl-0.9.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 15.5 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e118baf94544b0422cefce68ecea0cba3b9420ec13f89bfeabc61560dae1245a
|
|
BLAKE2b-256 checksum How to use checksums |
f2b756277237413ac74f4f33665ec0d16cc7128d0062e93be074061ca1593dff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp310-cp310-manylinux_2_39_x86_64.whl
| Download URL | yfinance_pl-0.9.1-cp310-cp310-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 16.5 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
b2fb87986f75f24a54436b0c6e212c85e10dac2df9fed5b72892195418aa3e4e
|
|
BLAKE2b-256 checksum How to use checksums |
f7b48cf15efcb89c62ad7b255fb1e02f556627296d0f0ec29cc8fe567a0a9813
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / yfinance_pl-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | yfinance_pl-0.9.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 15.0 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
637705eb8cc00c9e9566b0d0307f5aa888b2c8d36ffabc300312219f85f5fbb5
|
|
BLAKE2b-256 checksum How to use checksums |
83a5129f662e42cfa1b51e927a5a4e35b5cc894a64f496d2ab2e12324ee97fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logSecurity for yfinance-pl 0.9.1
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.
Full provenance
All 13 files in this release have been uploaded with provenance metadata.
Attestation for yfinance_pl-0.9.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logA 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.