robosystems-client 0.2.3__py3-none-any.whl → 0.2.4__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.

Potentially problematic release.


This version of robosystems-client might be problematic. Click here for more details.

Files changed (103) hide show
  1. robosystems_client/api/agent/auto_select_agent.py +1 -41
  2. robosystems_client/api/agent/batch_process_queries.py +1 -41
  3. robosystems_client/api/agent/execute_specific_agent.py +1 -41
  4. robosystems_client/api/agent/get_agent_metadata.py +5 -49
  5. robosystems_client/api/agent/list_agents.py +4 -42
  6. robosystems_client/api/agent/recommend_agent.py +5 -45
  7. robosystems_client/api/auth/generate_sso_token.py +0 -18
  8. robosystems_client/api/auth/get_current_auth_user.py +14 -74
  9. robosystems_client/api/auth/logout_user.py +14 -50
  10. robosystems_client/api/auth/refresh_auth_session.py +14 -50
  11. robosystems_client/api/auth/resend_verification_email.py +14 -74
  12. robosystems_client/api/backup/create_backup.py +5 -45
  13. robosystems_client/api/backup/get_backup_download_url.py +4 -42
  14. robosystems_client/api/backup/get_backup_stats.py +5 -49
  15. robosystems_client/api/backup/list_backups.py +4 -42
  16. robosystems_client/api/backup/restore_backup.py +5 -45
  17. robosystems_client/api/connections/create_connection.py +5 -45
  18. robosystems_client/api/connections/create_link_token.py +5 -45
  19. robosystems_client/api/connections/delete_connection.py +5 -49
  20. robosystems_client/api/connections/exchange_link_token.py +5 -45
  21. robosystems_client/api/connections/get_connection.py +5 -49
  22. robosystems_client/api/connections/get_connection_options.py +5 -49
  23. robosystems_client/api/connections/init_o_auth.py +5 -45
  24. robosystems_client/api/connections/list_connections.py +4 -42
  25. robosystems_client/api/connections/oauth_callback.py +5 -45
  26. robosystems_client/api/connections/sync_connection.py +5 -45
  27. robosystems_client/api/graph_analytics/get_graph_metrics.py +5 -49
  28. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +4 -42
  29. robosystems_client/api/graph_billing/get_current_graph_bill.py +5 -49
  30. robosystems_client/api/graph_billing/get_graph_billing_history.py +4 -42
  31. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +5 -49
  32. robosystems_client/api/graph_billing/get_graph_usage_details.py +4 -42
  33. robosystems_client/api/graph_credits/check_credit_balance.py +0 -38
  34. robosystems_client/api/graph_credits/check_storage_limits.py +1 -45
  35. robosystems_client/api/graph_credits/get_credit_summary.py +1 -45
  36. robosystems_client/api/graph_credits/get_storage_usage.py +0 -38
  37. robosystems_client/api/graph_credits/list_credit_transactions.py +4 -42
  38. robosystems_client/api/graph_health/get_database_health.py +5 -49
  39. robosystems_client/api/graph_info/get_database_info.py +5 -49
  40. robosystems_client/api/graph_limits/get_graph_limits.py +5 -49
  41. robosystems_client/api/graphs/create_graph.py +21 -57
  42. robosystems_client/api/graphs/get_available_extensions.py +131 -15
  43. robosystems_client/api/graphs/get_graphs.py +154 -79
  44. robosystems_client/api/graphs/select_graph.py +117 -49
  45. robosystems_client/api/mcp/call_mcp_tool.py +24 -47
  46. robosystems_client/api/mcp/list_mcp_tools.py +13 -61
  47. robosystems_client/api/operations/cancel_operation.py +1 -45
  48. robosystems_client/api/operations/get_operation_status.py +1 -45
  49. robosystems_client/api/query/execute_cypher_query.py +69 -53
  50. robosystems_client/api/schema/export_graph_schema.py +223 -65
  51. robosystems_client/api/schema/get_graph_schema.py +137 -79
  52. robosystems_client/api/schema/validate_schema.py +5 -45
  53. robosystems_client/api/subgraphs/create_subgraph.py +5 -45
  54. robosystems_client/api/subgraphs/delete_subgraph.py +5 -45
  55. robosystems_client/api/subgraphs/get_subgraph_info.py +5 -49
  56. robosystems_client/api/subgraphs/get_subgraph_quota.py +5 -49
  57. robosystems_client/api/subgraphs/list_subgraphs.py +5 -49
  58. robosystems_client/api/tables/delete_file.py +181 -301
  59. robosystems_client/api/tables/get_file_info.py +117 -265
  60. robosystems_client/api/tables/get_upload_url.py +193 -389
  61. robosystems_client/api/tables/ingest_tables.py +277 -465
  62. robosystems_client/api/tables/list_table_files.py +193 -373
  63. robosystems_client/api/tables/list_tables.py +189 -361
  64. robosystems_client/api/tables/query_tables.py +85 -141
  65. robosystems_client/api/tables/update_file_status.py +205 -349
  66. robosystems_client/api/user/create_user_api_key.py +1 -41
  67. robosystems_client/api/user/get_all_credit_summaries.py +14 -111
  68. robosystems_client/api/user/get_current_user.py +14 -75
  69. robosystems_client/api/user/list_user_api_keys.py +14 -75
  70. robosystems_client/api/user/revoke_user_api_key.py +1 -45
  71. robosystems_client/api/user/update_user.py +1 -41
  72. robosystems_client/api/user/update_user_api_key.py +1 -41
  73. robosystems_client/api/user/update_user_password.py +1 -41
  74. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -38
  75. robosystems_client/api/user_analytics/get_user_usage_overview.py +14 -75
  76. robosystems_client/api/user_limits/get_all_shared_repository_limits.py +14 -105
  77. robosystems_client/api/user_limits/get_shared_repository_limits.py +1 -45
  78. robosystems_client/api/user_limits/get_user_limits.py +14 -75
  79. robosystems_client/api/user_limits/get_user_usage.py +14 -75
  80. robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +1 -45
  81. robosystems_client/api/user_subscriptions/get_repository_credits.py +1 -45
  82. robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +14 -75
  83. robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -38
  84. robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +1 -41
  85. robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +1 -41
  86. robosystems_client/extensions/__init__.py +8 -1
  87. robosystems_client/extensions/auth_integration.py +1 -2
  88. robosystems_client/extensions/query_client.py +3 -2
  89. robosystems_client/extensions/sse_client.py +1 -1
  90. robosystems_client/extensions/table_ingest_client.py +5 -0
  91. robosystems_client/extensions/utils.py +2 -2
  92. robosystems_client/models/__init__.py +4 -4
  93. robosystems_client/models/create_graph_request.py +4 -3
  94. robosystems_client/models/cypher_query_request.py +5 -22
  95. robosystems_client/models/schema_export_response.py +4 -2
  96. robosystems_client/models/schema_info_response.py +77 -0
  97. robosystems_client/models/{get_graph_schema_response_getgraphschema.py → schema_info_response_schema.py} +6 -6
  98. robosystems_client/models/schema_validation_response.py +7 -6
  99. robosystems_client/models/table_query_request.py +37 -2
  100. {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/METADATA +2 -4
  101. {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/RECORD +103 -102
  102. {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/WHEEL +0 -0
  103. {robosystems_client-0.2.3.dist-info → robosystems_client-0.2.4.dist-info}/licenses/LICENSE +0 -0
@@ -7,35 +7,19 @@ from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.http_validation_error import HTTPValidationError
9
9
  from ...models.tier_upgrade_request import TierUpgradeRequest
10
- from ...types import UNSET, Response, Unset
10
+ from ...types import Response
11
11
 
12
12
 
13
13
  def _get_kwargs(
14
14
  subscription_id: str,
15
15
  *,
16
16
  body: TierUpgradeRequest,
17
- token: Union[None, Unset, str] = UNSET,
18
- authorization: Union[None, Unset, str] = UNSET,
19
17
  ) -> dict[str, Any]:
20
18
  headers: dict[str, Any] = {}
21
- if not isinstance(authorization, Unset):
22
- headers["authorization"] = authorization
23
-
24
- params: dict[str, Any] = {}
25
-
26
- json_token: Union[None, Unset, str]
27
- if isinstance(token, Unset):
28
- json_token = UNSET
29
- else:
30
- json_token = token
31
- params["token"] = json_token
32
-
33
- params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
34
19
 
35
20
  _kwargs: dict[str, Any] = {
36
21
  "method": "put",
37
22
  "url": f"/v1/user/subscriptions/shared-repositories/{subscription_id}/upgrade",
38
- "params": params,
39
23
  }
40
24
 
41
25
  _kwargs["json"] = body.to_dict()
@@ -96,8 +80,6 @@ def sync_detailed(
96
80
  *,
97
81
  client: AuthenticatedClient,
98
82
  body: TierUpgradeRequest,
99
- token: Union[None, Unset, str] = UNSET,
100
- authorization: Union[None, Unset, str] = UNSET,
101
83
  ) -> Response[Union[Any, HTTPValidationError]]:
102
84
  """Upgrade Subscription Tier
103
85
 
@@ -105,8 +87,6 @@ def sync_detailed(
105
87
 
106
88
  Args:
107
89
  subscription_id (str):
108
- token (Union[None, Unset, str]): JWT token for SSE authentication
109
- authorization (Union[None, Unset, str]):
110
90
  body (TierUpgradeRequest): Request to upgrade subscription tier.
111
91
 
112
92
  Raises:
@@ -120,8 +100,6 @@ def sync_detailed(
120
100
  kwargs = _get_kwargs(
121
101
  subscription_id=subscription_id,
122
102
  body=body,
123
- token=token,
124
- authorization=authorization,
125
103
  )
126
104
 
127
105
  response = client.get_httpx_client().request(
@@ -136,8 +114,6 @@ def sync(
136
114
  *,
137
115
  client: AuthenticatedClient,
138
116
  body: TierUpgradeRequest,
139
- token: Union[None, Unset, str] = UNSET,
140
- authorization: Union[None, Unset, str] = UNSET,
141
117
  ) -> Optional[Union[Any, HTTPValidationError]]:
142
118
  """Upgrade Subscription Tier
143
119
 
@@ -145,8 +121,6 @@ def sync(
145
121
 
146
122
  Args:
147
123
  subscription_id (str):
148
- token (Union[None, Unset, str]): JWT token for SSE authentication
149
- authorization (Union[None, Unset, str]):
150
124
  body (TierUpgradeRequest): Request to upgrade subscription tier.
151
125
 
152
126
  Raises:
@@ -161,8 +135,6 @@ def sync(
161
135
  subscription_id=subscription_id,
162
136
  client=client,
163
137
  body=body,
164
- token=token,
165
- authorization=authorization,
166
138
  ).parsed
167
139
 
168
140
 
@@ -171,8 +143,6 @@ async def asyncio_detailed(
171
143
  *,
172
144
  client: AuthenticatedClient,
173
145
  body: TierUpgradeRequest,
174
- token: Union[None, Unset, str] = UNSET,
175
- authorization: Union[None, Unset, str] = UNSET,
176
146
  ) -> Response[Union[Any, HTTPValidationError]]:
177
147
  """Upgrade Subscription Tier
178
148
 
@@ -180,8 +150,6 @@ async def asyncio_detailed(
180
150
 
181
151
  Args:
182
152
  subscription_id (str):
183
- token (Union[None, Unset, str]): JWT token for SSE authentication
184
- authorization (Union[None, Unset, str]):
185
153
  body (TierUpgradeRequest): Request to upgrade subscription tier.
186
154
 
187
155
  Raises:
@@ -195,8 +163,6 @@ async def asyncio_detailed(
195
163
  kwargs = _get_kwargs(
196
164
  subscription_id=subscription_id,
197
165
  body=body,
198
- token=token,
199
- authorization=authorization,
200
166
  )
201
167
 
202
168
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -209,8 +175,6 @@ async def asyncio(
209
175
  *,
210
176
  client: AuthenticatedClient,
211
177
  body: TierUpgradeRequest,
212
- token: Union[None, Unset, str] = UNSET,
213
- authorization: Union[None, Unset, str] = UNSET,
214
178
  ) -> Optional[Union[Any, HTTPValidationError]]:
215
179
  """Upgrade Subscription Tier
216
180
 
@@ -218,8 +182,6 @@ async def asyncio(
218
182
 
219
183
  Args:
220
184
  subscription_id (str):
221
- token (Union[None, Unset, str]): JWT token for SSE authentication
222
- authorization (Union[None, Unset, str]):
223
185
  body (TierUpgradeRequest): Request to upgrade subscription tier.
224
186
 
225
187
  Raises:
@@ -235,7 +197,5 @@ async def asyncio(
235
197
  subscription_id=subscription_id,
236
198
  client=client,
237
199
  body=body,
238
- token=token,
239
- authorization=authorization,
240
200
  )
241
201
  ).parsed
@@ -94,6 +94,7 @@ except ImportError:
94
94
  HAS_PANDAS = False
95
95
  DataFrameQueryClient = None
96
96
  # Set placeholders for optional functions
97
+ query_result_to_dataframe = None
97
98
  parse_datetime_columns = None
98
99
  _stream_to_dataframe = None
99
100
  dataframe_to_cypher_params = None
@@ -189,14 +190,20 @@ def stream_query(graph_id: str, query: str, parameters=None, chunk_size=None):
189
190
 
190
191
 
191
192
  # DataFrame convenience functions (if pandas is available)
192
- if HAS_PANDAS:
193
+ if (
194
+ HAS_PANDAS
195
+ and query_result_to_dataframe is not None
196
+ and _stream_to_dataframe is not None
197
+ ):
193
198
 
194
199
  def query_to_dataframe(graph_id: str, query: str, parameters=None, **kwargs):
195
200
  """Execute query and return results as pandas DataFrame"""
201
+ assert query_result_to_dataframe is not None
196
202
  result = execute_query(graph_id, query, parameters)
197
203
  return query_result_to_dataframe(result, **kwargs)
198
204
 
199
205
  def stream_to_dataframe(graph_id: str, query: str, parameters=None, chunk_size=10000):
200
206
  """Stream query results and return as pandas DataFrame"""
207
+ assert _stream_to_dataframe is not None
201
208
  stream = stream_query(graph_id, query, parameters, chunk_size)
202
209
  return _stream_to_dataframe(stream, chunk_size)
@@ -60,12 +60,11 @@ class AuthenticatedExtensions(RoboSystemsExtensions):
60
60
 
61
61
  request = CypherQueryRequest(query=query, parameters=parameters or {})
62
62
 
63
- # Pass the token parameter along with the client
63
+ # Execute the query
64
64
  response = sync_detailed(
65
65
  graph_id=graph_id,
66
66
  client=self._authenticated_client,
67
67
  body=request,
68
- token=self._authenticated_client.token,
69
68
  )
70
69
 
71
70
  if response.parsed:
@@ -476,7 +476,7 @@ class QueryClient:
476
476
  self,
477
477
  graph_id: str,
478
478
  queries: List[str],
479
- parameters_list: Optional[List[Dict[str, Any]]] = None,
479
+ parameters_list: Optional[List[Optional[Dict[str, Any]]]] = None,
480
480
  parallel: bool = False,
481
481
  ) -> List[Union[QueryResult, Dict[str, Any]]]:
482
482
  """Execute multiple queries in batch
@@ -497,7 +497,8 @@ class QueryClient:
497
497
  ... ])
498
498
  """
499
499
  if parameters_list is None:
500
- parameters_list = [None] * len(queries)
500
+ # Create a list of None values for each query
501
+ parameters_list = [None for _ in queries]
501
502
 
502
503
  if len(queries) != len(parameters_list):
503
504
  raise ValueError("queries and parameters_list must have same length")
@@ -53,7 +53,7 @@ class SSEEvent:
53
53
  data: Any
54
54
  id: Optional[str] = None
55
55
  retry: Optional[int] = None
56
- timestamp: datetime = None
56
+ timestamp: Optional[datetime] = None
57
57
 
58
58
  def __post_init__(self) -> None:
59
59
  if self.timestamp is None:
@@ -114,6 +114,9 @@ class TableIngestClient:
114
114
  file_or_buffer, "read"
115
115
  )
116
116
 
117
+ # Initialize file_path for type checking
118
+ file_path: Optional[Path] = None
119
+
117
120
  if is_buffer:
118
121
  # Handle buffer upload
119
122
  file_name = options.file_name or "data.parquet"
@@ -218,6 +221,8 @@ class TableIngestClient:
218
221
  file_content = file_or_buffer.read()
219
222
  else:
220
223
  # Read from file path
224
+ if file_path is None:
225
+ raise ValueError("file_path should not be None when not using buffer")
221
226
  with open(file_path, "rb") as f:
222
227
  file_content = f.read()
223
228
 
@@ -144,7 +144,7 @@ class ResultProcessor:
144
144
  writer.writerow(headers)
145
145
 
146
146
  for row in data:
147
- if isinstance(row, dict):
147
+ if isinstance(row, dict) and headers:
148
148
  writer.writerow([row.get(h, "") for h in headers])
149
149
  elif isinstance(row, (list, tuple)):
150
150
  writer.writerow(row)
@@ -159,7 +159,7 @@ class ResultProcessor:
159
159
  writer.writerow(headers)
160
160
 
161
161
  for row in data:
162
- if isinstance(row, dict):
162
+ if isinstance(row, dict) and headers:
163
163
  writer.writerow([row.get(h, "") for h in headers])
164
164
  elif isinstance(row, (list, tuple)):
165
165
  writer.writerow(row)
@@ -124,9 +124,6 @@ from .get_graph_limits_response_getgraphlimits import (
124
124
  from .get_graph_monthly_bill_response_getgraphmonthlybill import (
125
125
  GetGraphMonthlyBillResponseGetgraphmonthlybill,
126
126
  )
127
- from .get_graph_schema_response_getgraphschema import (
128
- GetGraphSchemaResponseGetgraphschema,
129
- )
130
127
  from .get_graph_usage_details_response_getgraphusagedetails import (
131
128
  GetGraphUsageDetailsResponseGetgraphusagedetails,
132
129
  )
@@ -202,6 +199,8 @@ from .schema_export_response_data_stats_type_0 import SchemaExportResponseDataSt
202
199
  from .schema_export_response_schema_definition_type_0 import (
203
200
  SchemaExportResponseSchemaDefinitionType0,
204
201
  )
202
+ from .schema_info_response import SchemaInfoResponse
203
+ from .schema_info_response_schema import SchemaInfoResponseSchema
205
204
  from .schema_validation_request import SchemaValidationRequest
206
205
  from .schema_validation_request_schema_definition_type_0 import (
207
206
  SchemaValidationRequestSchemaDefinitionType0,
@@ -361,7 +360,6 @@ __all__ = (
361
360
  "GetGraphBillingHistoryResponseGetgraphbillinghistory",
362
361
  "GetGraphLimitsResponseGetgraphlimits",
363
362
  "GetGraphMonthlyBillResponseGetgraphmonthlybill",
364
- "GetGraphSchemaResponseGetgraphschema",
365
363
  "GetGraphUsageDetailsResponseGetgraphusagedetails",
366
364
  "GetOperationStatusResponseGetoperationstatus",
367
365
  "GetSharedRepositoryLimitsResponseGetsharedrepositorylimits",
@@ -417,6 +415,8 @@ __all__ = (
417
415
  "SchemaExportResponse",
418
416
  "SchemaExportResponseDataStatsType0",
419
417
  "SchemaExportResponseSchemaDefinitionType0",
418
+ "SchemaInfoResponse",
419
+ "SchemaInfoResponseSchema",
420
420
  "SchemaValidationRequest",
421
421
  "SchemaValidationRequestSchemaDefinitionType0",
422
422
  "SchemaValidationResponse",
@@ -20,9 +20,10 @@ class CreateGraphRequest:
20
20
  """Request model for creating a new graph.
21
21
 
22
22
  Example:
23
- {'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, 'instance_tier':
24
- 'kuzu-standard', 'metadata': {'description': 'Main production graph', 'graph_name': 'Production System',
25
- 'schema_extensions': ['roboledger']}, 'tags': ['production', 'finance']}
23
+ {'initial_entity': {'cik': '0001234567', 'name': 'Acme Consulting LLC', 'uri': 'https://acmeconsulting.com'},
24
+ 'instance_tier': 'kuzu-standard', 'metadata': {'description': 'Professional consulting services with full
25
+ accounting integration', 'graph_name': 'Acme Consulting LLC', 'schema_extensions': ['roboledger']}, 'tags':
26
+ ['consulting', 'professional-services']}
26
27
 
27
28
  Attributes:
28
29
  metadata (GraphMetadata): Metadata for graph creation.
@@ -2,7 +2,6 @@ from collections.abc import Mapping
2
2
  from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
- from attrs import field as _attrs_field
6
5
 
7
6
  from ..types import UNSET, Unset
8
7
 
@@ -20,15 +19,16 @@ class CypherQueryRequest:
20
19
  """Request model for Cypher query execution.
21
20
 
22
21
  Attributes:
23
- query (str): The Cypher query to execute
24
- parameters (Union['CypherQueryRequestParametersType0', None, Unset]): Optional parameters for the Cypher query
22
+ query (str): The Cypher query to execute. Use parameters ($param_name) for all dynamic values to prevent
23
+ injection attacks.
24
+ parameters (Union['CypherQueryRequestParametersType0', None, Unset]): Query parameters for safe value
25
+ substitution. ALWAYS use parameters instead of string interpolation.
25
26
  timeout (Union[None, Unset, int]): Query timeout in seconds (1-300) Default: 60.
26
27
  """
27
28
 
28
29
  query: str
29
30
  parameters: Union["CypherQueryRequestParametersType0", None, Unset] = UNSET
30
31
  timeout: Union[None, Unset, int] = 60
31
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
32
 
33
33
  def to_dict(self) -> dict[str, Any]:
34
34
  from ..models.cypher_query_request_parameters_type_0 import (
@@ -52,7 +52,7 @@ class CypherQueryRequest:
52
52
  timeout = self.timeout
53
53
 
54
54
  field_dict: dict[str, Any] = {}
55
- field_dict.update(self.additional_properties)
55
+
56
56
  field_dict.update(
57
57
  {
58
58
  "query": query,
@@ -108,21 +108,4 @@ class CypherQueryRequest:
108
108
  timeout=timeout,
109
109
  )
110
110
 
111
- cypher_query_request.additional_properties = d
112
111
  return cypher_query_request
113
-
114
- @property
115
- def additional_keys(self) -> list[str]:
116
- return list(self.additional_properties.keys())
117
-
118
- def __getitem__(self, key: str) -> Any:
119
- return self.additional_properties[key]
120
-
121
- def __setitem__(self, key: str, value: Any) -> None:
122
- self.additional_properties[key] = value
123
-
124
- def __delitem__(self, key: str) -> None:
125
- del self.additional_properties[key]
126
-
127
- def __contains__(self, key: str) -> bool:
128
- return key in self.additional_properties
@@ -24,10 +24,12 @@ class SchemaExportResponse:
24
24
 
25
25
  Attributes:
26
26
  graph_id (str): Graph ID
27
- schema_definition (Union['SchemaExportResponseSchemaDefinitionType0', str]): Exported schema definition
27
+ schema_definition (Union['SchemaExportResponseSchemaDefinitionType0', str]): Exported schema definition (format
28
+ depends on 'format' parameter)
28
29
  format_ (str): Export format used
29
30
  exported_at (str): Export timestamp
30
- data_stats (Union['SchemaExportResponseDataStatsType0', None, Unset]): Data statistics if requested
31
+ data_stats (Union['SchemaExportResponseDataStatsType0', None, Unset]): Data statistics if requested (only when
32
+ include_data_stats=true)
31
33
  """
32
34
 
33
35
  graph_id: str
@@ -0,0 +1,77 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.schema_info_response_schema import SchemaInfoResponseSchema
9
+
10
+
11
+ T = TypeVar("T", bound="SchemaInfoResponse")
12
+
13
+
14
+ @_attrs_define
15
+ class SchemaInfoResponse:
16
+ """Response model for runtime schema introspection.
17
+
18
+ This model represents the actual current state of the graph database,
19
+ showing what node labels, relationship types, and properties exist right now.
20
+
21
+ Attributes:
22
+ graph_id (str): Graph database identifier
23
+ schema (SchemaInfoResponseSchema): Runtime schema information showing actual database structure
24
+ """
25
+
26
+ graph_id: str
27
+ schema: "SchemaInfoResponseSchema"
28
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
+
30
+ def to_dict(self) -> dict[str, Any]:
31
+ graph_id = self.graph_id
32
+
33
+ schema = self.schema.to_dict()
34
+
35
+ field_dict: dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update(
38
+ {
39
+ "graph_id": graph_id,
40
+ "schema": schema,
41
+ }
42
+ )
43
+
44
+ return field_dict
45
+
46
+ @classmethod
47
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
48
+ from ..models.schema_info_response_schema import SchemaInfoResponseSchema
49
+
50
+ d = dict(src_dict)
51
+ graph_id = d.pop("graph_id")
52
+
53
+ schema = SchemaInfoResponseSchema.from_dict(d.pop("schema"))
54
+
55
+ schema_info_response = cls(
56
+ graph_id=graph_id,
57
+ schema=schema,
58
+ )
59
+
60
+ schema_info_response.additional_properties = d
61
+ return schema_info_response
62
+
63
+ @property
64
+ def additional_keys(self) -> list[str]:
65
+ return list(self.additional_properties.keys())
66
+
67
+ def __getitem__(self, key: str) -> Any:
68
+ return self.additional_properties[key]
69
+
70
+ def __setitem__(self, key: str, value: Any) -> None:
71
+ self.additional_properties[key] = value
72
+
73
+ def __delitem__(self, key: str) -> None:
74
+ del self.additional_properties[key]
75
+
76
+ def __contains__(self, key: str) -> bool:
77
+ return key in self.additional_properties
@@ -4,12 +4,12 @@ from typing import Any, TypeVar
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
- T = TypeVar("T", bound="GetGraphSchemaResponseGetgraphschema")
7
+ T = TypeVar("T", bound="SchemaInfoResponseSchema")
8
8
 
9
9
 
10
10
  @_attrs_define
11
- class GetGraphSchemaResponseGetgraphschema:
12
- """ """
11
+ class SchemaInfoResponseSchema:
12
+ """Runtime schema information showing actual database structure"""
13
13
 
14
14
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
15
15
 
@@ -22,10 +22,10 @@ class GetGraphSchemaResponseGetgraphschema:
22
22
  @classmethod
23
23
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
24
  d = dict(src_dict)
25
- get_graph_schema_response_getgraphschema = cls()
25
+ schema_info_response_schema = cls()
26
26
 
27
- get_graph_schema_response_getgraphschema.additional_properties = d
28
- return get_graph_schema_response_getgraphschema
27
+ schema_info_response_schema.additional_properties = d
28
+ return schema_info_response_schema
29
29
 
30
30
  @property
31
31
  def additional_keys(self) -> list[str]:
@@ -25,12 +25,13 @@ class SchemaValidationResponse:
25
25
  Attributes:
26
26
  valid (bool): Whether the schema is valid
27
27
  message (str): Validation message
28
- errors (Union[None, Unset, list[str]]): List of validation errors
29
- warnings (Union[None, Unset, list[str]]): List of warnings
30
- stats (Union['SchemaValidationResponseStatsType0', None, Unset]): Schema statistics (nodes, relationships,
31
- properties)
32
- compatibility (Union['SchemaValidationResponseCompatibilityType0', None, Unset]): Compatibility check results if
33
- requested
28
+ errors (Union[None, Unset, list[str]]): List of validation errors (only present when valid=false)
29
+ warnings (Union[None, Unset, list[str]]): List of validation warnings (schema is still valid but has potential
30
+ issues)
31
+ stats (Union['SchemaValidationResponseStatsType0', None, Unset]): Schema statistics (only present when
32
+ valid=true)
33
+ compatibility (Union['SchemaValidationResponseCompatibilityType0', None, Unset]): Compatibility check results
34
+ (only when check_compatibility specified)
34
35
  """
35
36
 
36
37
  valid: bool
@@ -1,8 +1,10 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar
2
+ from typing import Any, TypeVar, Union, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
 
6
+ from ..types import UNSET, Unset
7
+
6
8
  T = TypeVar("T", bound="TableQueryRequest")
7
9
 
8
10
 
@@ -10,14 +12,27 @@ T = TypeVar("T", bound="TableQueryRequest")
10
12
  class TableQueryRequest:
11
13
  """
12
14
  Attributes:
13
- sql (str): SQL query to execute on staging tables
15
+ sql (str): SQL query to execute on staging tables. Use ? placeholders or $param_name for dynamic values to
16
+ prevent SQL injection.
17
+ parameters (Union[None, Unset, list[Any]]): Query parameters for safe value substitution. ALWAYS use parameters
18
+ instead of string concatenation.
14
19
  """
15
20
 
16
21
  sql: str
22
+ parameters: Union[None, Unset, list[Any]] = UNSET
17
23
 
18
24
  def to_dict(self) -> dict[str, Any]:
19
25
  sql = self.sql
20
26
 
27
+ parameters: Union[None, Unset, list[Any]]
28
+ if isinstance(self.parameters, Unset):
29
+ parameters = UNSET
30
+ elif isinstance(self.parameters, list):
31
+ parameters = self.parameters
32
+
33
+ else:
34
+ parameters = self.parameters
35
+
21
36
  field_dict: dict[str, Any] = {}
22
37
 
23
38
  field_dict.update(
@@ -25,6 +40,8 @@ class TableQueryRequest:
25
40
  "sql": sql,
26
41
  }
27
42
  )
43
+ if parameters is not UNSET:
44
+ field_dict["parameters"] = parameters
28
45
 
29
46
  return field_dict
30
47
 
@@ -33,8 +50,26 @@ class TableQueryRequest:
33
50
  d = dict(src_dict)
34
51
  sql = d.pop("sql")
35
52
 
53
+ def _parse_parameters(data: object) -> Union[None, Unset, list[Any]]:
54
+ if data is None:
55
+ return data
56
+ if isinstance(data, Unset):
57
+ return data
58
+ try:
59
+ if not isinstance(data, list):
60
+ raise TypeError()
61
+ parameters_type_0 = cast(list[Any], data)
62
+
63
+ return parameters_type_0
64
+ except: # noqa: E722
65
+ pass
66
+ return cast(Union[None, Unset, list[Any]], data)
67
+
68
+ parameters = _parse_parameters(d.pop("parameters", UNSET))
69
+
36
70
  table_query_request = cls(
37
71
  sql=sql,
72
+ parameters=parameters,
38
73
  )
39
74
 
40
75
  return table_query_request
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robosystems-client
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Python Client for RoboSystems financial graph database API
5
5
  Author: RFS LLC
6
6
  License: MIT
@@ -35,9 +35,9 @@ Provides-Extra: all
35
35
  Requires-Dist: pandas>=1.5.0; extra == 'all'
36
36
  Requires-Dist: pyarrow>=10.0.0; extra == 'all'
37
37
  Provides-Extra: dev
38
+ Requires-Dist: basedpyright>=1.21.0; extra == 'dev'
38
39
  Requires-Dist: build>=1.0.0; extra == 'dev'
39
40
  Requires-Dist: openapi-python-client>=0.21.8; extra == 'dev'
40
- Requires-Dist: pyright>=1.1.402; extra == 'dev'
41
41
  Requires-Dist: pytest-asyncio>=0.26.0; extra == 'dev'
42
42
  Requires-Dist: pytest-httpx>=0.30.0; extra == 'dev'
43
43
  Requires-Dist: pytest>=8.3.5; extra == 'dev'
@@ -80,8 +80,6 @@ pip install robosystems-client[tables]
80
80
  pip install robosystems-client[all]
81
81
  ```
82
82
 
83
- See the [examples](./examples) directory for usage guides.
84
-
85
83
  ## API Reference
86
84
 
87
85
  - [API reference](https://api.robosystems.ai)