robosystems-client 0.1.10__py3-none-any.whl → 0.1.12__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.
- robosystems_client/api/agent/query_financial_agent.py +16 -16
- robosystems_client/api/backup/create_backup.py +0 -4
- robosystems_client/api/backup/export_backup.py +0 -3
- robosystems_client/api/backup/get_backup_download_url.py +1 -1
- robosystems_client/api/backup/restore_backup.py +0 -4
- robosystems_client/api/connections/create_connection.py +8 -20
- robosystems_client/api/connections/delete_connection.py +8 -16
- robosystems_client/api/connections/sync_connection.py +8 -20
- robosystems_client/api/create/get_available_extensions.py +1 -1
- robosystems_client/api/graph_analytics/get_graph_metrics.py +8 -16
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +8 -16
- robosystems_client/api/mcp/call_mcp_tool.py +8 -20
- robosystems_client/api/query/execute_cypher_query.py +28 -31
- robosystems_client/api/schema/get_graph_schema_info.py +4 -19
- robosystems_client/api/schema/validate_schema.py +4 -16
- robosystems_client/api/service_offerings/get_service_offerings.py +4 -4
- robosystems_client/api/subgraphs/__init__.py +1 -0
- robosystems_client/api/subgraphs/create_subgraph.py +372 -0
- robosystems_client/api/subgraphs/delete_subgraph.py +317 -0
- robosystems_client/api/subgraphs/get_subgraph_info.py +300 -0
- robosystems_client/api/subgraphs/get_subgraph_quota.py +272 -0
- robosystems_client/api/subgraphs/list_subgraphs.py +272 -0
- robosystems_client/api/user/select_user_graph.py +1 -1
- robosystems_client/api/user_limits/get_all_shared_repository_limits.py +223 -0
- robosystems_client/api/user_limits/get_shared_repository_limits.py +248 -0
- robosystems_client/api/user_subscriptions/get_repository_credits.py +18 -18
- robosystems_client/extensions/README.md +2 -6
- robosystems_client/extensions/__init__.py +1 -1
- robosystems_client/extensions/auth_integration.py +2 -2
- robosystems_client/extensions/extensions.py +1 -1
- robosystems_client/extensions/tests/__init__.py +1 -1
- robosystems_client/extensions/tests/test_integration.py +3 -3
- robosystems_client/extensions/tests/test_unit.py +5 -3
- robosystems_client/extensions/utils.py +1 -1
- robosystems_client/models/__init__.py +28 -2
- robosystems_client/models/create_graph_request.py +5 -25
- robosystems_client/models/create_subgraph_request.py +185 -0
- robosystems_client/models/create_subgraph_request_metadata_type_0.py +44 -0
- robosystems_client/models/credit_summary_response.py +0 -8
- robosystems_client/models/database_health_response.py +1 -1
- robosystems_client/models/database_info_response.py +2 -2
- robosystems_client/models/delete_subgraph_request.py +89 -0
- robosystems_client/models/delete_subgraph_response.py +120 -0
- robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py +46 -0
- robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py +44 -0
- robosystems_client/models/list_subgraphs_response.py +148 -0
- robosystems_client/models/repository_credits_response.py +6 -6
- robosystems_client/models/schema_export_response.py +2 -2
- robosystems_client/models/subgraph_quota_response.py +158 -0
- robosystems_client/models/subgraph_response.py +279 -0
- robosystems_client/models/{get_mcp_health_response_getmcphealth.py → subgraph_response_metadata_type_0.py} +5 -5
- robosystems_client/models/subgraph_summary.py +155 -0
- robosystems_client/models/subgraph_type.py +11 -0
- robosystems_client/models/subscription_info.py +0 -28
- robosystems_client/models/subscription_request.py +0 -9
- robosystems_client/models/subscription_response.py +0 -8
- robosystems_client/sdk-config.yaml +1 -1
- {robosystems_client-0.1.10.dist-info → robosystems_client-0.1.12.dist-info}/METADATA +1 -1
- {robosystems_client-0.1.10.dist-info → robosystems_client-0.1.12.dist-info}/RECORD +60 -42
- robosystems_client/api/status/get_mcp_health.py +0 -136
- {robosystems_client-0.1.10.dist-info → robosystems_client-0.1.12.dist-info}/WHEEL +0 -0
|
@@ -47,9 +47,6 @@ def _parse_response(
|
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
return response_200
|
|
50
|
-
if response.status_code == 402:
|
|
51
|
-
response_402 = cast(Any, None)
|
|
52
|
-
return response_402
|
|
53
50
|
if response.status_code == 403:
|
|
54
51
|
response_403 = cast(Any, None)
|
|
55
52
|
return response_403
|
|
@@ -100,10 +97,7 @@ def sync_detailed(
|
|
|
100
97
|
This is different from custom schema management - it shows what actually exists in the database,
|
|
101
98
|
useful for understanding the current graph structure before writing queries.
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
- Base cost: 2.0 credits
|
|
105
|
-
- Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x)
|
|
106
|
-
- Schema information is cached for performance
|
|
100
|
+
This operation is FREE - no credit consumption required.
|
|
107
101
|
|
|
108
102
|
Args:
|
|
109
103
|
graph_id (str): The graph database to get schema for
|
|
@@ -152,10 +146,7 @@ def sync(
|
|
|
152
146
|
This is different from custom schema management - it shows what actually exists in the database,
|
|
153
147
|
useful for understanding the current graph structure before writing queries.
|
|
154
148
|
|
|
155
|
-
|
|
156
|
-
- Base cost: 2.0 credits
|
|
157
|
-
- Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x)
|
|
158
|
-
- Schema information is cached for performance
|
|
149
|
+
This operation is FREE - no credit consumption required.
|
|
159
150
|
|
|
160
151
|
Args:
|
|
161
152
|
graph_id (str): The graph database to get schema for
|
|
@@ -199,10 +190,7 @@ async def asyncio_detailed(
|
|
|
199
190
|
This is different from custom schema management - it shows what actually exists in the database,
|
|
200
191
|
useful for understanding the current graph structure before writing queries.
|
|
201
192
|
|
|
202
|
-
|
|
203
|
-
- Base cost: 2.0 credits
|
|
204
|
-
- Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x)
|
|
205
|
-
- Schema information is cached for performance
|
|
193
|
+
This operation is FREE - no credit consumption required.
|
|
206
194
|
|
|
207
195
|
Args:
|
|
208
196
|
graph_id (str): The graph database to get schema for
|
|
@@ -249,10 +237,7 @@ async def asyncio(
|
|
|
249
237
|
This is different from custom schema management - it shows what actually exists in the database,
|
|
250
238
|
useful for understanding the current graph structure before writing queries.
|
|
251
239
|
|
|
252
|
-
|
|
253
|
-
- Base cost: 2.0 credits
|
|
254
|
-
- Multiplied by graph tier (standard=1x, enterprise=2x, premium=4x)
|
|
255
|
-
- Schema information is cached for performance
|
|
240
|
+
This operation is FREE - no credit consumption required.
|
|
256
241
|
|
|
257
242
|
Args:
|
|
258
243
|
graph_id (str): The graph database to get schema for
|
|
@@ -51,10 +51,6 @@ def _parse_response(
|
|
|
51
51
|
response_400 = ErrorResponse.from_dict(response.json())
|
|
52
52
|
|
|
53
53
|
return response_400
|
|
54
|
-
if response.status_code == 402:
|
|
55
|
-
response_402 = ErrorResponse.from_dict(response.json())
|
|
56
|
-
|
|
57
|
-
return response_402
|
|
58
54
|
if response.status_code == 403:
|
|
59
55
|
response_403 = ErrorResponse.from_dict(response.json())
|
|
60
56
|
|
|
@@ -115,9 +111,7 @@ def sync_detailed(
|
|
|
115
111
|
- Performance problems
|
|
116
112
|
- Naming conflicts
|
|
117
113
|
|
|
118
|
-
|
|
119
|
-
- Base cost: 5.0 credits
|
|
120
|
-
- Multiplied by graph tier
|
|
114
|
+
This operation is FREE - no credit consumption required.
|
|
121
115
|
|
|
122
116
|
Args:
|
|
123
117
|
graph_id (str): Graph database identifier
|
|
@@ -178,9 +172,7 @@ def sync(
|
|
|
178
172
|
- Performance problems
|
|
179
173
|
- Naming conflicts
|
|
180
174
|
|
|
181
|
-
|
|
182
|
-
- Base cost: 5.0 credits
|
|
183
|
-
- Multiplied by graph tier
|
|
175
|
+
This operation is FREE - no credit consumption required.
|
|
184
176
|
|
|
185
177
|
Args:
|
|
186
178
|
graph_id (str): Graph database identifier
|
|
@@ -236,9 +228,7 @@ async def asyncio_detailed(
|
|
|
236
228
|
- Performance problems
|
|
237
229
|
- Naming conflicts
|
|
238
230
|
|
|
239
|
-
|
|
240
|
-
- Base cost: 5.0 credits
|
|
241
|
-
- Multiplied by graph tier
|
|
231
|
+
This operation is FREE - no credit consumption required.
|
|
242
232
|
|
|
243
233
|
Args:
|
|
244
234
|
graph_id (str): Graph database identifier
|
|
@@ -297,9 +287,7 @@ async def asyncio(
|
|
|
297
287
|
- Performance problems
|
|
298
288
|
- Naming conflicts
|
|
299
289
|
|
|
300
|
-
|
|
301
|
-
- Base cost: 5.0 credits
|
|
302
|
-
- Multiplied by graph tier
|
|
290
|
+
This operation is FREE - no credit consumption required.
|
|
303
291
|
|
|
304
292
|
Args:
|
|
305
293
|
graph_id (str): Graph database identifier
|
|
@@ -58,7 +58,7 @@ def sync_detailed(
|
|
|
58
58
|
applications to display subscription options.
|
|
59
59
|
|
|
60
60
|
Includes:
|
|
61
|
-
- Graph subscription tiers (
|
|
61
|
+
- Graph subscription tiers (standard, enterprise, premium)
|
|
62
62
|
- Shared repository subscriptions (SEC, industry, economic data)
|
|
63
63
|
- Operation costs and credit information
|
|
64
64
|
- Features and capabilities for each tier
|
|
@@ -98,7 +98,7 @@ def sync(
|
|
|
98
98
|
applications to display subscription options.
|
|
99
99
|
|
|
100
100
|
Includes:
|
|
101
|
-
- Graph subscription tiers (
|
|
101
|
+
- Graph subscription tiers (standard, enterprise, premium)
|
|
102
102
|
- Shared repository subscriptions (SEC, industry, economic data)
|
|
103
103
|
- Operation costs and credit information
|
|
104
104
|
- Features and capabilities for each tier
|
|
@@ -134,7 +134,7 @@ async def asyncio_detailed(
|
|
|
134
134
|
applications to display subscription options.
|
|
135
135
|
|
|
136
136
|
Includes:
|
|
137
|
-
- Graph subscription tiers (
|
|
137
|
+
- Graph subscription tiers (standard, enterprise, premium)
|
|
138
138
|
- Shared repository subscriptions (SEC, industry, economic data)
|
|
139
139
|
- Operation costs and credit information
|
|
140
140
|
- Features and capabilities for each tier
|
|
@@ -172,7 +172,7 @@ async def asyncio(
|
|
|
172
172
|
applications to display subscription options.
|
|
173
173
|
|
|
174
174
|
Includes:
|
|
175
|
-
- Graph subscription tiers (
|
|
175
|
+
- Graph subscription tiers (standard, enterprise, premium)
|
|
176
176
|
- Shared repository subscriptions (SEC, industry, economic data)
|
|
177
177
|
- Operation costs and credit information
|
|
178
178
|
- Features and capabilities for each tier
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.create_subgraph_request import CreateSubgraphRequest
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.subgraph_response import SubgraphResponse
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
graph_id: str,
|
|
16
|
+
*,
|
|
17
|
+
body: CreateSubgraphRequest,
|
|
18
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
19
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
headers: dict[str, Any] = {}
|
|
22
|
+
if not isinstance(authorization, Unset):
|
|
23
|
+
headers["authorization"] = authorization
|
|
24
|
+
|
|
25
|
+
cookies = {}
|
|
26
|
+
if auth_token is not UNSET:
|
|
27
|
+
cookies["auth-token"] = auth_token
|
|
28
|
+
|
|
29
|
+
_kwargs: dict[str, Any] = {
|
|
30
|
+
"method": "post",
|
|
31
|
+
"url": f"/v1/{graph_id}/subgraphs",
|
|
32
|
+
"cookies": cookies,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_kwargs["json"] = body.to_dict()
|
|
36
|
+
|
|
37
|
+
headers["Content-Type"] = "application/json"
|
|
38
|
+
|
|
39
|
+
_kwargs["headers"] = headers
|
|
40
|
+
return _kwargs
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _parse_response(
|
|
44
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
45
|
+
) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
46
|
+
if response.status_code == 200:
|
|
47
|
+
response_200 = SubgraphResponse.from_dict(response.json())
|
|
48
|
+
|
|
49
|
+
return response_200
|
|
50
|
+
if response.status_code == 401:
|
|
51
|
+
response_401 = cast(Any, None)
|
|
52
|
+
return response_401
|
|
53
|
+
if response.status_code == 403:
|
|
54
|
+
response_403 = cast(Any, None)
|
|
55
|
+
return response_403
|
|
56
|
+
if response.status_code == 404:
|
|
57
|
+
response_404 = cast(Any, None)
|
|
58
|
+
return response_404
|
|
59
|
+
if response.status_code == 400:
|
|
60
|
+
response_400 = cast(Any, None)
|
|
61
|
+
return response_400
|
|
62
|
+
if response.status_code == 409:
|
|
63
|
+
response_409 = cast(Any, None)
|
|
64
|
+
return response_409
|
|
65
|
+
if response.status_code == 500:
|
|
66
|
+
response_500 = cast(Any, None)
|
|
67
|
+
return response_500
|
|
68
|
+
if response.status_code == 422:
|
|
69
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
70
|
+
|
|
71
|
+
return response_422
|
|
72
|
+
if client.raise_on_unexpected_status:
|
|
73
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
74
|
+
else:
|
|
75
|
+
return None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _build_response(
|
|
79
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
80
|
+
) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
81
|
+
return Response(
|
|
82
|
+
status_code=HTTPStatus(response.status_code),
|
|
83
|
+
content=response.content,
|
|
84
|
+
headers=response.headers,
|
|
85
|
+
parsed=_parse_response(client=client, response=response),
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def sync_detailed(
|
|
90
|
+
graph_id: str,
|
|
91
|
+
*,
|
|
92
|
+
client: AuthenticatedClient,
|
|
93
|
+
body: CreateSubgraphRequest,
|
|
94
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
95
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
96
|
+
) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
97
|
+
"""Create New Subgraph
|
|
98
|
+
|
|
99
|
+
Create a new subgraph database under an Enterprise or Premium parent graph.
|
|
100
|
+
|
|
101
|
+
**Requirements:**
|
|
102
|
+
- Parent graph must be Enterprise or Premium tier
|
|
103
|
+
- User must have admin access to parent graph
|
|
104
|
+
- Subgraph name must be unique within parent
|
|
105
|
+
- Subgraph name must be alphanumeric (1-20 chars)
|
|
106
|
+
|
|
107
|
+
**Subgraph Benefits:**
|
|
108
|
+
- Shares parent's infrastructure (no additional cost)
|
|
109
|
+
- Inherits parent's credit pool
|
|
110
|
+
- Isolated database on same instance
|
|
111
|
+
- Full Kuzu database capabilities
|
|
112
|
+
|
|
113
|
+
**Use Cases:**
|
|
114
|
+
- Separate environments (dev/staging/prod)
|
|
115
|
+
- Department-specific data isolation
|
|
116
|
+
- Multi-tenant applications
|
|
117
|
+
- Testing and experimentation
|
|
118
|
+
|
|
119
|
+
**Schema Inheritance:**
|
|
120
|
+
- Subgraphs can use parent's schema or custom extensions
|
|
121
|
+
- Extensions are additive only
|
|
122
|
+
- Base schema always included
|
|
123
|
+
|
|
124
|
+
**Limits:**
|
|
125
|
+
- Enterprise: Maximum 10 subgraphs
|
|
126
|
+
- Premium: Unlimited subgraphs
|
|
127
|
+
- Standard: Not supported
|
|
128
|
+
|
|
129
|
+
**Response includes:**
|
|
130
|
+
- `graph_id`: Full subgraph identifier
|
|
131
|
+
- `parent_graph_id`: Parent graph ID
|
|
132
|
+
- `subgraph_name`: Short name within parent
|
|
133
|
+
- `status`: Creation status
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
graph_id (str): Parent graph identifier
|
|
137
|
+
authorization (Union[None, Unset, str]):
|
|
138
|
+
auth_token (Union[None, Unset, str]):
|
|
139
|
+
body (CreateSubgraphRequest): Request model for creating a subgraph.
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Response[Union[Any, HTTPValidationError, SubgraphResponse]]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
kwargs = _get_kwargs(
|
|
150
|
+
graph_id=graph_id,
|
|
151
|
+
body=body,
|
|
152
|
+
authorization=authorization,
|
|
153
|
+
auth_token=auth_token,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
response = client.get_httpx_client().request(
|
|
157
|
+
**kwargs,
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
return _build_response(client=client, response=response)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def sync(
|
|
164
|
+
graph_id: str,
|
|
165
|
+
*,
|
|
166
|
+
client: AuthenticatedClient,
|
|
167
|
+
body: CreateSubgraphRequest,
|
|
168
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
169
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
170
|
+
) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
171
|
+
"""Create New Subgraph
|
|
172
|
+
|
|
173
|
+
Create a new subgraph database under an Enterprise or Premium parent graph.
|
|
174
|
+
|
|
175
|
+
**Requirements:**
|
|
176
|
+
- Parent graph must be Enterprise or Premium tier
|
|
177
|
+
- User must have admin access to parent graph
|
|
178
|
+
- Subgraph name must be unique within parent
|
|
179
|
+
- Subgraph name must be alphanumeric (1-20 chars)
|
|
180
|
+
|
|
181
|
+
**Subgraph Benefits:**
|
|
182
|
+
- Shares parent's infrastructure (no additional cost)
|
|
183
|
+
- Inherits parent's credit pool
|
|
184
|
+
- Isolated database on same instance
|
|
185
|
+
- Full Kuzu database capabilities
|
|
186
|
+
|
|
187
|
+
**Use Cases:**
|
|
188
|
+
- Separate environments (dev/staging/prod)
|
|
189
|
+
- Department-specific data isolation
|
|
190
|
+
- Multi-tenant applications
|
|
191
|
+
- Testing and experimentation
|
|
192
|
+
|
|
193
|
+
**Schema Inheritance:**
|
|
194
|
+
- Subgraphs can use parent's schema or custom extensions
|
|
195
|
+
- Extensions are additive only
|
|
196
|
+
- Base schema always included
|
|
197
|
+
|
|
198
|
+
**Limits:**
|
|
199
|
+
- Enterprise: Maximum 10 subgraphs
|
|
200
|
+
- Premium: Unlimited subgraphs
|
|
201
|
+
- Standard: Not supported
|
|
202
|
+
|
|
203
|
+
**Response includes:**
|
|
204
|
+
- `graph_id`: Full subgraph identifier
|
|
205
|
+
- `parent_graph_id`: Parent graph ID
|
|
206
|
+
- `subgraph_name`: Short name within parent
|
|
207
|
+
- `status`: Creation status
|
|
208
|
+
|
|
209
|
+
Args:
|
|
210
|
+
graph_id (str): Parent graph identifier
|
|
211
|
+
authorization (Union[None, Unset, str]):
|
|
212
|
+
auth_token (Union[None, Unset, str]):
|
|
213
|
+
body (CreateSubgraphRequest): Request model for creating a subgraph.
|
|
214
|
+
|
|
215
|
+
Raises:
|
|
216
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
217
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
218
|
+
|
|
219
|
+
Returns:
|
|
220
|
+
Union[Any, HTTPValidationError, SubgraphResponse]
|
|
221
|
+
"""
|
|
222
|
+
|
|
223
|
+
return sync_detailed(
|
|
224
|
+
graph_id=graph_id,
|
|
225
|
+
client=client,
|
|
226
|
+
body=body,
|
|
227
|
+
authorization=authorization,
|
|
228
|
+
auth_token=auth_token,
|
|
229
|
+
).parsed
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
async def asyncio_detailed(
|
|
233
|
+
graph_id: str,
|
|
234
|
+
*,
|
|
235
|
+
client: AuthenticatedClient,
|
|
236
|
+
body: CreateSubgraphRequest,
|
|
237
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
238
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
239
|
+
) -> Response[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
240
|
+
"""Create New Subgraph
|
|
241
|
+
|
|
242
|
+
Create a new subgraph database under an Enterprise or Premium parent graph.
|
|
243
|
+
|
|
244
|
+
**Requirements:**
|
|
245
|
+
- Parent graph must be Enterprise or Premium tier
|
|
246
|
+
- User must have admin access to parent graph
|
|
247
|
+
- Subgraph name must be unique within parent
|
|
248
|
+
- Subgraph name must be alphanumeric (1-20 chars)
|
|
249
|
+
|
|
250
|
+
**Subgraph Benefits:**
|
|
251
|
+
- Shares parent's infrastructure (no additional cost)
|
|
252
|
+
- Inherits parent's credit pool
|
|
253
|
+
- Isolated database on same instance
|
|
254
|
+
- Full Kuzu database capabilities
|
|
255
|
+
|
|
256
|
+
**Use Cases:**
|
|
257
|
+
- Separate environments (dev/staging/prod)
|
|
258
|
+
- Department-specific data isolation
|
|
259
|
+
- Multi-tenant applications
|
|
260
|
+
- Testing and experimentation
|
|
261
|
+
|
|
262
|
+
**Schema Inheritance:**
|
|
263
|
+
- Subgraphs can use parent's schema or custom extensions
|
|
264
|
+
- Extensions are additive only
|
|
265
|
+
- Base schema always included
|
|
266
|
+
|
|
267
|
+
**Limits:**
|
|
268
|
+
- Enterprise: Maximum 10 subgraphs
|
|
269
|
+
- Premium: Unlimited subgraphs
|
|
270
|
+
- Standard: Not supported
|
|
271
|
+
|
|
272
|
+
**Response includes:**
|
|
273
|
+
- `graph_id`: Full subgraph identifier
|
|
274
|
+
- `parent_graph_id`: Parent graph ID
|
|
275
|
+
- `subgraph_name`: Short name within parent
|
|
276
|
+
- `status`: Creation status
|
|
277
|
+
|
|
278
|
+
Args:
|
|
279
|
+
graph_id (str): Parent graph identifier
|
|
280
|
+
authorization (Union[None, Unset, str]):
|
|
281
|
+
auth_token (Union[None, Unset, str]):
|
|
282
|
+
body (CreateSubgraphRequest): Request model for creating a subgraph.
|
|
283
|
+
|
|
284
|
+
Raises:
|
|
285
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
286
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
287
|
+
|
|
288
|
+
Returns:
|
|
289
|
+
Response[Union[Any, HTTPValidationError, SubgraphResponse]]
|
|
290
|
+
"""
|
|
291
|
+
|
|
292
|
+
kwargs = _get_kwargs(
|
|
293
|
+
graph_id=graph_id,
|
|
294
|
+
body=body,
|
|
295
|
+
authorization=authorization,
|
|
296
|
+
auth_token=auth_token,
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
300
|
+
|
|
301
|
+
return _build_response(client=client, response=response)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
async def asyncio(
|
|
305
|
+
graph_id: str,
|
|
306
|
+
*,
|
|
307
|
+
client: AuthenticatedClient,
|
|
308
|
+
body: CreateSubgraphRequest,
|
|
309
|
+
authorization: Union[None, Unset, str] = UNSET,
|
|
310
|
+
auth_token: Union[None, Unset, str] = UNSET,
|
|
311
|
+
) -> Optional[Union[Any, HTTPValidationError, SubgraphResponse]]:
|
|
312
|
+
"""Create New Subgraph
|
|
313
|
+
|
|
314
|
+
Create a new subgraph database under an Enterprise or Premium parent graph.
|
|
315
|
+
|
|
316
|
+
**Requirements:**
|
|
317
|
+
- Parent graph must be Enterprise or Premium tier
|
|
318
|
+
- User must have admin access to parent graph
|
|
319
|
+
- Subgraph name must be unique within parent
|
|
320
|
+
- Subgraph name must be alphanumeric (1-20 chars)
|
|
321
|
+
|
|
322
|
+
**Subgraph Benefits:**
|
|
323
|
+
- Shares parent's infrastructure (no additional cost)
|
|
324
|
+
- Inherits parent's credit pool
|
|
325
|
+
- Isolated database on same instance
|
|
326
|
+
- Full Kuzu database capabilities
|
|
327
|
+
|
|
328
|
+
**Use Cases:**
|
|
329
|
+
- Separate environments (dev/staging/prod)
|
|
330
|
+
- Department-specific data isolation
|
|
331
|
+
- Multi-tenant applications
|
|
332
|
+
- Testing and experimentation
|
|
333
|
+
|
|
334
|
+
**Schema Inheritance:**
|
|
335
|
+
- Subgraphs can use parent's schema or custom extensions
|
|
336
|
+
- Extensions are additive only
|
|
337
|
+
- Base schema always included
|
|
338
|
+
|
|
339
|
+
**Limits:**
|
|
340
|
+
- Enterprise: Maximum 10 subgraphs
|
|
341
|
+
- Premium: Unlimited subgraphs
|
|
342
|
+
- Standard: Not supported
|
|
343
|
+
|
|
344
|
+
**Response includes:**
|
|
345
|
+
- `graph_id`: Full subgraph identifier
|
|
346
|
+
- `parent_graph_id`: Parent graph ID
|
|
347
|
+
- `subgraph_name`: Short name within parent
|
|
348
|
+
- `status`: Creation status
|
|
349
|
+
|
|
350
|
+
Args:
|
|
351
|
+
graph_id (str): Parent graph identifier
|
|
352
|
+
authorization (Union[None, Unset, str]):
|
|
353
|
+
auth_token (Union[None, Unset, str]):
|
|
354
|
+
body (CreateSubgraphRequest): Request model for creating a subgraph.
|
|
355
|
+
|
|
356
|
+
Raises:
|
|
357
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
358
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
359
|
+
|
|
360
|
+
Returns:
|
|
361
|
+
Union[Any, HTTPValidationError, SubgraphResponse]
|
|
362
|
+
"""
|
|
363
|
+
|
|
364
|
+
return (
|
|
365
|
+
await asyncio_detailed(
|
|
366
|
+
graph_id=graph_id,
|
|
367
|
+
client=client,
|
|
368
|
+
body=body,
|
|
369
|
+
authorization=authorization,
|
|
370
|
+
auth_token=auth_token,
|
|
371
|
+
)
|
|
372
|
+
).parsed
|