timeplus 1.4.1__tar.gz → 2.0.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.
- timeplus-2.0.0/LICENSE +201 -0
- {timeplus-1.4.1/timeplus.egg-info → timeplus-2.0.0}/PKG-INFO +54 -11
- timeplus-1.4.1/PKG-INFO → timeplus-2.0.0/README.md +37 -23
- timeplus-2.0.0/pyproject.toml +64 -0
- timeplus-2.0.0/setup.cfg +4 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/api_client.py +10 -1
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/query_result.py +3 -2
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stream.py +1 -1
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/view.py +14 -14
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/alert.py +3 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/dbapi.py +81 -20
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/env.py +26 -0
- timeplus-2.0.0/src/timeplus/error.py +94 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/external_stream.py +2 -1
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/query.py +11 -6
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/schema.py +2 -1
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/sqlalchemy.py +2 -2
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/stream.py +50 -6
- timeplus-2.0.0/src/timeplus/version.py +1 -0
- timeplus-1.4.1/README.md → timeplus-2.0.0/src/timeplus.egg-info/PKG-INFO +66 -3
- timeplus-2.0.0/src/timeplus.egg-info/SOURCES.txt +141 -0
- timeplus-2.0.0/src/timeplus.egg-info/entry_points.txt +2 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus.egg-info/requires.txt +9 -1
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus.egg-info/top_level.txt +0 -1
- timeplus-1.4.1/setup.cfg +0 -29
- timeplus-1.4.1/setup.py +0 -45
- timeplus-1.4.1/swagger_test/__init__.py +0 -0
- timeplus-1.4.1/swagger_test/test_alert.py +0 -39
- timeplus-1.4.1/swagger_test/test_alert_incident.py +0 -39
- timeplus-1.4.1/swagger_test/test_alert_timeline.py +0 -39
- timeplus-1.4.1/swagger_test/test_alerts_v1beta2_api.py +0 -89
- timeplus-1.4.1/swagger_test/test_analyze_sql_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_api_key.py +0 -39
- timeplus-1.4.1/swagger_test/test_api_keys_v1beta2_api.py +0 -54
- timeplus-1.4.1/swagger_test/test_batching_policy.py +0 -39
- timeplus-1.4.1/swagger_test/test_build.py +0 -39
- timeplus-1.4.1/swagger_test/test_column.py +0 -39
- timeplus-1.4.1/swagger_test/test_column_def.py +0 -39
- timeplus-1.4.1/swagger_test/test_columns_resp.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_alert_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_api_key_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_api_key_response.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_dashboard_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_query_request_v1_beta2.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_saved_query_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_sink_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_source_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_create_view_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_customer.py +0 -39
- timeplus-1.4.1/swagger_test/test_dashboard_dashboard.py +0 -39
- timeplus-1.4.1/swagger_test/test_dashboard_panel.py +0 -39
- timeplus-1.4.1/swagger_test/test_dashboards_v1beta2_api.py +0 -68
- timeplus-1.4.1/swagger_test/test_edge.py +0 -39
- timeplus-1.4.1/swagger_test/test_error_response.py +0 -39
- timeplus-1.4.1/swagger_test/test_event.py +0 -39
- timeplus-1.4.1/swagger_test/test_event_infer_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_event_infer_response.py +0 -39
- timeplus-1.4.1/swagger_test/test_execute_query_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_external_stream.py +0 -39
- timeplus-1.4.1/swagger_test/test_external_stream_def.py +0 -39
- timeplus-1.4.1/swagger_test/test_external_streams_v1beta2_api.py +0 -61
- timeplus-1.4.1/swagger_test/test_external_table.py +0 -39
- timeplus-1.4.1/swagger_test/test_external_table_def.py +0 -39
- timeplus-1.4.1/swagger_test/test_external_tables_v1beta2_api.py +0 -61
- timeplus-1.4.1/swagger_test/test_format_query_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_format_query_response.py +0 -39
- timeplus-1.4.1/swagger_test/test_global_metrics_result.py +0 -39
- timeplus-1.4.1/swagger_test/test_graph.py +0 -39
- timeplus-1.4.1/swagger_test/test_info.py +0 -39
- timeplus-1.4.1/swagger_test/test_ingest_data.py +0 -39
- timeplus-1.4.1/swagger_test/test_invitation.py +0 -39
- timeplus-1.4.1/swagger_test/test_invitation_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_invitations_v1beta2_api.py +0 -54
- timeplus-1.4.1/swagger_test/test_kafka_common.py +0 -39
- timeplus-1.4.1/swagger_test/test_kafka_common_tls.py +0 -39
- timeplus-1.4.1/swagger_test/test_keygen_license.py +0 -39
- timeplus-1.4.1/swagger_test/test_license_license.py +0 -39
- timeplus-1.4.1/swagger_test/test_license_v1beta2_api.py +0 -61
- timeplus-1.4.1/swagger_test/test_metrics_v1beta2_api.py +0 -40
- timeplus-1.4.1/swagger_test/test_misc_api.py +0 -40
- timeplus-1.4.1/swagger_test/test_node.py +0 -39
- timeplus-1.4.1/swagger_test/test_owner.py +0 -39
- timeplus-1.4.1/swagger_test/test_payment.py +0 -39
- timeplus-1.4.1/swagger_test/test_queries_v1beta2_api.py +0 -96
- timeplus-1.4.1/swagger_test/test_query.py +0 -39
- timeplus-1.4.1/swagger_test/test_query_pipeline.py +0 -39
- timeplus-1.4.1/swagger_test/test_query_pipeline_edge.py +0 -39
- timeplus-1.4.1/swagger_test/test_query_pipeline_node.py +0 -39
- timeplus-1.4.1/swagger_test/test_query_pipeline_node_metric.py +0 -39
- timeplus-1.4.1/swagger_test/test_query_result.py +0 -39
- timeplus-1.4.1/swagger_test/test_saved_queries_v1beta2_api.py +0 -68
- timeplus-1.4.1/swagger_test/test_saved_query.py +0 -39
- timeplus-1.4.1/swagger_test/test_schema_resp.py +0 -39
- timeplus-1.4.1/swagger_test/test_schemas_v1beta2_api.py +0 -68
- timeplus-1.4.1/swagger_test/test_sink.py +0 -39
- timeplus-1.4.1/swagger_test/test_sink_stat.py +0 -39
- timeplus-1.4.1/swagger_test/test_sink_stats.py +0 -39
- timeplus-1.4.1/swagger_test/test_sinks_v1beta2_api.py +0 -89
- timeplus-1.4.1/swagger_test/test_source.py +0 -39
- timeplus-1.4.1/swagger_test/test_source_preview_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_sources_v1beta2_api.py +0 -117
- timeplus-1.4.1/swagger_test/test_sql_analyze_column.py +0 -39
- timeplus-1.4.1/swagger_test/test_sql_analyze_result.py +0 -39
- timeplus-1.4.1/swagger_test/test_stats.py +0 -39
- timeplus-1.4.1/swagger_test/test_stats_error.py +0 -39
- timeplus-1.4.1/swagger_test/test_stats_throughput.py +0 -39
- timeplus-1.4.1/swagger_test/test_stream.py +0 -39
- timeplus-1.4.1/swagger_test/test_stream_def.py +0 -39
- timeplus-1.4.1/swagger_test/test_stream_match_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_stream_setting.py +0 -39
- timeplus-1.4.1/swagger_test/test_stream_stats.py +0 -39
- timeplus-1.4.1/swagger_test/test_streams_v1beta2_api.py +0 -82
- timeplus-1.4.1/swagger_test/test_subscription.py +0 -39
- timeplus-1.4.1/swagger_test/test_subscription_v1beta2_api.py +0 -40
- timeplus-1.4.1/swagger_test/test_time_columns.py +0 -39
- timeplus-1.4.1/swagger_test/test_topology_v1beta2_api.py +0 -40
- timeplus-1.4.1/swagger_test/test_udf.py +0 -39
- timeplus-1.4.1/swagger_test/test_udf_argument.py +0 -39
- timeplus-1.4.1/swagger_test/test_udf_auth_context.py +0 -39
- timeplus-1.4.1/swagger_test/test_udfs_v1beta2_api.py +0 -68
- timeplus-1.4.1/swagger_test/test_update_dashboard_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_update_source_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_update_stream_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_update_view_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_update_workspace_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_v1beta2_create_schema_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_v1beta2_licenses_body.py +0 -39
- timeplus-1.4.1/swagger_test/test_v1beta2_list_kafka_topic_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_v1beta2_update_schema_request.py +0 -39
- timeplus-1.4.1/swagger_test/test_view.py +0 -39
- timeplus-1.4.1/swagger_test/test_views_v1beta2_api.py +0 -75
- timeplus-1.4.1/swagger_test/test_workspace.py +0 -39
- timeplus-1.4.1/swagger_test/test_workspace_settings.py +0 -39
- timeplus-1.4.1/swagger_test/test_workspace_v1beta2_api.py +0 -47
- timeplus-1.4.1/swagger_test/test_workspaces_v1beta2_api.py +0 -40
- timeplus-1.4.1/test/test_alert.py +0 -6
- timeplus-1.4.1/test/test_analyze.py +0 -11
- timeplus-1.4.1/test/test_dashboard.py +0 -5
- timeplus-1.4.1/test/test_dbapi.py +0 -34
- timeplus-1.4.1/test/test_env.py +0 -41
- timeplus-1.4.1/test/test_external_stream.py +0 -41
- timeplus-1.4.1/test/test_ingest_stream.py +0 -150
- timeplus-1.4.1/test/test_query.py +0 -61
- timeplus-1.4.1/test/test_schema.py +0 -62
- timeplus-1.4.1/test/test_sink.py +0 -39
- timeplus-1.4.1/test/test_source.py +0 -116
- timeplus-1.4.1/test/test_sqlalchemy_query.py +0 -120
- timeplus-1.4.1/test/test_sqlalchemy_types.py +0 -46
- timeplus-1.4.1/test/test_stream.py +0 -38
- timeplus-1.4.1/test/test_topology.py +0 -7
- timeplus-1.4.1/test/test_udf.py +0 -5
- timeplus-1.4.1/test/test_view.py +0 -90
- timeplus-1.4.1/timeplus/error.py +0 -59
- timeplus-1.4.1/timeplus/version.py +0 -1
- timeplus-1.4.1/timeplus.egg-info/SOURCES.txt +0 -266
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/__init__.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/configuration.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/__init__.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/alert.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/alert_incident.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/alert_timeline.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/analyze_sql_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/api_key.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/batching_policy.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/build.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/column.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/column_def.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/columns_resp.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_alert_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_api_key_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_api_key_response.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_dashboard_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_query_request_v1_beta2.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_saved_query_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_sink_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_source_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/create_view_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/customer.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/dashboard_dashboard.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/dashboard_panel.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/edge.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/error_response.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/event.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/event_infer_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/event_infer_response.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/execute_query_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/external_stream.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/external_stream_def.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/external_table.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/external_table_def.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/format_query_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/format_query_response.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/global_metrics_result.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/graph.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/info.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/ingest_data.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/invitation.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/invitation_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/kafka_common.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/kafka_common_tls.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/keygen_license.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/license_license.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/node.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/owner.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/payment.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/query.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/query_pipeline.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/query_pipeline_edge.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/query_pipeline_node.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/query_pipeline_node_metric.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/saved_query.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/schema_resp.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/sink.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/sink_stat.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/sink_stats.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/source.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/source_preview_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/sql_analyze_column.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/sql_analyze_result.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stats.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stats_error.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stats_throughput.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stream_def.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stream_match_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stream_setting.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/stream_stats.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/subscription.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/time_columns.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/udf.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/udf_argument.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/udf_auth_context.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/update_dashboard_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/update_source_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/update_stream_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/update_view_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/update_workspace_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/v1beta2_create_schema_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/v1beta2_licenses_body.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/v1beta2_list_kafka_topic_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/v1beta2_update_schema_request.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/workspace.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/models/workspace_settings.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/rest.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/__init__.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/alerts_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/api_keys_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/dashboards_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/external_streams_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/external_tables_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/invitations_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/license_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/metrics_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/misc_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/queries_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/saved_queries_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/schemas_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/sinks_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/sources_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/streams_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/subscription_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/topology_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/udfs_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/views_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/workspace_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/swagger_client/timeplus/workspaces_v1beta2_api.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/__init__.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/dashboard.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/sink.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/source.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/topology.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/type.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/udf.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus/view.py +0 -0
- {timeplus-1.4.1 → timeplus-2.0.0/src}/timeplus.egg-info/dependency_links.txt +0 -0
timeplus-2.0.0/LICENSE
ADDED
|
@@ -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.
|
|
@@ -1,27 +1,42 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: timeplus
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Timeplus python SDK
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Author-email: gang@timeplus.io
|
|
5
|
+
Author-email: Gang Tao <gang@timeplus.io>
|
|
6
|
+
Project-URL: Homepage, https://github.com/timeplus-io/gluon
|
|
8
7
|
Project-URL: Bug Tracker, https://github.com/timeplus-io/gluon/issues
|
|
9
8
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
-
Classifier:
|
|
11
|
-
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
13
14
|
Requires-Dist: urllib3>=1.15
|
|
14
15
|
Requires-Dist: six>=1.10
|
|
15
16
|
Requires-Dist: certifi
|
|
17
|
+
Requires-Dist: python-dateutil
|
|
16
18
|
Requires-Dist: sseclient-py>=1.7.2
|
|
17
19
|
Requires-Dist: loguru>=0.6.0
|
|
18
20
|
Requires-Dist: sqlalchemy>=1.4.36
|
|
19
|
-
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: flake8==7.1.0; extra == "dev"
|
|
23
|
+
Requires-Dist: black==22.1.0; extra == "dev"
|
|
24
|
+
Requires-Dist: click==8.0.2; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest>=7.0.1; extra == "dev"
|
|
26
|
+
Requires-Dist: build; extra == "dev"
|
|
27
|
+
Requires-Dist: twine; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
20
29
|
|
|
21
|
-
# Timeplus Python Client
|
|
30
|
+
# Timeplus Python Client (gluon)
|
|
22
31
|
|
|
23
32
|
[Timeplus](https://www.timeplus.com/) is a real-time streaming data analytic platform. Timeplus python client provides basic functionalities to interact with Timeplus cloud, to manage the streaming analytic work loads.
|
|
24
33
|
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
A `gluon` (/ˈɡluːɒn/) is an elementary particle that acts as the exchange particle (or gauge boson) for the strong force between quarks. It is analogous to the exchange of photons in the electromagnetic force between two charged particles.
|
|
37
|
+
|
|
38
|
+
In Timepluse architecture, `gluon` is the API sdk acting as the connection to Timeplus's ecosystems.
|
|
39
|
+
|
|
25
40
|
|
|
26
41
|
## Installation
|
|
27
42
|
|
|
@@ -35,6 +50,26 @@ We recommend creating a virtual environment when installing Python dependencies.
|
|
|
35
50
|
pip install timeplus
|
|
36
51
|
```
|
|
37
52
|
|
|
53
|
+
## Authentication
|
|
54
|
+
|
|
55
|
+
Timeplus Cloud uses an API key. Self-hosted Timeplus Enterprise uses a username and password.
|
|
56
|
+
Username and password support needs `timeplus` 2.0, which is a pre-release for now: `pip install --pre timeplus`.
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from timeplus import Environment
|
|
60
|
+
from timeplus.dbapi import connect
|
|
61
|
+
|
|
62
|
+
# Timeplus Cloud: API key
|
|
63
|
+
env = Environment().address("https://us.timeplus.cloud").workspace("your_workspace_id").apikey("your_60_character_api_key")
|
|
64
|
+
conn = connect(host="us.timeplus.cloud", password="your_60_character_api_key", path="your_workspace_id")
|
|
65
|
+
|
|
66
|
+
# Timeplus Enterprise: username and password
|
|
67
|
+
env = Environment().address("https://your.timeplus.host").workspace("default").username("your_user").password("your_password")
|
|
68
|
+
conn = connect(host="your.timeplus.host", port=443, user="your_user", password="your_password", path="default")
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
With SQLAlchemy, use `timeplus://:{api_key}@{host}:443/{workspace}` or `timeplus://{user}:{password}@{host}:443/{workspace}`.
|
|
72
|
+
|
|
38
73
|
## 3 API
|
|
39
74
|
The `timeplus` python libary supports 3 API:
|
|
40
75
|
|
|
@@ -82,7 +117,7 @@ import os
|
|
|
82
117
|
from sqlalchemy import create_engine, text, select, MetaData, Table
|
|
83
118
|
from sqlalchemy.dialects import registry
|
|
84
119
|
|
|
85
|
-
# register timeplus dialect
|
|
120
|
+
# register timeplus dialect (not needed from timeplus 2.0.0, which registers it on install)
|
|
86
121
|
registry.register("timeplus", "timeplus.sqlalchemy", "TimeplusDialect")
|
|
87
122
|
|
|
88
123
|
api_key = os.environ.get("TIMEPLUS_API_KEY")
|
|
@@ -140,6 +175,10 @@ here is a list of all supported resources
|
|
|
140
175
|
| [Alert](https://docs.timeplus.com/alert)| list |
|
|
141
176
|
| [Dashboard](https://docs.timeplus.com/viz#dashboard) | list |
|
|
142
177
|
|
|
178
|
+
Not every Timeplus server serves every REST endpoint. For example, a self-hosted Timeplus Enterprise server
|
|
179
|
+
may not serve the alert endpoints or schema creation. In that case the call raises
|
|
180
|
+
`timeplus.error.EndpointNotFoundError` (a subclass of `swagger_client.rest.ApiException`).
|
|
181
|
+
|
|
143
182
|
|
|
144
183
|
#### query
|
|
145
184
|
|
|
@@ -328,4 +367,8 @@ stream.ingest(payload=payload, format="lines")
|
|
|
328
367
|
|
|
329
368
|
## Examples
|
|
330
369
|
|
|
331
|
-
More sample code can be found [
|
|
370
|
+
More sample code can be found in [examples](https://github.com/timeplus-io/gluon/tree/develop/examples).
|
|
371
|
+
|
|
372
|
+
## Development
|
|
373
|
+
|
|
374
|
+
See [CONTRIBUTING.md](https://github.com/timeplus-io/gluon/blob/develop/CONTRIBUTING.md) for the project layout, how to run the tests, and how to update the generated REST client.
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
Name: timeplus
|
|
3
|
-
Version: 1.4.1
|
|
4
|
-
Summary: Timeplus python SDK
|
|
5
|
-
Home-page: https://github.com/timeplus-io/gluon/tree/develop/python
|
|
6
|
-
Author: Gang Tao
|
|
7
|
-
Author-email: gang@timeplus.io
|
|
8
|
-
Project-URL: Bug Tracker, https://github.com/timeplus-io/gluon/issues
|
|
9
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Requires-Python: >=3
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
Requires-Dist: urllib3>=1.15
|
|
14
|
-
Requires-Dist: six>=1.10
|
|
15
|
-
Requires-Dist: certifi
|
|
16
|
-
Requires-Dist: sseclient-py>=1.7.2
|
|
17
|
-
Requires-Dist: loguru>=0.6.0
|
|
18
|
-
Requires-Dist: sqlalchemy>=1.4.36
|
|
19
|
-
Requires-Dist: python-dateutil
|
|
20
|
-
|
|
21
|
-
# Timeplus Python Client
|
|
1
|
+
# Timeplus Python Client (gluon)
|
|
22
2
|
|
|
23
3
|
[Timeplus](https://www.timeplus.com/) is a real-time streaming data analytic platform. Timeplus python client provides basic functionalities to interact with Timeplus cloud, to manage the streaming analytic work loads.
|
|
24
4
|
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
A `gluon` (/ˈɡluːɒn/) is an elementary particle that acts as the exchange particle (or gauge boson) for the strong force between quarks. It is analogous to the exchange of photons in the electromagnetic force between two charged particles.
|
|
8
|
+
|
|
9
|
+
In Timepluse architecture, `gluon` is the API sdk acting as the connection to Timeplus's ecosystems.
|
|
10
|
+
|
|
25
11
|
|
|
26
12
|
## Installation
|
|
27
13
|
|
|
@@ -35,6 +21,26 @@ We recommend creating a virtual environment when installing Python dependencies.
|
|
|
35
21
|
pip install timeplus
|
|
36
22
|
```
|
|
37
23
|
|
|
24
|
+
## Authentication
|
|
25
|
+
|
|
26
|
+
Timeplus Cloud uses an API key. Self-hosted Timeplus Enterprise uses a username and password.
|
|
27
|
+
Username and password support needs `timeplus` 2.0, which is a pre-release for now: `pip install --pre timeplus`.
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from timeplus import Environment
|
|
31
|
+
from timeplus.dbapi import connect
|
|
32
|
+
|
|
33
|
+
# Timeplus Cloud: API key
|
|
34
|
+
env = Environment().address("https://us.timeplus.cloud").workspace("your_workspace_id").apikey("your_60_character_api_key")
|
|
35
|
+
conn = connect(host="us.timeplus.cloud", password="your_60_character_api_key", path="your_workspace_id")
|
|
36
|
+
|
|
37
|
+
# Timeplus Enterprise: username and password
|
|
38
|
+
env = Environment().address("https://your.timeplus.host").workspace("default").username("your_user").password("your_password")
|
|
39
|
+
conn = connect(host="your.timeplus.host", port=443, user="your_user", password="your_password", path="default")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
With SQLAlchemy, use `timeplus://:{api_key}@{host}:443/{workspace}` or `timeplus://{user}:{password}@{host}:443/{workspace}`.
|
|
43
|
+
|
|
38
44
|
## 3 API
|
|
39
45
|
The `timeplus` python libary supports 3 API:
|
|
40
46
|
|
|
@@ -82,7 +88,7 @@ import os
|
|
|
82
88
|
from sqlalchemy import create_engine, text, select, MetaData, Table
|
|
83
89
|
from sqlalchemy.dialects import registry
|
|
84
90
|
|
|
85
|
-
# register timeplus dialect
|
|
91
|
+
# register timeplus dialect (not needed from timeplus 2.0.0, which registers it on install)
|
|
86
92
|
registry.register("timeplus", "timeplus.sqlalchemy", "TimeplusDialect")
|
|
87
93
|
|
|
88
94
|
api_key = os.environ.get("TIMEPLUS_API_KEY")
|
|
@@ -140,6 +146,10 @@ here is a list of all supported resources
|
|
|
140
146
|
| [Alert](https://docs.timeplus.com/alert)| list |
|
|
141
147
|
| [Dashboard](https://docs.timeplus.com/viz#dashboard) | list |
|
|
142
148
|
|
|
149
|
+
Not every Timeplus server serves every REST endpoint. For example, a self-hosted Timeplus Enterprise server
|
|
150
|
+
may not serve the alert endpoints or schema creation. In that case the call raises
|
|
151
|
+
`timeplus.error.EndpointNotFoundError` (a subclass of `swagger_client.rest.ApiException`).
|
|
152
|
+
|
|
143
153
|
|
|
144
154
|
#### query
|
|
145
155
|
|
|
@@ -328,4 +338,8 @@ stream.ingest(payload=payload, format="lines")
|
|
|
328
338
|
|
|
329
339
|
## Examples
|
|
330
340
|
|
|
331
|
-
More sample code can be found [
|
|
341
|
+
More sample code can be found in [examples](https://github.com/timeplus-io/gluon/tree/develop/examples).
|
|
342
|
+
|
|
343
|
+
## Development
|
|
344
|
+
|
|
345
|
+
See [CONTRIBUTING.md](https://github.com/timeplus-io/gluon/blob/develop/CONTRIBUTING.md) for the project layout, how to run the tests, and how to update the generated REST client.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "timeplus"
|
|
7
|
+
description = "Timeplus python SDK"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
authors = [{ name = "Gang Tao", email = "gang@timeplus.io" }]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"License :: OSI Approved :: Apache Software License",
|
|
13
|
+
"Operating System :: OS Independent",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"urllib3>=1.15",
|
|
18
|
+
"six>=1.10",
|
|
19
|
+
"certifi",
|
|
20
|
+
"python-dateutil",
|
|
21
|
+
"sseclient-py>=1.7.2",
|
|
22
|
+
"loguru>=0.6.0",
|
|
23
|
+
"sqlalchemy>=1.4.36",
|
|
24
|
+
]
|
|
25
|
+
dynamic = ["version"]
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
dev = [
|
|
29
|
+
"flake8==7.1.0",
|
|
30
|
+
"black==22.1.0",
|
|
31
|
+
"click==8.0.2",
|
|
32
|
+
"pytest>=7.0.1",
|
|
33
|
+
"build",
|
|
34
|
+
"twine",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
# lets sqlalchemy.create_engine("timeplus://...") find the dialect
|
|
38
|
+
[project.entry-points."sqlalchemy.dialects"]
|
|
39
|
+
timeplus = "timeplus.sqlalchemy:TimeplusDialect"
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://github.com/timeplus-io/gluon"
|
|
43
|
+
"Bug Tracker" = "https://github.com/timeplus-io/gluon/issues"
|
|
44
|
+
|
|
45
|
+
[tool.setuptools.dynamic]
|
|
46
|
+
version = { attr = "timeplus.version.__version__" }
|
|
47
|
+
|
|
48
|
+
# swagger_client is the generated REST client that timeplus imports.
|
|
49
|
+
# It ships as a second top-level package; tests are not shipped.
|
|
50
|
+
[tool.setuptools.packages.find]
|
|
51
|
+
where = ["src"]
|
|
52
|
+
|
|
53
|
+
[tool.pytest.ini_options]
|
|
54
|
+
# `pytest` alone runs the unit tests; functional tests need a Timeplus server
|
|
55
|
+
# and are run with `pytest tests/functional` (see CONTRIBUTING.md).
|
|
56
|
+
testpaths = ["tests/unit"]
|
|
57
|
+
# tests/unit and tests/functional have files with the same name
|
|
58
|
+
addopts = "--import-mode=importlib"
|
|
59
|
+
# tests/generated holds swagger-codegen stubs; they are kept but not run.
|
|
60
|
+
norecursedirs = ["generated"]
|
|
61
|
+
|
|
62
|
+
[tool.black]
|
|
63
|
+
# Only hand-written code is formatted; the generated client is left as generated.
|
|
64
|
+
extend-exclude = "src/swagger_client|tests/generated"
|
timeplus-2.0.0/setup.cfg
ADDED
|
@@ -17,6 +17,7 @@ from multiprocessing.pool import ThreadPool
|
|
|
17
17
|
import os
|
|
18
18
|
import re
|
|
19
19
|
import tempfile
|
|
20
|
+
import base64
|
|
20
21
|
|
|
21
22
|
# python 2 and python 3 compatibility library
|
|
22
23
|
import six
|
|
@@ -75,7 +76,10 @@ class ApiClient(object):
|
|
|
75
76
|
self.user_agent = 'Swagger-Codegen/1.0.0/python'
|
|
76
77
|
|
|
77
78
|
def __del__(self):
|
|
78
|
-
|
|
79
|
+
try: # TODO: skip close exection
|
|
80
|
+
self.pool.close()
|
|
81
|
+
except Exception:
|
|
82
|
+
pass
|
|
79
83
|
self.pool.join()
|
|
80
84
|
|
|
81
85
|
@property
|
|
@@ -134,6 +138,10 @@ class ApiClient(object):
|
|
|
134
138
|
post_params = self.parameters_to_tuples(post_params,
|
|
135
139
|
collection_formats)
|
|
136
140
|
|
|
141
|
+
if self.configuration.username and self.configuration.password:
|
|
142
|
+
auth_header = f"{self.configuration.username}:{self.configuration.password}"
|
|
143
|
+
header_params['Authorization'] = 'Basic ' + base64.b64encode(auth_header.encode()).decode()
|
|
144
|
+
|
|
137
145
|
# auth setting
|
|
138
146
|
self.update_params_for_auth(header_params, query_params, auth_settings)
|
|
139
147
|
|
|
@@ -312,6 +320,7 @@ class ApiClient(object):
|
|
|
312
320
|
If parameter async_req is False or missing,
|
|
313
321
|
then the method will return the response directly.
|
|
314
322
|
"""
|
|
323
|
+
|
|
315
324
|
if not async_req:
|
|
316
325
|
return self.__call_api(resource_path, method,
|
|
317
326
|
path_params, query_params, header_params,
|
|
@@ -59,8 +59,9 @@ class QueryResult(object):
|
|
|
59
59
|
:param header: The header of this QueryResult. # noqa: E501
|
|
60
60
|
:type: list[Column]
|
|
61
61
|
"""
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
# it is possible for specific query, the header is None
|
|
63
|
+
# if header is None:
|
|
64
|
+
# raise ValueError("Invalid value for `header`, must not be `None`") # noqa: E501
|
|
64
65
|
|
|
65
66
|
self._header = header
|
|
66
67
|
|
|
@@ -351,7 +351,7 @@ class Stream(object):
|
|
|
351
351
|
"""
|
|
352
352
|
if mode is None:
|
|
353
353
|
raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501
|
|
354
|
-
allowed_values = ["append", "changelog", "changelog_kv", "versioned_kv"] # noqa: E501
|
|
354
|
+
allowed_values = ["append", "changelog", "changelog_kv", "versioned_kv", ""] # noqa: E501
|
|
355
355
|
if mode not in allowed_values:
|
|
356
356
|
raise ValueError(
|
|
357
357
|
"Invalid value for `mode` ({0}), must be one of {1}" # noqa: E501
|
|
@@ -182,8 +182,8 @@ class View(object):
|
|
|
182
182
|
:param description: The description of this View. # noqa: E501
|
|
183
183
|
:type: str
|
|
184
184
|
"""
|
|
185
|
-
if description is None:
|
|
186
|
-
|
|
185
|
+
# if description is None:
|
|
186
|
+
# raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501
|
|
187
187
|
|
|
188
188
|
self._description = description
|
|
189
189
|
|
|
@@ -249,8 +249,8 @@ class View(object):
|
|
|
249
249
|
:param logstore_retention_bytes: The logstore_retention_bytes of this View. # noqa: E501
|
|
250
250
|
:type: int
|
|
251
251
|
"""
|
|
252
|
-
if logstore_retention_bytes is None:
|
|
253
|
-
|
|
252
|
+
# if logstore_retention_bytes is None:
|
|
253
|
+
# raise ValueError("Invalid value for `logstore_retention_bytes`, must not be `None`") # noqa: E501
|
|
254
254
|
|
|
255
255
|
self._logstore_retention_bytes = logstore_retention_bytes
|
|
256
256
|
|
|
@@ -274,8 +274,8 @@ class View(object):
|
|
|
274
274
|
:param logstore_retention_ms: The logstore_retention_ms of this View. # noqa: E501
|
|
275
275
|
:type: int
|
|
276
276
|
"""
|
|
277
|
-
if logstore_retention_ms is None:
|
|
278
|
-
|
|
277
|
+
# if logstore_retention_ms is None:
|
|
278
|
+
# raise ValueError("Invalid value for `logstore_retention_ms`, must not be `None`") # noqa: E501
|
|
279
279
|
|
|
280
280
|
self._logstore_retention_ms = logstore_retention_ms
|
|
281
281
|
|
|
@@ -297,8 +297,8 @@ class View(object):
|
|
|
297
297
|
:param materialized: The materialized of this View. # noqa: E501
|
|
298
298
|
:type: bool
|
|
299
299
|
"""
|
|
300
|
-
if materialized is None:
|
|
301
|
-
|
|
300
|
+
# if materialized is None:
|
|
301
|
+
# raise ValueError("Invalid value for `materialized`, must not be `None`") # noqa: E501
|
|
302
302
|
|
|
303
303
|
self._materialized = materialized
|
|
304
304
|
|
|
@@ -368,8 +368,8 @@ class View(object):
|
|
|
368
368
|
:param target_stream: The target_stream of this View. # noqa: E501
|
|
369
369
|
:type: str
|
|
370
370
|
"""
|
|
371
|
-
if target_stream is None:
|
|
372
|
-
|
|
371
|
+
# if target_stream is None:
|
|
372
|
+
# raise ValueError("Invalid value for `target_stream`, must not be `None`") # noqa: E501
|
|
373
373
|
|
|
374
374
|
self._target_stream = target_stream
|
|
375
375
|
|
|
@@ -393,8 +393,8 @@ class View(object):
|
|
|
393
393
|
:param ttl: The ttl of this View. # noqa: E501
|
|
394
394
|
:type: str
|
|
395
395
|
"""
|
|
396
|
-
if ttl is None:
|
|
397
|
-
|
|
396
|
+
# if ttl is None:
|
|
397
|
+
# raise ValueError("Invalid value for `ttl`, must not be `None`") # noqa: E501
|
|
398
398
|
|
|
399
399
|
self._ttl = ttl
|
|
400
400
|
|
|
@@ -418,8 +418,8 @@ class View(object):
|
|
|
418
418
|
:param ttl_expression: The ttl_expression of this View. # noqa: E501
|
|
419
419
|
:type: str
|
|
420
420
|
"""
|
|
421
|
-
if ttl_expression is None:
|
|
422
|
-
|
|
421
|
+
# if ttl_expression is None:
|
|
422
|
+
# raise ValueError("Invalid value for `ttl_expression`, must not be `None`") # noqa: E501
|
|
423
423
|
|
|
424
424
|
self._ttl_expression = ttl_expression
|
|
425
425
|
|
|
@@ -2,6 +2,8 @@ from pprint import pprint
|
|
|
2
2
|
import swagger_client
|
|
3
3
|
from swagger_client.rest import ApiException
|
|
4
4
|
|
|
5
|
+
from .error import raise_if_endpoint_missing
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
class Alert:
|
|
7
9
|
def __init__(self, env):
|
|
@@ -31,6 +33,7 @@ class Alert:
|
|
|
31
33
|
list_response = self._api_instance.v1beta2_alerts_get()
|
|
32
34
|
return list_response
|
|
33
35
|
except ApiException as e:
|
|
36
|
+
raise_if_endpoint_missing(e, "listing alerts")
|
|
34
37
|
pprint(
|
|
35
38
|
"Exception when calling AlertsV1beta2Api->v1beta2_alerts_get: %s\n" % e
|
|
36
39
|
)
|