atlan-application-sdk-api 3.51.0__py3-none-any.whl

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.
Files changed (78) hide show
  1. application_sdk/__init__.py +7 -0
  2. application_sdk/_build_info.py +62 -0
  3. application_sdk/_context_errors.py +65 -0
  4. application_sdk/_install.py +130 -0
  5. application_sdk/_logging.py +171 -0
  6. application_sdk/_runtime/__init__.py +29 -0
  7. application_sdk/_runtime/offload.py +1020 -0
  8. application_sdk/_runtime/progress.py +757 -0
  9. application_sdk/clients/__init__.py +63 -0
  10. application_sdk/clients/_interface.py +58 -0
  11. application_sdk/clients/_sql_failure_classifier.py +112 -0
  12. application_sdk/clients/base.py +565 -0
  13. application_sdk/clients/http_errors.py +28 -0
  14. application_sdk/clients/models.py +49 -0
  15. application_sdk/clients/sql.py +1218 -0
  16. application_sdk/clients/sql_errors.py +192 -0
  17. application_sdk/clients/sql_typecasters.py +431 -0
  18. application_sdk/clients/ssl_utils.py +247 -0
  19. application_sdk/common/__init__.py +53 -0
  20. application_sdk/common/_generated_tree.py +321 -0
  21. application_sdk/common/_listing.py +192 -0
  22. application_sdk/common/aws_utils.py +522 -0
  23. application_sdk/common/aws_utils_errors.py +88 -0
  24. application_sdk/common/build_identity.py +120 -0
  25. application_sdk/common/concurrency.py +45 -0
  26. application_sdk/common/errors.py +99 -0
  27. application_sdk/common/filter_matching.py +261 -0
  28. application_sdk/common/logger.py +11 -0
  29. application_sdk/common/models.py +31 -0
  30. application_sdk/common/sql_filters.py +719 -0
  31. application_sdk/common/sql_filters_errors.py +17 -0
  32. application_sdk/common/task_queue.py +431 -0
  33. application_sdk/common/types.py +51 -0
  34. application_sdk/common/utils.py +87 -0
  35. application_sdk/constants.py +1120 -0
  36. application_sdk/contracts/__init__.py +158 -0
  37. application_sdk/contracts/base.py +1178 -0
  38. application_sdk/contracts/events.py +251 -0
  39. application_sdk/contracts/types.py +801 -0
  40. application_sdk/contracts/types_errors.py +17 -0
  41. application_sdk/credentials/__init__.py +326 -0
  42. application_sdk/credentials/errors.py +226 -0
  43. application_sdk/credentials/extra.py +114 -0
  44. application_sdk/credentials/ingress.py +283 -0
  45. application_sdk/credentials/ref.py +376 -0
  46. application_sdk/credentials/spec.py +182 -0
  47. application_sdk/credentials/types.py +339 -0
  48. application_sdk/credentials/utils.py +257 -0
  49. application_sdk/errors/__init__.py +224 -0
  50. application_sdk/errors/base.py +504 -0
  51. application_sdk/errors/categories.py +118 -0
  52. application_sdk/errors/http.py +81 -0
  53. application_sdk/errors/leaves.py +526 -0
  54. application_sdk/errors/wire.py +124 -0
  55. application_sdk/handler/__init__.py +97 -0
  56. application_sdk/handler/_warmup.py +198 -0
  57. application_sdk/handler/asgi.py +252 -0
  58. application_sdk/handler/base.py +281 -0
  59. application_sdk/handler/context.py +212 -0
  60. application_sdk/handler/contracts.py +1166 -0
  61. application_sdk/handler/manifest.py +81 -0
  62. application_sdk/handler/metadata_routes.py +699 -0
  63. application_sdk/handler/object_routes.py +418 -0
  64. application_sdk/handler/request_contract.py +91 -0
  65. application_sdk/handler/routes.py +1118 -0
  66. application_sdk/handler/service_errors.py +37 -0
  67. application_sdk/server/__init__.py +15 -0
  68. application_sdk/server/fastapi/models.py +338 -0
  69. application_sdk/templates/__init__.py +52 -0
  70. application_sdk/templates/contracts/__init__.py +111 -0
  71. application_sdk/templates/contracts/base_metadata_extraction.py +32 -0
  72. application_sdk/templates/contracts/incremental_sql.py +563 -0
  73. application_sdk/templates/contracts/sql_metadata.py +824 -0
  74. application_sdk/templates/contracts/sql_query.py +105 -0
  75. application_sdk/version.py +40 -0
  76. atlan_application_sdk_api-3.51.0.dist-info/METADATA +230 -0
  77. atlan_application_sdk_api-3.51.0.dist-info/RECORD +78 -0
  78. atlan_application_sdk_api-3.51.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,81 @@
