Skip to main content

量潮基础工具箱(Python SDK)

Project description

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/

相关文档

Project details


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.1.1.tar.gz (37.9 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.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quanttide-0.1.1.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for quanttide-0.1.1.tar.gz
Algorithm Hash digest
SHA256 93324c4fdd9c972919dee54c16e54b8ca4e94df21294202c0396d813d6adec90
MD5 99dd60b603f1f81b96a46fa4b925ffc3
BLAKE2b-256 72a18155fd05729f33bcfd4334dc01754fa8a3d43fa98ed2d0171f6f8f7ff3e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quanttide-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for quanttide-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d022ab92d34769f1700617eedb83dcc7ba902c0440410198a20ee14a1c1b8c00
MD5 fe58fac750d96e1bf5a96c12b58e4041
BLAKE2b-256 c43822628403f02389020b02c74f781bb6d91bd2b5e5e325f6ce38e4161319e9

See more details on using hashes here.

Supported by

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