Skip to main content

数据获取

直接通过pip安装即可:

pip install -U qfetch

数据获取模块qfetch是相对独立的模块,主要功能是从公开的数据源获取数据。qfetch提供两种api,一种是异步版本,以fetch_开头,另外一种是阻塞版本,以block_fetch_ 开头。

Rust编写的模块和函数是通过qfetch.qfetch导出,该模块原样导出Rust 封装的函数(.pyi\ 文件)。一般情况下,是不需要使用该包下面的函数,在qfetch.fetch下面有此包的包装函数,包装函数除了可返回原始的Rust输出外,也提供可选装换为pd.Dataframe格式的参数。如:

In [1]: import qfetch as fetch

In [2]: await fetch.fetch_trade_date()
Out[2]: 
      trade_date
0       20120104
1       20120105
2       20120106
3       20120109
4       20120110
...          ...
8306    20021225
8307    20021226
8308    20021227
8309    20021230
8310    20021231

[8311 rows x 1 columns]

Metadata

Release files for qfetch 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for qfetch 0.1.2
File Interpreter ABI Platform
qfetch-0.1.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Release files / qfetch-0.1.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL qfetch-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Size 13.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2c294a8732915880473dd752d0c2a8a68044ec49c22e9f0bb8a736286fd3fa5a
BLAKE2b-256 checksum
How to use checksums
ded3753062ca10a422b7bd3f77bb172f0edaa9256aac2fffa0d553c949708ebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page