量潮基础工具箱(Python SDK)
Project description
quanttide Python SDK
量潮基础工具箱的 Python SDK,提供跨平台的本地存储等基础能力。
设计原则
- 平台自适应:遵循各平台事实标准(XDG、Windows Known Folders、macOS File System Programming Guide)
- 零外部依赖(核心层):仅依赖
platformdirs和标准库 - 命名空间隔离:路径统一为
<平台基础目录>/quanttide/<应用名>/
安装
pip install quanttide
快速开始
from quanttide import LocalStorage
store = LocalStorage("my-app")
data_dir = store.data_dir
config_dir = store.config_dir
# 数据目录
# Linux: ~/.local/share/quanttide/my-app/
# macOS: ~/Library/Application Support/quanttide/my-app/
# Windows: %APPDATA%/quanttide/my-app/
API 参考
| 属性 | 说明 |
|---|---|
store.config_dir |
应用配置目录 |
store.data_dir |
应用数据目录 |
store.cache_dir |
应用缓存目录 |
store.log_dir |
应用日志目录 |
store.state_dir |
应用状态目录 |
store.runtime_dir |
应用运行时目录 |
环境变量
<APP>_CONFIG_HOME
<APP>_DATA_HOME
<APP>_STATE_HOME
<APP>_CACHE_HOME
<APP>_LOG_HOME
<APP>_RUNTIME_HOME
开发
uv sync --dev
# lint
uv run ruff check src/ tests/
# test
uv run pytest --cov=src/
相关文档
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(34.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quanttide-0.1.0.tar.gz.
File metadata
- Download URL: quanttide-0.1.0.tar.gz
- Upload date:
- Size: 34.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16e4a923e18adc66e26a529d5277a52fc289475decd6d1b9b067edd2b5148a80
|
|
| MD5 |
accd8462fcbb7103e38e6e4643b4163f
|
|
| BLAKE2b-256 |
c0501f44b089d9d1a0cc81d11f5851c25b3898ece0f4d0151993d3fc7e287921
|
File details
Details for the file quanttide-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quanttide-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd14c9bcced282f2b38d3934c3bd8db2c24654ad1a36a57b13375abc611056c3
|
|
| MD5 |
659caefe89e9983fa926fbe67281bd80
|
|
| BLAKE2b-256 |
d518d0892e0662846b82bbfd179c2f1757949066b5d12868c74a831e0a38e92a
|