konecty_sdk_python 2.1.5__tar.gz → 2.1.6__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.
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/client.py +34 -17
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/PKG-INFO +1 -1
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/pyproject.toml +1 -1
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/.gitignore +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/__init__.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/cli/__init__.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/cli/apply.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/cli/backup.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/cli/pull.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/__init__.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/exceptions.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/feature_types/__init__.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/feature_types/cross_module_query.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/feature_types/kpi.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/feature_types/query_json.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/file_manager.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/filters.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/http.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/model.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/serialization.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/__init__.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/admin.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/aggregation.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/auth.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/base.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/change_user.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/comments.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/export.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/files.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/notifications.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/pat.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/query.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/stream.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/subscriptions.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/settings.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/types.py +0 -0
- {konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/README.md +0 -0
|
@@ -52,6 +52,25 @@ KONECTY_UPDATE_IGNORE_FIELDS = [
|
|
|
52
52
|
KONECTY_CREATE_IGNORE_FIELDS = ["_updatedAt", "_createdAt", "_updatedBy", "_createdBy"]
|
|
53
53
|
|
|
54
54
|
|
|
55
|
+
def _find_query_params(options: KonectyFindParams, get_total: bool) -> Dict[str, str]:
|
|
56
|
+
"""Query string de /rest/data/{module}/find.
|
|
57
|
+
|
|
58
|
+
`getTotal=false` só vai para a rede quando a contagem é desligada: com o
|
|
59
|
+
padrão a query fica idêntica à de antes. Paridade com `KonectyClient.find` do
|
|
60
|
+
SDK TypeScript, que também só envia o desligamento, sempre no fim da query.
|
|
61
|
+
"""
|
|
62
|
+
params: Dict[str, str] = {}
|
|
63
|
+
for key, value in options.model_dump(exclude_none=True).items():
|
|
64
|
+
params[key] = (
|
|
65
|
+
json.dumps(value, default=json_serial)
|
|
66
|
+
if key != "fields"
|
|
67
|
+
else ",".join(value)
|
|
68
|
+
)
|
|
69
|
+
if get_total is False:
|
|
70
|
+
params["getTotal"] = "false"
|
|
71
|
+
return params
|
|
72
|
+
|
|
73
|
+
|
|
55
74
|
def get_first_dict(items: List[Any]) -> Optional[KonectyDict]:
|
|
56
75
|
"""Retorna o primeiro item de uma lista como dicionário ou None se estiver vazia."""
|
|
57
76
|
if not items:
|
|
@@ -655,14 +674,16 @@ class KonectyClient:
|
|
|
655
674
|
query_id, shared_with, is_public=is_public
|
|
656
675
|
)
|
|
657
676
|
|
|
658
|
-
async def find(
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
677
|
+
async def find(
|
|
678
|
+
self, module: str, options: KonectyFindParams, get_total: bool = True
|
|
679
|
+
) -> List[KonectyDict]:
|
|
680
|
+
"""Busca registros em GET /rest/data/{module}/find.
|
|
681
|
+
|
|
682
|
+
`get_total=False` pede ao servidor para não contar o total (a resposta vem
|
|
683
|
+
sem `total`), o que acelera listagens grandes quando o total não é
|
|
684
|
+
necessário. Com o padrão (`True`) nada é enviado e a URL é a mesma de antes.
|
|
685
|
+
"""
|
|
686
|
+
params = _find_query_params(options, get_total)
|
|
666
687
|
|
|
667
688
|
async with (
|
|
668
689
|
aiohttp.ClientSession() as session,
|
|
@@ -716,15 +737,11 @@ class KonectyClient:
|
|
|
716
737
|
data = result.get("data", [])
|
|
717
738
|
return cast(List[KonectyDict], data)
|
|
718
739
|
|
|
719
|
-
def find_sync(
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
json.dumps(value, default=json_serial)
|
|
725
|
-
if key != "fields"
|
|
726
|
-
else ",".join(value)
|
|
727
|
-
)
|
|
740
|
+
def find_sync(
|
|
741
|
+
self, module: str, options: KonectyFindParams, get_total: bool = True
|
|
742
|
+
) -> List[KonectyDict]:
|
|
743
|
+
"""Versão síncrona de find (mesma semântica de `get_total`)."""
|
|
744
|
+
params = _find_query_params(options, get_total)
|
|
728
745
|
|
|
729
746
|
import requests
|
|
730
747
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/feature_types/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/feature_types/kpi.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/__init__.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/admin.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/aggregation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/change_user.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/comments.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/export.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/files.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/notifications.py
RENAMED
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/query.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/stream.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.1.5 → konecty_sdk_python-2.1.6}/KonectySdkPython/lib/services/subscriptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|