ey-commerce-lib 1.0.26__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.
- ey_commerce_lib-1.0.26/.gitignore +12 -0
- ey_commerce_lib-1.0.26/.python-version +1 -0
- ey_commerce_lib-1.0.26/PKG-INFO +13 -0
- ey_commerce_lib-1.0.26/README.md +0 -0
- ey_commerce_lib-1.0.26/pyproject.toml +26 -0
- ey_commerce_lib-1.0.26/pytest.ini +13 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/__init__.py +1 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/constant/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/constant/order.py +80 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/exception/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/exception/common.py +7 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/main.py +967 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/common.py +110 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/count.py +43 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/ebay_product.py +16 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/export_template.py +17 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/order.py +348 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/purchase.py +121 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/tracking.py +56 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/warehouse.py +67 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/common.py +13 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/dxm_commodity_product.py +417 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/ebay_product.py +56 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/export_package.py +23 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/order.py +276 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/tracking.py +45 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/warehouse.py +164 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/utils/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/utils/dxm_commodity_product.py +120 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/utils/mark.py +109 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/constant/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/constant/response.py +8 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/main.py +281 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/parser/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/parser/order.py +19 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/query/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/query/order.py +101 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/vo/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/vo/order.py +438 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/main.py +45 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/query/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/query/order.py +20 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/query/product.py +76 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/response/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/response/order.py +70 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/response/product.py +97 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/model.py +13 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/py.typed +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/config.py +39 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/main.py +117 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/parser/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/parser/order.py +20 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/__init__.py +0 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/close.py +6 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/dxm.py +43 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/float.py +30 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/list_util.py +23 -0
- ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/str.py +3 -0
- ey_commerce_lib-1.0.26/tests/__init__.py +0 -0
- ey_commerce_lib-1.0.26/tests/dxm/__init__.py +0 -0
- ey_commerce_lib-1.0.26/tests/dxm/test_purchase.py +90 -0
- ey_commerce_lib-1.0.26/tests/kogan/__init__.py +0 -0
- ey_commerce_lib-1.0.26/tests/kogan/test_client.py +14 -0
- ey_commerce_lib-1.0.26/uv.lock +884 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ey-commerce-lib
|
|
3
|
+
Version: 1.0.26
|
|
4
|
+
Summary: eeyoung电商客户端调用封装
|
|
5
|
+
Author-email: 饶奇奇 <1124393197@qq.com>
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: ddddocr>=1.5.6
|
|
8
|
+
Requires-Dist: httpx>=0.28.1
|
|
9
|
+
Requires-Dist: lxml>=5.3.2
|
|
10
|
+
Requires-Dist: playwright>=1.52.0
|
|
11
|
+
Requires-Dist: pydantic>=2.11.3
|
|
12
|
+
Requires-Dist: pytest-asyncio>=0.26.0
|
|
13
|
+
Requires-Dist: pytest>=8.3.5
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ey-commerce-lib"
|
|
3
|
+
version = "1.0.26"
|
|
4
|
+
description = "eeyoung电商客户端调用封装"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "饶奇奇", email = "1124393197@qq.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"pytest-asyncio>=0.26.0",
|
|
12
|
+
"pytest>=8.3.5",
|
|
13
|
+
"httpx>=0.28.1",
|
|
14
|
+
"pydantic>=2.11.3",
|
|
15
|
+
"lxml>=5.3.2",
|
|
16
|
+
"playwright>=1.52.0",
|
|
17
|
+
"ddddocr>=1.5.6",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[build-system]
|
|
21
|
+
requires = ["hatchling"]
|
|
22
|
+
build-backend = "hatchling.build"
|
|
23
|
+
|
|
24
|
+
[pypi]
|
|
25
|
+
username = '__token__'
|
|
26
|
+
password = 'pypi-AgEIcHlwaS5vcmcCJGM0ODMxYjA3LWUwZGEtNDI5MC04ZjFhLWY0NWQ2YjMwMTE3YgACKlszLCIxZmExMDhjZC02MjBjLTQ0ZjQtYmRiYy01ZDc4ZDM0MmY4YzIiXQAABiAX4H1ZB3reItO25PIffe7vOLqyqktJpnevZy_ibdUt6Q'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[pytest]
|
|
2
|
+
# -ra:显示所有额外的测试信息,尤其是跳过、失败、错误、成功的测试。
|
|
3
|
+
#-q:启用简洁模式(quiet mode),减少输出内容,只有测试的关键信息会显示。
|
|
4
|
+
#-s:允许打印输出到控制台,比如 print 语句的输出。
|
|
5
|
+
addopts = -ra -q -s
|
|
6
|
+
# 设置 pythonpath,即指定 Python 模块的搜索路径。这里设置为 src,意味着 pytest 会将 src 目录作为 Python 模块的根目录,这对于项目结构清晰,源代码不在当前目录下时非常有用。
|
|
7
|
+
pythonpath = src
|
|
8
|
+
testpaths = tests
|
|
9
|
+
# 事件循环的模式
|
|
10
|
+
#class(在每个测试类使用相同的事件循环)
|
|
11
|
+
#module(每个测试模块使用相同的事件循环)
|
|
12
|
+
#function(每个测试函数使用相同的事件循环)
|
|
13
|
+
asyncio_default_fixture_loop_scope = function
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# 待审核搜索配置
|
|
2
|
+
from enum import StrEnum
|
|
3
|
+
|
|
4
|
+
from ey_commerce_lib.dxm.schemas.order import DxmOrderSearchForm
|
|
5
|
+
|
|
6
|
+
# 待审核搜索基础配置
|
|
7
|
+
ORDER_SEARCH_APPROVAL_BASE_FORM = DxmOrderSearchForm(**{
|
|
8
|
+
'state': 'paid',
|
|
9
|
+
'is_voided': '0',
|
|
10
|
+
'is_removed': '0',
|
|
11
|
+
'order_field': 'order_pay_time',
|
|
12
|
+
'is_desc': '0'
|
|
13
|
+
})
|
|
14
|
+
# 待处理搜索基础配置
|
|
15
|
+
ORDER_SEARCH_PENDING_PROCESSING_BASE_FORM = DxmOrderSearchForm(**{
|
|
16
|
+
'state': 'approved',
|
|
17
|
+
'is_voided': '0',
|
|
18
|
+
'is_removed': '0',
|
|
19
|
+
'order_field': 'order_pay_time',
|
|
20
|
+
'is_desc': '0',
|
|
21
|
+
})
|
|
22
|
+
# 自营仓库搜索配置(非海外仓)
|
|
23
|
+
ORDER_SEARCH_SELF_WAREHOUSE_BASE_FORM = DxmOrderSearchForm(**{
|
|
24
|
+
'search_types': 'packageNum',
|
|
25
|
+
'state': 'processed',
|
|
26
|
+
'is_voided': '0',
|
|
27
|
+
'is_removed': '0',
|
|
28
|
+
'is_oversea': '0',
|
|
29
|
+
'order_field': 'order_pay_time',
|
|
30
|
+
'is_desc': '0',
|
|
31
|
+
})
|
|
32
|
+
# 海外仓库搜索配置(海外仓)
|
|
33
|
+
ORDER_SEARCH_OVERSEA_WAREHOUSE_BASE_FORM = DxmOrderSearchForm(**{
|
|
34
|
+
'state': 'processed',
|
|
35
|
+
'is_voided': '0',
|
|
36
|
+
'is_removed': '0',
|
|
37
|
+
'is_oversea': '1',
|
|
38
|
+
'order_field': 'order_pay_time',
|
|
39
|
+
'is_desc': '0',
|
|
40
|
+
})
|
|
41
|
+
# 有货搜索配置
|
|
42
|
+
ORDER_SEARCH_HAVE_GOODS_BASE_FORM = DxmOrderSearchForm(**{
|
|
43
|
+
'state': 'allocated_has',
|
|
44
|
+
'is_voided': '0',
|
|
45
|
+
'is_removed': '0',
|
|
46
|
+
'order_field': 'order_pay_time',
|
|
47
|
+
'is_desc': '0',
|
|
48
|
+
})
|
|
49
|
+
# 缺货搜索配置
|
|
50
|
+
ORDER_SEARCH_OUT_OF_STOCK_BASE_FORM = DxmOrderSearchForm(**{
|
|
51
|
+
'state': 'allocated_out',
|
|
52
|
+
'is_voided': '0',
|
|
53
|
+
'is_removed': '0',
|
|
54
|
+
'order_field': 'order_pay_time',
|
|
55
|
+
'is_desc': '0',
|
|
56
|
+
})
|
|
57
|
+
# 发货失败搜索配置
|
|
58
|
+
ORDER_SEARCH_DELIVERY_FAILURE_BASE_FORM = DxmOrderSearchForm(**{
|
|
59
|
+
'state': 'fail',
|
|
60
|
+
'is_voided': '0',
|
|
61
|
+
'is_removed': '0',
|
|
62
|
+
'order_field': 'order_pay_time',
|
|
63
|
+
'is_desc': '0'
|
|
64
|
+
})
|
|
65
|
+
# 发货成功搜索配置
|
|
66
|
+
ORDER_SEARCH_DELIVERY_SUCCESS_BASE_FORM = DxmOrderSearchForm(**{
|
|
67
|
+
'state': 'shipped',
|
|
68
|
+
'is_voided': '0',
|
|
69
|
+
'is_removed': '0',
|
|
70
|
+
'commit_platforms': 'success',
|
|
71
|
+
'order_field': 'shipped_time',
|
|
72
|
+
'is_desc': '0'}
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class DxmOrderRuleType(StrEnum):
|
|
77
|
+
# 审单规则
|
|
78
|
+
ORDER_APPROVAL = '1'
|
|
79
|
+
# 物流规则
|
|
80
|
+
LOGISTICS = '2'
|
|
File without changes
|