phenoml 0.0.6__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.
- phenoml/__init__.py +30 -0
- phenoml/agent/__init__.py +56 -0
- phenoml/agent/client.py +939 -0
- phenoml/agent/errors/__init__.py +11 -0
- phenoml/agent/errors/bad_request_error.py +10 -0
- phenoml/agent/errors/forbidden_error.py +10 -0
- phenoml/agent/errors/internal_server_error.py +10 -0
- phenoml/agent/errors/not_found_error.py +10 -0
- phenoml/agent/errors/unauthorized_error.py +10 -0
- phenoml/agent/prompts/__init__.py +7 -0
- phenoml/agent/prompts/client.py +707 -0
- phenoml/agent/prompts/raw_client.py +1345 -0
- phenoml/agent/prompts/types/__init__.py +8 -0
- phenoml/agent/prompts/types/prompts_delete_response.py +20 -0
- phenoml/agent/prompts/types/prompts_list_response.py +22 -0
- phenoml/agent/raw_client.py +1668 -0
- phenoml/agent/types/__init__.py +43 -0
- phenoml/agent/types/agent_chat_response.py +33 -0
- phenoml/agent/types/agent_create_request.py +53 -0
- phenoml/agent/types/agent_create_request_provider.py +5 -0
- phenoml/agent/types/agent_delete_response.py +20 -0
- phenoml/agent/types/agent_get_chat_messages_request_order.py +5 -0
- phenoml/agent/types/agent_get_chat_messages_response.py +22 -0
- phenoml/agent/types/agent_list_response.py +22 -0
- phenoml/agent/types/agent_prompts_response.py +22 -0
- phenoml/agent/types/agent_response.py +22 -0
- phenoml/agent/types/agent_template.py +58 -0
- phenoml/agent/types/agent_template_provider.py +5 -0
- phenoml/agent/types/chat_message_template.py +72 -0
- phenoml/agent/types/chat_session_template.py +67 -0
- phenoml/agent/types/json_patch.py +7 -0
- phenoml/agent/types/json_patch_operation.py +40 -0
- phenoml/agent/types/json_patch_operation_op.py +5 -0
- phenoml/agent/types/prompt_template.py +52 -0
- phenoml/agent/types/success_response.py +20 -0
- phenoml/authtoken/__init__.py +17 -0
- phenoml/authtoken/auth/__init__.py +7 -0
- phenoml/authtoken/auth/client.py +129 -0
- phenoml/authtoken/auth/raw_client.py +173 -0
- phenoml/authtoken/auth/types/__init__.py +7 -0
- phenoml/authtoken/auth/types/auth_generate_token_response.py +22 -0
- phenoml/authtoken/client.py +39 -0
- phenoml/authtoken/errors/__init__.py +8 -0
- phenoml/authtoken/errors/bad_request_error.py +10 -0
- phenoml/authtoken/errors/unauthorized_error.py +10 -0
- phenoml/authtoken/raw_client.py +13 -0
- phenoml/authtoken/types/__init__.py +8 -0
- phenoml/authtoken/types/bad_request_error_body.py +21 -0
- phenoml/authtoken/types/unauthorized_error_body.py +21 -0
- phenoml/client.py +177 -0
- phenoml/cohort/__init__.py +8 -0
- phenoml/cohort/client.py +113 -0
- phenoml/cohort/errors/__init__.py +9 -0
- phenoml/cohort/errors/bad_request_error.py +10 -0
- phenoml/cohort/errors/internal_server_error.py +10 -0
- phenoml/cohort/errors/unauthorized_error.py +10 -0
- phenoml/cohort/raw_client.py +185 -0
- phenoml/cohort/types/__init__.py +8 -0
- phenoml/cohort/types/cohort_response.py +33 -0
- phenoml/cohort/types/search_concept.py +37 -0
- phenoml/construe/__init__.py +45 -0
- phenoml/construe/client.py +399 -0
- phenoml/construe/errors/__init__.py +11 -0
- phenoml/construe/errors/bad_request_error.py +10 -0
- phenoml/construe/errors/conflict_error.py +10 -0
- phenoml/construe/errors/failed_dependency_error.py +10 -0
- phenoml/construe/errors/internal_server_error.py +10 -0
- phenoml/construe/errors/unauthorized_error.py +10 -0
- phenoml/construe/raw_client.py +706 -0
- phenoml/construe/types/__init__.py +41 -0
- phenoml/construe/types/bad_request_error_body.py +27 -0
- phenoml/construe/types/construe_cohort_request_config.py +37 -0
- phenoml/construe/types/construe_cohort_response.py +33 -0
- phenoml/construe/types/construe_cohort_response_queries_item.py +49 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item.py +31 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item_codes_item.py +32 -0
- phenoml/construe/types/construe_upload_code_system_response.py +19 -0
- phenoml/construe/types/extract_codes_result.py +22 -0
- phenoml/construe/types/extract_request_config.py +23 -0
- phenoml/construe/types/extract_request_config_chunking_method.py +5 -0
- phenoml/construe/types/extract_request_system.py +37 -0
- phenoml/construe/types/extracted_code_result.py +41 -0
- phenoml/construe/types/internal_server_error_body.py +27 -0
- phenoml/construe/types/unauthorized_error_body.py +27 -0
- phenoml/construe/types/upload_request_format.py +5 -0
- phenoml/core/__init__.py +52 -0
- phenoml/core/api_error.py +23 -0
- phenoml/core/client_wrapper.py +87 -0
- phenoml/core/datetime_utils.py +28 -0
- phenoml/core/file.py +67 -0
- phenoml/core/force_multipart.py +16 -0
- phenoml/core/http_client.py +543 -0
- phenoml/core/http_response.py +55 -0
- phenoml/core/jsonable_encoder.py +100 -0
- phenoml/core/pydantic_utilities.py +255 -0
- phenoml/core/query_encoder.py +58 -0
- phenoml/core/remove_none_from_dict.py +11 -0
- phenoml/core/request_options.py +35 -0
- phenoml/core/serialization.py +276 -0
- phenoml/environment.py +7 -0
- phenoml/fhir/__init__.py +36 -0
- phenoml/fhir/client.py +970 -0
- phenoml/fhir/errors/__init__.py +10 -0
- phenoml/fhir/errors/bad_request_error.py +10 -0
- phenoml/fhir/errors/internal_server_error.py +10 -0
- phenoml/fhir/errors/not_found_error.py +10 -0
- phenoml/fhir/errors/unauthorized_error.py +10 -0
- phenoml/fhir/raw_client.py +1385 -0
- phenoml/fhir/types/__init__.py +29 -0
- phenoml/fhir/types/error_response.py +36 -0
- phenoml/fhir/types/fhir_bundle.py +43 -0
- phenoml/fhir/types/fhir_bundle_entry_item.py +34 -0
- phenoml/fhir/types/fhir_bundle_entry_item_request.py +25 -0
- phenoml/fhir/types/fhir_bundle_entry_item_request_method.py +5 -0
- phenoml/fhir/types/fhir_bundle_entry_item_response.py +24 -0
- phenoml/fhir/types/fhir_patch_request_body_item.py +40 -0
- phenoml/fhir/types/fhir_patch_request_body_item_op.py +7 -0
- phenoml/fhir/types/fhir_resource.py +40 -0
- phenoml/fhir/types/fhir_resource_meta.py +28 -0
- phenoml/fhir/types/fhir_search_response.py +8 -0
- phenoml/fhir_provider/__init__.py +43 -0
- phenoml/fhir_provider/client.py +731 -0
- phenoml/fhir_provider/errors/__init__.py +11 -0
- phenoml/fhir_provider/errors/bad_request_error.py +10 -0
- phenoml/fhir_provider/errors/forbidden_error.py +10 -0
- phenoml/fhir_provider/errors/internal_server_error.py +10 -0
- phenoml/fhir_provider/errors/not_found_error.py +10 -0
- phenoml/fhir_provider/errors/unauthorized_error.py +10 -0
- phenoml/fhir_provider/raw_client.py +1445 -0
- phenoml/fhir_provider/types/__init__.py +35 -0
- phenoml/fhir_provider/types/auth_method.py +7 -0
- phenoml/fhir_provider/types/fhir_provider_auth_config.py +53 -0
- phenoml/fhir_provider/types/fhir_provider_delete_response.py +20 -0
- phenoml/fhir_provider/types/fhir_provider_list_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_remove_auth_config_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_set_active_auth_config_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_template.py +66 -0
- phenoml/fhir_provider/types/fhir_query_response.py +27 -0
- phenoml/fhir_provider/types/fhir_query_response_data.py +5 -0
- phenoml/fhir_provider/types/json_web_key.py +51 -0
- phenoml/fhir_provider/types/provider.py +8 -0
- phenoml/fhir_provider/types/service_account_key.py +35 -0
- phenoml/fhir_provider/types/smart_configuration.py +46 -0
- phenoml/lang2fhir/__init__.py +27 -0
- phenoml/lang2fhir/client.py +430 -0
- phenoml/lang2fhir/errors/__init__.py +11 -0
- phenoml/lang2fhir/errors/bad_request_error.py +10 -0
- phenoml/lang2fhir/errors/failed_dependency_error.py +10 -0
- phenoml/lang2fhir/errors/forbidden_error.py +10 -0
- phenoml/lang2fhir/errors/internal_server_error.py +10 -0
- phenoml/lang2fhir/errors/unauthorized_error.py +10 -0
- phenoml/lang2fhir/raw_client.py +788 -0
- phenoml/lang2fhir/types/__init__.py +19 -0
- phenoml/lang2fhir/types/create_request_resource.py +25 -0
- phenoml/lang2fhir/types/document_request_file_type.py +7 -0
- phenoml/lang2fhir/types/document_request_resource.py +5 -0
- phenoml/lang2fhir/types/fhir_resource.py +5 -0
- phenoml/lang2fhir/types/lang2fhir_upload_profile_response.py +23 -0
- phenoml/lang2fhir/types/search_response.py +33 -0
- phenoml/py.typed +0 -0
- phenoml/tools/__init__.py +37 -0
- phenoml/tools/client.py +359 -0
- phenoml/tools/errors/__init__.py +11 -0
- phenoml/tools/errors/bad_request_error.py +10 -0
- phenoml/tools/errors/failed_dependency_error.py +10 -0
- phenoml/tools/errors/forbidden_error.py +10 -0
- phenoml/tools/errors/internal_server_error.py +10 -0
- phenoml/tools/errors/unauthorized_error.py +10 -0
- phenoml/tools/mcp_server/__init__.py +7 -0
- phenoml/tools/mcp_server/client.py +336 -0
- phenoml/tools/mcp_server/raw_client.py +641 -0
- phenoml/tools/mcp_server/tools/__init__.py +4 -0
- phenoml/tools/mcp_server/tools/client.py +358 -0
- phenoml/tools/mcp_server/tools/raw_client.py +656 -0
- phenoml/tools/raw_client.py +696 -0
- phenoml/tools/types/__init__.py +27 -0
- phenoml/tools/types/cohort_response.py +49 -0
- phenoml/tools/types/lang2fhir_and_create_request_resource.py +25 -0
- phenoml/tools/types/lang2fhir_and_create_response.py +33 -0
- phenoml/tools/types/lang2fhir_and_search_response.py +40 -0
- phenoml/tools/types/mcp_server_response.py +33 -0
- phenoml/tools/types/mcp_server_response_data.py +51 -0
- phenoml/tools/types/mcp_server_tool_call_response.py +37 -0
- phenoml/tools/types/mcp_server_tool_response.py +33 -0
- phenoml/tools/types/mcp_server_tool_response_data.py +61 -0
- phenoml/tools/types/search_concept.py +41 -0
- phenoml/types/__init__.py +21 -0
- phenoml/types/cohort_response.py +5 -0
- phenoml/types/lang2fhir_and_create_response.py +5 -0
- phenoml/types/lang2fhir_and_search_response.py +5 -0
- phenoml/types/mcp_server_response.py +5 -0
- phenoml/types/mcp_server_tool_call_response.py +5 -0
- phenoml/types/mcp_server_tool_response.py +5 -0
- phenoml/types/search_concept.py +5 -0
- phenoml/version.py +3 -0
- phenoml/workflows/__init__.py +66 -0
- phenoml/workflows/client.py +210 -0
- phenoml/workflows/errors/__init__.py +11 -0
- phenoml/workflows/errors/bad_request_error.py +10 -0
- phenoml/workflows/errors/forbidden_error.py +10 -0
- phenoml/workflows/errors/internal_server_error.py +10 -0
- phenoml/workflows/errors/not_found_error.py +10 -0
- phenoml/workflows/errors/unauthorized_error.py +10 -0
- phenoml/workflows/mcp_server/__init__.py +7 -0
- phenoml/workflows/mcp_server/client.py +274 -0
- phenoml/workflows/mcp_server/raw_client.py +226 -0
- phenoml/workflows/mcp_server/tools/__init__.py +4 -0
- phenoml/workflows/mcp_server/tools/client.py +287 -0
- phenoml/workflows/mcp_server/tools/raw_client.py +244 -0
- phenoml/workflows/raw_client.py +169 -0
- phenoml/workflows/types/__init__.py +43 -0
- phenoml/workflows/types/create_workflow_response.py +44 -0
- phenoml/workflows/types/decision_node_definition.py +32 -0
- phenoml/workflows/types/execute_workflow_response.py +30 -0
- phenoml/workflows/types/execute_workflow_response_results.py +22 -0
- phenoml/workflows/types/lang2fhir_create_definition.py +37 -0
- phenoml/workflows/types/lang2fhir_search_definition.py +42 -0
- phenoml/workflows/types/list_workflows_response.py +39 -0
- phenoml/workflows/types/step_operation.py +26 -0
- phenoml/workflows/types/sub_workflow_definition.py +32 -0
- phenoml/workflows/types/workflow_config.py +27 -0
- phenoml/workflows/types/workflow_definition.py +57 -0
- phenoml/workflows/types/workflow_graph.py +23 -0
- phenoml/workflows/types/workflow_response.py +61 -0
- phenoml/workflows/types/workflow_response_graph.py +23 -0
- phenoml/workflows/types/workflow_step.py +55 -0
- phenoml/workflows/types/workflow_step_summary.py +47 -0
- phenoml/workflows/types/workflow_step_summary_type.py +5 -0
- phenoml/workflows/types/workflow_step_type.py +5 -0
- phenoml/workflows/workflows/__init__.py +19 -0
- phenoml/workflows/workflows/client.py +694 -0
- phenoml/workflows/workflows/raw_client.py +1266 -0
- phenoml/workflows/workflows/types/__init__.py +17 -0
- phenoml/workflows/workflows/types/create_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/workflows/types/update_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/workflows/types/workflows_delete_response.py +20 -0
- phenoml/workflows/workflows/types/workflows_get_response.py +26 -0
- phenoml/workflows/workflows/types/workflows_update_response.py +31 -0
- phenoml/wrapper_client.py +123 -0
- phenoml-0.0.6.dist-info/LICENSE +21 -0
- phenoml-0.0.6.dist-info/METADATA +192 -0
- phenoml-0.0.6.dist-info/RECORD +244 -0
- phenoml-0.0.6.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from .mcp_server.client import AsyncMcpServerClient, McpServerClient
|
|
8
|
+
from .raw_client import AsyncRawWorkflowsClient, RawWorkflowsClient
|
|
9
|
+
from .workflows.client import AsyncWorkflowsClient as workflows_workflows_client_AsyncWorkflowsClient
|
|
10
|
+
from .workflows.client import WorkflowsClient as workflows_workflows_client_WorkflowsClient
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WorkflowsClient:
|
|
14
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
15
|
+
self._raw_client = RawWorkflowsClient(client_wrapper=client_wrapper)
|
|
16
|
+
self.workflows = workflows_workflows_client_WorkflowsClient(client_wrapper=client_wrapper)
|
|
17
|
+
|
|
18
|
+
self.mcp_server = McpServerClient(client_wrapper=client_wrapper)
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def with_raw_response(self) -> RawWorkflowsClient:
|
|
22
|
+
"""
|
|
23
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
RawWorkflowsClient
|
|
28
|
+
"""
|
|
29
|
+
return self._raw_client
|
|
30
|
+
|
|
31
|
+
def create_fhir_resource(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
32
|
+
"""
|
|
33
|
+
Parameters
|
|
34
|
+
----------
|
|
35
|
+
request_options : typing.Optional[RequestOptions]
|
|
36
|
+
Request-specific configuration.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
None
|
|
41
|
+
|
|
42
|
+
Examples
|
|
43
|
+
--------
|
|
44
|
+
from phenoml import phenoml
|
|
45
|
+
|
|
46
|
+
client = phenoml(
|
|
47
|
+
token="YOUR_TOKEN",
|
|
48
|
+
)
|
|
49
|
+
client.workflows.create_fhir_resource()
|
|
50
|
+
"""
|
|
51
|
+
_response = self._raw_client.create_fhir_resource(request_options=request_options)
|
|
52
|
+
return _response.data
|
|
53
|
+
|
|
54
|
+
def search_fhir_resources(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
55
|
+
"""
|
|
56
|
+
Parameters
|
|
57
|
+
----------
|
|
58
|
+
request_options : typing.Optional[RequestOptions]
|
|
59
|
+
Request-specific configuration.
|
|
60
|
+
|
|
61
|
+
Returns
|
|
62
|
+
-------
|
|
63
|
+
None
|
|
64
|
+
|
|
65
|
+
Examples
|
|
66
|
+
--------
|
|
67
|
+
from phenoml import phenoml
|
|
68
|
+
|
|
69
|
+
client = phenoml(
|
|
70
|
+
token="YOUR_TOKEN",
|
|
71
|
+
)
|
|
72
|
+
client.workflows.search_fhir_resources()
|
|
73
|
+
"""
|
|
74
|
+
_response = self._raw_client.search_fhir_resources(request_options=request_options)
|
|
75
|
+
return _response.data
|
|
76
|
+
|
|
77
|
+
def analyze_cohort(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
78
|
+
"""
|
|
79
|
+
Parameters
|
|
80
|
+
----------
|
|
81
|
+
request_options : typing.Optional[RequestOptions]
|
|
82
|
+
Request-specific configuration.
|
|
83
|
+
|
|
84
|
+
Returns
|
|
85
|
+
-------
|
|
86
|
+
None
|
|
87
|
+
|
|
88
|
+
Examples
|
|
89
|
+
--------
|
|
90
|
+
from phenoml import phenoml
|
|
91
|
+
|
|
92
|
+
client = phenoml(
|
|
93
|
+
token="YOUR_TOKEN",
|
|
94
|
+
)
|
|
95
|
+
client.workflows.analyze_cohort()
|
|
96
|
+
"""
|
|
97
|
+
_response = self._raw_client.analyze_cohort(request_options=request_options)
|
|
98
|
+
return _response.data
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class AsyncWorkflowsClient:
|
|
102
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
103
|
+
self._raw_client = AsyncRawWorkflowsClient(client_wrapper=client_wrapper)
|
|
104
|
+
self.workflows = workflows_workflows_client_AsyncWorkflowsClient(client_wrapper=client_wrapper)
|
|
105
|
+
|
|
106
|
+
self.mcp_server = AsyncMcpServerClient(client_wrapper=client_wrapper)
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def with_raw_response(self) -> AsyncRawWorkflowsClient:
|
|
110
|
+
"""
|
|
111
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
112
|
+
|
|
113
|
+
Returns
|
|
114
|
+
-------
|
|
115
|
+
AsyncRawWorkflowsClient
|
|
116
|
+
"""
|
|
117
|
+
return self._raw_client
|
|
118
|
+
|
|
119
|
+
async def create_fhir_resource(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
120
|
+
"""
|
|
121
|
+
Parameters
|
|
122
|
+
----------
|
|
123
|
+
request_options : typing.Optional[RequestOptions]
|
|
124
|
+
Request-specific configuration.
|
|
125
|
+
|
|
126
|
+
Returns
|
|
127
|
+
-------
|
|
128
|
+
None
|
|
129
|
+
|
|
130
|
+
Examples
|
|
131
|
+
--------
|
|
132
|
+
import asyncio
|
|
133
|
+
|
|
134
|
+
from phenoml import Asyncphenoml
|
|
135
|
+
|
|
136
|
+
client = Asyncphenoml(
|
|
137
|
+
token="YOUR_TOKEN",
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
async def main() -> None:
|
|
142
|
+
await client.workflows.create_fhir_resource()
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
asyncio.run(main())
|
|
146
|
+
"""
|
|
147
|
+
_response = await self._raw_client.create_fhir_resource(request_options=request_options)
|
|
148
|
+
return _response.data
|
|
149
|
+
|
|
150
|
+
async def search_fhir_resources(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
151
|
+
"""
|
|
152
|
+
Parameters
|
|
153
|
+
----------
|
|
154
|
+
request_options : typing.Optional[RequestOptions]
|
|
155
|
+
Request-specific configuration.
|
|
156
|
+
|
|
157
|
+
Returns
|
|
158
|
+
-------
|
|
159
|
+
None
|
|
160
|
+
|
|
161
|
+
Examples
|
|
162
|
+
--------
|
|
163
|
+
import asyncio
|
|
164
|
+
|
|
165
|
+
from phenoml import Asyncphenoml
|
|
166
|
+
|
|
167
|
+
client = Asyncphenoml(
|
|
168
|
+
token="YOUR_TOKEN",
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
async def main() -> None:
|
|
173
|
+
await client.workflows.search_fhir_resources()
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
asyncio.run(main())
|
|
177
|
+
"""
|
|
178
|
+
_response = await self._raw_client.search_fhir_resources(request_options=request_options)
|
|
179
|
+
return _response.data
|
|
180
|
+
|
|
181
|
+
async def analyze_cohort(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
182
|
+
"""
|
|
183
|
+
Parameters
|
|
184
|
+
----------
|
|
185
|
+
request_options : typing.Optional[RequestOptions]
|
|
186
|
+
Request-specific configuration.
|
|
187
|
+
|
|
188
|
+
Returns
|
|
189
|
+
-------
|
|
190
|
+
None
|
|
191
|
+
|
|
192
|
+
Examples
|
|
193
|
+
--------
|
|
194
|
+
import asyncio
|
|
195
|
+
|
|
196
|
+
from phenoml import Asyncphenoml
|
|
197
|
+
|
|
198
|
+
client = Asyncphenoml(
|
|
199
|
+
token="YOUR_TOKEN",
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
async def main() -> None:
|
|
204
|
+
await client.workflows.analyze_cohort()
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
asyncio.run(main())
|
|
208
|
+
"""
|
|
209
|
+
_response = await self._raw_client.analyze_cohort(request_options=request_options)
|
|
210
|
+
return _response.data
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .bad_request_error import BadRequestError
|
|
6
|
+
from .forbidden_error import ForbiddenError
|
|
7
|
+
from .internal_server_error import InternalServerError
|
|
8
|
+
from .not_found_error import NotFoundError
|
|
9
|
+
from .unauthorized_error import UnauthorizedError
|
|
10
|
+
|
|
11
|
+
__all__ = ["BadRequestError", "ForbiddenError", "InternalServerError", "NotFoundError", "UnauthorizedError"]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.api_error import ApiError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class BadRequestError(ApiError):
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
10
|
+
super().__init__(status_code=400, headers=headers, body=body)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.api_error import ApiError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ForbiddenError(ApiError):
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
10
|
+
super().__init__(status_code=403, headers=headers, body=body)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.api_error import ApiError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class InternalServerError(ApiError):
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
10
|
+
super().__init__(status_code=500, headers=headers, body=body)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.api_error import ApiError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class NotFoundError(ApiError):
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
10
|
+
super().__init__(status_code=404, headers=headers, body=body)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.api_error import ApiError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class UnauthorizedError(ApiError):
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
10
|
+
super().__init__(status_code=401, headers=headers, body=body)
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ...core.request_options import RequestOptions
|
|
7
|
+
from .raw_client import AsyncRawMcpServerClient, RawMcpServerClient
|
|
8
|
+
from .tools.client import AsyncToolsClient, ToolsClient
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class McpServerClient:
|
|
12
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
13
|
+
self._raw_client = RawMcpServerClient(client_wrapper=client_wrapper)
|
|
14
|
+
self.tools = ToolsClient(client_wrapper=client_wrapper)
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def with_raw_response(self) -> RawMcpServerClient:
|
|
18
|
+
"""
|
|
19
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
20
|
+
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
RawMcpServerClient
|
|
24
|
+
"""
|
|
25
|
+
return self._raw_client
|
|
26
|
+
|
|
27
|
+
def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
28
|
+
"""
|
|
29
|
+
Parameters
|
|
30
|
+
----------
|
|
31
|
+
request_options : typing.Optional[RequestOptions]
|
|
32
|
+
Request-specific configuration.
|
|
33
|
+
|
|
34
|
+
Returns
|
|
35
|
+
-------
|
|
36
|
+
None
|
|
37
|
+
|
|
38
|
+
Examples
|
|
39
|
+
--------
|
|
40
|
+
from phenoml import phenoml
|
|
41
|
+
|
|
42
|
+
client = phenoml(
|
|
43
|
+
token="YOUR_TOKEN",
|
|
44
|
+
)
|
|
45
|
+
client.workflows.mcp_server.create()
|
|
46
|
+
"""
|
|
47
|
+
_response = self._raw_client.create(request_options=request_options)
|
|
48
|
+
return _response.data
|
|
49
|
+
|
|
50
|
+
def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
51
|
+
"""
|
|
52
|
+
Parameters
|
|
53
|
+
----------
|
|
54
|
+
request_options : typing.Optional[RequestOptions]
|
|
55
|
+
Request-specific configuration.
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
None
|
|
60
|
+
|
|
61
|
+
Examples
|
|
62
|
+
--------
|
|
63
|
+
from phenoml import phenoml
|
|
64
|
+
|
|
65
|
+
client = phenoml(
|
|
66
|
+
token="YOUR_TOKEN",
|
|
67
|
+
)
|
|
68
|
+
client.workflows.mcp_server.list()
|
|
69
|
+
"""
|
|
70
|
+
_response = self._raw_client.list(request_options=request_options)
|
|
71
|
+
return _response.data
|
|
72
|
+
|
|
73
|
+
def get(self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
74
|
+
"""
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
mcp_server_id : str
|
|
78
|
+
|
|
79
|
+
request_options : typing.Optional[RequestOptions]
|
|
80
|
+
Request-specific configuration.
|
|
81
|
+
|
|
82
|
+
Returns
|
|
83
|
+
-------
|
|
84
|
+
None
|
|
85
|
+
|
|
86
|
+
Examples
|
|
87
|
+
--------
|
|
88
|
+
from phenoml import phenoml
|
|
89
|
+
|
|
90
|
+
client = phenoml(
|
|
91
|
+
token="YOUR_TOKEN",
|
|
92
|
+
)
|
|
93
|
+
client.workflows.mcp_server.get(
|
|
94
|
+
mcp_server_id="mcp_server_id",
|
|
95
|
+
)
|
|
96
|
+
"""
|
|
97
|
+
_response = self._raw_client.get(mcp_server_id, request_options=request_options)
|
|
98
|
+
return _response.data
|
|
99
|
+
|
|
100
|
+
def delete(self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
101
|
+
"""
|
|
102
|
+
Parameters
|
|
103
|
+
----------
|
|
104
|
+
mcp_server_id : str
|
|
105
|
+
|
|
106
|
+
request_options : typing.Optional[RequestOptions]
|
|
107
|
+
Request-specific configuration.
|
|
108
|
+
|
|
109
|
+
Returns
|
|
110
|
+
-------
|
|
111
|
+
None
|
|
112
|
+
|
|
113
|
+
Examples
|
|
114
|
+
--------
|
|
115
|
+
from phenoml import phenoml
|
|
116
|
+
|
|
117
|
+
client = phenoml(
|
|
118
|
+
token="YOUR_TOKEN",
|
|
119
|
+
)
|
|
120
|
+
client.workflows.mcp_server.delete(
|
|
121
|
+
mcp_server_id="mcp_server_id",
|
|
122
|
+
)
|
|
123
|
+
"""
|
|
124
|
+
_response = self._raw_client.delete(mcp_server_id, request_options=request_options)
|
|
125
|
+
return _response.data
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class AsyncMcpServerClient:
|
|
129
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
130
|
+
self._raw_client = AsyncRawMcpServerClient(client_wrapper=client_wrapper)
|
|
131
|
+
self.tools = AsyncToolsClient(client_wrapper=client_wrapper)
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
def with_raw_response(self) -> AsyncRawMcpServerClient:
|
|
135
|
+
"""
|
|
136
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
AsyncRawMcpServerClient
|
|
141
|
+
"""
|
|
142
|
+
return self._raw_client
|
|
143
|
+
|
|
144
|
+
async def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
145
|
+
"""
|
|
146
|
+
Parameters
|
|
147
|
+
----------
|
|
148
|
+
request_options : typing.Optional[RequestOptions]
|
|
149
|
+
Request-specific configuration.
|
|
150
|
+
|
|
151
|
+
Returns
|
|
152
|
+
-------
|
|
153
|
+
None
|
|
154
|
+
|
|
155
|
+
Examples
|
|
156
|
+
--------
|
|
157
|
+
import asyncio
|
|
158
|
+
|
|
159
|
+
from phenoml import Asyncphenoml
|
|
160
|
+
|
|
161
|
+
client = Asyncphenoml(
|
|
162
|
+
token="YOUR_TOKEN",
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
async def main() -> None:
|
|
167
|
+
await client.workflows.mcp_server.create()
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
asyncio.run(main())
|
|
171
|
+
"""
|
|
172
|
+
_response = await self._raw_client.create(request_options=request_options)
|
|
173
|
+
return _response.data
|
|
174
|
+
|
|
175
|
+
async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
176
|
+
"""
|
|
177
|
+
Parameters
|
|
178
|
+
----------
|
|
179
|
+
request_options : typing.Optional[RequestOptions]
|
|
180
|
+
Request-specific configuration.
|
|
181
|
+
|
|
182
|
+
Returns
|
|
183
|
+
-------
|
|
184
|
+
None
|
|
185
|
+
|
|
186
|
+
Examples
|
|
187
|
+
--------
|
|
188
|
+
import asyncio
|
|
189
|
+
|
|
190
|
+
from phenoml import Asyncphenoml
|
|
191
|
+
|
|
192
|
+
client = Asyncphenoml(
|
|
193
|
+
token="YOUR_TOKEN",
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
async def main() -> None:
|
|
198
|
+
await client.workflows.mcp_server.list()
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
asyncio.run(main())
|
|
202
|
+
"""
|
|
203
|
+
_response = await self._raw_client.list(request_options=request_options)
|
|
204
|
+
return _response.data
|
|
205
|
+
|
|
206
|
+
async def get(self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
207
|
+
"""
|
|
208
|
+
Parameters
|
|
209
|
+
----------
|
|
210
|
+
mcp_server_id : str
|
|
211
|
+
|
|
212
|
+
request_options : typing.Optional[RequestOptions]
|
|
213
|
+
Request-specific configuration.
|
|
214
|
+
|
|
215
|
+
Returns
|
|
216
|
+
-------
|
|
217
|
+
None
|
|
218
|
+
|
|
219
|
+
Examples
|
|
220
|
+
--------
|
|
221
|
+
import asyncio
|
|
222
|
+
|
|
223
|
+
from phenoml import Asyncphenoml
|
|
224
|
+
|
|
225
|
+
client = Asyncphenoml(
|
|
226
|
+
token="YOUR_TOKEN",
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
async def main() -> None:
|
|
231
|
+
await client.workflows.mcp_server.get(
|
|
232
|
+
mcp_server_id="mcp_server_id",
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
asyncio.run(main())
|
|
237
|
+
"""
|
|
238
|
+
_response = await self._raw_client.get(mcp_server_id, request_options=request_options)
|
|
239
|
+
return _response.data
|
|
240
|
+
|
|
241
|
+
async def delete(self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
242
|
+
"""
|
|
243
|
+
Parameters
|
|
244
|
+
----------
|
|
245
|
+
mcp_server_id : str
|
|
246
|
+
|
|
247
|
+
request_options : typing.Optional[RequestOptions]
|
|
248
|
+
Request-specific configuration.
|
|
249
|
+
|
|
250
|
+
Returns
|
|
251
|
+
-------
|
|
252
|
+
None
|
|
253
|
+
|
|
254
|
+
Examples
|
|
255
|
+
--------
|
|
256
|
+
import asyncio
|
|
257
|
+
|
|
258
|
+
from phenoml import Asyncphenoml
|
|
259
|
+
|
|
260
|
+
client = Asyncphenoml(
|
|
261
|
+
token="YOUR_TOKEN",
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
async def main() -> None:
|
|
266
|
+
await client.workflows.mcp_server.delete(
|
|
267
|
+
mcp_server_id="mcp_server_id",
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
asyncio.run(main())
|
|
272
|
+
"""
|
|
273
|
+
_response = await self._raw_client.delete(mcp_server_id, request_options=request_options)
|
|
274
|
+
return _response.data
|