tgshops-integrations 3.5__tar.gz → 3.7__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/PKG-INFO +4 -1
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/README.md +3 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/setup.py +5 -2
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/middlewares/gateway.py +4 -4
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/nocodb_connector/categories_management.py +13 -12
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/nocodb_connector/model_mapping.py +2 -2
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/nocodb_connector/products_management.py +3 -3
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations.egg-info/PKG-INFO +4 -1
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/setup.cfg +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/__init__.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/middlewares/__init__.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/models/__init__.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/models/categories.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/models/products.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/nocodb_connector/__init__.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/nocodb_connector/client.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/nocodb_connector/tables.py +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations.egg-info/SOURCES.txt +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations.egg-info/dependency_links.txt +0 -0
- {tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tgshops_integrations
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.7
|
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
|
|
@@ -2,7 +2,7 @@ from setuptools import setup,find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='tgshops_integrations',
|
5
|
-
version='3.
|
5
|
+
version='3.7',
|
6
6
|
packages=find_packages(),
|
7
7
|
install_requires=[
|
8
8
|
# List your library's dependencies here
|
@@ -24,4 +24,7 @@ setup(
|
|
24
24
|
'Operating System :: OS Independent',
|
25
25
|
],
|
26
26
|
python_requires='>=3.10',
|
27
|
-
)
|
27
|
+
)
|
28
|
+
|
29
|
+
# python3 setup.py sdist bdist_wheel
|
30
|
+
# twine upload dist/* --verbose
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/middlewares/gateway.py
RENAMED
@@ -9,8 +9,8 @@ from models.products import ProductModel
|
|
9
9
|
import sys
|
10
10
|
sys.path.append('/home/latoff/Desktop/MarketBots')
|
11
11
|
|
12
|
-
from nocodb_connector.client import NocodbClient
|
13
|
-
from nocodb_connector.model_mapping import (
|
12
|
+
from tgshops_integrations.nocodb_connector.client import NocodbClient
|
13
|
+
from tgshops_integrations.nocodb_connector.model_mapping import (
|
14
14
|
dump_product_data,
|
15
15
|
dump_product_data_with_check,
|
16
16
|
get_pagination_info,
|
@@ -23,8 +23,8 @@ from nocodb_connector.model_mapping import (
|
|
23
23
|
PRODUCT_IMAGES_LOOKUP_FIELD,
|
24
24
|
PRODUCT_EXTERNAL_ID,
|
25
25
|
)
|
26
|
-
from nocodb_connector.categories_management import CategoryManager
|
27
|
-
from nocodb_connector.products_management import ProductManager
|
26
|
+
from tgshops_integrations.nocodb_connector.categories_management import CategoryManager
|
27
|
+
from tgshops_integrations.nocodb_connector.products_management import ProductManager
|
28
28
|
from loguru import logger
|
29
29
|
|
30
30
|
|
@@ -1,10 +1,10 @@
|
|
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
|
6
|
-
from nocodb_connector.client import custom_key_builder, NocodbClient
|
7
|
-
from nocodb_connector.model_mapping import (
|
4
|
+
from tgshops_integrations.models.categories import CategoryModel, CategoryResponseModel, CategoryListResponseModel
|
5
|
+
from tgshops_integrations.models.products import ProductModel
|
6
|
+
from tgshops_integrations.nocodb_connector.client import custom_key_builder, NocodbClient
|
7
|
+
from tgshops_integrations.nocodb_connector.model_mapping import (
|
8
8
|
CATEGORY_IMAGE_FIELD,
|
9
9
|
CATEGORY_NAME_FIELD,
|
10
10
|
CATEGORY_PARENT_FIELD,
|
@@ -89,13 +89,15 @@ class CategoryManager(NocodbClient):
|
|
89
89
|
properties_to_create = []
|
90
90
|
|
91
91
|
for product in external_products:
|
92
|
-
for num, product_property in enumerate(product.product_properties):
|
92
|
+
for num, product_property in enumerate(product.product_properties[:len(self.filter_buttons)]):
|
93
93
|
if product_property not in categories_list:
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
94
|
+
# TODO: Needs restructuring
|
95
|
+
# parent_id = (
|
96
|
+
# self.categories[self.filter_buttons[num]]
|
97
|
+
# if self.filter_buttons
|
98
|
+
# else self.categories[product.category_I_name[0]]
|
99
|
+
# )
|
100
|
+
parent_id=0
|
99
101
|
properties_to_create.append([product_property, parent_id])
|
100
102
|
categories_list.append(product_property)
|
101
103
|
|
@@ -124,8 +126,7 @@ class CategoryManager(NocodbClient):
|
|
124
126
|
linked_column["fk_model_id"],
|
125
127
|
child_id,
|
126
128
|
linked_column["id"],
|
127
|
-
parent_id
|
128
|
-
)
|
129
|
+
parent_id)
|
129
130
|
|
130
131
|
async def unlink_categories(self, parent_id: int, child_id: int):
|
131
132
|
metadata = await self.get_table_meta(self.categories_table)
|
@@ -3,8 +3,8 @@ import secrets
|
|
3
3
|
import importlib.util
|
4
4
|
from pathlib import Path
|
5
5
|
|
6
|
-
from models.categories import CategoryModel, CategoryResponseModel, PaginationResponseModel
|
7
|
-
from models.products import ExtraAttribute, ProductModel
|
6
|
+
from tgshops_integrations.models.categories import CategoryModel, CategoryResponseModel, PaginationResponseModel
|
7
|
+
from tgshops_integrations.models.products import ExtraAttribute, ProductModel
|
8
8
|
|
9
9
|
|
10
10
|
# Helper function to load `config.py` dynamically
|
@@ -2,9 +2,9 @@ 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
|
6
|
-
from nocodb_connector.client import custom_key_builder, NocodbClient
|
7
|
-
from nocodb_connector.model_mapping import (
|
5
|
+
from tgshops_integrations.models.products import ProductModel
|
6
|
+
from tgshops_integrations.nocodb_connector.client import custom_key_builder, NocodbClient
|
7
|
+
from tgshops_integrations.nocodb_connector.model_mapping import (
|
8
8
|
dump_product_data,
|
9
9
|
dump_product_data_with_check,
|
10
10
|
get_pagination_info,
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tgshops-integrations
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.7
|
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
|
|
File without changes
|
File without changes
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/middlewares/__init__.py
RENAMED
File without changes
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/models/__init__.py
RENAMED
File without changes
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/models/categories.py
RENAMED
File without changes
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations/models/products.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{tgshops_integrations-3.5 → tgshops_integrations-3.7}/tgshops_integrations.egg-info/top_level.txt
RENAMED
File without changes
|