lingxingapi 1.0.2__tar.gz → 1.0.4__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 lingxingapi might be problematic. Click here for more details.

Files changed (72) hide show
  1. {lingxingapi-1.0.2/src/lingxingapi.egg-info → lingxingapi-1.0.4}/PKG-INFO +9 -2
  2. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/README.md +7 -0
  3. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/setup.cfg +2 -2
  4. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/basic/api.py +4 -4
  5. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/basic/schema.py +9 -3
  6. {lingxingapi-1.0.2 → lingxingapi-1.0.4/src/lingxingapi.egg-info}/PKG-INFO +9 -2
  7. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi.egg-info/requires.txt +1 -1
  8. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/LICENSE +0 -0
  9. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/MANIFEST.in +0 -0
  10. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/pyproject.toml +0 -0
  11. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/__init__.py +0 -0
  12. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/ads/__init__.py +0 -0
  13. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/ads/api.py +0 -0
  14. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/ads/param.py +0 -0
  15. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/ads/route.py +0 -0
  16. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/ads/schema.py +0 -0
  17. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/api.py +0 -0
  18. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/base/__init__.py +0 -0
  19. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/base/api.py +0 -0
  20. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/base/param.py +0 -0
  21. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/base/route.py +0 -0
  22. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/base/schema.py +0 -0
  23. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/basic/__init__.py +0 -0
  24. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/basic/param.py +0 -0
  25. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/basic/route.py +0 -0
  26. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/errors.py +0 -0
  27. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/fba/__init__.py +0 -0
  28. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/fba/api.py +0 -0
  29. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/fba/param.py +0 -0
  30. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/fba/route.py +0 -0
  31. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/fba/schema.py +0 -0
  32. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/fields.py +0 -0
  33. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/finance/__init__.py +0 -0
  34. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/finance/api.py +0 -0
  35. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/finance/param.py +0 -0
  36. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/finance/route.py +0 -0
  37. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/finance/schema.py +0 -0
  38. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/product/__init__.py +0 -0
  39. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/product/api.py +0 -0
  40. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/product/param.py +0 -0
  41. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/product/route.py +0 -0
  42. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/product/schema.py +0 -0
  43. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/purchase/__init__.py +0 -0
  44. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/purchase/api.py +0 -0
  45. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/purchase/param.py +0 -0
  46. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/purchase/route.py +0 -0
  47. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/purchase/schema.py +0 -0
  48. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/sales/__init__.py +0 -0
  49. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/sales/api.py +0 -0
  50. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/sales/param.py +0 -0
  51. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/sales/route.py +0 -0
  52. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/sales/schema.py +0 -0
  53. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/source/__init__.py +0 -0
  54. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/source/api.py +0 -0
  55. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/source/param.py +0 -0
  56. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/source/route.py +0 -0
  57. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/source/schema.py +0 -0
  58. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/tools/__init__.py +0 -0
  59. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/tools/api.py +0 -0
  60. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/tools/param.py +0 -0
  61. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/tools/route.py +0 -0
  62. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/tools/schema.py +0 -0
  63. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/utils.py +0 -0
  64. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/warehourse/__init__.py +0 -0
  65. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/warehourse/api.py +0 -0
  66. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/warehourse/param.py +0 -0
  67. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/warehourse/route.py +0 -0
  68. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi/warehourse/schema.py +0 -0
  69. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi.egg-info/SOURCES.txt +0 -0
  70. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi.egg-info/dependency_links.txt +0 -0
  71. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi.egg-info/not-zip-safe +0 -0
  72. {lingxingapi-1.0.2 → lingxingapi-1.0.4}/src/lingxingapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lingxingapi
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: An async API client for LingXing (领星) ERP
5
5
  Home-page: https://github.com/AresJef/LingXingApi
6
6
  Author: Jiefu Chen
@@ -15,7 +15,7 @@ Requires-Python: >=3.10
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: aiohttp>=3.8.4
18
- Requires-Dist: cytimes>=2.0.7
18
+ Requires-Dist: cytimes>=2.1.1
19
19
  Requires-Dist: numpy>=1.25.2
20
20
  Requires-Dist: orjson>=3.10.2
21
21
  Requires-Dist: pycryptodome>=3.23.0
@@ -50,9 +50,16 @@ pip install git+https://github.com/AresJef/LingXingApi.git
50
50
  ```python
51
51
  from lingxingapi import API
52
52
 
53
+ # Context Manager
53
54
  async def test(self, app_id: str, app_secret: str) -> None:
54
55
  async with API(app_id, app_secret) as api:
55
56
  sellers = await api.basic.Sellers()
57
+
58
+ # Close Manually
59
+ async def test(self, app_id: str, app_secret: str) -> None:
60
+ api = API(app_id, app_secret)
61
+ sellers = await api.basic.Sellers()
62
+ await api.close()
56
63
  ```
57
64
 
58
65
  ### Acknowledgements
@@ -25,9 +25,16 @@ pip install git+https://github.com/AresJef/LingXingApi.git
25
25
  ```python
26
26
  from lingxingapi import API
27
27
 
28
+ # Context Manager
28
29
  async def test(self, app_id: str, app_secret: str) -> None:
29
30
  async with API(app_id, app_secret) as api:
30
31
  sellers = await api.basic.Sellers()
32
+
33
+ # Close Manually
34
+ async def test(self, app_id: str, app_secret: str) -> None:
35
+ api = API(app_id, app_secret)
36
+ sellers = await api.basic.Sellers()
37
+ await api.close()
31
38
  ```
32
39
 
