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.
Files changed (72) hide show
  1. ey_commerce_lib-1.0.26/.gitignore +12 -0
  2. ey_commerce_lib-1.0.26/.python-version +1 -0
  3. ey_commerce_lib-1.0.26/PKG-INFO +13 -0
  4. ey_commerce_lib-1.0.26/README.md +0 -0
  5. ey_commerce_lib-1.0.26/pyproject.toml +26 -0
  6. ey_commerce_lib-1.0.26/pytest.ini +13 -0
  7. ey_commerce_lib-1.0.26/src/ey_commerce_lib/__init__.py +1 -0
  8. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/__init__.py +0 -0
  9. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/constant/__init__.py +0 -0
  10. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/constant/order.py +80 -0
  11. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/exception/__init__.py +0 -0
  12. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/exception/common.py +7 -0
  13. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/main.py +967 -0
  14. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/__init__.py +0 -0
  15. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/common.py +110 -0
  16. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/count.py +43 -0
  17. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/ebay_product.py +16 -0
  18. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/export_template.py +17 -0
  19. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/order.py +348 -0
  20. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/purchase.py +121 -0
  21. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/tracking.py +56 -0
  22. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/parser/warehouse.py +67 -0
  23. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/__init__.py +0 -0
  24. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/common.py +13 -0
  25. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/dxm_commodity_product.py +417 -0
  26. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/ebay_product.py +56 -0
  27. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/export_package.py +23 -0
  28. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/order.py +276 -0
  29. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/tracking.py +45 -0
  30. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/schemas/warehouse.py +164 -0
  31. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/utils/__init__.py +0 -0
  32. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/utils/dxm_commodity_product.py +120 -0
  33. ey_commerce_lib-1.0.26/src/ey_commerce_lib/dxm/utils/mark.py +109 -0
  34. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/__init__.py +0 -0
  35. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/constant/__init__.py +0 -0
  36. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/constant/response.py +8 -0
  37. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/main.py +281 -0
  38. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/parser/__init__.py +0 -0
  39. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/parser/order.py +19 -0
  40. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/__init__.py +0 -0
  41. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/query/__init__.py +0 -0
  42. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/query/order.py +101 -0
  43. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/vo/__init__.py +0 -0
  44. ey_commerce_lib-1.0.26/src/ey_commerce_lib/four_seller/schemas/vo/order.py +438 -0
  45. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/__init__.py +0 -0
  46. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/main.py +45 -0
  47. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/__init__.py +0 -0
  48. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/query/__init__.py +0 -0
  49. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/query/order.py +20 -0
  50. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/query/product.py +76 -0
  51. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/response/__init__.py +0 -0
  52. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/response/order.py +70 -0
  53. ey_commerce_lib-1.0.26/src/ey_commerce_lib/kogan/schemas/response/product.py +97 -0
  54. ey_commerce_lib-1.0.26/src/ey_commerce_lib/model.py +13 -0
  55. ey_commerce_lib-1.0.26/src/ey_commerce_lib/py.typed +0 -0
  56. ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/__init__.py +0 -0
  57. ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/config.py +39 -0
  58. ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/main.py +117 -0
  59. ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/parser/__init__.py +0 -0
  60. ey_commerce_lib-1.0.26/src/ey_commerce_lib/takesend/parser/order.py +20 -0
  61. ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/__init__.py +0 -0
  62. ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/close.py +6 -0
  63. ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/dxm.py +43 -0
  64. ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/float.py +30 -0
  65. ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/list_util.py +23 -0
  66. ey_commerce_lib-1.0.26/src/ey_commerce_lib/utils/str.py +3 -0
  67. ey_commerce_lib-1.0.26/tests/__init__.py +0 -0
  68. ey_commerce_lib-1.0.26/tests/dxm/__init__.py +0 -0
  69. ey_commerce_lib-1.0.26/tests/dxm/test_purchase.py +90 -0
  70. ey_commerce_lib-1.0.26/tests/kogan/__init__.py +0 -0
  71. ey_commerce_lib-1.0.26/tests/kogan/test_client.py +14 -0
  72. ey_commerce_lib-1.0.26/uv.lock +884 -0
@@ -0,0 +1,12 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+ # pycharm
12
+ .idea
@@ -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"
@@ -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'
@@ -0,0 +1,7 @@
1
+ class PageInfoNotFoundException(Exception):
2
+ """
3
+ 找不到分页参数异常
4
+ """
5
+
6
+ def __init__(self, msg):
7
+ super().__init__(msg)