robosystems-client 0.1.15__py3-none-any.whl → 0.1.17__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 (130) hide show
  1. robosystems_client/api/agent/auto_select_agent.py +246 -0
  2. robosystems_client/api/agent/batch_process_queries.py +261 -0
  3. robosystems_client/api/agent/execute_specific_agent.py +258 -0
  4. robosystems_client/api/agent/get_agent_metadata.py +238 -0
  5. robosystems_client/api/agent/list_agents.py +246 -0
  6. robosystems_client/api/agent/recommend_agent.py +255 -0
  7. robosystems_client/api/auth/forgot_password.py +191 -0
  8. robosystems_client/api/auth/generate_sso_token.py +18 -0
  9. robosystems_client/api/auth/get_current_auth_user.py +4 -22
  10. robosystems_client/api/auth/logout_user.py +17 -17
  11. robosystems_client/api/auth/{refresh_session.py → refresh_auth_session.py} +21 -21
  12. robosystems_client/api/auth/resend_verification_email.py +222 -0
  13. robosystems_client/api/auth/reset_password.py +177 -0
  14. robosystems_client/api/auth/validate_reset_token.py +171 -0
  15. robosystems_client/api/auth/verify_email.py +177 -0
  16. robosystems_client/api/backup/create_backup.py +0 -18
  17. robosystems_client/api/backup/export_backup.py +0 -18
  18. robosystems_client/api/backup/get_backup_download_url.py +0 -18
  19. robosystems_client/api/backup/get_backup_stats.py +0 -18
  20. robosystems_client/api/backup/list_backups.py +0 -18
  21. robosystems_client/api/backup/restore_backup.py +0 -18
  22. robosystems_client/api/connections/create_connection.py +0 -18
  23. robosystems_client/api/connections/create_link_token.py +0 -18
  24. robosystems_client/api/connections/delete_connection.py +0 -18
  25. robosystems_client/api/connections/exchange_link_token.py +0 -18
  26. robosystems_client/api/connections/get_connection.py +0 -18
  27. robosystems_client/api/connections/get_connection_options.py +0 -18
  28. robosystems_client/api/connections/init_o_auth.py +0 -18
  29. robosystems_client/api/connections/list_connections.py +0 -18
  30. robosystems_client/api/connections/oauth_callback.py +4 -22
  31. robosystems_client/api/connections/sync_connection.py +0 -18
  32. robosystems_client/api/copy/copy_data_to_graph.py +0 -18
  33. robosystems_client/api/create/create_graph.py +0 -18
  34. robosystems_client/api/graph_analytics/get_graph_metrics.py +0 -18
  35. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -18
  36. robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -18
  37. robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -18
  38. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -18
  39. robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -18
  40. robosystems_client/api/graph_credits/check_credit_balance.py +14 -28
  41. robosystems_client/api/graph_credits/check_storage_limits.py +0 -18
  42. robosystems_client/api/graph_credits/get_credit_summary.py +0 -18
  43. robosystems_client/api/graph_credits/get_storage_usage.py +0 -18
  44. robosystems_client/api/graph_credits/list_credit_transactions.py +0 -18
  45. robosystems_client/api/graph_health/get_database_health.py +0 -18
  46. robosystems_client/api/graph_info/get_database_info.py +0 -18
  47. robosystems_client/api/graph_limits/get_graph_limits.py +0 -18
  48. robosystems_client/api/mcp/call_mcp_tool.py +0 -18
  49. robosystems_client/api/mcp/list_mcp_tools.py +0 -18
  50. robosystems_client/api/operations/cancel_operation.py +0 -18
  51. robosystems_client/api/operations/get_operation_status.py +0 -18
  52. robosystems_client/api/operations/stream_operation_events.py +0 -18
  53. robosystems_client/api/query/execute_cypher_query.py +0 -18
  54. robosystems_client/api/schema/export_graph_schema.py +0 -18
  55. robosystems_client/api/schema/get_graph_schema_info.py +0 -18
  56. robosystems_client/api/schema/list_schema_extensions.py +0 -18
  57. robosystems_client/api/schema/validate_schema.py +0 -18
  58. robosystems_client/api/subgraphs/create_subgraph.py +0 -18
  59. robosystems_client/api/subgraphs/delete_subgraph.py +0 -18
  60. robosystems_client/api/subgraphs/get_subgraph_info.py +0 -18
  61. robosystems_client/api/subgraphs/get_subgraph_quota.py +0 -18
  62. robosystems_client/api/subgraphs/list_subgraphs.py +0 -18
  63. robosystems_client/api/user/create_user_api_key.py +0 -18
  64. robosystems_client/api/user/get_all_credit_summaries.py +0 -18
  65. robosystems_client/api/user/get_current_user.py +0 -18
  66. robosystems_client/api/user/get_user_graphs.py +0 -18
  67. robosystems_client/api/user/list_user_api_keys.py +0 -18
  68. robosystems_client/api/user/revoke_user_api_key.py +0 -18
  69. robosystems_client/api/user/select_user_graph.py +0 -18
  70. robosystems_client/api/user/update_user.py +0 -18
  71. robosystems_client/api/user/update_user_api_key.py +0 -18
  72. robosystems_client/api/user/update_user_password.py +0 -18
  73. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -18
  74. robosystems_client/api/user_analytics/get_user_usage_overview.py +0 -18
  75. robosystems_client/api/user_limits/get_all_shared_repository_limits.py +0 -18
  76. robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -18
  77. robosystems_client/api/user_limits/get_user_limits.py +0 -18
  78. robosystems_client/api/user_limits/get_user_usage.py +0 -18
  79. robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +0 -18
  80. robosystems_client/api/user_subscriptions/get_repository_credits.py +0 -18
  81. robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +0 -18
  82. robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +0 -18
  83. robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +0 -18
  84. robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +0 -18
  85. robosystems_client/models/__init__.py +51 -3
  86. robosystems_client/models/agent_list_response.py +74 -0
  87. robosystems_client/models/agent_list_response_agents.py +67 -0
  88. robosystems_client/models/{credits_summary_response_credits_by_addon_item.py → agent_list_response_agents_additional_property.py} +5 -5
  89. robosystems_client/models/agent_message.py +35 -1
  90. robosystems_client/models/agent_metadata_response.py +133 -0
  91. robosystems_client/models/agent_mode.py +11 -0
  92. robosystems_client/models/agent_recommendation.py +106 -0
  93. robosystems_client/models/agent_recommendation_request.py +108 -0
  94. robosystems_client/models/agent_recommendation_request_context_type_0.py +44 -0
  95. robosystems_client/models/agent_recommendation_response.py +82 -0
  96. robosystems_client/models/agent_request.py +110 -6
  97. robosystems_client/models/agent_response.py +161 -11
  98. robosystems_client/models/agent_response_error_details_type_0.py +44 -0
  99. robosystems_client/models/agent_response_tokens_used_type_0.py +44 -0
  100. robosystems_client/models/auth_response.py +20 -6
  101. robosystems_client/models/batch_agent_request.py +85 -0
  102. robosystems_client/models/batch_agent_response.py +90 -0
  103. robosystems_client/models/credit_summary.py +35 -9
  104. robosystems_client/models/credits_summary_response.py +47 -21
  105. robosystems_client/models/credits_summary_response_credits_by_addon_type_0_item.py +44 -0
  106. robosystems_client/models/custom_schema_definition.py +7 -14
  107. robosystems_client/models/custom_schema_definition_metadata.py +1 -6
  108. robosystems_client/models/database_health_response.py +11 -11
  109. robosystems_client/models/database_info_response.py +13 -14
  110. robosystems_client/models/email_verification_request.py +60 -0
  111. robosystems_client/models/error_response.py +4 -8
  112. robosystems_client/models/forgot_password_request.py +60 -0
  113. robosystems_client/models/forgot_password_response_forgotpassword.py +44 -0
  114. robosystems_client/models/graph_metadata.py +4 -5
  115. robosystems_client/models/health_status.py +2 -2
  116. robosystems_client/models/repository_credits_response.py +43 -16
  117. robosystems_client/models/resend_verification_email_response_resendverificationemail.py +44 -0
  118. robosystems_client/models/reset_password_request.py +68 -0
  119. robosystems_client/models/reset_password_validate_response.py +82 -0
  120. robosystems_client/models/schema_export_response.py +5 -8
  121. robosystems_client/models/schema_validation_request.py +3 -5
  122. robosystems_client/models/schema_validation_response.py +5 -5
  123. robosystems_client/models/selection_criteria.py +122 -0
  124. robosystems_client/models/success_response.py +1 -1
  125. robosystems_client-0.1.17.dist-info/METADATA +89 -0
  126. {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/RECORD +128 -97
  127. robosystems_client-0.1.17.dist-info/licenses/LICENSE +21 -0
  128. robosystems_client/api/agent/query_financial_agent.py +0 -423
  129. robosystems_client-0.1.15.dist-info/METADATA +0 -302
  130. {robosystems_client-0.1.15.dist-info → robosystems_client-0.1.17.dist-info}/WHEEL +0 -0
@@ -1,302 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: robosystems-client
3
- Version: 0.1.15
4
- Summary: Python Client for RoboSystems financial graph database API
5
- Author: Harbinger FinLab
6
- License: MIT
7
- Keywords: api,client,financial,graph,kuzu,robosystems,sdk
8
- Classifier: Development Status :: 4 - Beta
9
- Classifier: Framework :: AsyncIO
10
- Classifier: Framework :: Pydantic
11
- Classifier: Framework :: Pydantic :: 2
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Intended Audience :: Financial and Insurance Industry
14
- Classifier: License :: OSI Approved :: MIT License
15
- Classifier: Natural Language :: English
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Topic :: Database :: Front-Ends
22
- Classifier: Topic :: Internet :: WWW/HTTP
23
- Classifier: Topic :: Office/Business :: Financial
24
- Classifier: Topic :: Office/Business :: Financial :: Accounting
25
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Classifier: Typing :: Typed
27
- Requires-Python: >=3.10
28
- Requires-Dist: attrs>=23.0.0
29
- Requires-Dist: httpx>=0.28.1
30
- Requires-Dist: pydantic>=2.11.7
31
- Requires-Dist: python-dateutil>=2.8.0
32
- Requires-Dist: typing-extensions>=4.0.0
33
- Provides-Extra: all
34
- Requires-Dist: httpx>=0.28.1; extra == 'all'
35
- Requires-Dist: pandas>=1.5.0; extra == 'all'
36
- Provides-Extra: dev
37
- Requires-Dist: build>=1.0.0; extra == 'dev'
38
- Requires-Dist: openapi-python-client>=0.21.8; extra == 'dev'
39
- Requires-Dist: pyright>=1.1.402; extra == 'dev'
40
- Requires-Dist: pytest-asyncio>=0.26.0; extra == 'dev'
41
- Requires-Dist: pytest-httpx>=0.30.0; extra == 'dev'
42
- Requires-Dist: pytest>=8.3.5; extra == 'dev'
43
- Requires-Dist: ruff>=0.12; extra == 'dev'
44
- Requires-Dist: twine>=5.0.0; extra == 'dev'
45
- Provides-Extra: extensions
46
- Requires-Dist: httpx>=0.28.1; extra == 'extensions'
47
- Requires-Dist: pandas>=1.5.0; extra == 'extensions'
48
- Description-Content-Type: text/markdown
49
-
50
- # RoboSystems Python Client
51
-
52
- [![PyPI version](https://badge.fury.io/py/robosystems-client.svg)](https://pypi.org/project/robosystems-client/)
53
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
54
-
55
- Official Python Client for the RoboSystems Financial Knowledge Graph API. Access comprehensive financial data including accounting records, SEC filings, and advanced graph analytics through a type-safe, async-ready Python interface.
56
-
57
- ## Features
58
-
59
- - **Type-safe API client** with full type hints and Pydantic models
60
- - **Async/await support** for high-performance applications
61
- - **Multi-tenant support** with graph-scoped operations
62
- - **Authentication handling** with API key and SSO support
63
- - **Comprehensive error handling** with custom exceptions
64
- - **Pagination support** for large data sets
65
- - **Streaming query support** for memory-efficient processing of large result sets
66
- - **Financial AI Agent** integration for natural language queries
67
-
68
- ## Installation
69
-
70
- ```bash
71
- pip install robosystems-client
72
- ```
73
-
74
- ## Quick Start
75
-
76
- ```python
77
- from robosystems_client import RoboSystemsSDK
78
- from robosystems_client.api.query import execute_cypher_query
79
- from robosystems_client.models import CypherQueryRequest
80
-
81
- # Initialize the SDK
82
- sdk = RoboSystemsSDK(
83
- base_url="https://api.robosystems.ai",
84
- token="your-api-key",
85
- auth_header_name="X-API-Key",
86
- prefix="" # No prefix needed for API key
87
- )
88
-
89
- # Async usage (recommended)
90
- import asyncio
91
-
92
- async def main():
93
- # Execute a Cypher query
94
- query = CypherQueryRequest(
95
- query="MATCH (c:Company)-[:HAS_FILING]->(f:Filing) RETURN c.name, f.form_type, f.filing_date LIMIT 10"
96
- )
97
- result = await execute_cypher_query.asyncio(graph_id="your-graph-id", client=sdk, body=query)
98
-
99
- for row in result.data:
100
- print(f"{row['c.name']} filed {row['f.form_type']} on {row['f.filing_date']}")
101
-
102
- asyncio.run(main())
103
- ```
104
-
105
- ## Key API Endpoints
106
-
107
- ### Graph Queries & Analytics
108
- ```python
109
- from robosystems_client.api.query import execute_cypher_query
110
- from robosystems_client.api.graph_analytics import get_graph_metrics
111
- from robosystems_client.models import CypherQueryRequest
112
-
113
- # Execute Cypher queries with parameters
114
- query_request = CypherQueryRequest(
115
- query="""MATCH (c:Company {ticker: $ticker})-[:HAS_METRIC]->(m:Metric)
116
- WHERE m.fiscal_year >= $start_year
117
- RETURN m.name, m.value, m.fiscal_year
118
- ORDER BY m.fiscal_year DESC""",
119
- parameters={"ticker": "AAPL", "start_year": 2020}
120
- )
121
- results = await execute_cypher_query.asyncio(
122
- graph_id="your-graph-id",
123
- client=sdk,
124
- body=query_request
125
- )
126
-
127
- # Get graph analytics and metrics
128
- metrics = await get_graph_metrics.asyncio(
129
- graph_id="your-graph-id",
130
- client=sdk
131
- )
132
- print(f"Total nodes: {metrics.total_nodes}")
133
- print(f"Total relationships: {metrics.total_relationships}")
134
- ```
135
-
136
- ### Financial AI Agent
137
- ```python
138
- from robosystems_client.api.agent import query_financial_agent
139
- from robosystems_client.models import AgentRequest
140
-
141
- # Natural language financial queries
142
- agent_request = AgentRequest(
143
- message="What was Apple's revenue growth over the last 3 years?",
144
- force_extended_analysis=True,
145
- context={"include_schema": True}
146
- )
147
- agent_response = await query_financial_agent.asyncio(
148
- graph_id="your-graph-id",
149
- client=sdk,
150
- body=agent_request
151
- )
152
- print(f"Response: {agent_response.message}")
153
- ```
154
-
155
- ### Function Patterns
156
-
157
- Every API endpoint provides multiple calling patterns:
158
-
159
- - **`asyncio()`** - Async call, returns parsed response (recommended)
160
- - **`asyncio_detailed()`** - Async call, returns full Response object
161
- - **`sync()`** - Synchronous call, returns parsed response
162
- - **`sync_detailed()`** - Synchronous call, returns full Response object
163
-
164
- ## Streaming Support with Extensions
165
-
166
- The SDK includes an extensions module with SSE (Server-Sent Events) support for real-time streaming operations:
167
-
168
- ```python
169
- from robosystems_client.extensions import (
170
- SSEClient,
171
- QueryClient,
172
- OperationClient,
173
- RoboSystemsExtensions
174
- )
175
- from robosystems_client.models import CypherQueryRequest
176
-
177
- # Initialize extensions
178
- extensions = RoboSystemsExtensions()
179
-
180
- # Use QueryClient for advanced query operations
181
- query_client = QueryClient(sdk)
182
-
183
- # Execute queries with the query client
184
- query = CypherQueryRequest(
185
- query="""MATCH (c:Company)-[:HAS_METRIC]->(m:Metric)
186
- WHERE m.fiscal_year >= 2020
187
- RETURN c.name, m.name, m.value, m.fiscal_year
188
- ORDER BY c.name, m.fiscal_year""",
189
- parameters={}
190
- )
191
-
192
- # Monitor long-running operations with SSE
193
- operation_client = OperationClient(sdk)
194
-
195
- # Stream operation events
196
- from robosystems_client.api.operations import stream_operation_events
197
- await stream_operation_events.asyncio(
198
- operation_id="op-123",
199
- client=sdk
200
- )
201
- ```
202
-
203
- The extensions module provides:
204
- - SSE client for real-time event streaming
205
- - Query client with advanced query management
206
- - Operation client for monitoring long-running tasks
207
- - Utilities for result processing and caching
208
-
209
- ## Error Handling
210
-
211
- ```python
212
- from robosystems_client.types import Response
213
- from robosystems_client.errors import UnexpectedStatus
214
- import httpx
215
-
216
- try:
217
- # API calls that might fail
218
- result = await execute_cypher_query.asyncio(
219
- graph_id="your-graph-id",
220
- client=sdk,
221
- body=query_request
222
- )
223
- except UnexpectedStatus as e:
224
- # Handle API errors (4xx, 5xx)
225
- print(f"API error: {e.status_code}")
226
- print(f"Error details: {e.content}")
227
-
228
- # Parse error response if JSON
229
- if e.status_code == 400:
230
- error_detail = e.content.decode('utf-8')
231
- print(f"Validation error: {error_detail}")
232
- elif e.status_code == 401:
233
- print("Authentication failed - check your API key")
234
- elif e.status_code == 403:
235
- print("Permission denied - check graph access")
236
- elif e.status_code == 429:
237
- print("Rate limit exceeded - retry later")
238
- except httpx.TimeoutException:
239
- print("Request timed out - try again")
240
- except httpx.NetworkError as e:
241
- print(f"Network error: {e}")
242
- except Exception as e:
243
- print(f"Unexpected error: {type(e).__name__}: {e}")
244
-
245
- # Using detailed responses for better error handling
246
- from robosystems_client.api.query import execute_cypher_query
247
-
248
- response = await execute_cypher_query.asyncio_detailed(
249
- graph_id="your-graph-id",
250
- client=sdk,
251
- body=query_request
252
- )
253
-
254
- if response.status_code == 200:
255
- result = response.parsed
256
- print(f"Success: Query executed successfully")
257
- else:
258
- print(f"Failed with status {response.status_code}")
259
- print(f"Headers: {response.headers}")
260
- print(f"Content: {response.content}")
261
- ```
262
-
263
- ## Development
264
-
265
- This Client is auto-generated from the RoboSystems OpenAPI specification to ensure it stays in sync with the latest API changes.
266
-
267
- ### Setup
268
-
269
- ```bash
270
- just venv
271
- just install
272
- ```
273
-
274
- ### Regenerating the Client
275
-
276
- When the API changes, regenerate the Client from the OpenAPI spec:
277
-
278
- ```bash
279
- # From localhost (development)
280
- just generate-client http://localhost:8000/openapi.json
281
-
282
- # From staging
283
- just generate-client https://staging.api.robosystems.ai/openapi.json
284
-
285
- # From production
286
- just generate-client https://api.robosystems.ai/openapi.json
287
- ```
288
-
289
- ### Testing
290
-
291
- ```bash
292
- just test
293
- just test-cov
294
- ```
295
-
296
- ### Code Quality
297
-
298
- ```bash
299
- just lint
300
- just format
301
- just typecheck
302
- ```