kailash 0.9.15__py3-none-any.whl → 0.9.16__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 (30) hide show
  1. kailash/middleware/database/base_models.py +7 -1
  2. kailash/migration/__init__.py +30 -0
  3. kailash/migration/cli.py +340 -0
  4. kailash/migration/compatibility_checker.py +662 -0
  5. kailash/migration/configuration_validator.py +837 -0
  6. kailash/migration/documentation_generator.py +1828 -0
  7. kailash/migration/examples/__init__.py +5 -0
  8. kailash/migration/examples/complete_migration_example.py +692 -0
  9. kailash/migration/migration_assistant.py +715 -0
  10. kailash/migration/performance_comparator.py +760 -0
  11. kailash/migration/regression_detector.py +1141 -0
  12. kailash/migration/tests/__init__.py +6 -0
  13. kailash/migration/tests/test_compatibility_checker.py +403 -0
  14. kailash/migration/tests/test_integration.py +463 -0
  15. kailash/migration/tests/test_migration_assistant.py +397 -0
  16. kailash/migration/tests/test_performance_comparator.py +433 -0
  17. kailash/nodes/data/async_sql.py +1507 -6
  18. kailash/runtime/local.py +1255 -8
  19. kailash/runtime/monitoring/__init__.py +1 -0
  20. kailash/runtime/monitoring/runtime_monitor.py +780 -0
  21. kailash/runtime/resource_manager.py +3033 -0
  22. kailash/sdk_exceptions.py +21 -0
  23. kailash/workflow/cyclic_runner.py +18 -2
  24. {kailash-0.9.15.dist-info → kailash-0.9.16.dist-info}/METADATA +1 -1
  25. {kailash-0.9.15.dist-info → kailash-0.9.16.dist-info}/RECORD +30 -12
  26. {kailash-0.9.15.dist-info → kailash-0.9.16.dist-info}/WHEEL +0 -0
  27. {kailash-0.9.15.dist-info → kailash-0.9.16.dist-info}/entry_points.txt +0 -0
  28. {kailash-0.9.15.dist-info → kailash-0.9.16.dist-info}/licenses/LICENSE +0 -0
  29. {kailash-0.9.15.dist-info → kailash-0.9.16.dist-info}/licenses/NOTICE +0 -0
  30. {kailash-0.9.15.dist-info → kailash-0.9.16.dist-info}/top_level.txt +0 -0
kailash/sdk_exceptions.py CHANGED
@@ -196,6 +196,27 @@ class RuntimeExecutionError(RuntimeException):
196
196
  """
197
197
 
198
198
 
199
+ class ResourceLimitExceededError(RuntimeException):
200
+ """Raised when runtime resource limits are exceeded.
201
+
202
+ This typically occurs when:
203
+ - Connection pool limits are exceeded
204
+ - Memory usage exceeds configured limits
205
+ - CPU usage exceeds thresholds
206
+ - Too many concurrent workflows
207
+ """
208
+
209
+
210
+ class CircuitBreakerOpenError(RuntimeException):
211
+ """Raised when circuit breaker is open.
212
+
213
+ This typically occurs when:
214
+ - Service has exceeded failure threshold
215
+ - Circuit breaker is protecting against cascading failures
216
+ - Service is temporarily unavailable
217
+ """
218
+
219
+
199
220
  # Task tracking exceptions
200
221
  class TaskException(KailashException):
201
222
  """Base exception for task tracking errors."""
@@ -130,6 +130,7 @@ class WorkflowState:
130
130
  self.node_outputs: dict[str, Any] = {}
131
131
  self.execution_order: list[str] = []
132
132
  self.metadata: dict[str, Any] = {}
133
+ self.runtime = None # Will be set by executor for enterprise features
133
134
 
134
135
 
135
136
  class CyclicWorkflowExecutor:
@@ -151,6 +152,7 @@ class CyclicWorkflowExecutor:
151
152
  parameters: dict[str, Any] | None = None,
152
153
  task_manager: TaskManager | None = None,
153
154
  run_id: str | None = None,
155
+ runtime=None,
154
156
  ) -> tuple[dict[str, Any], str]:
155
157
  """Execute workflow with cycle support.