33
40
  ### Acknowledgements
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = lingxingapi
3
- version = 1.0.2
3
+ version = 1.0.4
4
4
  author = Jiefu Chen
5
5
  author_email = keppa1991@163.com
6
6
  description = An async API client for LingXing (领星) ERP
@@ -24,7 +24,7 @@ packages = find:
24
24
  python_requires = >=3.10
25
25
  install_requires =
26
26
  aiohttp>=3.8.4
27
- cytimes>=2.0.7
27
+ cytimes>=2.1.1
28
28
  numpy>=1.25.2
29
29
  orjson>=3.10.2
30
30
  pycryptodome>=3.23.0
@@ -48,7 +48,7 @@ class BasicAPI(BaseAPI):
48
48
  # 站点区域
49
49
  "region": "NA",
50
50
  # 站点亚马逊仓库所属区域 [原字段 'aws_region']
51
- "amazon_region": "NA",
51
+ "region_aws": "NA",
52
52
  # 站点国家 (中文)
53
53
  "country": "美国",
54
54
  # 站点国家代码 [原字段 'code']
@@ -309,7 +309,7 @@ class BasicAPI(BaseAPI):
309
309
  "data": [
310
310
  {
311
311
  # 领星账号所从属的ID (如主帐号ID) [原字段 'zid']
312
- "mid": 1,
312
+ "parent_id": 1,
313
313
  # 领星帐号ID [唯一标识] [原字段 'uid']
314
314
  "user_id": 1,
315
315
  # 是否为主账号 (0: 否, 1: 是)
@@ -380,8 +380,8 @@ class BasicAPI(BaseAPI):
380
380
  # 响应数据
381
381
  "data": [
382
382
  {
383
- # 汇率日期 (格式: YYYY-MM)
384
- "date": "2025-01",
383
+ # 汇率日期 (格式: YYYY-MM-DD)
384
+ "date": "2025-01-01",
385
385
  # 货币名称 (中文) [原字段 'name']
386
386
  "currency": "美元",
387
387
  # 货币代码 [原字段 'code']
@@ -14,7 +14,7 @@ class Marketplace(BaseModel):
14
14
  # 站点区域
15
15
  region: str
16
16
  # 站点亚马逊仓库所属区域 [原字段 'aws_region']
17
- amazon_region: str = Field(validation_alias="aws_region")
17
+ region_aws: str = Field(validation_alias="aws_region")
18
18
  # 站点国家 (中文)
19
19
  country: str
20
20
  # 站点国家代码 [原字段 'code']
@@ -151,7 +151,7 @@ class Account(BaseModel):
151
151
  """领星账号."""
152
152
 
153
153
  # 领星账号所从属的ID (如主帐号ID) [原字段 'zid']
154
- mid: int = Field(validation_alias="zid")
154
+ parent_id: int = Field(validation_alias="zid")
155
155
  # 领星帐号ID [唯一标识] [原字段 'uid']
156
156
  user_id: int = Field(validation_alias="uid")
157
157
  # 是否为主账号 (0: 否, 1: 是)
@@ -190,7 +190,7 @@ class Accounts(ResponseV1):
190
190
  class ExchangeRate(BaseModel):
191
191
  """货币汇率."""
192
192
 
193
- # 汇率日期 (格式: YYYY-MM)
193
+ # 汇率日期 (格式: YYYY-MM-DD)
194
194
  date: str
195
195
  # 货币名称 (中文) [原字段 'name']
196
196
  currency: str = Field(validation_alias="name")
@@ -205,6 +205,12 @@ class ExchangeRate(BaseModel):
205
205
  # 用户汇率修改时间 (北京时间)
206
206
  update_time: str
207
207
 
208
+ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
209
+ @field_validator("date", mode="after")
210
+ @classmethod
211
+ def _validate_date(cls, v: str) -> str:
212
+ return v + "-01"
213
+
208
214
 
209
215
  class ExchangeRates(ResponseV1):
210
216
  """货币汇率查询结果."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lingxingapi
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: An async API client for LingXing (领星) ERP
5
5
  Home-page: https://github.com/AresJef/LingXingApi
6
6
  Author: Jiefu Chen
@@ -15,7 +15,7 @@ Requires-Python: >=3.10
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: aiohttp>=3.8.4
18
- Requires-Dist: cytimes>=2.0.7
18
+ Requires-Dist: cytimes>=2.1.1
19
19
  Requires-Dist: numpy>=1.25.2
20
20
  Requires-Dist: orjson>=3.10.2
21
21
  Requires-Dist: pycryptodome>=3.23.0
@@ -50,9 +50,16 @@ pip install git+https://github.com/AresJef/LingXingApi.git
50
50
  ```python
51
51
  from lingxingapi import API
52
52
 
53
+ # Context Manager
53
54
  async def test(self, app_id: str, app_secret: str) -> None:
54
55
  async with API(app_id, app_secret) as api:
55
56
  sellers = await api.basic.Sellers()
57
+
58
+ # Close Manually
59
+ async def test(self, app_id: str, app_secret: str) -> None:
60
+ api = API(app_id, app_secret)
61
+ sellers = await api.basic.Sellers()
62
+ await api.close()
56
63
  ```
57
64
 
58
65
  ### Acknowledgements
@@ -1,5 +1,5 @@
1
1
  aiohttp>=3.8.4
2
- cytimes>=2.0.7
2
+ cytimes>=2.1.1
3
3
  numpy>=1.25.2
4
4
  orjson>=3.10.2
5
5
  pycryptodome>=3.23.0
File without changes
File without changes
File without changes