dts-dance 0.1.8__tar.gz → 0.1.9__tar.gz
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.
- {dts_dance-0.1.8 → dts_dance-0.1.9}/PKG-INFO +5 -4
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/s3.py +1 -2
- {dts_dance-0.1.8 → dts_dance-0.1.9}/pyproject.toml +5 -4
- {dts_dance-0.1.8 → dts_dance-0.1.9}/uv.lock +76 -4
- dts_dance-0.1.8/tests/config.py +0 -22
- dts_dance-0.1.8/tests/test_dflow.py +0 -21
- {dts_dance-0.1.8 → dts_dance-0.1.9}/.gitignore +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/.python-version +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/CLAUDE.md +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/DEV.md +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/README.md +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/config.example.yaml +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/__init__.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/bytecloud.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/dflow.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/dsyncer.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/feishu_base.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/feishu_table.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/metrics_fe.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/spacex.py +0 -0
- {dts_dance-0.1.8 → dts_dance-0.1.9}/dtsdance/tcc.py +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dts-dance
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: dts dance lib
|
|
5
5
|
Keywords: observation,tools
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
|
-
Requires-Dist:
|
|
8
|
-
Requires-Dist:
|
|
9
|
-
Requires-Dist:
|
|
7
|
+
Requires-Dist: boto3<2.0.0,>=1.42.27
|
|
8
|
+
Requires-Dist: loguru<0.8.0,>=0.7.3
|
|
9
|
+
Requires-Dist: pyyaml<7.0.0,>=6.0.3
|
|
10
|
+
Requires-Dist: requests<3.0.0,>=2.32.5
|
|
10
11
|
Description-Content-Type: text/markdown
|
|
11
12
|
|
|
12
13
|
# dts-dance
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from typing import Optional
|
|
3
3
|
import boto3
|
|
4
|
-
from botocore.exceptions import ClientError
|
|
5
4
|
from loguru import logger
|
|
6
5
|
|
|
7
6
|
|
|
@@ -35,6 +34,6 @@ class S3Client:
|
|
|
35
34
|
file_url = f"{self.base_url}/{s3_file_name}"
|
|
36
35
|
logger.info(f"文件已成功上传到 S3: {file_url}")
|
|
37
36
|
return file_url
|
|
38
|
-
except
|
|
37
|
+
except Exception as e:
|
|
39
38
|
logger.error(f"上传文件到 S3 时出错: {e}")
|
|
40
39
|
return None
|
|
@@ -4,15 +4,16 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dts-dance"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.9"
|
|
8
8
|
description = "dts dance lib"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
keywords = ["tools", "observation"]
|
|
11
11
|
requires-python = ">=3.12"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"requests
|
|
14
|
-
"loguru
|
|
15
|
-
"
|
|
13
|
+
"requests>=2.32.5,<3.0.0",
|
|
14
|
+
"loguru>=0.7.3,<0.8.0",
|
|
15
|
+
"boto3>=1.42.27,<2.0.0",
|
|
16
|
+
"pyyaml>=6.0.3,<7.0.0",
|
|
16
17
|
]
|
|
17
18
|
|
|
18
19
|
[tool.hatch.build.targets.wheel]
|
|
@@ -2,6 +2,34 @@ version = 1
|
|
|
2
2
|
revision = 3
|
|
3
3
|
requires-python = ">=3.12"
|
|
4
4
|
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "boto3"
|
|
7
|
+
version = "1.42.27"
|
|
8
|
+
source = { registry = "https://pypi.org/simple" }
|
|
9
|
+
dependencies = [
|
|
10
|
+
{ name = "botocore" },
|
|
11
|
+
{ name = "jmespath" },
|
|
12
|
+
{ name = "s3transfer" },
|
|
13
|
+
]
|
|
14
|
+
sdist = { url = "https://files.pythonhosted.org/packages/8d/99/65569052c911160702ad371b0b08b751bb1df29deeef0c5c117528074c29/boto3-1.42.27.tar.gz", hash = "sha256:a8a53abb98ff1a24d9a88d9d8c0285bf02d23189666130456e8951ede2f7db98", size = 112765, upload-time = "2026-01-13T20:35:11.971Z" }
|
|
15
|
+
wheels = [
|
|
16
|
+
{ url = "https://files.pythonhosted.org/packages/44/9e/9554a8c1d7610ec8ea55bec0dac87ad894c83cada2ea2c05fc45f14d0cde/boto3-1.42.27-py3-none-any.whl", hash = "sha256:39dfec51aff3f9356e8c7331195f324cb498ec75b2601a902fc62aa127b8fd00", size = 140577, upload-time = "2026-01-13T20:35:09.35Z" },
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[[package]]
|
|
20
|
+
name = "botocore"
|
|
21
|
+
version = "1.42.27"
|
|
22
|
+
source = { registry = "https://pypi.org/simple" }
|
|
23
|
+
dependencies = [
|
|
24
|
+
{ name = "jmespath" },
|
|
25
|
+
{ name = "python-dateutil" },
|
|
26
|
+
{ name = "urllib3" },
|
|
27
|
+
]
|
|
28
|
+
sdist = { url = "https://files.pythonhosted.org/packages/65/90/55b003d38f947c90c0d7e306d377dcdfd9cd0dc1e184082b2d1a6adb0eec/botocore-1.42.27.tar.gz", hash = "sha256:c8e1e3ffb6c871622b1c8054f064d60cbc786aa5ca1f97f5f9fd5fa0a9d82d05", size = 14880030, upload-time = "2026-01-13T20:35:00.31Z" }
|
|
29
|
+
wheels = [
|
|
30
|
+
{ url = "https://files.pythonhosted.org/packages/bf/32/8a4a0447432425cd2f772c757d988742685f46796cf5d68aeaf6bcb6bc37/botocore-1.42.27-py3-none-any.whl", hash = "sha256:d51fb3b8dd1a944c8d238d2827a0dd6e5528d6da49a3bd9eccad019c533e4c9c", size = 14555236, upload-time = "2026-01-13T20:34:55.918Z" },
|
|
31
|
+
]
|
|
32
|
+
|
|
5
33
|
[[package]]
|
|
6
34
|
name = "certifi"
|
|
7
35
|
version = "2025.11.12"
|
|
@@ -79,9 +107,10 @@ wheels = [
|
|
|
79
107
|
|
|
80
108
|
[[package]]
|
|
81
109
|
name = "dts-dance"
|
|
82
|
-
version = "0.1.
|
|
110
|
+
version = "0.1.9"
|
|
83
111
|
source = { editable = "." }
|
|
84
112
|
dependencies = [
|
|
113
|
+
{ name = "boto3" },
|
|
85
114
|
{ name = "loguru" },
|
|
86
115
|
{ name = "pyyaml" },
|
|
87
116
|
{ name = "requests" },
|
|
@@ -89,9 +118,10 @@ dependencies = [
|
|
|
89
118
|
|
|
90
119
|
[package.metadata]
|
|
91
120
|
requires-dist = [
|
|
92
|
-
{ name = "
|
|
93
|
-
{ name = "
|
|
94
|
-
{ name = "
|
|
121
|
+
{ name = "boto3", specifier = ">=1.42.27,<2.0.0" },
|
|
122
|
+
{ name = "loguru", specifier = ">=0.7.3,<0.8.0" },
|
|
123
|
+
{ name = "pyyaml", specifier = ">=6.0.3,<7.0.0" },
|
|
124
|
+
{ name = "requests", specifier = ">=2.32.5,<3.0.0" },
|
|
95
125
|
]
|
|
96
126
|
|
|
97
127
|
[[package]]
|
|
@@ -103,6 +133,15 @@ wheels = [
|
|
|
103
133
|
{ url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" },
|
|
104
134
|
]
|
|
105
135
|
|
|
136
|
+
[[package]]
|
|
137
|
+
name = "jmespath"
|
|
138
|
+
version = "1.0.1"
|
|
139
|
+
source = { registry = "https://pypi.org/simple" }
|
|
140
|
+
sdist = { url = "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe", size = 25843, upload-time = "2022-06-17T18:00:12.224Z" }
|
|
141
|
+
wheels = [
|
|
142
|
+
{ url = "https://files.pythonhosted.org/packages/31/b4/b9b800c45527aadd64d5b442f9b932b00648617eb5d63d2c7a6587b7cafc/jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", size = 20256, upload-time = "2022-06-17T18:00:10.251Z" },
|
|
143
|
+
]
|
|
144
|
+
|
|
106
145
|
[[package]]
|
|
107
146
|
name = "loguru"
|
|
108
147
|
version = "0.7.3"
|
|
@@ -116,6 +155,18 @@ wheels = [
|
|
|
116
155
|
{ url = "https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c", size = 61595, upload-time = "2024-12-06T11:20:54.538Z" },
|
|
117
156
|
]
|
|
118
157
|
|
|
158
|
+
[[package]]
|
|
159
|
+
name = "python-dateutil"
|
|
160
|
+
version = "2.9.0.post0"
|
|
161
|
+
source = { registry = "https://pypi.org/simple" }
|
|
162
|
+
dependencies = [
|
|
163
|
+
{ name = "six" },
|
|
164
|
+
]
|
|
165
|
+
sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" }
|
|
166
|
+
wheels = [
|
|
167
|
+
{ url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" },
|
|
168
|
+
]
|
|
169
|
+
|
|
119
170
|
[[package]]
|
|
120
171
|
name = "pyyaml"
|
|
121
172
|
version = "6.0.3"
|
|
@@ -177,6 +228,27 @@ wheels = [
|
|
|
177
228
|
{ url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" },
|
|
178
229
|
]
|
|
179
230
|
|
|
231
|
+
[[package]]
|
|
232
|
+
name = "s3transfer"
|
|
233
|
+
version = "0.16.0"
|
|
234
|
+
source = { registry = "https://pypi.org/simple" }
|
|
235
|
+
dependencies = [
|
|
236
|
+
{ name = "botocore" },
|
|
237
|
+
]
|
|
238
|
+
sdist = { url = "https://files.pythonhosted.org/packages/05/04/74127fc843314818edfa81b5540e26dd537353b123a4edc563109d8f17dd/s3transfer-0.16.0.tar.gz", hash = "sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920", size = 153827, upload-time = "2025-12-01T02:30:59.114Z" }
|
|
239
|
+
wheels = [
|
|
240
|
+
{ url = "https://files.pythonhosted.org/packages/fc/51/727abb13f44c1fcf6d145979e1535a35794db0f6e450a0cb46aa24732fe2/s3transfer-0.16.0-py3-none-any.whl", hash = "sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe", size = 86830, upload-time = "2025-12-01T02:30:57.729Z" },
|
|
241
|
+
]
|
|
242
|
+
|
|
243
|
+
[[package]]
|
|
244
|
+
name = "six"
|
|
245
|
+
version = "1.17.0"
|
|
246
|
+
source = { registry = "https://pypi.org/simple" }
|
|
247
|
+
sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" }
|
|
248
|
+
wheels = [
|
|
249
|
+
{ url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" },
|
|
250
|
+
]
|
|
251
|
+
|
|
180
252
|
[[package]]
|
|
181
253
|
name = "urllib3"
|
|
182
254
|
version = "2.6.2"
|
dts_dance-0.1.8/tests/config.py
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from typing import Any
|
|
3
|
-
import yaml
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def load_config() -> dict[str, Any]:
|
|
7
|
-
"""从配置文件加载配置
|
|
8
|
-
|
|
9
|
-
Returns:
|
|
10
|
-
dict[str, Any]: 应用配置字典
|
|
11
|
-
|
|
12
|
-
Raises:
|
|
13
|
-
ValueError: 配置文件加载错误
|
|
14
|
-
"""
|
|
15
|
-
config_path = os.environ.get("CONFIG_PATH", "config.yaml")
|
|
16
|
-
|
|
17
|
-
try:
|
|
18
|
-
with open(config_path, "r", encoding="utf-8") as f:
|
|
19
|
-
return yaml.safe_load(f)
|
|
20
|
-
|
|
21
|
-
except Exception as e:
|
|
22
|
-
raise ValueError(f"加载配置失败: {e}")
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
from dtsdance.dflow import DFlowHelper
|
|
2
|
-
from dtsdance.bytecloud import ByteCloudEnvInfo, ByteCloudHelper
|
|
3
|
-
|
|
4
|
-
from config import load_config
|
|
5
|
-
|
|
6
|
-
config = load_config()
|
|
7
|
-
envs_bytecloud = {k: ByteCloudEnvInfo(k, v["endpoint"], v["svc_secret"]) for k, v in config["sites"].items()}
|
|
8
|
-
bytecloud_helper = ByteCloudHelper(envs_bytecloud)
|
|
9
|
-
dsyncer_helper = DFlowHelper(bytecloud_helper)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# pytest tests/test_dflow.py::test_get_dflow_info -s
|
|
13
|
-
def test_get_dflow_info():
|
|
14
|
-
try:
|
|
15
|
-
info = dsyncer_helper.get_dflow_info("boe", "1324653150464")
|
|
16
|
-
# info = dsyncer_helper.get_dflow_info("i18n-bd", "4102917472017")
|
|
17
|
-
# info = dsyncer_helper.get_dflow_info("us-ttp", "257993088799750")
|
|
18
|
-
# info = dsyncer_helper.get_dflow_info("eu-ttp", "815571859216")
|
|
19
|
-
print(f"DFlow Info: {info}")
|
|
20
|
-
except Exception as e:
|
|
21
|
-
print(f"Failed to get DFlow info for environment boe: {e}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|