altdatahub 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- altdatahub/__init__.py +61 -0
- altdatahub/__main__.py +5 -0
- altdatahub/_data/products.json +8420 -0
- altdatahub/catalog.py +81 -0
- altdatahub/cli.py +115 -0
- altdatahub/client.py +136 -0
- altdatahub/credentials.py +98 -0
- altdatahub/endpoints.py +93 -0
- altdatahub/errors.py +106 -0
- altdatahub/http_transport.py +73 -0
- altdatahub/models.py +1554 -0
- altdatahub/records.py +72 -0
- altdatahub/transport.py +80 -0
- altdatahub/wire.py +173 -0
- altdatahub-0.1.0.dist-info/METADATA +374 -0
- altdatahub-0.1.0.dist-info/RECORD +20 -0
- altdatahub-0.1.0.dist-info/WHEEL +5 -0
- altdatahub-0.1.0.dist-info/entry_points.txt +2 -0
- altdatahub-0.1.0.dist-info/licenses/LICENSE +21 -0
- altdatahub-0.1.0.dist-info/top_level.txt +1 -0
altdatahub/__init__.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""altdatahub —— 金融信用信息基础数据库「替代数据通」Python SDK。
|
|
2
|
+
|
|
3
|
+
当前覆盖范围(诚实口径):
|
|
4
|
+
|
|
5
|
+
- ✅ **数据契约**:51 个 productCode、557 个顶层字段、12 个子结构(397 个字段),
|
|
6
|
+
全部由附件 3(产品数据分册 V1.0)解析生成,含中文名 / 类型 / 长度 / 非空标记;
|
|
7
|
+
- ✅ **API 形态**:10 个大类方法 + `productCode` 枚举,模型强类型、保留原始 payload;
|
|
8
|
+
- ✅ **传输层**:`HttpTransport` 按《接口规范》示例代码 POST JSON,8 个 `eds_*` 公共参数
|
|
9
|
+
与业务参数同层平铺、**无签名**;`HubClient.from_env()` 从 `EDS_*` 构造在线客户端。
|
|
10
|
+
不传 transport 时默认 `PendingTransport`,查询显式抛 `SpecPendingError`:
|
|
11
|
+
默认离线,不猜测、不假装成功,目录类本地能力照常可用;
|
|
12
|
+
- ✅ **在线查询已验证**:2026-11-16 通过能力服务对 S0101 完成一次真实查询
|
|
13
|
+
(HTTP 200 / 1 行),响应信封 `data[].data` 与错误码字段名 `code` / `msg` 已确认;
|
|
14
|
+
其余 50 个产品的服务号清单仍待确认,详见 `docs/api/transport.md`。
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
from . import models
|
|
20
|
+
from .client import HubClient
|
|
21
|
+
from .credentials import EdsConfig
|
|
22
|
+
from .endpoints import CATEGORIES, PRODUCT_CATEGORY, PRODUCT_CODES, Category, category_of
|
|
23
|
+
from .errors import (
|
|
24
|
+
EDS_ERROR_CODES,
|
|
25
|
+
EdsBizError,
|
|
26
|
+
HubError,
|
|
27
|
+
ResponseError,
|
|
28
|
+
SpecPendingError,
|
|
29
|
+
TransportError,
|
|
30
|
+
ValidationError,
|
|
31
|
+
)
|
|
32
|
+
from .http_transport import HttpTransport
|
|
33
|
+
from .records import Record
|
|
34
|
+
from .transport import MappingTransport, PendingTransport, QueryRequest, Transport
|
|
35
|
+
|
|
36
|
+
__version__ = "0.1.0"
|
|
37
|
+
|
|
38
|
+
__all__ = [
|
|
39
|
+
"CATEGORIES",
|
|
40
|
+
"PRODUCT_CATEGORY",
|
|
41
|
+
"PRODUCT_CODES",
|
|
42
|
+
"Category",
|
|
43
|
+
"HubClient",
|
|
44
|
+
"EdsConfig",
|
|
45
|
+
"HttpTransport",
|
|
46
|
+
"EDS_ERROR_CODES",
|
|
47
|
+
"HubError",
|
|
48
|
+
"EdsBizError",
|
|
49
|
+
"MappingTransport",
|
|
50
|
+
"PendingTransport",
|
|
51
|
+
"QueryRequest",
|
|
52
|
+
"Record",
|
|
53
|
+
"ResponseError",
|
|
54
|
+
"SpecPendingError",
|
|
55
|
+
"Transport",
|
|
56
|
+
"TransportError",
|
|
57
|
+
"ValidationError",
|
|
58
|
+
"__version__",
|
|
59
|
+
"category_of",
|
|
60
|
+
"models",
|
|
61
|
+
]
|