airia 0.1.15__tar.gz → 0.1.16__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.
Files changed (71) hide show
  1. {airia-0.1.15 → airia-0.1.16}/PKG-INFO +1 -1
  2. airia-0.1.16/airia/client/pipelines_config/async_pipelines_config.py +125 -0
  3. {airia-0.1.15 → airia-0.1.16}/airia/client/pipelines_config/base_pipelines_config.py +34 -0
  4. airia-0.1.16/airia/client/pipelines_config/sync_pipelines_config.py +125 -0
  5. airia-0.1.16/airia/types/api/pipelines_config/__init__.py +87 -0
  6. airia-0.1.16/airia/types/api/pipelines_config/export_pipeline_definition.py +940 -0
  7. {airia-0.1.15 → airia-0.1.16}/airia.egg-info/PKG-INFO +1 -1
  8. {airia-0.1.15 → airia-0.1.16}/airia.egg-info/SOURCES.txt +1 -0
  9. {airia-0.1.15 → airia-0.1.16}/pyproject.toml +1 -1
  10. airia-0.1.15/airia/client/pipelines_config/async_pipelines_config.py +0 -65
  11. airia-0.1.15/airia/client/pipelines_config/sync_pipelines_config.py +0 -65
  12. airia-0.1.15/airia/types/api/pipelines_config/__init__.py +0 -35
  13. {airia-0.1.15 → airia-0.1.16}/LICENSE +0 -0
  14. {airia-0.1.15 → airia-0.1.16}/README.md +0 -0
  15. {airia-0.1.15 → airia-0.1.16}/airia/__init__.py +0 -0
  16. {airia-0.1.15 → airia-0.1.16}/airia/client/__init__.py +0 -0
  17. {airia-0.1.15 → airia-0.1.16}/airia/client/_request_handler/__init__.py +0 -0
  18. {airia-0.1.15 → airia-0.1.16}/airia/client/_request_handler/async_request_handler.py +0 -0
  19. {airia-0.1.15 → airia-0.1.16}/airia/client/_request_handler/base_request_handler.py +0 -0
  20. {airia-0.1.15 → airia-0.1.16}/airia/client/_request_handler/sync_request_handler.py +0 -0
  21. {airia-0.1.15 → airia-0.1.16}/airia/client/async_client.py +0 -0
  22. {airia-0.1.15 → airia-0.1.16}/airia/client/base_client.py +0 -0
  23. {airia-0.1.15 → airia-0.1.16}/airia/client/conversations/__init__.py +0 -0
  24. {airia-0.1.15 → airia-0.1.16}/airia/client/conversations/async_conversations.py +0 -0
  25. {airia-0.1.15 → airia-0.1.16}/airia/client/conversations/base_conversations.py +0 -0
  26. {airia-0.1.15 → airia-0.1.16}/airia/client/conversations/sync_conversations.py +0 -0
  27. {airia-0.1.15 → airia-0.1.16}/airia/client/deployments/__init__.py +0 -0
  28. {airia-0.1.15 → airia-0.1.16}/airia/client/deployments/async_deployments.py +0 -0
  29. {airia-0.1.15 → airia-0.1.16}/airia/client/deployments/base_deployments.py +0 -0
  30. {airia-0.1.15 → airia-0.1.16}/airia/client/deployments/sync_deployments.py +0 -0
  31. {airia-0.1.15 → airia-0.1.16}/airia/client/pipeline_execution/__init__.py +0 -0
  32. {airia-0.1.15 → airia-0.1.16}/airia/client/pipeline_execution/async_pipeline_execution.py +0 -0
  33. {airia-0.1.15 → airia-0.1.16}/airia/client/pipeline_execution/base_pipeline_execution.py +0 -0
  34. {airia-0.1.15 → airia-0.1.16}/airia/client/pipeline_execution/sync_pipeline_execution.py +0 -0
  35. {airia-0.1.15 → airia-0.1.16}/airia/client/pipelines_config/__init__.py +0 -0
  36. {airia-0.1.15 → airia-0.1.16}/airia/client/project/__init__.py +0 -0
  37. {airia-0.1.15 → airia-0.1.16}/airia/client/project/async_project.py +0 -0
  38. {airia-0.1.15 → airia-0.1.16}/airia/client/project/base_project.py +0 -0
  39. {airia-0.1.15 → airia-0.1.16}/airia/client/project/sync_project.py +0 -0
  40. {airia-0.1.15 → airia-0.1.16}/airia/client/store/__init__.py +0 -0
  41. {airia-0.1.15 → airia-0.1.16}/airia/client/store/async_store.py +0 -0
  42. {airia-0.1.15 → airia-0.1.16}/airia/client/store/base_store.py +0 -0
  43. {airia-0.1.15 → airia-0.1.16}/airia/client/store/sync_store.py +0 -0
  44. {airia-0.1.15 → airia-0.1.16}/airia/client/sync_client.py +0 -0
  45. {airia-0.1.15 → airia-0.1.16}/airia/constants.py +0 -0
  46. {airia-0.1.15 → airia-0.1.16}/airia/exceptions.py +0 -0
  47. {airia-0.1.15 → airia-0.1.16}/airia/logs.py +0 -0
  48. {airia-0.1.15 → airia-0.1.16}/airia/types/__init__.py +0 -0
  49. {airia-0.1.15 → airia-0.1.16}/airia/types/_api_version.py +0 -0
  50. {airia-0.1.15 → airia-0.1.16}/airia/types/_request_data.py +0 -0
  51. {airia-0.1.15 → airia-0.1.16}/airia/types/api/__init__.py +0 -0
  52. {airia-0.1.15 → airia-0.1.16}/airia/types/api/conversations/__init__.py +0 -0
  53. {airia-0.1.15 → airia-0.1.16}/airia/types/api/conversations/_conversations.py +0 -0
  54. {airia-0.1.15 → airia-0.1.16}/airia/types/api/deployments/__init__.py +0 -0
  55. {airia-0.1.15 → airia-0.1.16}/airia/types/api/deployments/get_deployment.py +0 -0
  56. {airia-0.1.15 → airia-0.1.16}/airia/types/api/deployments/get_deployments.py +0 -0
  57. {airia-0.1.15 → airia-0.1.16}/airia/types/api/pipeline_execution/__init__.py +0 -0
  58. {airia-0.1.15 → airia-0.1.16}/airia/types/api/pipeline_execution/_pipeline_execution.py +0 -0
  59. {airia-0.1.15 → airia-0.1.16}/airia/types/api/pipelines_config/get_pipeline_config.py +0 -0
  60. {airia-0.1.15 → airia-0.1.16}/airia/types/api/project/__init__.py +0 -0
  61. {airia-0.1.15 → airia-0.1.16}/airia/types/api/project/get_projects.py +0 -0
  62. {airia-0.1.15 → airia-0.1.16}/airia/types/api/store/__init__.py +0 -0
  63. {airia-0.1.15 → airia-0.1.16}/airia/types/api/store/get_file.py +0 -0
  64. {airia-0.1.15 → airia-0.1.16}/airia/types/api/store/get_files.py +0 -0
  65. {airia-0.1.15 → airia-0.1.16}/airia/types/sse/__init__.py +0 -0
  66. {airia-0.1.15 → airia-0.1.16}/airia/types/sse/sse_messages.py +0 -0
  67. {airia-0.1.15 → airia-0.1.16}/airia/utils/sse_parser.py +0 -0
  68. {airia-0.1.15 → airia-0.1.16}/airia.egg-info/dependency_links.txt +0 -0
  69. {airia-0.1.15 → airia-0.1.16}/airia.egg-info/requires.txt +0 -0
  70. {airia-0.1.15 → airia-0.1.16}/airia.egg-info/top_level.txt +0 -0
  71. {airia-0.1.15 → airia-0.1.16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airia
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Summary: Python SDK for Airia API
5
5
  Author-email: Airia LLC <support@airia.com>
6
6
  License: MIT
@@ -0,0 +1,125 @@
1
+ from typing import Optional
2
+
3
+ from ...types._api_version import ApiVersion
4
+ from ...types.api.pipelines_config import (
5
+ PipelineConfigResponse,
6
+ ExportPipelineDefinitionResponse,
7
+ )
8
+ from .._request_handler import AsyncRequestHandler
9
+ from .base_pipelines_config import BasePipelinesConfig
10
+
11
+
12
+ class AsyncPipelinesConfig(BasePipelinesConfig):
13
+ def __init__(self, request_handler: AsyncRequestHandler):
14
+ super().__init__(request_handler)
15
+
16
+ async def get_pipeline_config(
17
+ self, pipeline_id: str, correlation_id: Optional[str] = None
18
+ ) -> PipelineConfigResponse:
19
+ """
20
+ Retrieve configuration details for a specific pipeline.
21
+
22
+ This method fetches comprehensive information about a pipeline including its
23
+ deployment details, execution statistics, version information, and metadata.
24
+
25
+ Args:
26
+ pipeline_id (str): The unique identifier of the pipeline to retrieve
27
+ configuration for.
28
+ correlation_id (str, optional): A unique identifier for request tracing
29
+ and logging. If not provided, one will be automatically generated.
30
+
31
+ Returns:
32
+ PipelineConfigResponse: A response object containing the pipeline
33
+ configuration.
34
+
35
+ Raises:
36
+ AiriaAPIError: If the API request fails, including cases where:
37
+ - The pipeline_id doesn't exist (404)
38
+ - Authentication fails (401)
39
+ - Access is forbidden (403)
40
+ - Server errors (5xx)
41
+
42
+ Example:
43
+ ```python
44
+ from airia import AiriaAsyncClient
45
+
46
+ client = AiriaAsyncClient(api_key="your_api_key")
47
+
48
+ # Get pipeline configuration
49
+ config = await client.pipelines_config.get_pipeline_config(
50
+ pipeline_id="your_pipeline_id"
51
+ )
52
+
53
+ print(f"Pipeline: {config.agent.name}")
54
+ print(f"Description: {config.agent.agent_description}")
55
+ ```
56
+
57
+ Note:
58
+ This method only retrieves configuration information and does not
59
+ execute the pipeline. Use execute_pipeline() to run the pipeline.
60
+ """
61
+ request_data = self._pre_get_pipeline_config(
62
+ pipeline_id=pipeline_id,
63
+ correlation_id=correlation_id,
64
+ api_version=ApiVersion.V1.value,
65
+ )
66
+ resp = await self._request_handler.make_request("GET", request_data)
67
+
68
+ return PipelineConfigResponse(**resp)
69
+
70
+ async def export_pipeline_definition(
71
+ self, pipeline_id: str, correlation_id: Optional[str] = None
72
+ ) -> ExportPipelineDefinitionResponse:
73
+ """
74
+ Export the complete definition of a pipeline including all its components.
75
+
76
+ This method retrieves a comprehensive export of a pipeline definition including
77
+ metadata, agent configuration, data sources, prompts, tools, models, memories,
78
+ Python code blocks, routers, and deployment information.
79
+
80
+ Args:
81
+ pipeline_id (str): The unique identifier of the pipeline to export
82
+ definition for.
83
+ correlation_id (str, optional): A unique identifier for request tracing
84
+ and logging. If not provided, one will be automatically generated.
85
+
86
+ Returns:
87
+ ExportPipelineDefinitionResponse: A response object containing the complete
88
+ pipeline definition export.
89
+
90
+ Raises:
91
+ AiriaAPIError: If the API request fails, including cases where:
92
+ - The pipeline_id doesn't exist (404)
93
+ - Authentication fails (401)
94
+ - Access is forbidden (403)
95
+ - Server errors (5xx)
96
+
97
+ Example:
98
+ ```python
99
+ from airia import AiriaAsyncClient
100
+
101
+ client = AiriaAsyncClient(api_key="your_api_key")
102
+
103
+ # Export pipeline definition
104
+ export = await client.pipelines_config.export_pipeline_definition(
105
+ pipeline_id="your_pipeline_id"
106
+ )
107
+
108
+ print(f"Pipeline: {export.agent.name}")
109
+ print(f"Export version: {export.metadata.export_version}")
110
+ print(f"Data sources: {len(export.data_sources or [])}")
111
+ print(f"Tools: {len(export.tools or [])}")
112
+ ```
113
+
114
+ Note:
115
+ This method exports the complete pipeline definition which can be used
116
+ for backup, version control, or importing into other environments.
117
+ """
118
+ request_data = self._pre_export_pipeline_definition(
119
+ pipeline_id=pipeline_id,
120
+ correlation_id=correlation_id,
121
+ api_version=ApiVersion.V1.value,
122
+ )
123
+ resp = await self._request_handler.make_request("GET", request_data)
124
+
125
+ return ExportPipelineDefinitionResponse(**resp)
@@ -42,3 +42,37 @@ class BasePipelinesConfig:
42
42
  )
