0.6.5 用「代码前缀推断 + 全量清单离线校验」修好了债券/回购标度,但同一份证券 清单接口本来就返回 decimal_point,权威值一直没接进取数路径。本次接进来: - price_decimal_digits:查找顺序改为 权威表 -> 静态前缀规则(兜底) - decimal_sync(新模块):每日后台同步一次 + 磁盘缓存 + 原子写 - TdxData.sync_decimal_points() / decimal_point_status() - start() 不阻塞:当日缓存命中直接装表(60ms 零网络),否则挂后台 task - PYPYTDX_DATA_DISABLE_DECIMAL_SYNC=1 关闭 表按三位前缀归并(全量 5 万只 -> 129 条);若某前缀出现混合小数位则自动退化为 逐代码表,只存例外,mixed_prefixes 可观测。 实测:全量 51,982 条权威表与静态规则零分歧;首次同步 50s(后台), 热缓存 60ms。测试 289 -> 306。 Co-authored-by: openbot-coder <openbot-coder@users.noreply.github.com>
63 lines
1.7 KiB
TOML
63 lines
1.7 KiB
TOML
[project]
|
|
name = "pytdxdata"
|
|
version = "0.6.6"
|
|
description = "通达信(TongDaXin)行情数据客户端:动态连接池 + 双层TTL缓存 + 3连接并发分页,纯asyncio零运行时依赖,支持A股/港股/美股/期货/期权"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = "MIT"
|
|
license-files = ["LICENSE"]
|
|
keywords = ["tdx", "trading", "stock", "kline", "quote", "通达信", "A股", "港股", "美股", "期货", "asyncio", "quant"]
|
|
authors = [
|
|
{ name = "openbot-coder", email = "openbot-coder@users.noreply.github.com" }
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Financial and Insurance Industry",
|
|
"Topic :: Office/Business :: Financial :: Investment",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Operating System :: OS Independent",
|
|
"Framework :: AsyncIO",
|
|
"Typing :: Typed",
|
|
]
|
|
dependencies = []
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/openbot-coder/pytdxdata"
|
|
Repository = "https://github.com/openbot-coder/pytdxdata"
|
|
Documentation = "https://openbot-coder.github.io/pytdxdata/"
|
|
|
|
[project.optional-dependencies]
|
|
uvloop = ["uvloop>=0.21"]
|
|
dev = ["pytest>=8.0", "pytest-asyncio>=0.24", "ruff>=0.6"]
|
|
|
|
[project.scripts]
|
|
tdx = "pytdxdata.cli:main"
|
|
|
|
[build-system]
|
|
requires = ["uv_build>=0.11.1,<0.12.0"]
|
|
build-backend = "uv_build"
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py313"
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=9.1.1",
|
|
"pytest-asyncio>=1.4.0",
|
|
]
|
|
docs = [
|
|
"mkdocs-material>=9.5",
|
|
"mkdocstrings[python]>=0.26",
|
|
"ruff>=0.6",
|
|
"jieba>=0.42",
|
|
]
|
|
|