156
158
 
@@ -159,6 +161,7 @@ class CyclicWorkflowExecutor:
159
161
  parameters: Initial parameters/overrides
160
162
  task_manager: Optional task manager for tracking execution
161
163
  run_id: Optional run ID to use (if not provided, one will be generated)
164
+ runtime: Optional runtime instance for enterprise features (LocalRuntime)
162
165
 
163
166
  Returns:
164
167
  Tuple of (results dict, run_id)
@@ -189,7 +192,7 @@ class CyclicWorkflowExecutor:
189
192
  # Execute with cycle support
190
193
  try:
191
194
  results = self._execute_with_cycles(
192
- workflow, parameters, run_id, task_manager
195
+ workflow, parameters, run_id, task_manager, runtime
193
196
  )
194
197
  logger.info(f"Cyclic workflow execution completed: {workflow.name}")
195
198
  return results, run_id
@@ -280,6 +283,7 @@ class CyclicWorkflowExecutor:
280
283
  parameters: dict[str, Any] | None,
281
284
  run_id: str,
282
285
  task_manager: TaskManager | None = None,
286
+ runtime=None,
283
287
  ) -> dict[str, Any]:
284
288
  """Execute workflow with cycle handling.
285
289
 
@@ -304,6 +308,8 @@ class CyclicWorkflowExecutor:
304
308
 
305
309
  # Store initial parameters separately (don't treat them as outputs!)
306
310
  state.initial_parameters = parameters or {}
311
+ # Store runtime for enterprise features
312
+ state.runtime = runtime
307
313
 
308
314
  # Execute the plan
309
315
  results = self._execute_plan(workflow, execution_plan, state, task_manager)
@@ -1284,7 +1290,17 @@ class CyclicWorkflowExecutor:
1284
1290
 
1285
1291
  try:
1286
1292
  with collector.collect(node_id=node_id) as metrics_context:
1287
- result = node.execute(context=context, **merged_inputs)
1293
+ # Use enterprise node execution if runtime is available
1294
+ if state.runtime and hasattr(
1295
+ state.runtime, "execute_node_with_enterprise_features_sync"
1296
+ ):
1297
+ # Use sync enterprise wrapper for automatic feature integration
1298
+ result = state.runtime.execute_node_with_enterprise_features_sync(
1299
+ node, node_id, dict(context=context, **merged_inputs)
1300
+ )
1301
+ else:
1302
+ # Standard node execution (backward compatibility)
1303
+ result = node.execute(context=context, **merged_inputs)
1288
1304
 
1289
1305
  # Get performance metrics
1290
1306
  performance_metrics = metrics_context.result()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kailash
3
- Version: 0.9.15
3
+ Version: 0.9.16
4
4
  Summary: Python SDK for the Kailash container-node architecture
5
5
  Home-page: https://github.com/integrum/kailash-python-sdk
6
6
  Author: Integrum
@@ -3,7 +3,7 @@ kailash/__main__.py,sha256=vr7TVE5o16V6LsTmRFKG6RDKUXHpIWYdZ6Dok2HkHnI,198
3
3
  kailash/access_control.py,sha256=MjKtkoQ2sg1Mgfe7ovGxVwhAbpJKvaepPWr8dxOueMA,26058
4
4
  kailash/access_control_abac.py,sha256=FPfa_8PuDP3AxTjdWfiH3ntwWO8NodA0py9W8SE5dno,30263
5
5
  kailash/manifest.py,sha256=qzOmeMGWz20Sp4IJitSH9gTVbGng7hlimc96VTW4KI8,24814
6
- kailash/sdk_exceptions.py,sha256=dueSUxUYqKXmHS5mwl6QtEzP6a0rMGXcBFGCh5sT0tg,10179
6
+ kailash/sdk_exceptions.py,sha256=MeFNmFzDzs5g9PveymivIBp1vN6PI7eenGv-Dj62Gog,10774
7
7
  kailash/security.py,sha256=GBU93tUXcTZGEjl0f9XXRlF3W-sSulhiatMZzv1dNqc,27228
8
8
  kailash/access_control/__init__.py,sha256=ykR_zGJXQoCU_4gGNFbYzhVdUemxeAAoDQLhKIPVBGE,4018
9
9
  kailash/access_control/managers.py,sha256=Vg2inaZqR2GBXsySvPZcEqQtFHgF94z7A_wUHMtA3qA,14431
@@ -120,7 +120,7 @@ kailash/middleware/core/schema.py,sha256=uVF-5ZJlLYHOQdsKrG46FnTO1bq_QtDjhUSkIID
120
120
  kailash/middleware/core/workflows.py,sha256=kjwwP69-T6eCY7kWIMLUBwVy2CapoPR34cqCETquq0s,12480
121
121
  kailash/middleware/database/__init__.py,sha256=UMws94L-vja94AjfzPWIgn0h4_5BGQzI3YaSdqtzeLk,1682
122
122
  kailash/middleware/database/base.py,sha256=cWEei9Gb6J-C-bpa4M4T0takfWE3POXWumzYhqX3V4g,2735
123
- kailash/middleware/database/base_models.py,sha256=t4HfXKGHZkfLkzoRgXXvlO_wdgsqXhm7S0XP4OIdQXc,18262
123
+ kailash/middleware/database/base_models.py,sha256=XBcHEUmcpl2f6zZHCAgHQ_0jqUB3Gl82XARR83lW5GY,18287
124
124
  kailash/middleware/database/enums.py,sha256=Yo_wMS7OpsleWtNMESTc2LTf15d93nPnBADIn2EHjeQ,2516
125
125
  kailash/middleware/database/migrations.py,sha256=v5VZxsqciwmOl3rzIBQLp5p6-OP8OG_EL3mu65_yrCM,240
126
126
  kailash/middleware/database/models.py,sha256=CJwwUEdgxqBteXqpFJr1tWskjypJxViZXjODZlByrFk,17784
@@ -136,6 +136,21 @@ kailash/middleware/gateway/storage_backends.py,sha256=HJTi6zU6oBI3R3ffcm_U-Xp9qq
136
136
  kailash/middleware/mcp/__init__.py,sha256=EdZB8zOMSBEEmudRzs8ksz9QZJYWQMEx7Tm1MOwIWnI,922
137
137
  kailash/middleware/mcp/client_integration.py,sha256=dY1RmX-g5E6JzUFuWxk7viuOYIh8bMwoUSvHQMVEsYk,18265
138
138
  kailash/middleware/mcp/enhanced_server.py,sha256=RUVS7jWHn0ma4F3F23UvuFwUdu7OkSsIRNQmGtkG9I8,18547
139
+ kailash/migration/__init__.py,sha256=WFFeTikHkG1Y9s93vjYyeRJnPLNoDNoVPcOZxw-PSy0,1186
140
+ kailash/migration/cli.py,sha256=yheFAFhqUv5efTxX4kbUzsiYWBJq9bM92KSkgIoK3X4,12186
141
+ kailash/migration/compatibility_checker.py,sha256=-B9KxVXe0THq6GRbhXtAUVGh_xJEB6UPZLPskTOv9Oo,27352
142
+ kailash/migration/configuration_validator.py,sha256=s2TIG30Q_21LDQFcpcV-UH6ygeEyOjLMeFoQXVjN9VI,35494
143
+ kailash/migration/documentation_generator.py,sha256=dxR-lA3we2h-ozmfGnX3Q47eiU2ZRlv-A1g1Rr4Q67s,75289
144
+ kailash/migration/migration_assistant.py,sha256=GEixPyL_ctkxATXhA6QtcjP4in7X6GmMVy0nLP0j2iw,26014
145
+ kailash/migration/performance_comparator.py,sha256=zUv1VjSwjaRKiDx3QMrr6cG5zdHAKFyE64C_NQRKNCE,27967
146
+ kailash/migration/regression_detector.py,sha256=UxKfJcBqkXYFYyogQn_LBM6g_9mr_6e8ukHVMHgRECs,41837
147
+ kailash/migration/examples/__init__.py,sha256=JjomEr2XAiUW1Ffx7ZDgBlb2-H6gG_G5rvTtKU16l0E,206
148
+ kailash/migration/examples/complete_migration_example.py,sha256=gLlVrQ8lJUIOI_ThRODECNmeM1guE0bSjz6CggrBfWw,24875
149
+ kailash/migration/tests/__init__.py,sha256=CfeE7D6D8YEnvPYnoGxShrhExQ1GV-lKRDBjy78JLeI,292
150
+ kailash/migration/tests/test_compatibility_checker.py,sha256=Gx_lTedk1K-1sIhGDapiLrvLk1z-2hrmFN8Mst00rdg,14097
151
+ kailash/migration/tests/test_integration.py,sha256=-3j3LZdoaZ5HUcwY99wVM30FrE473rHjSH3i_tu3xNY,17202
152
+ kailash/migration/tests/test_migration_assistant.py,sha256=H0td6dL3Xkw8ivImFcQP_Cuh0WeqDRpbEKJFzuQ1LEc,14615
153
+ kailash/migration/tests/test_performance_comparator.py,sha256=cQgX4DHfqXYGmcKrl77qtlMBRYDs7xjaFxTih0M3XdE,15257
139
154
  kailash/monitoring/__init__.py,sha256=C5WmkNpk_mmAScqMWiCfkUbjhM5W16dsnRnc3Ial-Uc,475
140
155
  kailash/monitoring/alerts.py,sha256=Hk3Xs0EEkOIBH2ZhlejJBOsLYaPlvRejAAEGqNQISc0,21400
141
156
  kailash/monitoring/metrics.py,sha256=SiAnL3o6K0QaJHgfAuWBa-0pTkW5zymhuPEsj4bgOgM,22022
@@ -204,7 +219,7 @@ kailash/nodes/compliance/data_retention.py,sha256=90bH_eGwlcDzUdklAJeXQM-RcuLUGQ
204
219
  kailash/nodes/compliance/gdpr.py,sha256=ZMoHZjAo4QtGwtFCzGMrAUBFV3TbZOnJ5DZGZS87Bas,70548
205
220
  kailash/nodes/data/__init__.py,sha256=f0h4ysvXxlyFcNJLvDyXrgJ0ixwDF1cS0pJ2QNPakhg,5213
206
221
  kailash/nodes/data/async_connection.py,sha256=wfArHs9svU48bxGZIiixSV2YVn9cukNgEjagwTRu6J4,17250
207
- kailash/nodes/data/async_sql.py,sha256=lVNbYaKnanK4Ejm6VZSPSUuPqBItlP7rAQ3Zvp-KeYg,114285
222
+ kailash/nodes/data/async_sql.py,sha256=YWxRJEliOpA33vVkdZeFSOFBX5UGPUKUeULEYdH3AWQ,172747
208
223
  kailash/nodes/data/async_vector.py,sha256=HtwQLO25IXu8Vq80qzU8rMkUAKPQ2qM0x8YxjXHlygU,21005
209
224
  kailash/nodes/data/bulk_operations.py,sha256=WVopmosVkIlweFxVt3boLdCPc93EqpYyQ1Ez9mCIt0c,34453
210
225
  kailash/nodes/data/directory.py,sha256=fbfLqD_ijRubk-4xew3604QntPsyDxqaF4k6TpfyjDg,9923
@@ -325,15 +340,18 @@ kailash/runtime/async_local.py,sha256=sYNggSU0R-oo8cCvU5ayodDBqASzUhxu994ZvZxDSC
325
340
  kailash/runtime/compatibility_reporter.py,sha256=TOQD0ODnJdsxEPyNSYOV_zQxu60X_yvHeu26seFOMEA,19807
326
341
  kailash/runtime/docker.py,sha256=sZknVl1PCGfAZeyc0-exTuKlllSyjYlFIgJoiB3CRNs,23500
327
342
  kailash/runtime/hierarchical_switch_executor.py,sha256=k6aPGbpf6z2m6dTbHrEyuDR8ZCvOqUanBGYp70arQn0,20782
328
- kailash/runtime/local.py,sha256=xDJ7Z9UwqR432rRRUzkOyHJr1ejPE751VB-oW-BuBGE,147155
343
+ kailash/runtime/local.py,sha256=6c2RtT3YisYPnBAOho6lbd4fYyMiJG8EyUBOGmcei_U,201159
329
344
  kailash/runtime/parallel.py,sha256=-M9VVG36RxnrrmdbcBe9IjQWb58tAEEo76RQQ2uIXaE,21084
330
345
  kailash/runtime/parallel_cyclic.py,sha256=yANZHnePjhCPuCFbq3lFQA1K6jbCv5Of5-vIKbCsmZk,19863
331
346
  kailash/runtime/parameter_injection.py,sha256=kG4GhmarsRr5t3VDFbc2G1HSbsZJg6UmienHCE2Ru7o,14852
332
347
  kailash/runtime/parameter_injector.py,sha256=4l-OOKEBzM_cQ17Zz5o24QSV9a1Zqfu3D2qyq6Uy7hE,30810
333
348
  kailash/runtime/performance_monitor.py,sha256=8K9dApYQJSQ2Vb6lUQxvGzBdvPqyTlDl_aixniSuXqU,7585
349
+ kailash/runtime/resource_manager.py,sha256=mBXWDLbVscRGv4CFa7J0uC6zJ_H64g-y-ePh9_V_Nr0,110390
334
350
  kailash/runtime/runner.py,sha256=t_SEumtVn9uXlSzJicb50MpUu6xdqjW0uZ5b2phjVPY,3318
335
351
  kailash/runtime/secret_provider.py,sha256=wKhasHnm_Ialo7Q4KGMcmI2qVyrKLuS22ypEnVv4NcU,8757
336
352
  kailash/runtime/testing.py,sha256=hTrgGnqxwSBYoztVqnZpxzFwm0DwUnaJdChRHikgoio,19089
353
+ kailash/runtime/monitoring/__init__.py,sha256=9how7RsobJ2FCcMK2c_zutU6vd8NEjQXAtFzKZiyEG0,37
354
+ kailash/runtime/monitoring/runtime_monitor.py,sha256=68uIHI15kra_qiq3rfuoMttpEMknOab9apyUmt0b1Sg,25793
337
355
  kailash/runtime/validation/__init__.py,sha256=tvSnBo59Ku0b6mDwi4MWU162-jDHm9O2rQD1MKXuEZU,432
338
356
  kailash/runtime/validation/connection_context.py,sha256=NAvcyew8e6F0x_sORwszZ-SR3nn7y0Yzskv3X_3AjbU,3286
339
357
  kailash/runtime/validation/enhanced_error_formatter.py,sha256=tFmKbJ9pTXQd28oM9bu01sfVVmT3QIDQK1nkQjMqHfk,7642
@@ -390,7 +408,7 @@ kailash/workflow/cycle_debugger.py,sha256=eG-Q_kakqyhr1Ts-q4pRnO0EI7mVO9ao1s9WOx
390
408
  kailash/workflow/cycle_exceptions.py,sha256=4_OLnbEXqIiXKzOc3uh8DzFik4wEHwl8bRZhY9Xhf2A,21838
391
409
  kailash/workflow/cycle_profiler.py,sha256=aEWSCm0Xy15SjgLTpPooVJMzpFhtJWt4livR-3Me4N8,28547
392
410
  kailash/workflow/cycle_state.py,sha256=hzRUvciRreWfS56Cf7ZLQPit_mlPTQDoNTawh8yi-2s,10747
393
- kailash/workflow/cyclic_runner.py,sha256=-pj-bIiSJuVX9cGdNNMNKgPzx9HqIR1r1Xwneab_0RE,70363
411
+ kailash/workflow/cyclic_runner.py,sha256=Zo2Rakp-N5pPSarndYPdkkpWgY9yHpYrrpUh-znoCKQ,71246
394
412
  kailash/workflow/edge_infrastructure.py,sha256=lQDzs0-KdoCMqI4KAXAGbhHbwadM6t-ffJEWLlRuSNo,12448
395
413
  kailash/workflow/graph.py,sha256=zRpGLXeuwtuxFBvE7_16c_bB9yqZirM_uwtfD1_MY4g,59272
396
414
  kailash/workflow/input_handling.py,sha256=HrW--AmelYC8F18nkfmYlF_wXycA24RuNbDRjvM8rqk,6561
@@ -405,10 +423,10 @@ kailash/workflow/templates.py,sha256=XQMAKZXC2dlxgMMQhSEOWAF3hIbe9JJt9j_THchhAm8
405
423
  kailash/workflow/type_inference.py,sha256=i1F7Yd_Z3elTXrthsLpqGbOnQBIVVVEjhRpI0HrIjd0,24492
406
424
  kailash/workflow/validation.py,sha256=LdbIPQSokCqSLfWTBhJR82pa_0va44pcVu9dpEM4rvY,45177
407
425
  kailash/workflow/visualization.py,sha256=nHBW-Ai8QBMZtn2Nf3EE1_aiMGi9S6Ui_BfpA5KbJPU,23187
408
- kailash-0.9.15.dist-info/licenses/LICENSE,sha256=9GYZHXVUmx6FdFRNzOeE_w7a_aEGeYbqTVmFtJlrbGk,13438
409
- kailash-0.9.15.dist-info/licenses/NOTICE,sha256=9ssIK4LcHSTFqriXGdteMpBPTS1rSLlYtjppZ_bsjZ0,723
410
- kailash-0.9.15.dist-info/METADATA,sha256=xXck9LkEnFmoRYJW_c5EPsOOWwkH6uI8d5biAA2Nf3w,23528
411
- kailash-0.9.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
412
- kailash-0.9.15.dist-info/entry_points.txt,sha256=M_q3b8PG5W4XbhSgESzIJjh3_4OBKtZFYFsOdkr2vO4,45
413
- kailash-0.9.15.dist-info/top_level.txt,sha256=z7GzH2mxl66498pVf5HKwo5wwfPtt9Aq95uZUpH6JV0,8
414
- kailash-0.9.15.dist-info/RECORD,,
426
+ kailash-0.9.16.dist-info/licenses/LICENSE,sha256=9GYZHXVUmx6FdFRNzOeE_w7a_aEGeYbqTVmFtJlrbGk,13438
427
+ kailash-0.9.16.dist-info/licenses/NOTICE,sha256=9ssIK4LcHSTFqriXGdteMpBPTS1rSLlYtjppZ_bsjZ0,723
428
+ kailash-0.9.16.dist-info/METADATA,sha256=wT0i6zQQiwMQWpN6CP4czfXTTpwESneUQPLI75sV4SA,23528
429
+ kailash-0.9.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
430
+ kailash-0.9.16.dist-info/entry_points.txt,sha256=M_q3b8PG5W4XbhSgESzIJjh3_4OBKtZFYFsOdkr2vO4,45
431
+ kailash-0.9.16.dist-info/top_level.txt,sha256=z7GzH2mxl66498pVf5HKwo5wwfPtt9Aq95uZUpH6JV0,8
432
+ kailash-0.9.16.dist-info/RECORD,,