Metadata-Version: 2.4
Name: zfinance
Version: 0.1.0
Summary: Financial data, simplified. A modern, intuitive, typed Python API for financial data, powered by yfinance.
Author: Oceanus
Author-email: Oceanus <295322314+oceanus403@users.noreply.github.com>
License-Expression: MIT
Requires-Dist: yfinance>=1.8.0,<1.9
Requires-Dist: pandas>=2.2,<4
Requires-Python: >=3.12
Project-URL: Repository, https://github.com/oceanus403/zfinance
Project-URL: Documentation, https://oceanus403.github.io/zfinance/
Description-Content-Type: text/markdown

<div align="center">

<h1>zfinance</h1>

<p><strong>Financial data, simplified.</strong></p>

<p>
A modern, intuitive, typed Python API for financial data,<br>
powered by yfinance.
</p>

<p>
<a href="https://pypi.org/project/zfinance/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/zfinance"></a>
<a href="pyproject.toml"><img alt="Python 3.12+" src="https://img.shields.io/badge/python-3.12%2B-blue"></a>
<a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue"></a>
</p>

<p>
<a href="https://oceanus403.github.io/zfinance/"><b>Documentation</b></a>
&nbsp;&middot;&nbsp;
<a href="#capabilities"><b>Capabilities</b></a>
&nbsp;&middot;&nbsp;
<a href="#installation"><b>Installation</b></a>
&nbsp;&middot;&nbsp;
<a href="#usage"><b>Usage</b></a>
&nbsp;&middot;&nbsp;
<a href="https://oceanus403.github.io/zfinance/docs/contributing"><b>Contributing</b></a>
</p>

</div>

<br>

## Capabilities

| Area | What it covers |
|:--|:--|
| [Prices](docs/content/docs/prices/history.mdx) | Historical bars as one flat table for one or many symbols, quote snapshots, and price metadata |
| [Instruments](docs/content/docs/instruments/profile.mdx) | Instrument profiles, full provider metadata, and ISIN lookup |
| [Company](docs/content/docs/company/profile.mdx) | Company profiles and officers |
| [Financials](docs/content/docs/financials/income.mdx) | Income statements, balance sheets, cash flow, and valuation measures as wide tables |
| [Actions](docs/content/docs/actions/dividends.mdx) | Dividends, splits, capital gains, and combined action history |
| [Analysts](docs/content/docs/analysts/price-targets.mdx) | Price targets, recommendations, rating changes, and earnings estimates |
| [Ownership](docs/content/docs/ownership/institutional.mdx) | Major holders, institutional and mutual-fund holders, insider activity, and shares outstanding |
| [Options](docs/content/docs/options/expirations.mdx) | Expiration dates and full option chains |
| [Funds](docs/content/docs/funds/holdings.mdx) | Fund profiles, holdings, sector weights, and asset allocation |
| [News & discovery](docs/content/docs/news/articles.mdx) | News articles and symbol search |

## Installation

zfinance supports Python 3.12 and newer.

Add it to a uv project:

```sh
uv add zfinance
```

To install it in an active Python environment:

```sh
pip install zfinance
```

To build from source:

```sh
git clone https://github.com/oceanus403/zfinance
cd zfinance
uv sync --locked
```

## Usage

```python
import zfinance as zf

quote = zf.prices.quote("AAPL")
print(quote.price, quote.currency)

bars = zf.prices.history("AAPL", period="1y")
print(bars.tail())

company = zf.company.profile("AAPL")
print(company.name, company.industry)

income = zf.financials.income("AAPL", frequency="quarterly")
print(income.head())
```

## Project status

zfinance 0.1.0 covers Phase A: prices, instruments, company data,
financial statements, corporate actions, analysts, ownership, options,
funds, news, and search. Market data, sectors, events, screening, and
streaming are planned for a later release.

## License

zfinance is released under the [MIT License](LICENSE).
