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/

相关文档

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quanttide-0.2.0.tar.gz (37.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quanttide-0.2.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file quanttide-0.2.0.tar.gz.

File metadata

  • Download URL: quanttide-0.2.0.tar.gz
  • Upload date:
  • Size: 37.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quanttide-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7acf01144b5524d334695210feccc6ec962d0d9608d38798ef663eb1749c20d9
MD5 8642932eeb86e73eeb1a6c4ecae5ea60
BLAKE2b-256 91ea26d70a404c59437d5527412142654b8d6c4bf75ce51007c514360bd051ce

See more details on using hashes here.

File details

Details for the file quanttide-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: quanttide-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quanttide-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 658211a22955cfb16573eed3d04d75c767bf5966ce7fd50707bbac3940ae2772
MD5 b0772bc60a3700c3bc9ee3d6e14d4977
BLAKE2b-256 88aab894b7a59bb0dbcb0d3d02127b170e57e2d6904109db7a95be894f098463

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page