43
43
 
44
44
  return request_data
45
+
46
+ def _pre_export_pipeline_definition(
47
+ self,
48
+ pipeline_id: str,
49
+ correlation_id: Optional[str] = None,
50
+ api_version: str = ApiVersion.V1.value,
51
+ ):
52
+ """
53
+ Prepare request data for exporting pipeline definition endpoint.
54
+
55
+ Args:
56
+ pipeline_id: ID of the pipeline to export definition for
57
+ correlation_id: Optional correlation ID for tracing
58
+ api_version: API version to use for the request
59
+
60
+ Returns:
61
+ RequestData: Prepared request data for the export pipeline definition endpoint
62
+
63
+ Raises:
64
+ ValueError: If an invalid API version is provided
65
+ """
66
+ if api_version not in ApiVersion.as_list():
67
+ raise ValueError(
68
+ f"Invalid API version: {api_version}. Valid versions are: {', '.join(ApiVersion.as_list())}"
69
+ )
70
+ url = urljoin(
71
+ self._request_handler.base_url,
72
+ f"{api_version}/PipelinesConfig/export/{pipeline_id}",
73
+ )
74
+ request_data = self._request_handler.prepare_request(
75
+ url, correlation_id=correlation_id
76
+ )
77
+
78
+ return request_data
@@ -0,0 +1,125 @@
1
+ from typing import Optional
2
+
3
+ from ...types._api_version import ApiVersion
4
+ from ...types.api.pipelines_config import (
5
+ PipelineConfigResponse,
6
+ ExportPipelineDefinitionResponse,
7
+ )
8
+ from .._request_handler import RequestHandler
9
+ from .base_pipelines_config import BasePipelinesConfig
10
+
11
+
12
+ class PipelinesConfig(BasePipelinesConfig):
13
+ def __init__(self, request_handler: RequestHandler):
14
+ super().__init__(request_handler)
15
+
16
+ def get_pipeline_config(
17
+ self, pipeline_id: str, correlation_id: Optional[str] = None
18
+ ) -> PipelineConfigResponse:
19
+ """
20
+ Retrieve configuration details for a specific pipeline.
21
+
22
+ This method fetches comprehensive information about a pipeline including its
23
+ deployment details, execution statistics, version information, and metadata.
24
+
25
+ Args:
26
+ pipeline_id (str): The unique identifier of the pipeline to retrieve
27
+ configuration for.
28
+ correlation_id (str, optional): A unique identifier for request tracing
29
+ and logging. If not provided, one will be automatically generated.
30
+
31
+ Returns:
32
+ PipelineConfigResponse: A response object containing the pipeline
33
+ configuration.
34
+
35
+ Raises:
36
+ AiriaAPIError: If the API request fails, including cases where:
37
+ - The pipeline_id doesn't exist (404)
38
+ - Authentication fails (401)
39
+ - Access is forbidden (403)
40
+ - Server errors (5xx)
41
+
42
+ Example:
43
+ ```python
44
+ from airia import AiriaClient
45
+
46
+ client = AiriaClient(api_key="your_api_key")
47
+
48
+ # Get pipeline configuration
49
+ config = client.pipelines_config.get_pipeline_config(
50
+ pipeline_id="your_pipeline_id"
51
+ )
52
+
53
+ print(f"Pipeline: {config.agent.name}")
54
+ print(f"Description: {config.agent.agent_description}")
55
+ ```
56
+
57
+ Note:
58
+ This method only retrieves configuration information and does not
59
+ execute the pipeline. Use execute_pipeline() to run the pipeline.
60
+ """
61
+ request_data = self._pre_get_pipeline_config(
62
+ pipeline_id=pipeline_id,
63
+ correlation_id=correlation_id,
64
+ api_version=ApiVersion.V1.value,
65
+ )
66
+ resp = self._request_handler.make_request("GET", request_data)
67
+
68
+ return PipelineConfigResponse(**resp)
69
+
70
+ def export_pipeline_definition(
71
+ self, pipeline_id: str, correlation_id: Optional[str] = None
72
+ ) -> ExportPipelineDefinitionResponse:
73
+ """
74
+ Export the complete definition of a pipeline including all its components.
75
+
76
+ This method retrieves a comprehensive export of a pipeline definition including
77
+ metadata, agent configuration, data sources, prompts, tools, models, memories,
78
+ Python code blocks, routers, and deployment information.
79
+
80
+ Args:
81
+ pipeline_id (str): The unique identifier of the pipeline to export
82
+ definition for.
83
+ correlation_id (str, optional): A unique identifier for request tracing
84
+ and logging. If not provided, one will be automatically generated.
85
+
86
+ Returns:
87
+ ExportPipelineDefinitionResponse: A response object containing the complete
88
+ pipeline definition export.
89
+
90
+ Raises:
91
+ AiriaAPIError: If the API request fails, including cases where:
92
+ - The pipeline_id doesn't exist (404)
93
+ - Authentication fails (401)
94
+ - Access is forbidden (403)
95
+ - Server errors (5xx)
96
+
97
+ Example:
98
+ ```python
99
+ from airia import AiriaClient
100
+
101
+ client = AiriaClient(api_key="your_api_key")
102
+
103
+ # Export pipeline definition
104
+ export = client.pipelines_config.export_pipeline_definition(
105
+ pipeline_id="your_pipeline_id"
106
+ )
107
+
108
+ print(f"Pipeline: {export.agent.name}")
109
+ print(f"Export version: {export.metadata.export_version}")
110
+ print(f"Data sources: {len(export.data_sources or [])}")
111
+ print(f"Tools: {len(export.tools or [])}")
112
+ ```
113
+
114
+ Note:
115
+ This method exports the complete pipeline definition which can be used
116
+ for backup, version control, or importing into other environments.
117
+ """
118
+ request_data = self._pre_export_pipeline_definition(
119
+ pipeline_id=pipeline_id,
120
+ correlation_id=correlation_id,
121
+ api_version=ApiVersion.V1.value,
122
+ )
123
+ resp = self._request_handler.make_request("GET", request_data)
124
+
125
+ return ExportPipelineDefinitionResponse(**resp)
@@ -0,0 +1,87 @@
1
+ """Pipeline configuration API response types."""
2
+
3
+ from .get_pipeline_config import (
4
+ AboutDeploymentMetadata,
5
+ AgentDetailsEntry,
6
+ AgentTrigger,
7
+ Deployment,
8
+ DeploymentAssignment,
9
+ DeploymentUserPrompt,
10
+ Pipeline,
11
+ PipelineConfigResponse,
12
+ PipelineExecutionStats,
13
+ PipelineStep,
14
+ PipelineStepDependency,
15
+ PipelineStepHandle,
16
+ PipelineStepPosition,
17
+ PipelineVersion,
18
+ )
19
+ from .export_pipeline_definition import (
20
+ AgentDetailItemDefinition,
21
+ ExportPipelineDefinitionResponse,
22
+ ExportChunkingConfig,
23
+ ExportCredentialDataList,
24
+ ExportCredentials,
25
+ ExportDataSource,
26
+ ExportDataSourceFile,
27
+ ExportDependency,
28
+ ExportDeployment,
29
+ ExportHandle,
30
+ ExportMemory,
31
+ ExportMetadata,
32
+ ExportModel,
33
+ ExportPipeline,
34
+ ExportPipelineStep,
35
+ ExportPosition,
36
+ ExportPrompt,
37
+ ExportPromptMessageList,
38
+ ExportPythonCodeBlock,
39
+ ExportRouter,
40
+ ExportRouterConfig,
41
+ ExportTool,
42
+ ExportToolHeaders,
43
+ ExportToolParameters,
44
+ ExportUserPrompt,
45
+ )
46
+
47
+ __all__ = [
48
+ "AboutDeploymentMetadata",
49
+ "AgentDetailsEntry",
50
+ "AgentTrigger",
51
+ "Deployment",
52
+ "DeploymentAssignment",
53
+ "DeploymentUserPrompt",
54
+ "ExportPipelineDefinitionResponse",
55
+ "Pipeline",
56
+ "PipelineConfigResponse",
57
+ "PipelineExecutionStats",
58
+ "PipelineStep",
59
+ "PipelineStepDependency",
60
+ "PipelineStepHandle",
61
+ "PipelineStepPosition",
62
+ "PipelineVersion",
63
+ "AgentDetailItemDefinition",
64
+ "ExportChunkingConfig",
65
+ "ExportCredentialDataList",
66
+ "ExportCredentials",
67
+ "ExportDataSource",
68
+ "ExportDataSourceFile",
69
+ "ExportDependency",
70
+ "ExportDeployment",
71
+ "ExportHandle",
72
+ "ExportMemory",
73
+ "ExportMetadata",
74
+ "ExportModel",
75
+ "ExportPipeline",
76
+ "ExportPipelineStep",
77
+ "ExportPosition",
78
+ "ExportPrompt",
79
+ "ExportPromptMessageList",
80
+ "ExportPythonCodeBlock",
81
+ "ExportRouter",
82
+ "ExportRouterConfig",
83
+ "ExportTool",
84
+ "ExportToolHeaders",
85
+ "ExportToolParameters",
86
+ "ExportUserPrompt",
87
+ ]