1
+ """Typed manifest contracts for Automation Engine DAG execution.
2
+
3
+ HTTP API zone: these types are Pydantic models. They cross an external HTTP
4
+ boundary (GET /workflows/v1/manifest consumed by Heracles / Automation Engine)
5
+ so they need schema validation on ingress and clean JSON serialization on
6
+ egress. Do NOT use plain dataclasses here — use BaseModel so that
7
+ ``model_validate`` / ``model_validate_json`` replace hand-rolled parsing and
8
+ ``model_dump_json()`` eliminates the intermediate dict step.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from typing import Any
14
+
15
+ from pydantic import BaseModel, ConfigDict
16
+
17
+
18
+ class DagNodeDependency(BaseModel):
19
+ """Declares that a node may only run after the given node completes."""
20
+
21
+ model_config = ConfigDict(frozen=True)
22
+
23
+ node_id: str
24
+
25
+
26
+ class ExecuteWorkflowInputs(BaseModel):
27
+ """Inputs for the execute_workflow activity.
28
+
29
+ ``args`` values can be:
30
+
31
+ - Template placeholders: ``{{workflow-id}}``, ``{{connection}}`` —
32
+ substituted by Heracles from workflow config / frontend form values.
33
+ - JSONPath references: ``$.extract.outputs.foo`` — resolved by AE at
34
+ runtime against upstream node's run() return.
35
+ - Literals: booleans, strings, numbers.
36
+
37
+ ``args`` intentionally typed ``dict[str, Any]``: it is a passthrough
38
+ contract with an external orchestrator, so the value space is open by
39
+ design — this is not a missing type annotation.
40
+ """
41
+
42
+ model_config = ConfigDict(frozen=True)
43
+
44
+ workflow_type: str
45
+ task_queue: str
46
+ args: dict[str, Any] = {}
47
+
48
+
49
+ class DagNode(BaseModel):
50
+ """A single node in the Automation Engine execution DAG."""
51
+
52
+ model_config = ConfigDict(frozen=True)
53
+
54
+ activity_name: str
55
+ activity_display_name: str
56
+ app_name: str
57
+ inputs: ExecuteWorkflowInputs
58
+ depends_on: DagNodeDependency | None = None
59
+
60
+
61
+ class AppManifest(BaseModel):
62
+ """Manifest describing an app's execution DAG for Automation Engine.
63
+
64
+ Returned by GET /workflows/v1/manifest. Tells Heracles how to
65
+ orchestrate the app's workflows as a DAG via Automation Engine.
66
+
67
+ Parse from a dict or raw JSON string::
68
+
69
+ manifest = AppManifest.model_validate(data)
70
+ manifest = AppManifest.model_validate_json(raw_bytes)
71
+
72
+ Serialize to JSON bytes for the HTTP response::
73
+
74
+ return Response(content=manifest.model_dump_json(), media_type="application/json")
75
+ """
76
+
77
+ model_config = ConfigDict(frozen=True)
78
+
79
+ execution_mode: str
80
+ dag: dict[str, DagNode]
81
+ init_endpoint: str | None = None