arcadedb-driver 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arcadedb_driver-0.1.0/.gitignore +10 -0
- arcadedb_driver-0.1.0/LICENSE +201 -0
- arcadedb_driver-0.1.0/PKG-INFO +292 -0
- arcadedb_driver-0.1.0/README.md +276 -0
- arcadedb_driver-0.1.0/pyproject.toml +32 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/__init__.py +237 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/__init__.py +8 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/activate_ai.py +207 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/analyze_profiler_with_ai.py +212 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/chat_with_ai.py +238 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/delete_ai_chat.py +184 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/get_ai_chat.py +182 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/get_ai_config.py +160 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/list_ai_chats.py +152 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/stream_chat_with_ai.py +248 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/ai/update_ai_chat.py +215 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/auth/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/auth/list_sessions.py +152 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/auth/login.py +185 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/auth/logout.py +141 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/batch/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/add_cluster_peer.py +193 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/download_database_snapshot.py +207 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/get_cluster_bootstrap_state.py +181 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/get_cluster_status.py +217 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/get_database_snapshot_checksums.py +238 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/leave_cluster.py +202 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/remove_cluster_peer.py +218 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/resync_cluster_database.py +201 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/step_down_cluster_leader.py +161 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/transfer_cluster_leadership.py +201 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/cluster/verify_cluster_database.py +201 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/command/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/command/execute_command.py +225 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/database/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/database/check_database_exists.py +179 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/database/list_databases.py +147 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/grafana/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/grafana/check_grafana_health.py +189 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/grafana/get_grafana_metadata.py +197 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/grafana/query_grafana.py +230 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/health/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/health/check_health.py +87 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/health/check_ready.py +88 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/mcp/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/mcp/get_mcp_config.py +165 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/mcp/invoke_mcp.py +283 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/mcp/update_mcp_config.py +213 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/metrics/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/metrics/scrape_prometheus_metrics.py +166 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/prom_ql/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/prom_ql/prom_ql_label_values.py +216 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/prom_ql/prom_ql_labels.py +198 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/prom_ql/prom_ql_query.py +245 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/prom_ql/prom_ql_query_range.py +275 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/prom_ql/prom_ql_series.py +255 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/prometheus/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/query/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/query/execute_query_get.py +236 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/query/execute_query_post.py +225 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/create_api_token.py +189 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/create_or_update_group.py +189 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/create_user.py +193 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/delete_api_token.py +189 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/delete_group.py +204 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/delete_user.py +193 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/list_api_tokens.py +157 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/list_groups.py +157 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/list_users.py +157 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/security/update_user.py +213 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/server/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/server/execute_server_command.py +210 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/server/get_operation_progress.py +192 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/server/get_server_info.py +147 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/time_series/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/time_series/get_time_series_latest.py +229 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/time_series/query_time_series.py +252 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/transaction/__init__.py +1 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/transaction/begin_transaction.py +201 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/transaction/commit_transaction.py +196 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/api/transaction/rollback_transaction.py +196 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/client.py +268 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/errors.py +16 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/__init__.py +263 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/add_peer_request.py +81 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_activate_request.py +62 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_activate_response.py +62 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_analyze_profiler_request.py +68 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_analyze_profiler_request_profiler_data.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_analyze_profiler_response.py +90 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_analyze_profiler_response_commands_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat.py +126 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_deleted.py +62 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_list.py +80 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_messages_item.py +108 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_messages_item_commands_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_request.py +91 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_response.py +123 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_response_commands_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_chat_response_tool_calls_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_config.py +91 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/ai_protocol_error.py +91 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/batch_error.py +152 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/batch_response.py +160 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/batch_response_id_mapping.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/bootstrap_state_response.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/bootstrap_state_response_databases_item.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/cluster_action_response.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/cluster_status.py +266 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/cluster_status_alerts_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/cluster_status_database_presence.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/cluster_status_databases_item.py +108 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/cluster_status_peers_item.py +189 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/command_request.py +112 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/command_request_params.py +51 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/create_api_token_body.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/create_api_token_response_201.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/create_or_update_group_body.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/create_or_update_group_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/create_user_body.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/create_user_response_201.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/database_exists.py +64 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/database_list.py +64 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/delete_api_token_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/delete_group_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/delete_user_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/error_response.py +98 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/execute_batch_id_mapping.py +10 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/execute_batch_ref_mode.py +9 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/execute_query_get_language.py +12 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/get_database_snapshot_checksums_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_health.py +71 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_metadata.py +91 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_metadata_types_item.py +112 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_metadata_types_item_fields_item.py +71 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_metadata_types_item_tags_item.py +71 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_request.py +106 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_request_targets_item.py +123 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_request_targets_item_aggregation.py +94 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_request_targets_item_aggregation_requests_item.py +81 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_request_targets_item_tags.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response.py +75 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response_results.py +66 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response_results_additional_property.py +93 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response_results_additional_property_frames_item.py +101 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response_results_additional_property_frames_item_data.py +98 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response_results_additional_property_frames_item_data_values_item_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response_results_additional_property_frames_item_schema.py +87 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/grafana_query_response_results_additional_property_frames_item_schema_fields_item.py +71 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/invoke_mcp_body.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/invoke_mcp_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/invoke_mcp_response_403.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/invoke_mcp_response_405.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/invoke_mcp_response_503.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/list_api_tokens_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/list_groups_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/list_users_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/login_response.py +71 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/mcp_config.py +191 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/mcp_config_databases.py +60 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/mcp_config_principal_profiles.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/mcp_database_override.py +121 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/progress_response.py +80 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/progress_response_result_item.py +152 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_data_response.py +84 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_data_response_data.py +151 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_data_response_data_result_type.py +10 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_data_response_data_result_type_0_item.py +81 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_data_response_data_result_type_0_item_metric.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_data_response_data_result_type_1_item.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_data_response_data_result_type_1_item_metric.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_error_response.py +80 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_labels_response.py +73 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_series_response.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/prom_ql_series_response_data_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/query_request.py +122 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/query_request_params.py +51 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/query_response.py +113 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/query_response_result_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/server_info.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/session_list.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/session_list_result_item.py +134 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_aggregated_response.py +109 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_aggregated_response_buckets_item.py +94 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_aggregated_response_buckets_item_values_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_latest_response.py +119 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_latest_response_latest_type_0_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_query_request.py +144 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_query_request_aggregation.py +93 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_query_request_aggregation_requests_item.py +80 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_query_request_tags.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_raw_response.py +118 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_raw_response_rows_item_item.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/time_series_write_error.py +123 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/transfer_leader_request.py +71 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/update_user_body.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/update_user_response_200.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response.py +128 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response_files_item.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response_local_checksums.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response_result.py +159 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response_result_files_item.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response_result_local_checksums.py +47 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response_result_peers_item.py +139 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/verify_database_response_result_peers_item_mismatches_item.py +89 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/models/write_time_series_precision.py +11 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_generated/types.py +54 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_internal/__init__.py +0 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/_internal/unwrap.py +34 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/aio.py +279 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/auth.py +27 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/errors.py +76 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/facade/__init__.py +0 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/facade/dashboards.py +190 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/facade/data.py +124 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/facade/timeseries.py +158 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/facade/transaction.py +115 -0
- arcadedb_driver-0.1.0/src/arcadedb_driver/py.typed +0 -0
- arcadedb_driver-0.1.0/tests/test_async.py +93 -0
- arcadedb_driver-0.1.0/tests/test_auth.py +27 -0
- arcadedb_driver-0.1.0/tests/test_check_codegen_skips.py +69 -0
- arcadedb_driver-0.1.0/tests/test_dashboards.py +120 -0
- arcadedb_driver-0.1.0/tests/test_data.py +105 -0
- arcadedb_driver-0.1.0/tests/test_errors.py +83 -0
- arcadedb_driver-0.1.0/tests/test_public_surface.py +39 -0
- arcadedb_driver-0.1.0/tests/test_server.py +49 -0
- arcadedb_driver-0.1.0/tests/test_smoke.py +5 -0
- arcadedb_driver-0.1.0/tests/test_timeseries.py +171 -0
- arcadedb_driver-0.1.0/tests/test_transaction.py +151 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: arcadedb-driver
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python HTTP client for ArcadeDB, generated from ArcadeDB's OpenAPI contract.
|
|
5
|
+
Project-URL: Homepage, https://github.com/ArcadeData/arcadedb-drivers/tree/main/python/packages/driver#readme
|
|
6
|
+
Project-URL: Issues, https://github.com/ArcadeData/arcadedb-drivers/issues
|
|
7
|
+
Project-URL: Repository, https://github.com/ArcadeData/arcadedb-drivers
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: arcadedb,database,graph-database,http-client,multi-model
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Requires-Dist: attrs>=23.2
|
|
13
|
+
Requires-Dist: httpx>=0.27
|
|
14
|
+
Requires-Dist: typing-extensions>=4.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# arcadedb-driver
|
|
18
|
+
|
|
19
|
+
A Python HTTP client for [ArcadeDB](https://arcadedb.com), generated from ArcadeDB's OpenAPI
|
|
20
|
+
contract, with a hand-written facade on top for the data plane, transactions, and the pieces of
|
|
21
|
+
the contract the generator cannot model.
|
|
22
|
+
|
|
23
|
+
**This package is not yet published to PyPI.** The instructions below describe how it will be
|
|
24
|
+
installed and used once a release is made; until then, consume it from this repository (workspace
|
|
25
|
+
install, or `uv build` a wheel yourself).
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- Python `>=3.10`.
|
|
30
|
+
- An ArcadeDB server at or near the version in the compatibility table below.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install arcadedb-driver
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
or, in a [uv](https://docs.astral.sh/uv/) project:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
uv add arcadedb-driver
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick start
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from arcadedb_driver import ArcadeDBServer, basic_auth
|
|
48
|
+
|
|
49
|
+
with ArcadeDBServer(base_url="http://localhost:2480", auth=basic_auth("root", "playwithdata")) as srv:
|
|
50
|
+
db = srv.db("mydb")
|
|
51
|
+
envelope = db.query(language="sql", command="SELECT FROM Person WHERE age > ?", params={"1": 21})
|
|
52
|
+
print(envelope.result)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
A bearer token (for example, a session token returned by `/api/v1/login`) works the same way:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from arcadedb_driver import ArcadeDBServer, bearer_auth
|
|
59
|
+
|
|
60
|
+
with ArcadeDBServer(base_url="http://localhost:2480", auth=bearer_auth("AU-...")) as srv:
|
|
61
|
+
...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The async facade mirrors the sync one method-for-method:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
import asyncio
|
|
68
|
+
|
|
69
|
+
from arcadedb_driver import AsyncArcadeDBServer, basic_auth
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
async def main() -> None:
|
|
73
|
+
async with AsyncArcadeDBServer(base_url="http://localhost:2480", auth=basic_auth("root", "playwithdata")) as srv:
|
|
74
|
+
db = srv.db("mydb")
|
|
75
|
+
envelope = await db.query(language="sql", command="SELECT FROM Person WHERE age > ?", params={"1": 21})
|
|
76
|
+
print(envelope.result)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
asyncio.run(main())
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## The result envelope, and why `truncated` matters
|
|
83
|
+
|
|
84
|
+
`query` and `command` do not return bare rows. They return the whole response envelope:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
@dataclass(frozen=True, slots=True)
|
|
88
|
+
class QueryEnvelope:
|
|
89
|
+
result: list[dict[str, Any]]
|
|
90
|
+
limit: int
|
|
91
|
+
returned: int
|
|
92
|
+
truncated: bool
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`truncated` is `True` when the server's serializer hit its row cap while a query still had more
|
|
96
|
+
rows to write - `result` is then a partial answer, not a short-but-complete one. A caller that
|
|
97
|
+
reads `result` and ignores `truncated` can silently work off a partial answer, because a truncated
|
|
98
|
+
list and a complete one are indistinguishable by shape alone. Always check `truncated` before
|
|
99
|
+
treating `result` as the whole answer, and re-query with a narrower filter or a higher `limit`
|
|
100
|
+
when it is `True` - though raising `limit` is not always the fix: a result whose true size exceeds
|
|
101
|
+
the server's hard ceiling (`arcadedb.server.httpQueryMaxResultRows`) is refused outright with 413
|
|
102
|
+
rather than truncated, so once you are past that ceiling a narrower filter is the only way forward.
|
|
103
|
+
|
|
104
|
+
`limit` and `truncated` in the envelope above both default when the server's response omits them
|
|
105
|
+
(`limit` to `-1`, meaning uncapped; `returned` to `0`; `truncated` to `False`) - `QueryResponse`
|
|
106
|
+
has no required fields in the contract, so all four are, strictly, optional on the wire. In
|
|
107
|
+
practice the server always sends all four today, but a caller relying on `truncated is False` as
|
|
108
|
+
proof of completeness is trusting a client-side default, not a server guarantee.
|
|
109
|
+
|
|
110
|
+
## Sync and async
|
|
111
|
+
|
|
112
|
+
`ArcadeDBServer` and `AsyncArcadeDBServer` expose the same methods; the async one awaits them.
|
|
113
|
+
Both are context managers - `with` for the sync client, `async with` for the async one - because
|
|
114
|
+
each owns an `httpx` client with its own connection pool that must be released. Use the context
|
|
115
|
+
manager form where you can; call `close()` (sync) or `await aclose()` (async) yourself otherwise.
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
srv = ArcadeDBServer(base_url="http://localhost:2480")
|
|
119
|
+
try:
|
|
120
|
+
...
|
|
121
|
+
finally:
|
|
122
|
+
srv.close()
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Both constructors take a `timeout: httpx.Timeout | None = None`, and omitting it disables
|
|
126
|
+
timeouts entirely - it is not "use httpx's default" (5 seconds), it is no timeout at all, because
|
|
127
|
+
in httpx an explicit `timeout=None` means exactly that. This is deliberate: the generated `Client`
|
|
128
|
+
these facades wrap defaults its own timeout to `None` and forwards it the same way, and
|
|
129
|
+
`@arcadedb/driver` has no default timeout either, since `fetch` doesn't have one. Pass an
|
|
130
|
+
`httpx.Timeout` if you want requests bounded:
|
|
131
|
+
|
|
132
|
+
```python
|
|
133
|
+
srv = ArcadeDBServer(base_url="http://localhost:2480", timeout=httpx.Timeout(5.0))
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Transactions
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
with srv.db("mydb").transaction() as tx:
|
|
140
|
+
tx.command(language="sql", command="INSERT INTO Account SET balance = 100")
|
|
141
|
+
total = tx.query(language="sql", command="SELECT sum(balance) as total FROM Account").result[0]["total"]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
or, async:
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
async with srv.db("mydb").transaction() as tx:
|
|
148
|
+
await tx.command(language="sql", command="INSERT INTO Account SET balance = 100")
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`transaction()` returns a context manager whose `__enter__` (`__aenter__`) begins a server-side
|
|
152
|
+
transaction and hands back a SECOND database handle carrying its session id. Every call made
|
|
153
|
+
through that `tx` handle - not through the outer `db` object used to open the transaction - takes
|
|
154
|
+
part in it; a call made through the outer handle while a transaction is open auto-commits on its
|
|
155
|
+
own, outside the transaction, exactly as if no transaction were open at all.
|
|
156
|
+
|
|
157
|
+
The commit/rollback contract has three clauses:
|
|
158
|
+
|
|
159
|
+
- The block exits cleanly: the transaction commits.
|
|
160
|
+
- The block raises: the transaction rolls back and the block's exception propagates. If that
|
|
161
|
+
rollback itself also fails, the rollback's error is attached as `__cause__` on the block's
|
|
162
|
+
exception rather than replacing it - the block's own error is what the caller asked about - and
|
|
163
|
+
the attach is silently skipped if `__cause__` is already set or if attaching it fails outright.
|
|
164
|
+
- The commit itself fails: a best-effort rollback is issued first (its own failure discarded) so
|
|
165
|
+
the server-side session is not left open until `arcadedb.server.httpTxExpireTimeout` reaps it,
|
|
166
|
+
and then the commit's error is re-raised.
|
|
167
|
+
|
|
168
|
+
## Two error models
|
|
169
|
+
|
|
170
|
+
The facade methods (`query`, `command`, `transaction`, `list_databases`, `exists`, `server_info`,
|
|
171
|
+
`health`, `ready`, the `ts`/`grafana`/`promql` namespaces, ...) raise `ArcadeDBError` on any
|
|
172
|
+
non-2xx response:
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
from arcadedb_driver import ArcadeDBError
|
|
176
|
+
|
|
177
|
+
try:
|
|
178
|
+
db.query(language="sql", command="SELECT FROM NoSuchType")
|
|
179
|
+
except ArcadeDBError as err:
|
|
180
|
+
print(err.status, err.error, err.detail, err.request_id, err.help_)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
`err.help_` is spelled with a trailing underscore to match the field name on the generated
|
|
184
|
+
`ErrorResponse` model, which is reachable through `.raw` - `help` alone would shadow the Python
|
|
185
|
+
builtin, and picking a different spelling for the same field on the two error surfaces this
|
|
186
|
+
package exposes would be worse than one awkward name used consistently.
|
|
187
|
+
|
|
188
|
+
`server.raw`, the underlying generated client, does **not** raise. Every one of its operations
|
|
189
|
+
returns a `Response` whose `status_code` and `parsed` the caller inspects directly:
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
from arcadedb_driver._generated.api.database import list_databases
|
|
193
|
+
|
|
194
|
+
response = list_databases.sync_detailed(client=srv.raw)
|
|
195
|
+
if response.status_code >= 300:
|
|
196
|
+
... # handle it yourself; srv.raw never raises
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
These are two deliberately different contracts in one package. Use the facade for the ergonomics
|
|
200
|
+
of `try`/`except`; use `.raw` when you want to branch on a status code without exceptions. Mixing
|
|
201
|
+
assumptions about which one you're calling is the most common way to end up with an unhandled
|
|
202
|
+
exception or a silently ignored error.
|
|
203
|
+
|
|
204
|
+
## `exists` cannot prove absence
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
present = srv.exists("mydb")
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
`exists` returns `False` both when the database genuinely does not exist and when it exists but
|
|
211
|
+
the authenticated caller is not authorized to see it - the server's response does not distinguish
|
|
212
|
+
the two cases, so this client cannot either. Do not treat `False` as proof that a database is
|
|
213
|
+
absent; it only means "not visible to this caller right now."
|
|
214
|
+
|
|
215
|
+
## Endpoints this client does not wrap
|
|
216
|
+
|
|
217
|
+
Two distinct things are true about parts of the contract, and they should not be confused with
|
|
218
|
+
each other.
|
|
219
|
+
|
|
220
|
+
**Not wrapped at all.** `POST /api/v1/batch/{database}` (a jsonl/ndjson/csv body),
|
|
221
|
+
`POST /api/v1/ts/{database}/prom/read` and `POST /api/v1/ts/{database}/prom/write` (protobuf
|
|
222
|
+
bodies) are endpoints the generator cannot model - it has no way to describe a non-JSON request
|
|
223
|
+
body, so it prints a warning, skips the endpoint entirely, and exits 0. Nothing downstream notices
|
|
224
|
+
on its own: a skipped endpoint leaves no trace in the generated tree for `git diff` to flag. This
|
|
225
|
+
package pins the exact skip set in `scripts/check_codegen_skips.py`, which re-runs the generator
|
|
226
|
+
against the committed contract and fails if the set of skipped operations changes - so a future
|
|
227
|
+
contract that starts describing `batch` in a way the generator *can* model, or drops one of these
|
|
228
|
+
endpoints, cannot pass unnoticed.
|
|
229
|
+
|
|
230
|
+
`db.ts.write` (`POST /api/v1/ts/{database}/write`, InfluxDB line protocol as `text/plain`) has the
|
|
231
|
+
same generator limitation but is hand-written rather than left unwrapped, because a time-series
|
|
232
|
+
namespace that could query samples but never ingest any would be an odd thing to ship.
|
|
233
|
+
|
|
234
|
+
`POST /api/v1/server` (administrative commands) is likewise not wrapped by the facade, and reached
|
|
235
|
+
through `.raw` returns a body that does not conform to its declared `QueryResponse` schema
|
|
236
|
+
(`{"result": "ok"}` where an array is declared), so the generated model raises on an otherwise
|
|
237
|
+
successful call.
|
|
238
|
+
|
|
239
|
+
**Wrapped, but returning `dict[str, Any]` instead of a generated model.** Unlike `batch`,
|
|
240
|
+
`prom/read`, and `prom/write` above, these three routes describe a JSON body the generator *can*
|
|
241
|
+
model, and it does generate operation functions and response models for them -
|
|
242
|
+
`_generated/api/time_series/query_time_series.py`, `get_time_series_latest.py`, and
|
|
243
|
+
`_generated/api/grafana/query_grafana.py` all exist on disk. But `db.ts.query`, `db.ts.latest`,
|
|
244
|
+
and `db.grafana.query` do not call any of those generated operations - they are hand-written, and
|
|
245
|
+
none of the three generated modules above is imported anywhere outside its own package. Each
|
|
246
|
+
method builds the request URL itself and issues it directly through the same pooled httpx client
|
|
247
|
+
the generated operations use (`self._client.get_httpx_client()`, or its async twin), returning the
|
|
248
|
+
parsed JSON body rather than routing the response through a generated model at all.
|
|
249
|
+
|
|
250
|
+
The reason is the same in all three: the contract types each of these responses' per-element
|
|
251
|
+
scalar values (a timestamp, a numeric measurement, a DataFrame cell) as `"type": "object"`, so the
|
|
252
|
+
generated per-element model's `from_dict` calls `dict(value)` on every element - which raises
|
|
253
|
+
`TypeError` on an ordinary scalar like a float or an int. Had these methods routed through the
|
|
254
|
+
generated operations instead, `db.ts.query`'s `oneOf` response parser would have caught that
|
|
255
|
+
`TypeError` and silently fallen through to the aggregated-response model, whose fields are all
|
|
256
|
+
optional and so "parses" anything - every raw (non-aggregated) query response would come back
|
|
257
|
+
mis-typed as an empty-looking aggregated one instead of raising. `db.ts.latest` and
|
|
258
|
+
`db.grafana.query` have no such fallback branch and would simply raise `TypeError` on any real
|
|
259
|
+
response. `@arcadedb/driver`, the TypeScript sibling, is unaffected only because `openapi-fetch`
|
|
260
|
+
performs no runtime validation of its own - the raw JSON passes through unexamined. Bypassing the
|
|
261
|
+
generated operations and returning the parsed body directly is the Python equivalent, and the only
|
|
262
|
+
correct behaviour, until the contract is fixed upstream to type these fields correctly; fixing the
|
|
263
|
+
contract is also what would let these three methods move onto the generated operations and return
|
|
264
|
+
generated models, the same way `db.promql.*` already does - `db.promql.*` is unaffected by any of
|
|
265
|
+
this today because its response schemas do not have this shape.
|
|
266
|
+
|
|
267
|
+
## Contract version and compatibility
|
|
268
|
+
|
|
269
|
+
This package was generated from `contracts/arcadedb-openapi-26.9.1.json`, recorded in
|
|
270
|
+
`pyproject.toml` as `tool.arcadedb.server-version`:
|
|
271
|
+
|
|
272
|
+
```toml
|
|
273
|
+
[tool.arcadedb]
|
|
274
|
+
server-version = "26.9.1"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
| `arcadedb-driver` | ArcadeDB server |
|
|
278
|
+
| --- | --- |
|
|
279
|
+
| 0.1.0 | 26.9.1 |
|
|
280
|
+
|
|
281
|
+
This table is a historical record tied to a package version, not something derived automatically:
|
|
282
|
+
`scripts/adopt-contract-version.sh` deliberately does not touch it when it retires an old contract
|
|
283
|
+
and adopts a new one. Adding a row is a human decision made at release time, not a side effect of
|
|
284
|
+
a contract bump.
|
|
285
|
+
|
|
286
|
+
The client speaks ArcadeDB's HTTP API as described by that contract. Pointing it at a server on a
|
|
287
|
+
materially different release may work for the endpoints both versions share, but is not tested or
|
|
288
|
+
supported.
|
|
289
|
+
|
|
290
|
+
## License
|
|
291
|
+
|
|
292
|
+
Apache-2.0.
|