tgshops-integrations 3.4__py3-none-any.whl → 3.6__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tgshops_integrations/nocodb_connector/categories_management.py +2 -2
- tgshops_integrations/nocodb_connector/model_mapping.py +4 -2
- tgshops_integrations/nocodb_connector/products_management.py +2 -1
- {tgshops_integrations-3.4.dist-info → tgshops_integrations-3.6.dist-info}/METADATA +4 -1
- {tgshops_integrations-3.4.dist-info → tgshops_integrations-3.6.dist-info}/RECORD +7 -7
- {tgshops_integrations-3.4.dist-info → tgshops_integrations-3.6.dist-info}/WHEEL +0 -0
- {tgshops_integrations-3.4.dist-info → tgshops_integrations-3.6.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
from typing import List
|
2
2
|
from loguru import logger
|
3
3
|
from aiocache import cached
|
4
|
-
from models.categories import CategoryModel, CategoryResponseModel, CategoryListResponseModel
|
5
|
-
from models.products import ProductModel
|
4
|
+
from tgshops_integrations.models.categories import CategoryModel, CategoryResponseModel, CategoryListResponseModel
|
5
|
+
from tgshops_integrations.models.products import ProductModel
|
6
6
|
from tgshops_integrations.nocodb_connector.client import custom_key_builder, NocodbClient
|
7
7
|
from tgshops_integrations.nocodb_connector.model_mapping import (
|
8
8
|
CATEGORY_IMAGE_FIELD,
|
@@ -33,7 +33,7 @@ def initialize_model_mapping(config_path: str):
|
|
33
33
|
global PRODUCT_IMAGE_FIELD, PRODUCT_DISCOUNT_PRICE_FIELD, PRODUCT_CATEGORY_ID_LOOKUP_FIELD, PRODUCT_IMAGES_LOOKUP_FIELD
|
34
34
|
global PRODUCT_REQUIRED_OPTIONS_FIELD, PRODUCT_CATEGORIES_EXTRA_OPTIONS_FIELD, PRODUCT_CATEGORIES_EXTRA_OPTION_NAMES_FIELD
|
35
35
|
global PRODUCT_EXTRA_CHOICE_REQUIRED_FIELD, PRODUCT_ID_FIELD, PRODUCT_EXTERNAL_ID, PRODUCT_CHECKOUT_MODE
|
36
|
-
global NEW_ID_FIELD, NOCODB_CHECKOUT_MODES
|
36
|
+
global NEW_ID_FIELD, NOCODB_CHECKOUT_MODES,PRODUCT_CATEGORY_STRUCTURE
|
37
37
|
|
38
38
|
config = load_config(config_path)
|
39
39
|
|
@@ -50,6 +50,7 @@ def initialize_model_mapping(config_path: str):
|
|
50
50
|
PRODUCT_CURRENCY_FIELD = config.PRODUCT_CURRENCY_FIELD
|
51
51
|
PRODUCT_STOCK_FIELD = config.PRODUCT_STOCK_FIELD
|
52
52
|
PRODUCT_CATEGORY_NAME_FIELD = config.PRODUCT_CATEGORY_NAME_FIELD
|
53
|
+
PRODUCT_CATEGORY_STRUCTURE=config.PRODUCT_CATEGORY_STRUCTURE
|
53
54
|
PRODUCT_CATEGORY_ID_FIELD = config.PRODUCT_CATEGORY_ID_FIELD
|
54
55
|
PRODUCT_IMAGE_FIELD = config.PRODUCT_IMAGE_FIELD
|
55
56
|
PRODUCT_DISCOUNT_PRICE_FIELD = config.PRODUCT_DISCOUNT_PRICE_FIELD
|
@@ -187,7 +188,8 @@ async def parse_product_data(data: dict) -> ProductModel:
|
|
187
188
|
currency=data.get(PRODUCT_CURRENCY_FIELD, "RUB"),
|
188
189
|
stock_qty=data.get(PRODUCT_STOCK_FIELD, 0),
|
189
190
|
preview_url=preview_url,
|
190
|
-
|
191
|
+
product_properties=data.get(PRODUCT_CATEGORY_NAME_FIELD, []),
|
192
|
+
categories_structure=data.get(PRODUCT_CATEGORY_STRUCTURE, {}),
|
191
193
|
category=data.get(PRODUCT_CATEGORY_ID_LOOKUP_FIELD, []),
|
192
194
|
extra_attributes=extra_attributes,
|
193
195
|
extra_option_choice_required=bool(data.get(PRODUCT_EXTRA_CHOICE_REQUIRED_FIELD, [])),
|
@@ -2,7 +2,7 @@ from typing import List, Optional
|
|
2
2
|
import hashlib
|
3
3
|
from aiocache import cached
|
4
4
|
from loguru import logger
|
5
|
-
from models.products import ProductModel
|
5
|
+
from tgshops_integrations.models.products import ProductModel
|
6
6
|
from tgshops_integrations.nocodb_connector.client import custom_key_builder, NocodbClient
|
7
7
|
from tgshops_integrations.nocodb_connector.model_mapping import (
|
8
8
|
dump_product_data,
|
@@ -18,6 +18,7 @@ from tgshops_integrations.nocodb_connector.model_mapping import (
|
|
18
18
|
PRODUCT_IMAGES_LOOKUP_FIELD,
|
19
19
|
)
|
20
20
|
|
21
|
+
|
21
22
|
class ProductManager(NocodbClient):
|
22
23
|
def __init__(self, table_id=None, logging=False, NOCODB_HOST=None, NOCODB_API_KEY=None, SOURCE=None):
|
23
24
|
super().__init__(NOCODB_HOST=NOCODB_HOST, NOCODB_API_KEY=NOCODB_API_KEY, SOURCE=SOURCE)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tgshops-integrations
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.6
|
4
4
|
Summary: Library is intended to provide the integration of the external service or CRM system with the TelegramShops/It allows to configure the relationship between NocoDB list of the products used further to display in the shop/As a resultss the products can be synchronized and updated uppon the request.
|
5
5
|
Home-page: https://git.the-devs.com/virtual-shops/shop-system/shop-backend-integrations/integration-library/integration-library
|
6
6
|
Author: Dimi Latoff
|
@@ -74,6 +74,9 @@ async def main():
|
|
74
74
|
|
75
75
|
asyncio.run(main())
|
76
76
|
|
77
|
+
# python3 setup.py sdist bdist_wheel
|
78
|
+
# twine upload dist/* --verbose
|
79
|
+
|
77
80
|
|
78
81
|
|
79
82
|
|
@@ -5,12 +5,12 @@ tgshops_integrations/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
5
5
|
tgshops_integrations/models/categories.py,sha256=EG6C8g5dOfXB2MH-vtqH13aqB7_VyOobY2FHpDb-fsY,977
|
6
6
|
tgshops_integrations/models/products.py,sha256=4XC6fyC91TAWj5oaX0A26kT_UizZIGaf4qyrVv9lPpQ,1403
|
7
7
|
tgshops_integrations/nocodb_connector/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
tgshops_integrations/nocodb_connector/categories_management.py,sha256=
|
8
|
+
tgshops_integrations/nocodb_connector/categories_management.py,sha256=udUKf56yitvguI92HsB2nmAS-o6uSrZVFbuU-ep4l4o,6645
|
9
9
|
tgshops_integrations/nocodb_connector/client.py,sha256=U2rNozjluWVul-VZroQW-8b2j6nEtKrhOkFMz1L8KmI,12022
|
10
|
-
tgshops_integrations/nocodb_connector/model_mapping.py,sha256=
|
11
|
-
tgshops_integrations/nocodb_connector/products_management.py,sha256=
|
10
|
+
tgshops_integrations/nocodb_connector/model_mapping.py,sha256=UY6QHCba8o8J28duCgAzx95agGlE1pLagkNdZLV5nro,8719
|
11
|
+
tgshops_integrations/nocodb_connector/products_management.py,sha256=uo0b3azbO7is4PUXuQJ1Ode7T9IVnUaAFk9gXcVOZHI,6068
|
12
12
|
tgshops_integrations/nocodb_connector/tables.py,sha256=ha_QXZXd93mht0fR5E1nM0wUpz1ePon-pIdO2HI67l8,356
|
13
|
-
tgshops_integrations-3.
|
14
|
-
tgshops_integrations-3.
|
15
|
-
tgshops_integrations-3.
|
16
|
-
tgshops_integrations-3.
|
13
|
+
tgshops_integrations-3.6.dist-info/METADATA,sha256=DyY-wrNZTR3HbPn5avszEnsFthOe4INkyjvlUMMfP6s,2844
|
14
|
+
tgshops_integrations-3.6.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
15
|
+
tgshops_integrations-3.6.dist-info/top_level.txt,sha256=HFNtxqDpzmlF4ZLnMiwhbU7pOa_YozxU2zBl0bnUmcY,21
|
16
|
+
tgshops_integrations-3.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|