konecty-sdk-python 2.0.4__tar.gz → 2.0.5__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.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/client.py +29 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/PKG-INFO +1 -1
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/pyproject.toml +1 -1
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/.gitignore +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/__init__.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/cli/__init__.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/cli/apply.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/cli/backup.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/cli/pull.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/__init__.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/exceptions.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/feature_types/__init__.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/feature_types/cross_module_query.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/feature_types/kpi.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/feature_types/query_json.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/file_manager.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/filters.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/http.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/model.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/serialization.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/__init__.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/aggregation.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/base.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/change_user.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/comments.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/export.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/files.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/notifications.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/query.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/stream.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/subscriptions.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/settings.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/types.py +0 -0
- {konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/README.md +0 -0
|
@@ -463,6 +463,35 @@ class KonectyClient:
|
|
|
463
463
|
raise KonectyAPIError(errors)
|
|
464
464
|
data = result.get("data", [])
|
|
465
465
|
return cast(List[KonectyDict], data)
|
|
466
|
+
|
|
467
|
+
async def lookup(self, module: str, lookup_field: str, options: KonectyFindParams, search: str = "") -> List[KonectyDict]:
|
|
468
|
+
params: Dict[str, str] = {}
|
|
469
|
+
for key, value in options.model_dump(exclude_none=True).items():
|
|
470
|
+
params[key] = (
|
|
471
|
+
json.dumps(value, default=json_serial)
|
|
472
|
+
if key != "fields"
|
|
473
|
+
else ",".join(value)
|
|
474
|
+
)
|
|
475
|
+
if search:
|
|
476
|
+
params["search"] = search
|
|
477
|
+
|
|
478
|
+
print(f"params: {params}")
|
|
479
|
+
async with (
|
|
480
|
+
aiohttp.ClientSession() as session,
|
|
481
|
+
session.get(
|
|
482
|
+
f"{self.base_url}/rest/data/{module}/lookup/{lookup_field}",
|
|
483
|
+
params=params,
|
|
484
|
+
headers={"Authorization": self.headers["Authorization"]},
|
|
485
|
+
) as response,
|
|
486
|
+
):
|
|
487
|
+
response.raise_for_status()
|
|
488
|
+
result = await response.json()
|
|
489
|
+
if not result.get("success", False):
|
|
490
|
+
errors = result.get("errors", [])
|
|
491
|
+
logger.error(errors)
|
|
492
|
+
raise KonectyAPIError(errors)
|
|
493
|
+
data = result.get("data", [])
|
|
494
|
+
return cast(List[KonectyDict], data)
|
|
466
495
|
|
|
467
496
|
def find_sync(self, module: str, options: KonectyFindParams) -> List[KonectyDict]:
|
|
468
497
|
"""Versão síncrona de find."""
|
|
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.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/feature_types/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/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.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/__init__.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/aggregation.py
RENAMED
|
File without changes
|
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/change_user.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/comments.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/export.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/files.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/notifications.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/query.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/stream.py
RENAMED
|
File without changes
|
{konecty_sdk_python-2.0.4 → konecty_sdk_python-2.0.5}/KonectySdkPython/lib/services/subscriptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|