datahub_binary 1.7.10__cp312-cp312-win_amd64.whl → 1.7.12__cp312-cp312-win_amd64.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.
- datahub/ats/client_sdk.pyi +234 -33
- datahub/datacache.pyi +65 -22
- datahub/datahub.pyi +682 -56
- datahub/dbo/database.pyi +27 -4
- datahub/dbo/pg.pyi +36 -4
- datahub/dbo/redis_stream.pyi +46 -6
- datahub/dbo/sr.pyi +559 -43
- datahub/utils/logger.pyi +19 -2
- datahub/utils/sftp.pyi +37 -5
- datahub.cp312-win_amd64.pyd +0 -0
- {datahub_binary-1.7.10.dist-info → datahub_binary-1.7.12.dist-info}/METADATA +1 -1
- {datahub_binary-1.7.10.dist-info → datahub_binary-1.7.12.dist-info}/RECORD +14 -15
- {datahub_binary-1.7.10.dist-info → datahub_binary-1.7.12.dist-info}/WHEEL +1 -1
- datahub.build/.gitignore +0 -1
- {datahub_binary-1.7.10.dist-info → datahub_binary-1.7.12.dist-info}/top_level.txt +0 -0
datahub/utils/sftp.pyi
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import types
|
|
1
2
|
from _typeshed import Incomplete
|
|
2
3
|
from datahub.setting import SftpSetting
|
|
3
4
|
from paramiko import SFTPClient as _SFTPClient
|
|
@@ -9,10 +10,41 @@ class SFTPClient:
|
|
|
9
10
|
chmod: Incomplete
|
|
10
11
|
ssh: Incomplete
|
|
11
12
|
sftp: _SFTPClient
|
|
12
|
-
def __init__(self, setting: SftpSetting, chmod: int = 509) -> None:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
def __init__(self, setting: SftpSetting, chmod: int = 509) -> None:
|
|
14
|
+
'''
|
|
15
|
+
SFTP客户端类,支持上下文管理器模式和普通调用模式
|
|
16
|
+
示例:
|
|
17
|
+
# 作为上下文管理器使用
|
|
18
|
+
>>> with SFTPClient(setting) as sftp:
|
|
19
|
+
... print(sftp.listdir("/"))
|
|
20
|
+
|
|
21
|
+
# 普通方式使用
|
|
22
|
+
>>> client = SFTPClient(setting)
|
|
23
|
+
>>> client.connect()
|
|
24
|
+
>>> print(client.sftp.listdir("/"))
|
|
25
|
+
>>> client.close()
|
|
26
|
+
|
|
27
|
+
:param setting: SFTP连接配置
|
|
28
|
+
:param chmod: 新建文件夹权限设置, 默认为775 (drwxrwxr-x)
|
|
29
|
+
'''
|
|
30
|
+
def ensure_dir(self, dir_path: str, chmod: int = 509) -> bool:
|
|
31
|
+
"""
|
|
32
|
+
确保目录存在,递归创建根目录,不存在则创建并设置权限
|
|
33
|
+
|
|
34
|
+
:param dir_path: 目录
|
|
35
|
+
:param chmod: 权限, defaults to 0o775
|
|
36
|
+
:return 是否已存在, True为路径已存在无需创建
|
|
37
|
+
"""
|
|
38
|
+
def rmdir_recursive(self, path: str):
|
|
39
|
+
"""
|
|
40
|
+
递归删除目录及其子目录和文件
|
|
41
|
+
|
|
42
|
+
:param path: 目录路径
|
|
43
|
+
:return: None
|
|
44
|
+
"""
|
|
45
|
+
def connect(self):
|
|
46
|
+
"""建立连接并返回sftp客户端"""
|
|
47
|
+
def close(self) -> None:
|
|
48
|
+
"""关闭连接"""
|
|
17
49
|
def __enter__(self): ...
|
|
18
50
|
def __exit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None) -> None: ...
|
datahub.cp312-win_amd64.pyd
CHANGED
|
Binary file
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
datahub.cp312-win_amd64.pyd,sha256=
|
|
1
|
+
datahub.cp312-win_amd64.pyd,sha256=hvn8MCycQx1kdHnLizhxZ4u-MF2vewJeeQHT9j1terw,1799168
|
|
2
2
|
datahub.pyi,sha256=RCXeWHG7NPZBPCR6Kn2tGHTBvItWj8e3_Smus_1ZPGk,1507
|
|
3
3
|
datahub/__init__.pyi,sha256=hX8D9Qd6uPjZiUBd6rIq7Llkt_H4l_RvRXsws3sdYbI,630
|
|
4
|
-
datahub/datacache.pyi,sha256=
|
|
5
|
-
datahub/datahub.pyi,sha256=
|
|
4
|
+
datahub/datacache.pyi,sha256=Z2b3ktYv5t2y9Z1yXn0axbdoV06-GhjJhEIl_Ms-FjU,5044
|
|
5
|
+
datahub/datahub.pyi,sha256=CUApKMxrupjWgB2kz7RyDq2Wl4vjFESmGWfoy9lplqA,50337
|
|
6
6
|
datahub/setting.pyi,sha256=u6gYjjF6r1thSpp2XNMvg_1JUcqB64dRTkNoHlOoKUQ,889
|
|
7
|
-
datahub/ats/client_sdk.pyi,sha256=
|
|
8
|
-
datahub/dbo/database.pyi,sha256=
|
|
9
|
-
datahub/dbo/pg.pyi,sha256=
|
|
10
|
-
datahub/dbo/redis_stream.pyi,sha256=
|
|
11
|
-
datahub/dbo/sr.pyi,sha256=
|
|
7
|
+
datahub/ats/client_sdk.pyi,sha256=eObtyaQqSn_ouq_uDplZ8L6Xf8XRbJj2HrgvYHoXYSQ,8688
|
|
8
|
+
datahub/dbo/database.pyi,sha256=tsGDnI5MCQdvlwDWeDb256bz8Ck6j8SYexIQNbJk7Vw,1654
|
|
9
|
+
datahub/dbo/pg.pyi,sha256=0AA3aK6uLdg9TUypszoF3yVj06xPJzGnkU5cXUJByE4,1894
|
|
10
|
+
datahub/dbo/redis_stream.pyi,sha256=Rd9nvmSvnz4npEfjUyiq6Cw_TO6jtN9mPgwA-7nrO0g,1752
|
|
11
|
+
datahub/dbo/sr.pyi,sha256=zRHnU6QzJE5GS2SbIpd4GK_6f-XkuvBXgfE3YQOZPKE,28550
|
|
12
12
|
datahub/protos/client_msg.pyi,sha256=ftmkInjCGv1DEt477f5dLmRuFdVzrJ40jbOFGr3ZrZU,4063
|
|
13
13
|
datahub/protos/client_pb2.pyi,sha256=CZTEbNX3LduN31Ir1gNb4iK9GFEbP75kc4yeuAwg-dA,220830
|
|
14
14
|
datahub/protos/common_pb2.pyi,sha256=KCzIIakHr0iViKFNFcK1ZotkqcQuZ9_XTNIfvyvcSbM,32839
|
|
@@ -20,13 +20,12 @@ datahub/protos/signal_pb2.pyi,sha256=HJxCtrEOlc1cBtH-ywFRvKItT0IiLyQVb0jzdkRF6mY
|
|
|
20
20
|
datahub/protos/strategy_pb2.pyi,sha256=JmRoiuRdyE_1m6qQxxBMAvLp2OngDSHxTYivkcZQ2PU,32767
|
|
21
21
|
datahub/protos/trade_pb2.pyi,sha256=YLZFMLEMR3q1fSQxgyR81BsVvYngNQPbKPKvLA7ktjs,49810
|
|
22
22
|
datahub/utils/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
datahub/utils/logger.pyi,sha256=
|
|
24
|
-
datahub/utils/sftp.pyi,sha256=
|
|
23
|
+
datahub/utils/logger.pyi,sha256=1TwXn8-s1RDBK-b0-fL1YuWVBAXXzL1vn94euagCl4U,1341
|
|
24
|
+
datahub/utils/sftp.pyi,sha256=qYlQ9nJ_lhZi6pD9Ub0MOAs4zgK8A7XXaQuomR97bLw,1720
|
|
25
25
|
datahub/utils/monitor/__init__.pyi,sha256=EOwgf8CbJ4g3iUAaFoR6O-mYemJ9xjP42zlBj2KeA9c,76
|
|
26
26
|
datahub/utils/monitor/base.pyi,sha256=n1dKYK73JJ_7QPkCWFc-6Aj_a16j2z_VBaQ9zkN9A3E,310
|
|
27
27
|
datahub/utils/monitor/feishu.pyi,sha256=GgvJXYeX3cPOQjqpV0GJUr_Ri1_cZe2-viRBkpe6O_g,402
|
|
28
|
-
|
|
29
|
-
datahub_binary-1.7.
|
|
30
|
-
datahub_binary-1.7.
|
|
31
|
-
datahub_binary-1.7.
|
|
32
|
-
datahub_binary-1.7.10.dist-info/RECORD,,
|
|
28
|
+
datahub_binary-1.7.12.dist-info/METADATA,sha256=QSk2LsBl_dr_QYKrodrQuT5TPPcBvkslChcZC1Xk-U8,7903
|
|
29
|
+
datahub_binary-1.7.12.dist-info/WHEEL,sha256=udyJfL7sDplgZRIx5dG3Nuxzf9JUNe7jMVV2dM5RExo,96
|
|
30
|
+
datahub_binary-1.7.12.dist-info/top_level.txt,sha256=J0rzqYfZghMgpObWaPGhQtV88I-KXrgArDvi_ddf6ZA,8
|
|
31
|
+
datahub_binary-1.7.12.dist-info/RECORD,,
|
datahub.build/.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*
|
|
File without changes
|