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/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
- def ensure_dir(self, dir_path: str, chmod: int = 509) -> bool: ...
14
- def rmdir_recursive(self, path: str): ...
15
- def connect(self): ...
16
- def close(self) -> None: ...
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: ...
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datahub_binary
3
- Version: 1.7.10
3
+ Version: 1.7.12
4
4
  Summary: A comprehensive Python library for data processing, integration, and management.
5
5
  Requires-Python: <3.13,>=3.9
6
6
  Description-Content-Type: text/markdown
@@ -1,14 +1,14 @@
1
- datahub.cp312-win_amd64.pyd,sha256=4oYOhcIsvM3w8USvFQr2IlLsOyh3eibH7PoqR2I_Jtc,1920000
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=rVDkzr0nLn54RT6EkYMDBh41t788XfVFyL4XKTJ2eSM,3587
5
- datahub/datahub.pyi,sha256=IXSIjZf9fGTXp2HTuVi8gz5b5IsQ9djEafg608Q11Po,10302
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=ZdXVLPNXdh5AgHGo1E2fhA_4MLVYq-yeZYHsOvGqCL8,4107
8
- datahub/dbo/database.pyi,sha256=O8Gp0Os3tzznLa6hdmCaXnq7Iw4xAAkW4YcjK0jUSUY,1024
9
- datahub/dbo/pg.pyi,sha256=zSr5GAiPVwvqXSN6qctkUh1My7c2tMyGETJB0Ir1Uvo,871
10
- datahub/dbo/redis_stream.pyi,sha256=B3DJ5GQ_gnGqaPAGwgHwvTAVubMz99mAaoS8EK_2VaQ,734
11
- datahub/dbo/sr.pyi,sha256=ZGx7FBDu54GY6QNNUELDG6QPV9EIDXGEnnu4OGUg6_g,6984
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=KhXT5jucdGoj65U3i0jYFlQ_Qm66VRtU6PNLTerKMC8,796
24
- datahub/utils/sftp.pyi,sha256=J-lWxtTSZfnvqBRPmEHi1Tw5CpS0fsy6ySj-xnyXjZc,694
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
- datahub.build/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
29
- datahub_binary-1.7.10.dist-info/METADATA,sha256=abxTTW_u-YNfEoNNB3seaVq9EXigFqo_TIxiX02ZjhE,7903
30
- datahub_binary-1.7.10.dist-info/WHEEL,sha256=FQxUvv368yzeQ5jnDTKEMIdX3KL1fZX-LEwWLnwUgUg,97
31
- datahub_binary-1.7.10.dist-info/top_level.txt,sha256=J0rzqYfZghMgpObWaPGhQtV88I-KXrgArDvi_ddf6ZA,8
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: Nuitka (2.7.16)
2
+ Generator: Nuitka (2.8.3)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-win_amd64
5
5
 
datahub.build/.gitignore DELETED
@@ -1 +0,0 @@
1
- *