Skip to main content

quanttide

量潮基础工具箱的 Python SDK。

安装

pip install quanttide

快速开始

from quanttide import LocalStorage

store = LocalStorage("my-app")
data_dir = store.data_dir

# Linux:   ~/.local/share/quanttide/my-app/
# macOS:   ~/Library/Application Support/quanttide/my-app/
# Windows: %APPDATA%/quanttide/my-app/

标准字段与 Pydantic 模型搭配使用:

from pydantic import BaseModel
from quanttide import IdField, NameField, TitleField

class Project(BaseModel):
    id: IdField
    name: NameField
    title: TitleField | None = None

API

LocalStorage

属性 返回值 说明
config_dir Path 配置目录
data_dir Path 数据目录
state_dir Path 状态目录
cache_dir Path 缓存目录
log_dir Path 日志目录
runtime_dir Path 运行时目录

标准字段

字段类 Python 类型 说明
IdField UUID 全局唯一主键
NameField str(≤100) 唯一标识名
OrderField int(≥1) 排序序号
LabelField str(≤50) 显示标签
TitleField str(≤255) 完整标题
DescriptionField str 描述
CreatedAtField datetime 创建时间
UpdatedAtField datetime 最后更新时间

开发

uv sync --dev
uv run pytest --cov=src/   # 含 doctest
uv run ruff check src/ tests/

相关文档

Metadata

Release files for quanttide 0.2.0

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

Source distribution (sdist)

Source distribution for quanttide 0.2.0
File Size Uploaded
quanttide-0.2.0.tar.gz 37.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quanttide 0.2.0
File Interpreter ABI Platform
quanttide-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.4 kB

Release files / quanttide-0.2.0.tar.gz

Download URL quanttide-0.2.0.tar.gz
Size 37.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7acf01144b5524d334695210feccc6ec962d0d9608d38798ef663eb1749c20d9
BLAKE2b-256 checksum
How to use checksums
91ea26d70a404c59437d5527412142654b8d6c4bf75ce51007c514360bd051ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / quanttide-0.2.0-py3-none-any.whl

Download URL quanttide-0.2.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
658211a22955cfb16573eed3d04d75c767bf5966ce7fd50707bbac3940ae2772
BLAKE2b-256 checksum
How to use checksums
88aab894b7a59bb0dbcb0d3d02127b170e57e2d6904109db7a95be894f098463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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