vtexpy 0.0.0b9__py3-none-any.whl → 0.0.0b11__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.
Potentially problematic release.
This version of vtexpy might be problematic. Click here for more details.
- vtex/__init__.py +6 -6
- vtex/_api/base.py +25 -48
- vtex/_api/catalog.py +29 -21
- vtex/_api/checkout.py +6 -5
- vtex/_api/custom.py +33 -2
- vtex/_api/license_manager.py +5 -4
- vtex/_api/logistics.py +27 -22
- vtex/_api/master_data.py +9 -9
- vtex/_api/orders.py +16 -16
- vtex/_api/payments_gateway.py +30 -25
- vtex/_api/promotions_and_taxes.py +23 -10
- vtex/_api/types/__init__.py +0 -0
- vtex/_api/types/license_manager.py +17 -0
- vtex/_config.py +6 -7
- vtex/_dto.py +58 -65
- vtex/_exceptions.py +1 -3
- vtex/_types.py +2 -18
- vtex/_utils.py +30 -3
- vtex/_vtex.py +54 -35
- {vtexpy-0.0.0b9.dist-info → vtexpy-0.0.0b11.dist-info}/METADATA +22 -4
- vtexpy-0.0.0b11.dist-info/RECORD +28 -0
- vtexpy-0.0.0b9.dist-info/RECORD +0 -26
- {vtexpy-0.0.0b9.dist-info → vtexpy-0.0.0b11.dist-info}/LICENSE +0 -0
- {vtexpy-0.0.0b9.dist-info → vtexpy-0.0.0b11.dist-info}/WHEEL +0 -0
vtex/_vtex.py
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
from functools import cached_property
|
|
2
|
-
from typing import Union
|
|
3
|
-
|
|
4
|
-
from ._api import (
|
|
5
|
-
CatalogAPI,
|
|
6
|
-
CheckoutAPI,
|
|
7
|
-
CustomAPI,
|
|
8
|
-
LicenseManagerAPI,
|
|
9
|
-
LogisticsAPI,
|
|
10
|
-
MasterDataAPI,
|
|
11
|
-
OrdersAPI,
|
|
12
|
-
PaymentsGatewayAPI,
|
|
13
|
-
PromotionsAndTaxesAPI,
|
|
14
|
-
)
|
|
2
|
+
from typing import TYPE_CHECKING, List, Union
|
|
3
|
+
|
|
15
4
|
from ._config import Config # type: ignore[attr-defined]
|
|
16
5
|
from ._logging import CLIENT_LOGGER
|
|
17
6
|
from ._sentinels import UNDEFINED, UndefinedSentinel
|
|
18
|
-
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ._api import (
|
|
10
|
+
CatalogAPI,
|
|
11
|
+
CheckoutAPI,
|
|
12
|
+
CustomAPI,
|
|
13
|
+
LicenseManagerAPI,
|
|
14
|
+
LogisticsAPI,
|
|
15
|
+
MasterDataAPI,
|
|
16
|
+
OrdersAPI,
|
|
17
|
+
PaymentsGatewayAPI,
|
|
18
|
+
PromotionsAndTaxesAPI,
|
|
19
|
+
)
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
class VTEX:
|
|
@@ -34,12 +35,12 @@ class VTEX:
|
|
|
34
35
|
retry_backoff_min: Union[float, UndefinedSentinel] = UNDEFINED,
|
|
35
36
|
retry_backoff_max: Union[float, UndefinedSentinel] = UNDEFINED,
|
|
36
37
|
retry_backoff_exponential: Union[bool, float, UndefinedSentinel] = UNDEFINED,
|
|
37
|
-
retry_statuses: Union[
|
|
38
|
+
retry_statuses: Union[List[int], UndefinedSentinel] = UNDEFINED,
|
|
38
39
|
retry_logs: Union[bool, UndefinedSentinel] = UNDEFINED,
|
|
39
40
|
raise_for_status: Union[bool, UndefinedSentinel] = UNDEFINED,
|
|
40
41
|
) -> None:
|
|
41
|
-
self.
|
|
42
|
-
self.
|
|
42
|
+
self.logger = CLIENT_LOGGER
|
|
43
|
+
self.config = Config(
|
|
43
44
|
account_name=account_name,
|
|
44
45
|
app_key=app_key,
|
|
45
46
|
app_token=app_token,
|
|
@@ -54,37 +55,55 @@ class VTEX:
|
|
|
54
55
|
)
|
|
55
56
|
|
|
56
57
|
@cached_property
|
|
57
|
-
def custom(self) -> CustomAPI:
|
|
58
|
-
|
|
58
|
+
def custom(self) -> "CustomAPI":
|
|
59
|
+
from ._api import CustomAPI
|
|
60
|
+
|
|
61
|
+
return CustomAPI(client=self)
|
|
59
62
|
|
|
60
63
|
@cached_property
|
|
61
|
-
def catalog(self) -> CatalogAPI:
|
|
62
|
-
|
|
64
|
+
def catalog(self) -> "CatalogAPI":
|
|
65
|
+
from ._api import CatalogAPI
|
|
66
|
+
|
|
67
|
+
return CatalogAPI(client=self)
|
|
63
68
|
|
|
64
69
|
@cached_property
|
|
65
|
-
def checkout(self) -> CheckoutAPI:
|
|
66
|
-
|
|
70
|
+
def checkout(self) -> "CheckoutAPI":
|
|
71
|
+
from ._api import CheckoutAPI
|
|
72
|
+
|
|
73
|
+
return CheckoutAPI(client=self)
|
|
67
74
|
|
|
68
75
|
@cached_property
|
|
69
|
-
def license_manager(self) -> LicenseManagerAPI:
|
|
70
|
-
|
|
76
|
+
def license_manager(self) -> "LicenseManagerAPI":
|
|
77
|
+
from ._api import LicenseManagerAPI
|
|
78
|
+
|
|
79
|
+
return LicenseManagerAPI(client=self)
|
|
71
80
|
|
|
72
81
|
@cached_property
|
|
73
|
-
def logistics(self) -> LogisticsAPI:
|
|
74
|
-
|
|
82
|
+
def logistics(self) -> "LogisticsAPI":
|
|
83
|
+
from ._api import LogisticsAPI
|
|
84
|
+
|
|
85
|
+
return LogisticsAPI(client=self)
|
|
75
86
|
|
|
76
87
|
@cached_property
|
|
77
|
-
def master_data(self) -> MasterDataAPI:
|
|
78
|
-
|
|
88
|
+
def master_data(self) -> "MasterDataAPI":
|
|
89
|
+
from ._api import MasterDataAPI
|
|
90
|
+
|
|
91
|
+
return MasterDataAPI(client=self)
|
|
79
92
|
|
|
80
93
|
@cached_property
|
|
81
|
-
def orders(self) -> OrdersAPI:
|
|
82
|
-
|
|
94
|
+
def orders(self) -> "OrdersAPI":
|
|
95
|
+
from ._api import OrdersAPI
|
|
96
|
+
|
|
97
|
+
return OrdersAPI(client=self)
|
|
83
98
|
|
|
84
99
|
@cached_property
|
|
85
|
-
def payments_gateway(self) -> PaymentsGatewayAPI:
|
|
86
|
-
|
|
100
|
+
def payments_gateway(self) -> "PaymentsGatewayAPI":
|
|
101
|
+
from ._api import PaymentsGatewayAPI
|
|
102
|
+
|
|
103
|
+
return PaymentsGatewayAPI(client=self)
|
|
87
104
|
|
|
88
105
|
@cached_property
|
|
89
|
-
def promotions_and_taxes(self) -> PromotionsAndTaxesAPI:
|
|
90
|
-
|
|
106
|
+
def promotions_and_taxes(self) -> "PromotionsAndTaxesAPI":
|
|
107
|
+
from ._api import PromotionsAndTaxesAPI
|
|
108
|
+
|
|
109
|
+
return PromotionsAndTaxesAPI(client=self)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vtexpy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.0b11
|
|
4
4
|
Summary: Unofficial Python SDK for VTEX API
|
|
5
5
|
Home-page: https://github.com/lvieirajr/vtex-python
|
|
6
6
|
License: MIT
|
|
@@ -26,6 +26,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
26
26
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
27
27
|
Classifier: Typing :: Typed
|
|
28
28
|
Requires-Dist: httpx (>=0.26,<1.0)
|
|
29
|
+
Requires-Dist: python-dateutil (>=2.9,<3.0)
|
|
29
30
|
Requires-Dist: tenacity (>=8.3,<10.0)
|
|
30
31
|
Project-URL: Documentation, https://github.com/lvieirajr/vtex-python
|
|
31
32
|
Project-URL: Repository, https://github.com/lvieirajr/vtex-python
|
|
@@ -53,9 +54,10 @@ API.
|
|
|
53
54
|
|
|
54
55
|
#### Requirements
|
|
55
56
|
|
|
56
|
-
- Python >= 3.9, <3.14
|
|
57
|
-
- httpx >= 0.26, <1.0
|
|
58
|
-
-
|
|
57
|
+
- Python >= 3.9, < 3.14
|
|
58
|
+
- httpx >= 0.26, < 1.0
|
|
59
|
+
- python-dateutil >= 2.9, < 3.0
|
|
60
|
+
- tenacity >= 8.3, < 10.0
|
|
59
61
|
|
|
60
62
|
#### Installation
|
|
61
63
|
|
|
@@ -65,13 +67,29 @@ pip install vtexpy
|
|
|
65
67
|
|
|
66
68
|
#### Usage
|
|
67
69
|
|
|
70
|
+
If the API you want to call is not yet implemented, feel free to create an issue on the
|
|
71
|
+
VTEXPY Github repository and request it to be added.
|
|
72
|
+
|
|
68
73
|
```python
|
|
69
74
|
from vtex import VTEX
|
|
70
75
|
|
|
76
|
+
# 1 - Instantiate the VTEX client for the account you want to access:
|
|
71
77
|
vtex_client = VTEX(
|
|
72
78
|
account_name="<ACCOUNT_NAME>",
|
|
73
79
|
app_key="<APP_KEY>",
|
|
74
80
|
app_token="<APP_TOKEN>",
|
|
75
81
|
)
|
|
82
|
+
|
|
83
|
+
# 2 - Call one of the available APIs, e.g.:
|
|
84
|
+
vtex_client.license_manager.get_account()
|
|
85
|
+
vtex_client.catalog.list_sku_ids(page=1, page_size=1000)
|
|
86
|
+
vtex_client.orders.list_orders(page=1, page_size=100)
|
|
87
|
+
|
|
88
|
+
# 3 - If the API you want to call is not yet implemented you can use the `custom` API.
|
|
89
|
+
vtex_client.custom.request(
|
|
90
|
+
method="GET",
|
|
91
|
+
environment="vtexcommercestable",
|
|
92
|
+
endpoint="/api/catalog_system/pvt/commercialcondition/list",
|
|
93
|
+
)
|
|
76
94
|
```
|
|
77
95
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
vtex/__init__.py,sha256=OwOtOH0pFnXplGHndMz7gOM6WE12etFD6orzxLNlkA8,586
|
|
2
|
+
vtex/_api/__init__.py,sha256=V4n0SQrqCcVFWtm8J7jbmwIRI9mCSURwdD_8uHGueAI,353
|
|
3
|
+
vtex/_api/base.py,sha256=rux3pUNhz76B4dm6I1I9ojnuWKp8oR2EhnJ12anxnCU,5564
|
|
4
|
+
vtex/_api/catalog.py,sha256=nqiAZ3W4IXMcXED2x0WwDToTihTHvdnldoahnQc85bw,4290
|
|
5
|
+
vtex/_api/checkout.py,sha256=Q_PxFvWyWNzRJw-YJuHi2NSjRqQfQ-R2NIlYhXl3Dh0,1751
|
|
6
|
+
vtex/_api/custom.py,sha256=py3Zj_mY3JZfhd3LDx1OzXe1WuRbgzeCcvlrlpizYDY,2472
|
|
7
|
+
vtex/_api/license_manager.py,sha256=mYEUSYLkFdaBPEmhyNx2jUbhaHubcOwpqLG0SutoQMo,692
|
|
8
|
+
vtex/_api/logistics.py,sha256=tXg9V2wIBqNJuUUTJEZx4esN9T66ZKVxPb7X_4hPbUU,4618
|
|
9
|
+
vtex/_api/master_data.py,sha256=1q_OKY5Cf2Cfe1lcGI2hOplXZb-VSLFIO3jXReVHMVI,2088
|
|
10
|
+
vtex/_api/orders.py,sha256=2x84ym5aJD7VSHid16ize2hz57JwCC4ri61Qx2HPazY,5134
|
|
11
|
+
vtex/_api/payments_gateway.py,sha256=d6Lr3D7Aj6HXXP2gX8TA961C75JQ1lelTmdb2Sjo5Os,3934
|
|
12
|
+
vtex/_api/promotions_and_taxes.py,sha256=S8Vp0tlZAyJITAXEnxPi8LZMjE4wl_aChDRV1YAqt34,1973
|
|
13
|
+
vtex/_api/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
vtex/_api/types/license_manager.py,sha256=NhKr9pBoVAhp_hK4mAbXsjGM24oglf9ItWbQ7dgosZI,431
|
|
15
|
+
vtex/_config.py,sha256=aK6efpIOamEF76GWfdII7XlKXNNrpmU9jNzTLgq7zpo,16799
|
|
16
|
+
vtex/_constants.py,sha256=BV6BRgbYA6_jcp2t_SBXjXgVgg2-iDdJrYYXsXETU_8,1701
|
|
17
|
+
vtex/_dto.py,sha256=gX_r0685dXRo916A-ZSw9vYfN7XcxFLxkaiIBRbxA6M,6092
|
|
18
|
+
vtex/_exceptions.py,sha256=yglSMmPy4oYWU65oGY1XWA1CbmW1MJO8K-bGYIjoXeg,2127
|
|
19
|
+
vtex/_logging.py,sha256=66tjBs0KvbU3dB14PdSjhdi0C4RT60GEuMPvOe87j7s,1622
|
|
20
|
+
vtex/_sentinels.py,sha256=HLkYBJVHTx9GoyACPO1SuINaGlU2YiqOPuFXUa7iG8A,1120
|
|
21
|
+
vtex/_types.py,sha256=I_vca-7hqRiMXJOXMB40OVTlypXdujduf4LSwW-tGKk,333
|
|
22
|
+
vtex/_utils.py,sha256=OdKGAyGks0sYo8z9ljVVUnWyPZttEluE4hWCrK0hcJA,3483
|
|
23
|
+
vtex/_vtex.py,sha256=kz3SfwSW8rcRVSW_-5MXb8njpqWNknzA8JDYZu9-Vjo,3321
|
|
24
|
+
vtex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
+
vtexpy-0.0.0b11.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
26
|
+
vtexpy-0.0.0b11.dist-info/METADATA,sha256=iN_kTbEHbX7wW_MWLGYLWTIrDY1G5ol_XsQg6A-Io04,2956
|
|
27
|
+
vtexpy-0.0.0b11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
28
|
+
vtexpy-0.0.0b11.dist-info/RECORD,,
|
vtexpy-0.0.0b9.dist-info/RECORD
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
vtex/__init__.py,sha256=MHSWXYxS1emq7iO1iIwmMtrg_rbCROdHO20mra0gdEs,594
|
|
2
|
-
vtex/_api/__init__.py,sha256=V4n0SQrqCcVFWtm8J7jbmwIRI9mCSURwdD_8uHGueAI,353
|
|
3
|
-
vtex/_api/base.py,sha256=lbli3qA7Hd9DdKWllwH08F9kwh_kravwimni7OmzlPU,6262
|
|
4
|
-
vtex/_api/catalog.py,sha256=P3qgJhwWsPiHl__kR_E8sLZmVVfwjJvd9Hli59dJ0gk,3962
|
|
5
|
-
vtex/_api/checkout.py,sha256=TRQElMkrYJNs0nnLsOSnEnBHYX5CRzYWUM_8KUdk3Io,1679
|
|
6
|
-
vtex/_api/custom.py,sha256=p39hg7K6007SIisJeSj61xYVRUul_CsovWPVzJf6Kjw,1461
|
|
7
|
-
vtex/_api/license_manager.py,sha256=8pg1Zh-lyurB1zyO0ynKasR1cvz4AyQ0t3Efb-VLRjo,592
|
|
8
|
-
vtex/_api/logistics.py,sha256=HYpeZp_mTD04fb7CU1xkp4mSTW5qg9quotD7QfJsEnA,4272
|
|
9
|
-
vtex/_api/master_data.py,sha256=3psvAUtTXpdf5nJQX_l_bPbK1WuiHwRS8s4qCOSKO2Q,2061
|
|
10
|
-
vtex/_api/orders.py,sha256=_fr-UAIJNEPGxNIlaDOkTpGwxU5jH9BKlWj1sfu3a7A,4970
|
|
11
|
-
vtex/_api/payments_gateway.py,sha256=eD11czUXiyRMzHdKIWGfuOr-PvhtIkrXMqTUBGSSg2s,3568
|
|
12
|
-
vtex/_api/promotions_and_taxes.py,sha256=-Bs7zwKB26Ky6TaFX9f6z_NZF82Acd6G8s4TGvPe5Pc,1385
|
|
13
|
-
vtex/_config.py,sha256=pOtyvpPF7hFTsdd4jb3oTTuBrkIlpE0cWF4-hqLBmpM,16866
|
|
14
|
-
vtex/_constants.py,sha256=BV6BRgbYA6_jcp2t_SBXjXgVgg2-iDdJrYYXsXETU_8,1701
|
|
15
|
-
vtex/_dto.py,sha256=N4fgcXCq0D4xVmD6ntG5X9vR_Clfl_F4NVLmDFPddjY,6030
|
|
16
|
-
vtex/_exceptions.py,sha256=8aly7jBClpWKdZoC8SqJrCljeucebYDZNZeSS1nfaOg,2162
|
|
17
|
-
vtex/_logging.py,sha256=66tjBs0KvbU3dB14PdSjhdi0C4RT60GEuMPvOe87j7s,1622
|
|
18
|
-
vtex/_sentinels.py,sha256=HLkYBJVHTx9GoyACPO1SuINaGlU2YiqOPuFXUa7iG8A,1120
|
|
19
|
-
vtex/_types.py,sha256=zx5DLAjaxMeYbvC_Wno7-9UwoLc8j-awkoW2SjhVXAU,675
|
|
20
|
-
vtex/_utils.py,sha256=zoknymKx7e5Ih9pOlUtUHkNLT5THFPVaGmxkZ94rMA0,2806
|
|
21
|
-
vtex/_vtex.py,sha256=x7xKWqbNDbJZ2171KG_hwjW2ChcHl2PXluxj-PpjUcA,3151
|
|
22
|
-
vtex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
-
vtexpy-0.0.0b9.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
24
|
-
vtexpy-0.0.0b9.dist-info/METADATA,sha256=R3zgp6-kODw_zGQp4DKC9BgOZTPbcUox4sRW8npxUvs,2226
|
|
25
|
-
vtexpy-0.0.0b9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
26
|
-
vtexpy-0.0.0b9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|