ey-commerce-lib 1.0.8__tar.gz → 1.0.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.

Potentially problematic release.


This version of ey-commerce-lib might be problematic. Click here for more details.

Files changed (56) hide show
  1. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/PKG-INFO +1 -1
  2. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/pyproject.toml +1 -1
  3. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/main.py +7 -2
  4. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/tests/kogan/test_client.py +4 -3
  5. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/.gitignore +0 -0
  6. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/.python-version +0 -0
  7. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/README.md +0 -0
  8. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/pytest.ini +0 -0
  9. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/__init__.py +0 -0
  10. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/__init__.py +0 -0
  11. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/constant/__init__.py +0 -0
  12. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/constant/order.py +0 -0
  13. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/exception/__init__.py +0 -0
  14. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/exception/common.py +0 -0
  15. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/main.py +0 -0
  16. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/order.py +0 -0
  17. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/parser/__init__.py +0 -0
  18. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/parser/common.py +0 -0
  19. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/parser/order.py +0 -0
  20. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/parser/purchase.py +0 -0
  21. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/parser/warehouse.py +0 -0
  22. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/schemas/__init__.py +0 -0
  23. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/schemas/common.py +0 -0
  24. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/schemas/order.py +0 -0
  25. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/dxm/schemas/warehouse.py +0 -0
  26. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/__init__.py +0 -0
  27. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/constant/__init__.py +0 -0
  28. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/constant/response.py +0 -0
  29. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/main.py +0 -0
  30. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/parser/__init__.py +0 -0
  31. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/parser/order.py +0 -0
  32. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/schemas/__init__.py +0 -0
  33. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/schemas/query/__init__.py +0 -0
  34. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/schemas/query/order.py +0 -0
  35. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/schemas/vo/__init__.py +0 -0
  36. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/four_seller/schemas/vo/order.py +0 -0
  37. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/__init__.py +0 -0
  38. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/schemas/__init__.py +0 -0
  39. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/schemas/query/__init__.py +0 -0
  40. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/schemas/query/order.py +0 -0
  41. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/schemas/query/product.py +0 -0
  42. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/schemas/response/__init__.py +0 -0
  43. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/schemas/response/order.py +0 -0
  44. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/kogan/schemas/response/product.py +0 -0
  45. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/model.py +0 -0
  46. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/py.typed +0 -0
  47. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/utils/__init__.py +0 -0
  48. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/utils/close.py +0 -0
  49. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/utils/dxm.py +0 -0
  50. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/utils/list_util.py +0 -0
  51. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/src/ey_commerce_lib/utils/str.py +0 -0
  52. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/tests/__init__.py +0 -0
  53. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/tests/dxm/__init__.py +0 -0
  54. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/tests/dxm/test_purchase.py +0 -0
  55. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/tests/kogan/__init__.py +0 -0
  56. {ey_commerce_lib-1.0.8 → ey_commerce_lib-1.0.9}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ey-commerce-lib
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: eeyoung电商客户端调用封装
5
5
  Author-email: 饶奇奇 <1124393197@qq.com>
6
6
  Requires-Python: >=3.10
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ey-commerce-lib"
3
- version = "1.0.8"
3
+ version = "1.0.9"
4
4
  description = "eeyoung电商客户端调用封装"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,4 +1,4 @@
1
- from httpx import AsyncClient
1
+ from httpx import AsyncClient, Timeout
2
2
 
3
3
  from ey_commerce_lib.kogan.schemas.query.order import KoganOrderQuery
4
4
  from ey_commerce_lib.kogan.schemas.query.product import KoganProductQuery
@@ -11,13 +11,17 @@ class KoganClient:
11
11
  def __init__(self, seller_id: str, seller_token: str):
12
12
  self.seller_id = seller_id
13
13
  self.seller_token = seller_token
14
+ timeout = Timeout(connect=5.0, read=20.0, write=10.0, pool=10.0)
15
+
14
16
  # 异步客户端
15
17
  self.__async_client = AsyncClient(base_url="https://nimda.kogan.com",
16
18
  headers={
17
19
  'Accept': 'application/json',
18
20
  'SellerId': self.seller_id,
19
21
  'SellerToken': self.seller_token
20
- })
22
+ },
23
+ timeout=timeout
24
+ )
21
25
 
22
26
  async def orders(self, query_params: KoganOrderQuery):
23
27
  # 设置查询参数
@@ -31,6 +35,7 @@ class KoganClient:
31
35
  params=query_params.model_dump(by_alias=True,
32
36
  exclude_none=True
33
37
  ))
38
+
34
39
  return ProductResponse(**products_res.json())
35
40
 
36
41
  async def __aenter__(self):
@@ -7,7 +7,8 @@ from ey_commerce_lib.kogan.schemas.query.product import KoganProductQuery
7
7
  @pytest.mark.asyncio
8
8
  async def test_client():
9
9
  async with KoganClient(
10
- seller_id="xxxxx",
11
- seller_token="xxxxxx"
10
+ seller_id="xxx",
11
+ seller_token="xxxx"
12
12
  ) as client:
13
- await client.products(KoganProductQuery(search="Spider School Bags Kids Superhero Spider-Man Backpack Gift Set (Color:A)"))
13
+ print(await client.products(
14
+ KoganProductQuery(search="Boys Michael Jackson Cosplay Costume Black Suit Set Fancy MJ Outfit (Size:120)")))
File without changes