Metadata-Version: 2.4
Name: dayquant
Version: 0.3.0
Summary: Token-authenticated market data client: auto-download parquet and query with DuckDB
Author-email: dayquant <info@dayquant.com>
Maintainer-email: dayquant <info@dayquant.com>
License-Expression: MIT
Project-URL: Homepage, https://www.dayquant.com
Project-URL: Documentation, https://www.dayquant.com
Keywords: finance,stock,parquet,duckdb,etf,bond
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: duckdb>=1.0.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: tqdm>=4.66.0
Dynamic: license-file

# dayquant

Token 鉴权的行情 / 财务数据 Python 客户端：本地缺失时自动从服务器增量拉取 parquet，再用 DuckDB 查询，返回 pandas DataFrame。

## 安装

```bash
pip install dayquant
```

## 快速开始

```python
import dayquant as dq

cli = dq.create_client("YOUR_TOKEN", "/path/to/data_root")
df = cli.fetch_daily(
    stock_code="000001.SZ",
    start_date="20240101",
    end_date="20240131",
)
print(df.head())
```

本地没有对应数据时，会自动按查询范围从服务器下载后再返回结果。

## 环境变量（可选）

| 变量 | 说明 |
|------|------|
| `DAYQUANT_SERVER` | 下载服务地址 |
| `DAYQUANT_DATA_ROOT` | 默认数据根目录（仍建议在 `create_client` 中显式传入） |
| `DAYQUANT_MAX_ROWS` | 单次查询最大行数，默认 `500000` |

## 要求

- Python >= 3.10
- 依赖：duckdb、pandas、requests、tqdm、python-dotenv

更完整的接口说明见包内文档，或安装后查看源码中的 `README`。

## 作者与联系

| 项目 | 信息 |
|------|------|
| 作者 | dayquant |
| 邮箱 | info@dayquant.com |
| 官网 | https://www.dayquant.com |

## License

MIT
