aeri-python 4.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aeri/__init__.py +72 -0
- aeri/_client/_validation.py +204 -0
- aeri/_client/attributes.py +188 -0
- aeri/_client/client.py +3761 -0
- aeri/_client/constants.py +65 -0
- aeri/_client/datasets.py +302 -0
- aeri/_client/environment_variables.py +158 -0
- aeri/_client/get_client.py +149 -0
- aeri/_client/observe.py +661 -0
- aeri/_client/propagation.py +475 -0
- aeri/_client/resource_manager.py +510 -0
- aeri/_client/span.py +1519 -0
- aeri/_client/span_filter.py +76 -0
- aeri/_client/span_processor.py +206 -0
- aeri/_client/utils.py +132 -0
- aeri/_task_manager/media_manager.py +331 -0
- aeri/_task_manager/media_upload_consumer.py +44 -0
- aeri/_task_manager/media_upload_queue.py +12 -0
- aeri/_task_manager/score_ingestion_consumer.py +208 -0
- aeri/_task_manager/task_manager.py +475 -0
- aeri/_utils/__init__.py +19 -0
- aeri/_utils/environment.py +34 -0
- aeri/_utils/error_logging.py +47 -0
- aeri/_utils/parse_error.py +99 -0
- aeri/_utils/prompt_cache.py +188 -0
- aeri/_utils/request.py +137 -0
- aeri/_utils/serializer.py +205 -0
- aeri/api/.fern/metadata.json +14 -0
- aeri/api/__init__.py +836 -0
- aeri/api/annotation_queues/__init__.py +82 -0
- aeri/api/annotation_queues/client.py +1111 -0
- aeri/api/annotation_queues/raw_client.py +2288 -0
- aeri/api/annotation_queues/types/__init__.py +84 -0
- aeri/api/annotation_queues/types/annotation_queue.py +28 -0
- aeri/api/annotation_queues/types/annotation_queue_assignment_request.py +16 -0
- aeri/api/annotation_queues/types/annotation_queue_item.py +34 -0
- aeri/api/annotation_queues/types/annotation_queue_object_type.py +26 -0
- aeri/api/annotation_queues/types/annotation_queue_status.py +22 -0
- aeri/api/annotation_queues/types/create_annotation_queue_assignment_response.py +18 -0
- aeri/api/annotation_queues/types/create_annotation_queue_item_request.py +25 -0
- aeri/api/annotation_queues/types/create_annotation_queue_request.py +20 -0
- aeri/api/annotation_queues/types/delete_annotation_queue_assignment_response.py +14 -0
- aeri/api/annotation_queues/types/delete_annotation_queue_item_response.py +15 -0
- aeri/api/annotation_queues/types/paginated_annotation_queue_items.py +17 -0
- aeri/api/annotation_queues/types/paginated_annotation_queues.py +17 -0
- aeri/api/annotation_queues/types/update_annotation_queue_item_request.py +15 -0
- aeri/api/blob_storage_integrations/__init__.py +73 -0
- aeri/api/blob_storage_integrations/client.py +550 -0
- aeri/api/blob_storage_integrations/raw_client.py +976 -0
- aeri/api/blob_storage_integrations/types/__init__.py +77 -0
- aeri/api/blob_storage_integrations/types/blob_storage_export_frequency.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_export_mode.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_deletion_response.py +14 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_file_type.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_response.py +64 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_status_response.py +50 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_type.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integrations_response.py +15 -0
- aeri/api/blob_storage_integrations/types/blob_storage_sync_status.py +47 -0
- aeri/api/blob_storage_integrations/types/create_blob_storage_integration_request.py +91 -0
- aeri/api/client.py +679 -0
- aeri/api/comments/__init__.py +44 -0
- aeri/api/comments/client.py +407 -0
- aeri/api/comments/raw_client.py +750 -0
- aeri/api/comments/types/__init__.py +46 -0
- aeri/api/comments/types/create_comment_request.py +47 -0
- aeri/api/comments/types/create_comment_response.py +17 -0
- aeri/api/comments/types/get_comments_response.py +17 -0
- aeri/api/commons/__init__.py +210 -0
- aeri/api/commons/errors/__init__.py +56 -0
- aeri/api/commons/errors/access_denied_error.py +12 -0
- aeri/api/commons/errors/error.py +12 -0
- aeri/api/commons/errors/method_not_allowed_error.py +12 -0
- aeri/api/commons/errors/not_found_error.py +12 -0
- aeri/api/commons/errors/unauthorized_error.py +12 -0
- aeri/api/commons/types/__init__.py +190 -0
- aeri/api/commons/types/base_score.py +90 -0
- aeri/api/commons/types/base_score_v1.py +70 -0
- aeri/api/commons/types/boolean_score.py +26 -0
- aeri/api/commons/types/boolean_score_v1.py +26 -0
- aeri/api/commons/types/categorical_score.py +26 -0
- aeri/api/commons/types/categorical_score_v1.py +26 -0
- aeri/api/commons/types/comment.py +36 -0
- aeri/api/commons/types/comment_object_type.py +30 -0
- aeri/api/commons/types/config_category.py +15 -0
- aeri/api/commons/types/correction_score.py +26 -0
- aeri/api/commons/types/create_score_value.py +5 -0
- aeri/api/commons/types/dataset.py +49 -0
- aeri/api/commons/types/dataset_item.py +58 -0
- aeri/api/commons/types/dataset_run.py +63 -0
- aeri/api/commons/types/dataset_run_item.py +40 -0
- aeri/api/commons/types/dataset_run_with_items.py +19 -0
- aeri/api/commons/types/dataset_status.py +22 -0
- aeri/api/commons/types/map_value.py +11 -0
- aeri/api/commons/types/model.py +125 -0
- aeri/api/commons/types/model_price.py +14 -0
- aeri/api/commons/types/model_usage_unit.py +42 -0
- aeri/api/commons/types/numeric_score.py +17 -0
- aeri/api/commons/types/numeric_score_v1.py +17 -0
- aeri/api/commons/types/observation.py +142 -0
- aeri/api/commons/types/observation_level.py +30 -0
- aeri/api/commons/types/observation_v2.py +235 -0
- aeri/api/commons/types/observations_view.py +89 -0
- aeri/api/commons/types/pricing_tier.py +91 -0
- aeri/api/commons/types/pricing_tier_condition.py +68 -0
- aeri/api/commons/types/pricing_tier_input.py +76 -0
- aeri/api/commons/types/pricing_tier_operator.py +42 -0
- aeri/api/commons/types/score.py +201 -0
- aeri/api/commons/types/score_config.py +66 -0
- aeri/api/commons/types/score_config_data_type.py +26 -0
- aeri/api/commons/types/score_data_type.py +30 -0
- aeri/api/commons/types/score_source.py +26 -0
- aeri/api/commons/types/score_v1.py +131 -0
- aeri/api/commons/types/session.py +25 -0
- aeri/api/commons/types/session_with_traces.py +15 -0
- aeri/api/commons/types/trace.py +84 -0
- aeri/api/commons/types/trace_with_details.py +43 -0
- aeri/api/commons/types/trace_with_full_details.py +45 -0
- aeri/api/commons/types/usage.py +59 -0
- aeri/api/core/__init__.py +111 -0
- aeri/api/core/api_error.py +23 -0
- aeri/api/core/client_wrapper.py +141 -0
- aeri/api/core/datetime_utils.py +30 -0
- aeri/api/core/enum.py +20 -0
- aeri/api/core/file.py +70 -0
- aeri/api/core/force_multipart.py +18 -0
- aeri/api/core/http_client.py +711 -0
- aeri/api/core/http_response.py +55 -0
- aeri/api/core/http_sse/__init__.py +48 -0
- aeri/api/core/http_sse/_api.py +114 -0
- aeri/api/core/http_sse/_decoders.py +66 -0
- aeri/api/core/http_sse/_exceptions.py +7 -0
- aeri/api/core/http_sse/_models.py +17 -0
- aeri/api/core/jsonable_encoder.py +102 -0
- aeri/api/core/pydantic_utilities.py +310 -0
- aeri/api/core/query_encoder.py +60 -0
- aeri/api/core/remove_none_from_dict.py +11 -0
- aeri/api/core/request_options.py +35 -0
- aeri/api/core/serialization.py +282 -0
- aeri/api/dataset_items/__init__.py +52 -0
- aeri/api/dataset_items/client.py +499 -0
- aeri/api/dataset_items/raw_client.py +973 -0
- aeri/api/dataset_items/types/__init__.py +50 -0
- aeri/api/dataset_items/types/create_dataset_item_request.py +37 -0
- aeri/api/dataset_items/types/delete_dataset_item_response.py +17 -0
- aeri/api/dataset_items/types/paginated_dataset_items.py +17 -0
- aeri/api/dataset_run_items/__init__.py +43 -0
- aeri/api/dataset_run_items/client.py +323 -0
- aeri/api/dataset_run_items/raw_client.py +547 -0
- aeri/api/dataset_run_items/types/__init__.py +44 -0
- aeri/api/dataset_run_items/types/create_dataset_run_item_request.py +51 -0
- aeri/api/dataset_run_items/types/paginated_dataset_run_items.py +17 -0
- aeri/api/datasets/__init__.py +55 -0
- aeri/api/datasets/client.py +661 -0
- aeri/api/datasets/raw_client.py +1368 -0
- aeri/api/datasets/types/__init__.py +53 -0
- aeri/api/datasets/types/create_dataset_request.py +31 -0
- aeri/api/datasets/types/delete_dataset_run_response.py +14 -0
- aeri/api/datasets/types/paginated_dataset_runs.py +17 -0
- aeri/api/datasets/types/paginated_datasets.py +17 -0
- aeri/api/health/__init__.py +44 -0
- aeri/api/health/client.py +112 -0
- aeri/api/health/errors/__init__.py +42 -0
- aeri/api/health/errors/service_unavailable_error.py +13 -0
- aeri/api/health/raw_client.py +227 -0
- aeri/api/health/types/__init__.py +40 -0
- aeri/api/health/types/health_response.py +30 -0
- aeri/api/ingestion/__init__.py +169 -0
- aeri/api/ingestion/client.py +221 -0
- aeri/api/ingestion/raw_client.py +293 -0
- aeri/api/ingestion/types/__init__.py +169 -0
- aeri/api/ingestion/types/base_event.py +27 -0
- aeri/api/ingestion/types/create_event_body.py +14 -0
- aeri/api/ingestion/types/create_event_event.py +15 -0
- aeri/api/ingestion/types/create_generation_body.py +40 -0
- aeri/api/ingestion/types/create_generation_event.py +15 -0
- aeri/api/ingestion/types/create_observation_event.py +15 -0
- aeri/api/ingestion/types/create_span_body.py +19 -0
- aeri/api/ingestion/types/create_span_event.py +15 -0
- aeri/api/ingestion/types/ingestion_error.py +17 -0
- aeri/api/ingestion/types/ingestion_event.py +155 -0
- aeri/api/ingestion/types/ingestion_response.py +17 -0
- aeri/api/ingestion/types/ingestion_success.py +15 -0
- aeri/api/ingestion/types/ingestion_usage.py +8 -0
- aeri/api/ingestion/types/observation_body.py +53 -0
- aeri/api/ingestion/types/observation_type.py +54 -0
- aeri/api/ingestion/types/open_ai_completion_usage_schema.py +26 -0
- aeri/api/ingestion/types/open_ai_response_usage_schema.py +24 -0
- aeri/api/ingestion/types/open_ai_usage.py +28 -0
- aeri/api/ingestion/types/optional_observation_body.py +36 -0
- aeri/api/ingestion/types/score_body.py +75 -0
- aeri/api/ingestion/types/score_event.py +15 -0
- aeri/api/ingestion/types/sdk_log_body.py +14 -0
- aeri/api/ingestion/types/sdk_log_event.py +15 -0
- aeri/api/ingestion/types/trace_body.py +36 -0
- aeri/api/ingestion/types/trace_event.py +15 -0
- aeri/api/ingestion/types/update_event_body.py +14 -0
- aeri/api/ingestion/types/update_generation_body.py +40 -0
- aeri/api/ingestion/types/update_generation_event.py +15 -0
- aeri/api/ingestion/types/update_observation_event.py +15 -0
- aeri/api/ingestion/types/update_span_body.py +19 -0
- aeri/api/ingestion/types/update_span_event.py +15 -0
- aeri/api/ingestion/types/usage_details.py +10 -0
- aeri/api/legacy/__init__.py +61 -0
- aeri/api/legacy/client.py +105 -0
- aeri/api/legacy/metrics_v1/__init__.py +40 -0
- aeri/api/legacy/metrics_v1/client.py +214 -0
- aeri/api/legacy/metrics_v1/raw_client.py +322 -0
- aeri/api/legacy/metrics_v1/types/__init__.py +40 -0
- aeri/api/legacy/metrics_v1/types/metrics_response.py +19 -0
- aeri/api/legacy/observations_v1/__init__.py +43 -0
- aeri/api/legacy/observations_v1/client.py +523 -0
- aeri/api/legacy/observations_v1/raw_client.py +759 -0
- aeri/api/legacy/observations_v1/types/__init__.py +44 -0
- aeri/api/legacy/observations_v1/types/observations.py +17 -0
- aeri/api/legacy/observations_v1/types/observations_views.py +17 -0
- aeri/api/legacy/raw_client.py +13 -0
- aeri/api/legacy/score_v1/__init__.py +43 -0
- aeri/api/legacy/score_v1/client.py +329 -0
- aeri/api/legacy/score_v1/raw_client.py +545 -0
- aeri/api/legacy/score_v1/types/__init__.py +44 -0
- aeri/api/legacy/score_v1/types/create_score_request.py +75 -0
- aeri/api/legacy/score_v1/types/create_score_response.py +17 -0
- aeri/api/llm_connections/__init__.py +55 -0
- aeri/api/llm_connections/client.py +311 -0
- aeri/api/llm_connections/raw_client.py +541 -0
- aeri/api/llm_connections/types/__init__.py +53 -0
- aeri/api/llm_connections/types/llm_adapter.py +38 -0
- aeri/api/llm_connections/types/llm_connection.py +77 -0
- aeri/api/llm_connections/types/paginated_llm_connections.py +17 -0
- aeri/api/llm_connections/types/upsert_llm_connection_request.py +69 -0
- aeri/api/media/__init__.py +58 -0
- aeri/api/media/client.py +427 -0
- aeri/api/media/raw_client.py +739 -0
- aeri/api/media/types/__init__.py +56 -0
- aeri/api/media/types/get_media_response.py +55 -0
- aeri/api/media/types/get_media_upload_url_request.py +51 -0
- aeri/api/media/types/get_media_upload_url_response.py +28 -0
- aeri/api/media/types/media_content_type.py +232 -0
- aeri/api/media/types/patch_media_body.py +43 -0
- aeri/api/metrics/__init__.py +40 -0
- aeri/api/metrics/client.py +422 -0
- aeri/api/metrics/raw_client.py +530 -0
- aeri/api/metrics/types/__init__.py +40 -0
- aeri/api/metrics/types/metrics_v2response.py +19 -0
- aeri/api/models/__init__.py +43 -0
- aeri/api/models/client.py +523 -0
- aeri/api/models/raw_client.py +993 -0
- aeri/api/models/types/__init__.py +44 -0
- aeri/api/models/types/create_model_request.py +103 -0
- aeri/api/models/types/paginated_models.py +17 -0
- aeri/api/observations/__init__.py +43 -0
- aeri/api/observations/client.py +522 -0
- aeri/api/observations/raw_client.py +641 -0
- aeri/api/observations/types/__init__.py +44 -0
- aeri/api/observations/types/observations_v2meta.py +21 -0
- aeri/api/observations/types/observations_v2response.py +28 -0
- aeri/api/opentelemetry/__init__.py +67 -0
- aeri/api/opentelemetry/client.py +276 -0
- aeri/api/opentelemetry/raw_client.py +291 -0
- aeri/api/opentelemetry/types/__init__.py +65 -0
- aeri/api/opentelemetry/types/otel_attribute.py +27 -0
- aeri/api/opentelemetry/types/otel_attribute_value.py +46 -0
- aeri/api/opentelemetry/types/otel_resource.py +24 -0
- aeri/api/opentelemetry/types/otel_resource_span.py +32 -0
- aeri/api/opentelemetry/types/otel_scope.py +34 -0
- aeri/api/opentelemetry/types/otel_scope_span.py +28 -0
- aeri/api/opentelemetry/types/otel_span.py +76 -0
- aeri/api/opentelemetry/types/otel_trace_response.py +16 -0
- aeri/api/organizations/__init__.py +73 -0
- aeri/api/organizations/client.py +756 -0
- aeri/api/organizations/raw_client.py +1707 -0
- aeri/api/organizations/types/__init__.py +71 -0
- aeri/api/organizations/types/delete_membership_request.py +16 -0
- aeri/api/organizations/types/membership_deletion_response.py +17 -0
- aeri/api/organizations/types/membership_request.py +18 -0
- aeri/api/organizations/types/membership_response.py +20 -0
- aeri/api/organizations/types/membership_role.py +30 -0
- aeri/api/organizations/types/memberships_response.py +15 -0
- aeri/api/organizations/types/organization_api_key.py +31 -0
- aeri/api/organizations/types/organization_api_keys_response.py +19 -0
- aeri/api/organizations/types/organization_project.py +25 -0
- aeri/api/organizations/types/organization_projects_response.py +15 -0
- aeri/api/projects/__init__.py +67 -0
- aeri/api/projects/client.py +760 -0
- aeri/api/projects/raw_client.py +1577 -0
- aeri/api/projects/types/__init__.py +65 -0
- aeri/api/projects/types/api_key_deletion_response.py +18 -0
- aeri/api/projects/types/api_key_list.py +23 -0
- aeri/api/projects/types/api_key_response.py +30 -0
- aeri/api/projects/types/api_key_summary.py +35 -0
- aeri/api/projects/types/organization.py +22 -0
- aeri/api/projects/types/project.py +34 -0
- aeri/api/projects/types/project_deletion_response.py +15 -0
- aeri/api/projects/types/projects.py +15 -0
- aeri/api/prompt_version/__init__.py +4 -0
- aeri/api/prompt_version/client.py +157 -0
- aeri/api/prompt_version/raw_client.py +264 -0
- aeri/api/prompts/__init__.py +100 -0
- aeri/api/prompts/client.py +550 -0
- aeri/api/prompts/raw_client.py +987 -0
- aeri/api/prompts/types/__init__.py +96 -0
- aeri/api/prompts/types/base_prompt.py +42 -0
- aeri/api/prompts/types/chat_message.py +17 -0
- aeri/api/prompts/types/chat_message_type.py +15 -0
- aeri/api/prompts/types/chat_message_with_placeholders.py +8 -0
- aeri/api/prompts/types/chat_prompt.py +15 -0
- aeri/api/prompts/types/create_chat_prompt_request.py +37 -0
- aeri/api/prompts/types/create_chat_prompt_type.py +15 -0
- aeri/api/prompts/types/create_prompt_request.py +8 -0
- aeri/api/prompts/types/create_text_prompt_request.py +36 -0
- aeri/api/prompts/types/create_text_prompt_type.py +15 -0
- aeri/api/prompts/types/placeholder_message.py +16 -0
- aeri/api/prompts/types/placeholder_message_type.py +15 -0
- aeri/api/prompts/types/prompt.py +58 -0
- aeri/api/prompts/types/prompt_meta.py +35 -0
- aeri/api/prompts/types/prompt_meta_list_response.py +17 -0
- aeri/api/prompts/types/prompt_type.py +20 -0
- aeri/api/prompts/types/text_prompt.py +14 -0
- aeri/api/scim/__init__.py +94 -0
- aeri/api/scim/client.py +686 -0
- aeri/api/scim/raw_client.py +1528 -0
- aeri/api/scim/types/__init__.py +92 -0
- aeri/api/scim/types/authentication_scheme.py +20 -0
- aeri/api/scim/types/bulk_config.py +22 -0
- aeri/api/scim/types/empty_response.py +16 -0
- aeri/api/scim/types/filter_config.py +17 -0
- aeri/api/scim/types/resource_meta.py +17 -0
- aeri/api/scim/types/resource_type.py +27 -0
- aeri/api/scim/types/resource_types_response.py +21 -0
- aeri/api/scim/types/schema_extension.py +17 -0
- aeri/api/scim/types/schema_resource.py +19 -0
- aeri/api/scim/types/schemas_response.py +21 -0
- aeri/api/scim/types/scim_email.py +16 -0
- aeri/api/scim/types/scim_feature_support.py +14 -0
- aeri/api/scim/types/scim_name.py +14 -0
- aeri/api/scim/types/scim_user.py +24 -0
- aeri/api/scim/types/scim_users_list_response.py +25 -0
- aeri/api/scim/types/service_provider_config.py +36 -0
- aeri/api/scim/types/user_meta.py +20 -0
- aeri/api/score_configs/__init__.py +44 -0
- aeri/api/score_configs/client.py +526 -0
- aeri/api/score_configs/raw_client.py +1012 -0
- aeri/api/score_configs/types/__init__.py +46 -0
- aeri/api/score_configs/types/create_score_config_request.py +46 -0
- aeri/api/score_configs/types/score_configs.py +17 -0
- aeri/api/score_configs/types/update_score_config_request.py +53 -0
- aeri/api/scores/__init__.py +76 -0
- aeri/api/scores/client.py +420 -0
- aeri/api/scores/raw_client.py +656 -0
- aeri/api/scores/types/__init__.py +76 -0
- aeri/api/scores/types/get_scores_response.py +17 -0
- aeri/api/scores/types/get_scores_response_data.py +211 -0
- aeri/api/scores/types/get_scores_response_data_boolean.py +15 -0
- aeri/api/scores/types/get_scores_response_data_categorical.py +15 -0
- aeri/api/scores/types/get_scores_response_data_correction.py +15 -0
- aeri/api/scores/types/get_scores_response_data_numeric.py +15 -0
- aeri/api/scores/types/get_scores_response_trace_data.py +38 -0
- aeri/api/sessions/__init__.py +40 -0
- aeri/api/sessions/client.py +262 -0
- aeri/api/sessions/raw_client.py +500 -0
- aeri/api/sessions/types/__init__.py +40 -0
- aeri/api/sessions/types/paginated_sessions.py +17 -0
- aeri/api/trace/__init__.py +44 -0
- aeri/api/trace/client.py +728 -0
- aeri/api/trace/raw_client.py +1208 -0
- aeri/api/trace/types/__init__.py +46 -0
- aeri/api/trace/types/delete_trace_response.py +14 -0
- aeri/api/trace/types/sort.py +14 -0
- aeri/api/trace/types/traces.py +17 -0
- aeri/api/utils/__init__.py +44 -0
- aeri/api/utils/pagination/__init__.py +40 -0
- aeri/api/utils/pagination/types/__init__.py +40 -0
- aeri/api/utils/pagination/types/meta_response.py +38 -0
- aeri/batch_evaluation.py +1643 -0
- aeri/experiment.py +1044 -0
- aeri/langchain/CallbackHandler.py +1377 -0
- aeri/langchain/__init__.py +5 -0
- aeri/langchain/utils.py +212 -0
- aeri/logger.py +28 -0
- aeri/media.py +352 -0
- aeri/model.py +477 -0
- aeri/openai.py +1124 -0
- aeri/py.typed +0 -0
- aeri/span_filter.py +17 -0
- aeri/types.py +79 -0
- aeri/version.py +3 -0
- aeri_python-4.0.0.dist-info/METADATA +51 -0
- aeri_python-4.0.0.dist-info/RECORD +391 -0
- aeri_python-4.0.0.dist-info/WHEEL +4 -0
- aeri_python-4.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import (
|
|
10
|
+
CreateDatasetItemRequest,
|
|
11
|
+
DeleteDatasetItemResponse,
|
|
12
|
+
PaginatedDatasetItems,
|
|
13
|
+
)
|
|
14
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
15
|
+
"CreateDatasetItemRequest": ".types",
|
|
16
|
+
"DeleteDatasetItemResponse": ".types",
|
|
17
|
+
"PaginatedDatasetItems": ".types",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
22
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
23
|
+
if module_name is None:
|
|
24
|
+
raise AttributeError(
|
|
25
|
+
f"No {attr_name} found in _dynamic_imports for module name -> {__name__}"
|
|
26
|
+
)
|
|
27
|
+
try:
|
|
28
|
+
module = import_module(module_name, __package__)
|
|
29
|
+
if module_name == f".{attr_name}":
|
|
30
|
+
return module
|
|
31
|
+
else:
|
|
32
|
+
return getattr(module, attr_name)
|
|
33
|
+
except ImportError as e:
|
|
34
|
+
raise ImportError(
|
|
35
|
+
f"Failed to import {attr_name} from {module_name}: {e}"
|
|
36
|
+
) from e
|
|
37
|
+
except AttributeError as e:
|
|
38
|
+
raise AttributeError(
|
|
39
|
+
f"Failed to get {attr_name} from {module_name}: {e}"
|
|
40
|
+
) from e
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def __dir__():
|
|
44
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
45
|
+
return sorted(lazy_attrs)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
__all__ = [
|
|
49
|
+
"CreateDatasetItemRequest",
|
|
50
|
+
"DeleteDatasetItemResponse",
|
|
51
|
+
"PaginatedDatasetItems",
|
|
52
|
+
]
|
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
from ..commons.types.dataset_item import DatasetItem
|
|
7
|
+
from ..commons.types.dataset_status import DatasetStatus
|
|
8
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
9
|
+
from ..core.request_options import RequestOptions
|
|
10
|
+
from .raw_client import AsyncRawDatasetItemsClient, RawDatasetItemsClient
|
|
11
|
+
from .types.delete_dataset_item_response import DeleteDatasetItemResponse
|
|
12
|
+
from .types.paginated_dataset_items import PaginatedDatasetItems
|
|
13
|
+
|
|
14
|
+
# this is used as the default value for optional parameters
|
|
15
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DatasetItemsClient:
|
|
19
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
|
+
self._raw_client = RawDatasetItemsClient(client_wrapper=client_wrapper)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def with_raw_response(self) -> RawDatasetItemsClient:
|
|
24
|
+
"""
|
|
25
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
RawDatasetItemsClient
|
|
30
|
+
"""
|
|
31
|
+
return self._raw_client
|
|
32
|
+
|
|
33
|
+
def create(
|
|
34
|
+
self,
|
|
35
|
+
*,
|
|
36
|
+
dataset_name: str,
|
|
37
|
+
input: typing.Optional[typing.Any] = OMIT,
|
|
38
|
+
expected_output: typing.Optional[typing.Any] = OMIT,
|
|
39
|
+
metadata: typing.Optional[typing.Any] = OMIT,
|
|
40
|
+
source_trace_id: typing.Optional[str] = OMIT,
|
|
41
|
+
source_observation_id: typing.Optional[str] = OMIT,
|
|
42
|
+
id: typing.Optional[str] = OMIT,
|
|
43
|
+
status: typing.Optional[DatasetStatus] = OMIT,
|
|
44
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
45
|
+
) -> DatasetItem:
|
|
46
|
+
"""
|
|
47
|
+
Create a dataset item
|
|
48
|
+
|
|
49
|
+
Parameters
|
|
50
|
+
----------
|
|
51
|
+
dataset_name : str
|
|
52
|
+
|
|
53
|
+
input : typing.Optional[typing.Any]
|
|
54
|
+
|
|
55
|
+
expected_output : typing.Optional[typing.Any]
|
|
56
|
+
|
|
57
|
+
metadata : typing.Optional[typing.Any]
|
|
58
|
+
|
|
59
|
+
source_trace_id : typing.Optional[str]
|
|
60
|
+
|
|
61
|
+
source_observation_id : typing.Optional[str]
|
|
62
|
+
|
|
63
|
+
id : typing.Optional[str]
|
|
64
|
+
Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets.
|
|
65
|
+
|
|
66
|
+
status : typing.Optional[DatasetStatus]
|
|
67
|
+
Defaults to ACTIVE for newly created items
|
|
68
|
+
|
|
69
|
+
request_options : typing.Optional[RequestOptions]
|
|
70
|
+
Request-specific configuration.
|
|
71
|
+
|
|
72
|
+
Returns
|
|
73
|
+
-------
|
|
74
|
+
DatasetItem
|
|
75
|
+
|
|
76
|
+
Examples
|
|
77
|
+
--------
|
|
78
|
+
from aeri import AeriAPI
|
|
79
|
+
|
|
80
|
+
client = AeriAPI(
|
|
81
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
82
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
83
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
84
|
+
username="YOUR_USERNAME",
|
|
85
|
+
password="YOUR_PASSWORD",
|
|
86
|
+
base_url="https://yourhost.com/path/to/api",
|
|
87
|
+
)
|
|
88
|
+
client.dataset_items.create(
|
|
89
|
+
dataset_name="datasetName",
|
|
90
|
+
)
|
|
91
|
+
"""
|
|
92
|
+
_response = self._raw_client.create(
|
|
93
|
+
dataset_name=dataset_name,
|
|
94
|
+
input=input,
|
|
95
|
+
expected_output=expected_output,
|
|
96
|
+
metadata=metadata,
|
|
97
|
+
source_trace_id=source_trace_id,
|
|
98
|
+
source_observation_id=source_observation_id,
|
|
99
|
+
id=id,
|
|
100
|
+
status=status,
|
|
101
|
+
request_options=request_options,
|
|
102
|
+
)
|
|
103
|
+
return _response.data
|
|
104
|
+
|
|
105
|
+
def get(
|
|
106
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
107
|
+
) -> DatasetItem:
|
|
108
|
+
"""
|
|
109
|
+
Get a dataset item
|
|
110
|
+
|
|
111
|
+
Parameters
|
|
112
|
+
----------
|
|
113
|
+
id : str
|
|
114
|
+
|
|
115
|
+
request_options : typing.Optional[RequestOptions]
|
|
116
|
+
Request-specific configuration.
|
|
117
|
+
|
|
118
|
+
Returns
|
|
119
|
+
-------
|
|
120
|
+
DatasetItem
|
|
121
|
+
|
|
122
|
+
Examples
|
|
123
|
+
--------
|
|
124
|
+
from aeri import AeriAPI
|
|
125
|
+
|
|
126
|
+
client = AeriAPI(
|
|
127
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
128
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
129
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
130
|
+
username="YOUR_USERNAME",
|
|
131
|
+
password="YOUR_PASSWORD",
|
|
132
|
+
base_url="https://yourhost.com/path/to/api",
|
|
133
|
+
)
|
|
134
|
+
client.dataset_items.get(
|
|
135
|
+
id="id",
|
|
136
|
+
)
|
|
137
|
+
"""
|
|
138
|
+
_response = self._raw_client.get(id, request_options=request_options)
|
|
139
|
+
return _response.data
|
|
140
|
+
|
|
141
|
+
def list(
|
|
142
|
+
self,
|
|
143
|
+
*,
|
|
144
|
+
dataset_name: typing.Optional[str] = None,
|
|
145
|
+
source_trace_id: typing.Optional[str] = None,
|
|
146
|
+
source_observation_id: typing.Optional[str] = None,
|
|
147
|
+
version: typing.Optional[dt.datetime] = None,
|
|
148
|
+
page: typing.Optional[int] = None,
|
|
149
|
+
limit: typing.Optional[int] = None,
|
|
150
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
151
|
+
) -> PaginatedDatasetItems:
|
|
152
|
+
"""
|
|
153
|
+
Get dataset items. Optionally specify a version to get the items as they existed at that point in time.
|
|
154
|
+
Note: If version parameter is provided, datasetName must also be provided.
|
|
155
|
+
|
|
156
|
+
Parameters
|
|
157
|
+
----------
|
|
158
|
+
dataset_name : typing.Optional[str]
|
|
159
|
+
|
|
160
|
+
source_trace_id : typing.Optional[str]
|
|
161
|
+
|
|
162
|
+
source_observation_id : typing.Optional[str]
|
|
163
|
+
|
|
164
|
+
version : typing.Optional[dt.datetime]
|
|
165
|
+
ISO 8601 timestamp (RFC 3339, Section 5.6) in UTC (e.g., "2026-01-21T14:35:42Z").
|
|
166
|
+
If provided, returns state of dataset at this timestamp.
|
|
167
|
+
If not provided, returns the latest version. Requires datasetName to be specified.
|
|
168
|
+
|
|
169
|
+
page : typing.Optional[int]
|
|
170
|
+
page number, starts at 1
|
|
171
|
+
|
|
172
|
+
limit : typing.Optional[int]
|
|
173
|
+
limit of items per page
|
|
174
|
+
|
|
175
|
+
request_options : typing.Optional[RequestOptions]
|
|
176
|
+
Request-specific configuration.
|
|
177
|
+
|
|
178
|
+
Returns
|
|
179
|
+
-------
|
|
180
|
+
PaginatedDatasetItems
|
|
181
|
+
|
|
182
|
+
Examples
|
|
183
|
+
--------
|
|
184
|
+
from aeri import AeriAPI
|
|
185
|
+
|
|
186
|
+
client = AeriAPI(
|
|
187
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
188
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
189
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
190
|
+
username="YOUR_USERNAME",
|
|
191
|
+
password="YOUR_PASSWORD",
|
|
192
|
+
base_url="https://yourhost.com/path/to/api",
|
|
193
|
+
)
|
|
194
|
+
client.dataset_items.list()
|
|
195
|
+
"""
|
|
196
|
+
_response = self._raw_client.list(
|
|
197
|
+
dataset_name=dataset_name,
|
|
198
|
+
source_trace_id=source_trace_id,
|
|
199
|
+
source_observation_id=source_observation_id,
|
|
200
|
+
version=version,
|
|
201
|
+
page=page,
|
|
202
|
+
limit=limit,
|
|
203
|
+
request_options=request_options,
|
|
204
|
+
)
|
|
205
|
+
return _response.data
|
|
206
|
+
|
|
207
|
+
def delete(
|
|
208
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
209
|
+
) -> DeleteDatasetItemResponse:
|
|
210
|
+
"""
|
|
211
|
+
Delete a dataset item and all its run items. This action is irreversible.
|
|
212
|
+
|
|
213
|
+
Parameters
|
|
214
|
+
----------
|
|
215
|
+
id : str
|
|
216
|
+
|
|
217
|
+
request_options : typing.Optional[RequestOptions]
|
|
218
|
+
Request-specific configuration.
|
|
219
|
+
|
|
220
|
+
Returns
|
|
221
|
+
-------
|
|
222
|
+
DeleteDatasetItemResponse
|
|
223
|
+
|
|
224
|
+
Examples
|
|
225
|
+
--------
|
|
226
|
+
from aeri import AeriAPI
|
|
227
|
+
|
|
228
|
+
client = AeriAPI(
|
|
229
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
230
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
231
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
232
|
+
username="YOUR_USERNAME",
|
|
233
|
+
password="YOUR_PASSWORD",
|
|
234
|
+
base_url="https://yourhost.com/path/to/api",
|
|
235
|
+
)
|
|
236
|
+
client.dataset_items.delete(
|
|
237
|
+
id="id",
|
|
238
|
+
)
|
|
239
|
+
"""
|
|
240
|
+
_response = self._raw_client.delete(id, request_options=request_options)
|
|
241
|
+
return _response.data
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class AsyncDatasetItemsClient:
|
|
245
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
246
|
+
self._raw_client = AsyncRawDatasetItemsClient(client_wrapper=client_wrapper)
|
|
247
|
+
|
|
248
|
+
@property
|
|
249
|
+
def with_raw_response(self) -> AsyncRawDatasetItemsClient:
|
|
250
|
+
"""
|
|
251
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
252
|
+
|
|
253
|
+
Returns
|
|
254
|
+
-------
|
|
255
|
+
AsyncRawDatasetItemsClient
|
|
256
|
+
"""
|
|
257
|
+
return self._raw_client
|
|
258
|
+
|
|
259
|
+
async def create(
|
|
260
|
+
self,
|
|
261
|
+
*,
|
|
262
|
+
dataset_name: str,
|
|
263
|
+
input: typing.Optional[typing.Any] = OMIT,
|
|
264
|
+
expected_output: typing.Optional[typing.Any] = OMIT,
|
|
265
|
+
metadata: typing.Optional[typing.Any] = OMIT,
|
|
266
|
+
source_trace_id: typing.Optional[str] = OMIT,
|
|
267
|
+
source_observation_id: typing.Optional[str] = OMIT,
|
|
268
|
+
id: typing.Optional[str] = OMIT,
|
|
269
|
+
status: typing.Optional[DatasetStatus] = OMIT,
|
|
270
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
271
|
+
) -> DatasetItem:
|
|
272
|
+
"""
|
|
273
|
+
Create a dataset item
|
|
274
|
+
|
|
275
|
+
Parameters
|
|
276
|
+
----------
|
|
277
|
+
dataset_name : str
|
|
278
|
+
|
|
279
|
+
input : typing.Optional[typing.Any]
|
|
280
|
+
|
|
281
|
+
expected_output : typing.Optional[typing.Any]
|
|
282
|
+
|
|
283
|
+
metadata : typing.Optional[typing.Any]
|
|
284
|
+
|
|
285
|
+
source_trace_id : typing.Optional[str]
|
|
286
|
+
|
|
287
|
+
source_observation_id : typing.Optional[str]
|
|
288
|
+
|
|
289
|
+
id : typing.Optional[str]
|
|
290
|
+
Dataset items are upserted on their id. Id needs to be unique (project-level) and cannot be reused across datasets.
|
|
291
|
+
|
|
292
|
+
status : typing.Optional[DatasetStatus]
|
|
293
|
+
Defaults to ACTIVE for newly created items
|
|
294
|
+
|
|
295
|
+
request_options : typing.Optional[RequestOptions]
|
|
296
|
+
Request-specific configuration.
|
|
297
|
+
|
|
298
|
+
Returns
|
|
299
|
+
-------
|
|
300
|
+
DatasetItem
|
|
301
|
+
|
|
302
|
+
Examples
|
|
303
|
+
--------
|
|
304
|
+
import asyncio
|
|
305
|
+
|
|
306
|
+
from aeri import AsyncAeriAPI
|
|
307
|
+
|
|
308
|
+
client = AsyncAeriAPI(
|
|
309
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
310
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
311
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
312
|
+
username="YOUR_USERNAME",
|
|
313
|
+
password="YOUR_PASSWORD",
|
|
314
|
+
base_url="https://yourhost.com/path/to/api",
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
async def main() -> None:
|
|
319
|
+
await client.dataset_items.create(
|
|
320
|
+
dataset_name="datasetName",
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
asyncio.run(main())
|
|
325
|
+
"""
|
|
326
|
+
_response = await self._raw_client.create(
|
|
327
|
+
dataset_name=dataset_name,
|
|
328
|
+
input=input,
|
|
329
|
+
expected_output=expected_output,
|
|
330
|
+
metadata=metadata,
|
|
331
|
+
source_trace_id=source_trace_id,
|
|
332
|
+
source_observation_id=source_observation_id,
|
|
333
|
+
id=id,
|
|
334
|
+
status=status,
|
|
335
|
+
request_options=request_options,
|
|
336
|
+
)
|
|
337
|
+
return _response.data
|
|
338
|
+
|
|
339
|
+
async def get(
|
|
340
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
341
|
+
) -> DatasetItem:
|
|
342
|
+
"""
|
|
343
|
+
Get a dataset item
|
|
344
|
+
|
|
345
|
+
Parameters
|
|
346
|
+
----------
|
|
347
|
+
id : str
|
|
348
|
+
|
|
349
|
+
request_options : typing.Optional[RequestOptions]
|
|
350
|
+
Request-specific configuration.
|
|
351
|
+
|
|
352
|
+
Returns
|
|
353
|
+
-------
|
|
354
|
+
DatasetItem
|
|
355
|
+
|
|
356
|
+
Examples
|
|
357
|
+
--------
|
|
358
|
+
import asyncio
|
|
359
|
+
|
|
360
|
+
from aeri import AsyncAeriAPI
|
|
361
|
+
|
|
362
|
+
client = AsyncAeriAPI(
|
|
363
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
364
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
365
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
366
|
+
username="YOUR_USERNAME",
|
|
367
|
+
password="YOUR_PASSWORD",
|
|
368
|
+
base_url="https://yourhost.com/path/to/api",
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
async def main() -> None:
|
|
373
|
+
await client.dataset_items.get(
|
|
374
|
+
id="id",
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
asyncio.run(main())
|
|
379
|
+
"""
|
|
380
|
+
_response = await self._raw_client.get(id, request_options=request_options)
|
|
381
|
+
return _response.data
|
|
382
|
+
|
|
383
|
+
async def list(
|
|
384
|
+
self,
|
|
385
|
+
*,
|
|
386
|
+
dataset_name: typing.Optional[str] = None,
|
|
387
|
+
source_trace_id: typing.Optional[str] = None,
|
|
388
|
+
source_observation_id: typing.Optional[str] = None,
|
|
389
|
+
version: typing.Optional[dt.datetime] = None,
|
|
390
|
+
page: typing.Optional[int] = None,
|
|
391
|
+
limit: typing.Optional[int] = None,
|
|
392
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
393
|
+
) -> PaginatedDatasetItems:
|
|
394
|
+
"""
|
|
395
|
+
Get dataset items. Optionally specify a version to get the items as they existed at that point in time.
|
|
396
|
+
Note: If version parameter is provided, datasetName must also be provided.
|
|
397
|
+
|
|
398
|
+
Parameters
|
|
399
|
+
----------
|
|
400
|
+
dataset_name : typing.Optional[str]
|
|
401
|
+
|
|
402
|
+
source_trace_id : typing.Optional[str]
|
|
403
|
+
|
|
404
|
+
source_observation_id : typing.Optional[str]
|
|
405
|
+
|
|
406
|
+
version : typing.Optional[dt.datetime]
|
|
407
|
+
ISO 8601 timestamp (RFC 3339, Section 5.6) in UTC (e.g., "2026-01-21T14:35:42Z").
|
|
408
|
+
If provided, returns state of dataset at this timestamp.
|
|
409
|
+
If not provided, returns the latest version. Requires datasetName to be specified.
|
|
410
|
+
|
|
411
|
+
page : typing.Optional[int]
|
|
412
|
+
page number, starts at 1
|
|
413
|
+
|
|
414
|
+
limit : typing.Optional[int]
|
|
415
|
+
limit of items per page
|
|
416
|
+
|
|
417
|
+
request_options : typing.Optional[RequestOptions]
|
|
418
|
+
Request-specific configuration.
|
|
419
|
+
|
|
420
|
+
Returns
|
|
421
|
+
-------
|
|
422
|
+
PaginatedDatasetItems
|
|
423
|
+
|
|
424
|
+
Examples
|
|
425
|
+
--------
|
|
426
|
+
import asyncio
|
|
427
|
+
|
|
428
|
+
from aeri import AsyncAeriAPI
|
|
429
|
+
|
|
430
|
+
client = AsyncAeriAPI(
|
|
431
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
432
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
433
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
434
|
+
username="YOUR_USERNAME",
|
|
435
|
+
password="YOUR_PASSWORD",
|
|
436
|
+
base_url="https://yourhost.com/path/to/api",
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
async def main() -> None:
|
|
441
|
+
await client.dataset_items.list()
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
asyncio.run(main())
|
|
445
|
+
"""
|
|
446
|
+
_response = await self._raw_client.list(
|
|
447
|
+
dataset_name=dataset_name,
|
|
448
|
+
source_trace_id=source_trace_id,
|
|
449
|
+
source_observation_id=source_observation_id,
|
|
450
|
+
version=version,
|
|
451
|
+
page=page,
|
|
452
|
+
limit=limit,
|
|
453
|
+
request_options=request_options,
|
|
454
|
+
)
|
|
455
|
+
return _response.data
|
|
456
|
+
|
|
457
|
+
async def delete(
|
|
458
|
+
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
459
|
+
) -> DeleteDatasetItemResponse:
|
|
460
|
+
"""
|
|
461
|
+
Delete a dataset item and all its run items. This action is irreversible.
|
|
462
|
+
|
|
463
|
+
Parameters
|
|
464
|
+
----------
|
|
465
|
+
id : str
|
|
466
|
+
|
|
467
|
+
request_options : typing.Optional[RequestOptions]
|
|
468
|
+
Request-specific configuration.
|
|
469
|
+
|
|
470
|
+
Returns
|
|
471
|
+
-------
|
|
472
|
+
DeleteDatasetItemResponse
|
|
473
|
+
|
|
474
|
+
Examples
|
|
475
|
+
--------
|
|
476
|
+
import asyncio
|
|
477
|
+
|
|
478
|
+
from aeri import AsyncAeriAPI
|
|
479
|
+
|
|
480
|
+
client = AsyncAeriAPI(
|
|
481
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
482
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
483
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
484
|
+
username="YOUR_USERNAME",
|
|
485
|
+
password="YOUR_PASSWORD",
|
|
486
|
+
base_url="https://yourhost.com/path/to/api",
|
|
487
|
+
)
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
async def main() -> None:
|
|
491
|
+
await client.dataset_items.delete(
|
|
492
|
+
id="id",
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
asyncio.run(main())
|
|
497
|
+
"""
|
|
498
|
+
_response = await self._raw_client.delete(id, request_options=request_options)
|
|
499
|
+
return _response.data
|