datahub_binary 1.8.1__cp312-cp312-win_amd64.whl → 1.8.3__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/dbo/redis_stream.pyi +5 -3
- datahub/utils/sftp.pyi +10 -0
- datahub.cp312-win_amd64.pyd +0 -0
- datahub.pyi +2 -1
- {datahub_binary-1.8.1.dist-info → datahub_binary-1.8.3.dist-info}/METADATA +1 -1
- {datahub_binary-1.8.1.dist-info → datahub_binary-1.8.3.dist-info}/RECORD +8 -8
- {datahub_binary-1.8.1.dist-info → datahub_binary-1.8.3.dist-info}/WHEEL +0 -0
- {datahub_binary-1.8.1.dist-info → datahub_binary-1.8.3.dist-info}/top_level.txt +0 -0
datahub/dbo/redis_stream.pyi
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from ..protos.client_msg import deserialize as deserialize, serialize as serialize
|
|
2
2
|
from _typeshed import Incomplete
|
|
3
3
|
from datahub.setting import RedisSetting as RedisSetting
|
|
4
|
-
from typing import Any, Iterator, Sequence
|
|
4
|
+
from typing import Any, Callable, Iterator, Sequence
|
|
5
5
|
|
|
6
6
|
class RedisStream:
|
|
7
7
|
client: Incomplete
|
|
@@ -27,7 +27,7 @@ class RedisStream:
|
|
|
27
27
|
:param posi: 位置标记, 格式 {timestamp_ms}-{int}
|
|
28
28
|
:return:
|
|
29
29
|
"""
|
|
30
|
-
def read(self, topics: Sequence[str], count: int = 1, ignore_pending: bool = False, block: int = 0) -> Iterator[Any]:
|
|
30
|
+
def read(self, topics: Sequence[str], count: int = 1, ignore_pending: bool = False, block: int = 0, decode_func=...) -> Iterator[Any]:
|
|
31
31
|
"""
|
|
32
32
|
迭代读取proto消息, 自动ack
|
|
33
33
|
|
|
@@ -35,14 +35,16 @@ class RedisStream:
|
|
|
35
35
|
:param count: 单次读取上限
|
|
36
36
|
:param ignore_pending: 是否忽略pending消息, 如果为False, 则会先读取pending消息, 然后读取最新消息
|
|
37
37
|
:param block: 阻塞毫秒数,0为一直等待,超时后会直接返回
|
|
38
|
+
:param decode_func: 解码函数,默认使用proto解码
|
|
38
39
|
:return: proto msg
|
|
39
40
|
"""
|
|
40
|
-
def write(self, topic: str, proto_msg: Any):
|
|
41
|
+
def write(self, topic: str, proto_msg: Any, encode_func: Callable = ...):
|
|
41
42
|
"""
|
|
42
43
|
向stream写入proto消息
|
|
43
44
|
|
|
44
45
|
:param topic: 主题
|
|
45
46
|
:param proto_msg: proto消息
|
|
47
|
+
:param encode_func: 编码函数,默认使用proto
|
|
46
48
|
:return: None
|
|
47
49
|
"""
|
|
48
50
|
def delete(self, topic: str):
|
datahub/utils/sftp.pyi
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import polars as pl
|
|
1
2
|
import types
|
|
2
3
|
from _typeshed import Incomplete
|
|
3
4
|
from datahub.setting import SftpSetting
|
|
@@ -42,6 +43,15 @@ class SFTPClient:
|
|
|
42
43
|
:param path: 目录路径
|
|
43
44
|
:return: None
|
|
44
45
|
"""
|
|
46
|
+
def read_df(self, remote_dir: str, pattern: str) -> pl.DataFrame:
|
|
47
|
+
"""
|
|
48
|
+
读取远程parquet文件
|
|
49
|
+
|
|
50
|
+
:param remote_dir: 远程文件夹路径
|
|
51
|
+
:param pattern: 文件名匹配模式,支持正则, 如: data_2024*.parquet, *.parquet
|
|
52
|
+
(https://docs.python.org/zh-cn/3/library/fnmatch.html)
|
|
53
|
+
:return:
|
|
54
|
+
"""
|
|
45
55
|
def connect(self):
|
|
46
56
|
"""建立连接并返回sftp客户端"""
|
|
47
57
|
def close(self) -> None:
|
datahub.cp312-win_amd64.pyd
CHANGED
|
Binary file
|
datahub.pyi
CHANGED
|
@@ -53,7 +53,6 @@ import sqlalchemy.dialects.postgresql
|
|
|
53
53
|
import redis
|
|
54
54
|
import redis.exceptions
|
|
55
55
|
import warnings
|
|
56
|
-
import io
|
|
57
56
|
import socket
|
|
58
57
|
import google
|
|
59
58
|
import google.protobuf
|
|
@@ -66,4 +65,6 @@ import lark_oapi
|
|
|
66
65
|
import lark_oapi.api
|
|
67
66
|
import lark_oapi.api.im
|
|
68
67
|
import lark_oapi.api.im.v1
|
|
68
|
+
import fnmatch
|
|
69
|
+
import io
|
|
69
70
|
import paramiko
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
datahub.cp312-win_amd64.pyd,sha256=
|
|
2
|
-
datahub.pyi,sha256=
|
|
1
|
+
datahub.cp312-win_amd64.pyd,sha256=wIEbloQmv1er5lqFlAOrdaMbPolvR2ZoazAMl30ihtU,1811968
|
|
2
|
+
datahub.pyi,sha256=sy345awOY4R8_DxrPBOg_oOhfOyNhlH60hJOrgUp4NQ,1522
|
|
3
3
|
datahub/__init__.pyi,sha256=hX8D9Qd6uPjZiUBd6rIq7Llkt_H4l_RvRXsws3sdYbI,630
|
|
4
4
|
datahub/datacache.pyi,sha256=Z2b3ktYv5t2y9Z1yXn0axbdoV06-GhjJhEIl_Ms-FjU,5044
|
|
5
5
|
datahub/datahub.pyi,sha256=CUApKMxrupjWgB2kz7RyDq2Wl4vjFESmGWfoy9lplqA,50337
|
|
@@ -7,7 +7,7 @@ datahub/setting.pyi,sha256=u6gYjjF6r1thSpp2XNMvg_1JUcqB64dRTkNoHlOoKUQ,889
|
|
|
7
7
|
datahub/ats/client_sdk.pyi,sha256=RScBpyY2ML84RBrYt60RnHtodOwWOe5-LbnJ3nFFBGs,8710
|
|
8
8
|
datahub/dbo/database.pyi,sha256=tsGDnI5MCQdvlwDWeDb256bz8Ck6j8SYexIQNbJk7Vw,1654
|
|
9
9
|
datahub/dbo/pg.pyi,sha256=fz2vWRF7vd5ANW5dVQAf7NfTzzjFN5aRKSw32nPRN4M,1931
|
|
10
|
-
datahub/dbo/redis_stream.pyi,sha256=
|
|
10
|
+
datahub/dbo/redis_stream.pyi,sha256=geVI1BoTHRlxodS44MquM-FY_aJt27eDqmAKf2a4PyM,1938
|
|
11
11
|
datahub/dbo/sr.pyi,sha256=WWslzbQ11sasBqORbba3U5IZsAYWCiG4jeZK_f5-FZg,28579
|
|
12
12
|
datahub/protos/client_msg.pyi,sha256=ftmkInjCGv1DEt477f5dLmRuFdVzrJ40jbOFGr3ZrZU,4063
|
|
13
13
|
datahub/protos/client_pb2.pyi,sha256=3LdWOGSmV9vJiGIaaxBBrLpuQdXE4vb92bLvUGToCl8,228911
|
|
@@ -21,11 +21,11 @@ datahub/protos/strategy_pb2.pyi,sha256=JmRoiuRdyE_1m6qQxxBMAvLp2OngDSHxTYivkcZQ2
|
|
|
21
21
|
datahub/protos/trade_pb2.pyi,sha256=YLZFMLEMR3q1fSQxgyR81BsVvYngNQPbKPKvLA7ktjs,49810
|
|
22
22
|
datahub/utils/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
datahub/utils/logger.pyi,sha256=1TwXn8-s1RDBK-b0-fL1YuWVBAXXzL1vn94euagCl4U,1341
|
|
24
|
-
datahub/utils/sftp.pyi,sha256=
|
|
24
|
+
datahub/utils/sftp.pyi,sha256=w8S-cxJWMeWJ6--RjT95qVgng_IhwPImiyoqdCpOCQI,2107
|
|
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_binary-1.8.
|
|
29
|
-
datahub_binary-1.8.
|
|
30
|
-
datahub_binary-1.8.
|
|
31
|
-
datahub_binary-1.8.
|
|
28
|
+
datahub_binary-1.8.3.dist-info/METADATA,sha256=_INC2czYtHXQfZvGojxdkCOsY0XqIv8e8etTYzs5LoU,7902
|
|
29
|
+
datahub_binary-1.8.3.dist-info/WHEEL,sha256=GgV4Cr4qHk9xHlDqCT7rIsmc_XEc5nwpshO-GrXhyBw,96
|
|
30
|
+
datahub_binary-1.8.3.dist-info/top_level.txt,sha256=J0rzqYfZghMgpObWaPGhQtV88I-KXrgArDvi_ddf6ZA,8
|
|
31
|
+
datahub_binary-1.8.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|