dc-python-sdk 1.5.27__tar.gz → 1.5.28__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.
- {dc_python_sdk-1.5.27/src/dc_python_sdk.egg-info → dc_python_sdk-1.5.28}/PKG-INFO +1 -1
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/pyproject.toml +1 -1
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/setup.cfg +1 -1
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28/src/dc_python_sdk.egg-info}/PKG-INFO +1 -1
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/ai_http.py +38 -6
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/LICENSE +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/README.md +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_python_sdk.egg-info/SOURCES.txt +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_python_sdk.egg-info/dependency_links.txt +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_python_sdk.egg-info/entry_points.txt +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_python_sdk.egg-info/requires.txt +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_python_sdk.egg-info/top_level.txt +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/__init__.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/app.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/cli.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/errors.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/handler.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/__init__.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/ai.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/mapping.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/models/__init__.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/models/enums.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/models/errors.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/models/log_templates.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/models/pipeline_details.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/pipeline.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/server.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/services/__init__.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/services/api.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/services/aws.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/services/environment.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/services/loader.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/services/logger.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/src/services/session.py +0 -0
- {dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_sdk/types.py +0 -0
|
@@ -17,6 +17,44 @@ app = FastAPI()
|
|
|
17
17
|
|
|
18
18
|
_DEFAULT_PROCESS_TTL_SECONDS = 600.0
|
|
19
19
|
|
|
20
|
+
METHOD_CONTEXT = {
|
|
21
|
+
"authenticate": "Authenticate using self.credentials. Return True when authentication is successful, otherwise raise a meaningful error.",
|
|
22
|
+
"get_objects": "Return a list of object dictionaries with keys: object_id, object_name, object_label, and optional object_group/visible.",
|
|
23
|
+
"get_fields": "Return a list of field dictionaries for an object_id with keys: field_id, field_name, field_label, and optional metadata like data_type/size.",
|
|
24
|
+
"get_data": "Return paginated data in shape {'next_page': <token_or_none>, 'data': [row_dict, ...]}. Respect object_id, field_ids, n_rows, filters, next_page.",
|
|
25
|
+
"load_data": "Load mapped destination rows into object_id using mapping m and update_method. Return True on success or raise a specific load/write error.",
|
|
26
|
+
"close": "Close open sessions/connections safely. Should not fail when resources were never initialized.",
|
|
27
|
+
"FOLLOWUP": "Refine output quality based on user follow-up feedback after a method succeeds.",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
REQUIRED_METHODS = [
|
|
31
|
+
"authenticate",
|
|
32
|
+
"get_objects",
|
|
33
|
+
"get_fields",
|
|
34
|
+
"get_data",
|
|
35
|
+
"load_data",
|
|
36
|
+
"close",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
METHOD_SHAPE_REFERENCE = """
|
|
41
|
+
Reference behavior patterns (from production connectors like PostgreSQL):
|
|
42
|
+
- authenticate(self) -> bool
|
|
43
|
+
- validates credentials and initializes client/connection state.
|
|
44
|
+
- get_objects(self) -> list[dict]
|
|
45
|
+
- each object has: object_id, object_name, object_label, optional object_group.
|
|
46
|
+
- if we need to hardcode the objects, we should not do it here. Instead return an empty list with a comment that says objects pulled from API.
|
|
47
|
+
- get_fields(self, object_id, options=dict()) -> list[dict]
|
|
48
|
+
- each field has: field_id, field_name, field_label, optional data_type/size.
|
|
49
|
+
- get_data(self, object_id, field_ids, n_rows=None, filters=None, next_page=None, options=dict()) -> dict
|
|
50
|
+
- returns {"next_page": token_or_none, "data": [row_dict, ...]}.
|
|
51
|
+
- load_data(self, data, object_id, m, update_method, batch_number: int, total_batches: int) -> bool
|
|
52
|
+
- maps/transforms rows and writes data to destination object.
|
|
53
|
+
- close(self) -> None
|
|
54
|
+
- gracefully closes resources (session/connection/tunnel/etc).
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
|
|
20
58
|
# Default ports: connector HTTP (dc-sdk http) 5000, AI FastAPI 5001, code-server 5002.
|
|
21
59
|
CONNECTOR_PORT = os.getenv("CONNECTOR_PORT", 5000)
|
|
22
60
|
AI_PORT = os.getenv("AI_PORT", 5001)
|
|
@@ -325,12 +363,6 @@ def _build_full_fix_prompt(
|
|
|
325
363
|
stage: Optional[str],
|
|
326
364
|
connector_context: ConnectorContext,
|
|
327
365
|
) -> str:
|
|
328
|
-
from dc_sdk.src.ai import (
|
|
329
|
-
METHOD_CONTEXT,
|
|
330
|
-
METHOD_SHAPE_REFERENCE,
|
|
331
|
-
REQUIRED_METHODS,
|
|
332
|
-
)
|
|
333
|
-
|
|
334
366
|
extra_block = ""
|
|
335
367
|
if connector_context.notes:
|
|
336
368
|
extra_block = f"\nAdditional connector details:\n{connector_context.notes}\n"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dc_python_sdk-1.5.27 → dc_python_sdk-1.5.28}/src/dc_python_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|