lkd-pro 0.2.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.
- lkd/__init__.py +39 -0
- lkd/api/__init__.py +68 -0
- lkd/api/api.py +889 -0
- lkd/cache/__init__.py +9 -0
- lkd/cache/local_cache.py +173 -0
- lkd/client/__init__.py +25 -0
- lkd/client/client.py +201 -0
- lkd/client/request_base.py +93 -0
- lkd/client/request_delete.py +9 -0
- lkd/client/request_params.py +9 -0
- lkd/client/request_patch.py +9 -0
- lkd/client/request_post.py +9 -0
- lkd/client/request_put.py +9 -0
- lkd/env/__init__.py +9 -0
- lkd/env/auto_client.py +325 -0
- lkd/env/device_info.py +160 -0
- lkd/human/__init__.py +0 -0
- lkd/human/human.py +740 -0
- lkd/logs/__init__.py +132 -0
- lkd/logs/err_logs.py +137 -0
- lkd/mwin/__init__.py +0 -0
- lkd/mwin/direct.py +451 -0
- lkd/mwin/find_image.py +310 -0
- lkd/mwin/mbot.py +1140 -0
- lkd/py.typed +0 -0
- lkd/settings/__init__.py +10 -0
- lkd/settings/initialization.py +140 -0
- lkd/settings/settings.py +138 -0
- lkd/util/__init__.py +0 -0
- lkd/util/after_path.py +129 -0
- lkd/util/change_folder.py +112 -0
- lkd/util/file/__init__.py +0 -0
- lkd/util/file/file.py +211 -0
- lkd/util/file/folder.py +117 -0
- lkd/util/file/mjson.py +48 -0
- lkd/util/file/path.py +247 -0
- lkd/util/local_path_manager.py +90 -0
- lkd/util/my_json.py +259 -0
- lkd/util/network.py +79 -0
- lkd/util/up_c.py +736 -0
- lkd/util/util.py +598 -0
- lkd/var/__init__.py +9 -0
- lkd/var/variables.py +48 -0
- lkd_pro-0.2.0.dist-info/METADATA +644 -0
- lkd_pro-0.2.0.dist-info/RECORD +47 -0
- lkd_pro-0.2.0.dist-info/WHEEL +5 -0
- lkd_pro-0.2.0.dist-info/top_level.txt +1 -0
lkd/__init__.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""
|
|
2
|
+
邻可多 (LKD) 商品数据处理与自动化上传系统
|
|
3
|
+
|
|
4
|
+
主要功能:
|
|
5
|
+
- Excel 商品表格与图片文件夹自动匹配
|
|
6
|
+
- 多表格数据合并、活动价处理、最低价筛选
|
|
7
|
+
- 商品数据批量上传至后端 API,支持并发
|
|
8
|
+
- 错误日志异步上报,支持截图 base64 编码
|
|
9
|
+
- 支持多店铺文件夹自动识别与处理
|
|
10
|
+
|
|
11
|
+
版本:0.2.0
|
|
12
|
+
作者:云南邻可多电子商务有限公司
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
__version__ = "0.2.0"
|
|
16
|
+
__author__ = "云南邻可多电子商务有限公司"
|
|
17
|
+
__all__ = [
|
|
18
|
+
"api",
|
|
19
|
+
"cache",
|
|
20
|
+
"client",
|
|
21
|
+
"env",
|
|
22
|
+
"human",
|
|
23
|
+
"logs",
|
|
24
|
+
"mwin",
|
|
25
|
+
"settings",
|
|
26
|
+
"util",
|
|
27
|
+
"var",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
# 初始化全局变量
|
|
31
|
+
from lkd.var.variables import glv
|
|
32
|
+
|
|
33
|
+
# 确保全局变量已初始化
|
|
34
|
+
if not glv.get("LOCAL_IP"):
|
|
35
|
+
glv.set("LOCAL_IP", "")
|
|
36
|
+
if not glv.get("REMOTE_IP"):
|
|
37
|
+
glv.set("REMOTE_IP", "")
|
|
38
|
+
if not glv.get("gvar_logs_path"):
|
|
39
|
+
glv.set("gvar_logs_path", "")
|
lkd/api/__init__.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
API 模块
|
|
3
|
+
|
|
4
|
+
提供所有后端 API 接口封装
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from lkd.api.api import (
|
|
8
|
+
APIClient,
|
|
9
|
+
APIResponse,
|
|
10
|
+
# 快捷函数
|
|
11
|
+
register,
|
|
12
|
+
login,
|
|
13
|
+
refresh_token,
|
|
14
|
+
register_device,
|
|
15
|
+
send_heartbeat,
|
|
16
|
+
logs,
|
|
17
|
+
get_task,
|
|
18
|
+
update_task,
|
|
19
|
+
send_products,
|
|
20
|
+
get_products,
|
|
21
|
+
get_shop,
|
|
22
|
+
update_shop,
|
|
23
|
+
get_second_categories,
|
|
24
|
+
create_or_update_second,
|
|
25
|
+
get_purchase,
|
|
26
|
+
post_purchase,
|
|
27
|
+
put_purchase,
|
|
28
|
+
query_pdd_bind_products,
|
|
29
|
+
update_pdd_bind_product,
|
|
30
|
+
delete_pdd_bind_product,
|
|
31
|
+
get_history_purchase,
|
|
32
|
+
create_history_purchase,
|
|
33
|
+
update_history_purchase,
|
|
34
|
+
get_supermarkets,
|
|
35
|
+
daily_update_shop_cleanup,
|
|
36
|
+
initialize_unsync_data,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
"APIClient",
|
|
41
|
+
"APIResponse",
|
|
42
|
+
"register",
|
|
43
|
+
"login",
|
|
44
|
+
"refresh_token",
|
|
45
|
+
"register_device",
|
|
46
|
+
"send_heartbeat",
|
|
47
|
+
"logs",
|
|
48
|
+
"get_task",
|
|
49
|
+
"update_task",
|
|
50
|
+
"send_products",
|
|
51
|
+
"get_products",
|
|
52
|
+
"get_shop",
|
|
53
|
+
"update_shop",
|
|
54
|
+
"get_second_categories",
|
|
55
|
+
"create_or_update_second",
|
|
56
|
+
"get_purchase",
|
|
57
|
+
"post_purchase",
|
|
58
|
+
"put_purchase",
|
|
59
|
+
"query_pdd_bind_products",
|
|
60
|
+
"update_pdd_bind_product",
|
|
61
|
+
"delete_pdd_bind_product",
|
|
62
|
+
"get_history_purchase",
|
|
63
|
+
"create_history_purchase",
|
|
64
|
+
"update_history_purchase",
|
|
65
|
+
"get_supermarkets",
|
|
66
|
+
"daily_update_shop_cleanup",
|
|
67
|
+
"initialize_unsync_data",
|
|
68
|
+
]
|