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,760 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from .raw_client import AsyncRawProjectsClient, RawProjectsClient
|
|
8
|
+
from .types.api_key_deletion_response import ApiKeyDeletionResponse
|
|
9
|
+
from .types.api_key_list import ApiKeyList
|
|
10
|
+
from .types.api_key_response import ApiKeyResponse
|
|
11
|
+
from .types.project import Project
|
|
12
|
+
from .types.project_deletion_response import ProjectDeletionResponse
|
|
13
|
+
from .types.projects import Projects
|
|
14
|
+
|
|
15
|
+
# this is used as the default value for optional parameters
|
|
16
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ProjectsClient:
|
|
20
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
21
|
+
self._raw_client = RawProjectsClient(client_wrapper=client_wrapper)
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def with_raw_response(self) -> RawProjectsClient:
|
|
25
|
+
"""
|
|
26
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
27
|
+
|
|
28
|
+
Returns
|
|
29
|
+
-------
|
|
30
|
+
RawProjectsClient
|
|
31
|
+
"""
|
|
32
|
+
return self._raw_client
|
|
33
|
+
|
|
34
|
+
def get(
|
|
35
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
36
|
+
) -> Projects:
|
|
37
|
+
"""
|
|
38
|
+
Get Project associated with API key (requires project-scoped API key). You can use GET /api/public/organizations/projects to get all projects with an organization-scoped key.
|
|
39
|
+
|
|
40
|
+
Parameters
|
|
41
|
+
----------
|
|
42
|
+
request_options : typing.Optional[RequestOptions]
|
|
43
|
+
Request-specific configuration.
|
|
44
|
+
|
|
45
|
+
Returns
|
|
46
|
+
-------
|
|
47
|
+
Projects
|
|
48
|
+
|
|
49
|
+
Examples
|
|
50
|
+
--------
|
|
51
|
+
from aeri import AeriAPI
|
|
52
|
+
|
|
53
|
+
client = AeriAPI(
|
|
54
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
55
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
56
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
57
|
+
username="YOUR_USERNAME",
|
|
58
|
+
password="YOUR_PASSWORD",
|
|
59
|
+
base_url="https://yourhost.com/path/to/api",
|
|
60
|
+
)
|
|
61
|
+
client.projects.get()
|
|
62
|
+
"""
|
|
63
|
+
_response = self._raw_client.get(request_options=request_options)
|
|
64
|
+
return _response.data
|
|
65
|
+
|
|
66
|
+
def create(
|
|
67
|
+
self,
|
|
68
|
+
*,
|
|
69
|
+
name: str,
|
|
70
|
+
retention: int,
|
|
71
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
72
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
73
|
+
) -> Project:
|
|
74
|
+
"""
|
|
75
|
+
Create a new project (requires organization-scoped API key)
|
|
76
|
+
|
|
77
|
+
Parameters
|
|
78
|
+
----------
|
|
79
|
+
name : str
|
|
80
|
+
|
|
81
|
+
retention : int
|
|
82
|
+
Number of days to retain data. Must be 0 or at least 3 days. Requires data-retention entitlement for non-zero values. Optional.
|
|
83
|
+
|
|
84
|
+
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
85
|
+
Optional metadata for the project
|
|
86
|
+
|
|
87
|
+
request_options : typing.Optional[RequestOptions]
|
|
88
|
+
Request-specific configuration.
|
|
89
|
+
|
|
90
|
+
Returns
|
|
91
|
+
-------
|
|
92
|
+
Project
|
|
93
|
+
|
|
94
|
+
Examples
|
|
95
|
+
--------
|
|
96
|
+
from aeri import AeriAPI
|
|
97
|
+
|
|
98
|
+
client = AeriAPI(
|
|
99
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
100
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
101
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
102
|
+
username="YOUR_USERNAME",
|
|
103
|
+
password="YOUR_PASSWORD",
|
|
104
|
+
base_url="https://yourhost.com/path/to/api",
|
|
105
|
+
)
|
|
106
|
+
client.projects.create(
|
|
107
|
+
name="name",
|
|
108
|
+
retention=1,
|
|
109
|
+
)
|
|
110
|
+
"""
|
|
111
|
+
_response = self._raw_client.create(
|
|
112
|
+
name=name,
|
|
113
|
+
retention=retention,
|
|
114
|
+
metadata=metadata,
|
|
115
|
+
request_options=request_options,
|
|
116
|
+
)
|
|
117
|
+
return _response.data
|
|
118
|
+
|
|
119
|
+
def update(
|
|
120
|
+
self,
|
|
121
|
+
project_id: str,
|
|
122
|
+
*,
|
|
123
|
+
name: str,
|
|
124
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
125
|
+
retention: typing.Optional[int] = OMIT,
|
|
126
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
127
|
+
) -> Project:
|
|
128
|
+
"""
|
|
129
|
+
Update a project by ID (requires organization-scoped API key).
|
|
130
|
+
|
|
131
|
+
Parameters
|
|
132
|
+
----------
|
|
133
|
+
project_id : str
|
|
134
|
+
|
|
135
|
+
name : str
|
|
136
|
+
|
|
137
|
+
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
138
|
+
Optional metadata for the project
|
|
139
|
+
|
|
140
|
+
retention : typing.Optional[int]
|
|
141
|
+
Number of days to retain data.
|
|
142
|
+
Must be 0 or at least 3 days.
|
|
143
|
+
Requires data-retention entitlement for non-zero values.
|
|
144
|
+
Optional. Will retain existing retention setting if omitted.
|
|
145
|
+
|
|
146
|
+
request_options : typing.Optional[RequestOptions]
|
|
147
|
+
Request-specific configuration.
|
|
148
|
+
|
|
149
|
+
Returns
|
|
150
|
+
-------
|
|
151
|
+
Project
|
|
152
|
+
|
|
153
|
+
Examples
|
|
154
|
+
--------
|
|
155
|
+
from aeri import AeriAPI
|
|
156
|
+
|
|
157
|
+
client = AeriAPI(
|
|
158
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
159
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
160
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
161
|
+
username="YOUR_USERNAME",
|
|
162
|
+
password="YOUR_PASSWORD",
|
|
163
|
+
base_url="https://yourhost.com/path/to/api",
|
|
164
|
+
)
|
|
165
|
+
client.projects.update(
|
|
166
|
+
project_id="projectId",
|
|
167
|
+
name="name",
|
|
168
|
+
)
|
|
169
|
+
"""
|
|
170
|
+
_response = self._raw_client.update(
|
|
171
|
+
project_id,
|
|
172
|
+
name=name,
|
|
173
|
+
metadata=metadata,
|
|
174
|
+
retention=retention,
|
|
175
|
+
request_options=request_options,
|
|
176
|
+
)
|
|
177
|
+
return _response.data
|
|
178
|
+
|
|
179
|
+
def delete(
|
|
180
|
+
self,
|
|
181
|
+
project_id: str,
|
|
182
|
+
*,
|
|
183
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
184
|
+
) -> ProjectDeletionResponse:
|
|
185
|
+
"""
|
|
186
|
+
Delete a project by ID (requires organization-scoped API key). Project deletion is processed asynchronously.
|
|
187
|
+
|
|
188
|
+
Parameters
|
|
189
|
+
----------
|
|
190
|
+
project_id : str
|
|
191
|
+
|
|
192
|
+
request_options : typing.Optional[RequestOptions]
|
|
193
|
+
Request-specific configuration.
|
|
194
|
+
|
|
195
|
+
Returns
|
|
196
|
+
-------
|
|
197
|
+
ProjectDeletionResponse
|
|
198
|
+
|
|
199
|
+
Examples
|
|
200
|
+
--------
|
|
201
|
+
from aeri import AeriAPI
|
|
202
|
+
|
|
203
|
+
client = AeriAPI(
|
|
204
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
205
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
206
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
207
|
+
username="YOUR_USERNAME",
|
|
208
|
+
password="YOUR_PASSWORD",
|
|
209
|
+
base_url="https://yourhost.com/path/to/api",
|
|
210
|
+
)
|
|
211
|
+
client.projects.delete(
|
|
212
|
+
project_id="projectId",
|
|
213
|
+
)
|
|
214
|
+
"""
|
|
215
|
+
_response = self._raw_client.delete(project_id, request_options=request_options)
|
|
216
|
+
return _response.data
|
|
217
|
+
|
|
218
|
+
def get_api_keys(
|
|
219
|
+
self,
|
|
220
|
+
project_id: str,
|
|
221
|
+
*,
|
|
222
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
223
|
+
) -> ApiKeyList:
|
|
224
|
+
"""
|
|
225
|
+
Get all API keys for a project (requires organization-scoped API key)
|
|
226
|
+
|
|
227
|
+
Parameters
|
|
228
|
+
----------
|
|
229
|
+
project_id : str
|
|
230
|
+
|
|
231
|
+
request_options : typing.Optional[RequestOptions]
|
|
232
|
+
Request-specific configuration.
|
|
233
|
+
|
|
234
|
+
Returns
|
|
235
|
+
-------
|
|
236
|
+
ApiKeyList
|
|
237
|
+
|
|
238
|
+
Examples
|
|
239
|
+
--------
|
|
240
|
+
from aeri import AeriAPI
|
|
241
|
+
|
|
242
|
+
client = AeriAPI(
|
|
243
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
244
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
245
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
246
|
+
username="YOUR_USERNAME",
|
|
247
|
+
password="YOUR_PASSWORD",
|
|
248
|
+
base_url="https://yourhost.com/path/to/api",
|
|
249
|
+
)
|
|
250
|
+
client.projects.get_api_keys(
|
|
251
|
+
project_id="projectId",
|
|
252
|
+
)
|
|
253
|
+
"""
|
|
254
|
+
_response = self._raw_client.get_api_keys(
|
|
255
|
+
project_id, request_options=request_options
|
|
256
|
+
)
|
|
257
|
+
return _response.data
|
|
258
|
+
|
|
259
|
+
def create_api_key(
|
|
260
|
+
self,
|
|
261
|
+
project_id: str,
|
|
262
|
+
*,
|
|
263
|
+
note: typing.Optional[str] = OMIT,
|
|
264
|
+
public_key: typing.Optional[str] = OMIT,
|
|
265
|
+
secret_key: typing.Optional[str] = OMIT,
|
|
266
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
267
|
+
) -> ApiKeyResponse:
|
|
268
|
+
"""
|
|
269
|
+
Create a new API key for a project (requires organization-scoped API key)
|
|
270
|
+
|
|
271
|
+
Parameters
|
|
272
|
+
----------
|
|
273
|
+
project_id : str
|
|
274
|
+
|
|
275
|
+
note : typing.Optional[str]
|
|
276
|
+
Optional note for the API key
|
|
277
|
+
|
|
278
|
+
public_key : typing.Optional[str]
|
|
279
|
+
Optional predefined public key. Must start with 'pk-lf-'. If provided, secretKey must also be provided.
|
|
280
|
+
|
|
281
|
+
secret_key : typing.Optional[str]
|
|
282
|
+
Optional predefined secret key. Must start with 'sk-lf-'. If provided, publicKey must also be provided.
|
|
283
|
+
|
|
284
|
+
request_options : typing.Optional[RequestOptions]
|
|
285
|
+
Request-specific configuration.
|
|
286
|
+
|
|
287
|
+
Returns
|
|
288
|
+
-------
|
|
289
|
+
ApiKeyResponse
|
|
290
|
+
|
|
291
|
+
Examples
|
|
292
|
+
--------
|
|
293
|
+
from aeri import AeriAPI
|
|
294
|
+
|
|
295
|
+
client = AeriAPI(
|
|
296
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
297
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
298
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
299
|
+
username="YOUR_USERNAME",
|
|
300
|
+
password="YOUR_PASSWORD",
|
|
301
|
+
base_url="https://yourhost.com/path/to/api",
|
|
302
|
+
)
|
|
303
|
+
client.projects.create_api_key(
|
|
304
|
+
project_id="projectId",
|
|
305
|
+
)
|
|
306
|
+
"""
|
|
307
|
+
_response = self._raw_client.create_api_key(
|
|
308
|
+
project_id,
|
|
309
|
+
note=note,
|
|
310
|
+
public_key=public_key,
|
|
311
|
+
secret_key=secret_key,
|
|
312
|
+
request_options=request_options,
|
|
313
|
+
)
|
|
314
|
+
return _response.data
|
|
315
|
+
|
|
316
|
+
def delete_api_key(
|
|
317
|
+
self,
|
|
318
|
+
project_id: str,
|
|
319
|
+
api_key_id: str,
|
|
320
|
+
*,
|
|
321
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
322
|
+
) -> ApiKeyDeletionResponse:
|
|
323
|
+
"""
|
|
324
|
+
Delete an API key for a project (requires organization-scoped API key)
|
|
325
|
+
|
|
326
|
+
Parameters
|
|
327
|
+
----------
|
|
328
|
+
project_id : str
|
|
329
|
+
|
|
330
|
+
api_key_id : str
|
|
331
|
+
|
|
332
|
+
request_options : typing.Optional[RequestOptions]
|
|
333
|
+
Request-specific configuration.
|
|
334
|
+
|
|
335
|
+
Returns
|
|
336
|
+
-------
|
|
337
|
+
ApiKeyDeletionResponse
|
|
338
|
+
|
|
339
|
+
Examples
|
|
340
|
+
--------
|
|
341
|
+
from aeri import AeriAPI
|
|
342
|
+
|
|
343
|
+
client = AeriAPI(
|
|
344
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
345
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
346
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
347
|
+
username="YOUR_USERNAME",
|
|
348
|
+
password="YOUR_PASSWORD",
|
|
349
|
+
base_url="https://yourhost.com/path/to/api",
|
|
350
|
+
)
|
|
351
|
+
client.projects.delete_api_key(
|
|
352
|
+
project_id="projectId",
|
|
353
|
+
api_key_id="apiKeyId",
|
|
354
|
+
)
|
|
355
|
+
"""
|
|
356
|
+
_response = self._raw_client.delete_api_key(
|
|
357
|
+
project_id, api_key_id, request_options=request_options
|
|
358
|
+
)
|
|
359
|
+
return _response.data
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
class AsyncProjectsClient:
|
|
363
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
364
|
+
self._raw_client = AsyncRawProjectsClient(client_wrapper=client_wrapper)
|
|
365
|
+
|
|
366
|
+
@property
|
|
367
|
+
def with_raw_response(self) -> AsyncRawProjectsClient:
|
|
368
|
+
"""
|
|
369
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
370
|
+
|
|
371
|
+
Returns
|
|
372
|
+
-------
|
|
373
|
+
AsyncRawProjectsClient
|
|
374
|
+
"""
|
|
375
|
+
return self._raw_client
|
|
376
|
+
|
|
377
|
+
async def get(
|
|
378
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
379
|
+
) -> Projects:
|
|
380
|
+
"""
|
|
381
|
+
Get Project associated with API key (requires project-scoped API key). You can use GET /api/public/organizations/projects to get all projects with an organization-scoped key.
|
|
382
|
+
|
|
383
|
+
Parameters
|
|
384
|
+
----------
|
|
385
|
+
request_options : typing.Optional[RequestOptions]
|
|
386
|
+
Request-specific configuration.
|
|
387
|
+
|
|
388
|
+
Returns
|
|
389
|
+
-------
|
|
390
|
+
Projects
|
|
391
|
+
|
|
392
|
+
Examples
|
|
393
|
+
--------
|
|
394
|
+
import asyncio
|
|
395
|
+
|
|
396
|
+
from aeri import AsyncAeriAPI
|
|
397
|
+
|
|
398
|
+
client = AsyncAeriAPI(
|
|
399
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
400
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
401
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
402
|
+
username="YOUR_USERNAME",
|
|
403
|
+
password="YOUR_PASSWORD",
|
|
404
|
+
base_url="https://yourhost.com/path/to/api",
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
async def main() -> None:
|
|
409
|
+
await client.projects.get()
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
asyncio.run(main())
|
|
413
|
+
"""
|
|
414
|
+
_response = await self._raw_client.get(request_options=request_options)
|
|
415
|
+
return _response.data
|
|
416
|
+
|
|
417
|
+
async def create(
|
|
418
|
+
self,
|
|
419
|
+
*,
|
|
420
|
+
name: str,
|
|
421
|
+
retention: int,
|
|
422
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
423
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
424
|
+
) -> Project:
|
|
425
|
+
"""
|
|
426
|
+
Create a new project (requires organization-scoped API key)
|
|
427
|
+
|
|
428
|
+
Parameters
|
|
429
|
+
----------
|
|
430
|
+
name : str
|
|
431
|
+
|
|
432
|
+
retention : int
|
|
433
|
+
Number of days to retain data. Must be 0 or at least 3 days. Requires data-retention entitlement for non-zero values. Optional.
|
|
434
|
+
|
|
435
|
+
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
436
|
+
Optional metadata for the project
|
|
437
|
+
|
|
438
|
+
request_options : typing.Optional[RequestOptions]
|
|
439
|
+
Request-specific configuration.
|
|
440
|
+
|
|
441
|
+
Returns
|
|
442
|
+
-------
|
|
443
|
+
Project
|
|
444
|
+
|
|
445
|
+
Examples
|
|
446
|
+
--------
|
|
447
|
+
import asyncio
|
|
448
|
+
|
|
449
|
+
from aeri import AsyncAeriAPI
|
|
450
|
+
|
|
451
|
+
client = AsyncAeriAPI(
|
|
452
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
453
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
454
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
455
|
+
username="YOUR_USERNAME",
|
|
456
|
+
password="YOUR_PASSWORD",
|
|
457
|
+
base_url="https://yourhost.com/path/to/api",
|
|
458
|
+
)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
async def main() -> None:
|
|
462
|
+
await client.projects.create(
|
|
463
|
+
name="name",
|
|
464
|
+
retention=1,
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
asyncio.run(main())
|
|
469
|
+
"""
|
|
470
|
+
_response = await self._raw_client.create(
|
|
471
|
+
name=name,
|
|
472
|
+
retention=retention,
|
|
473
|
+
metadata=metadata,
|
|
474
|
+
request_options=request_options,
|
|
475
|
+
)
|
|
476
|
+
return _response.data
|
|
477
|
+
|
|
478
|
+
async def update(
|
|
479
|
+
self,
|
|
480
|
+
project_id: str,
|
|
481
|
+
*,
|
|
482
|
+
name: str,
|
|
483
|
+
metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
484
|
+
retention: typing.Optional[int] = OMIT,
|
|
485
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
486
|
+
) -> Project:
|
|
487
|
+
"""
|
|
488
|
+
Update a project by ID (requires organization-scoped API key).
|
|
489
|
+
|
|
490
|
+
Parameters
|
|
491
|
+
----------
|
|
492
|
+
project_id : str
|
|
493
|
+
|
|
494
|
+
name : str
|
|
495
|
+
|
|
496
|
+
metadata : typing.Optional[typing.Dict[str, typing.Any]]
|
|
497
|
+
Optional metadata for the project
|
|
498
|
+
|
|
499
|
+
retention : typing.Optional[int]
|
|
500
|
+
Number of days to retain data.
|
|
501
|
+
Must be 0 or at least 3 days.
|
|
502
|
+
Requires data-retention entitlement for non-zero values.
|
|
503
|
+
Optional. Will retain existing retention setting if omitted.
|
|
504
|
+
|
|
505
|
+
request_options : typing.Optional[RequestOptions]
|
|
506
|
+
Request-specific configuration.
|
|
507
|
+
|
|
508
|
+
Returns
|
|
509
|
+
-------
|
|
510
|
+
Project
|
|
511
|
+
|
|
512
|
+
Examples
|
|
513
|
+
--------
|
|
514
|
+
import asyncio
|
|
515
|
+
|
|
516
|
+
from aeri import AsyncAeriAPI
|
|
517
|
+
|
|
518
|
+
client = AsyncAeriAPI(
|
|
519
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
520
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
521
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
522
|
+
username="YOUR_USERNAME",
|
|
523
|
+
password="YOUR_PASSWORD",
|
|
524
|
+
base_url="https://yourhost.com/path/to/api",
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
async def main() -> None:
|
|
529
|
+
await client.projects.update(
|
|
530
|
+
project_id="projectId",
|
|
531
|
+
name="name",
|
|
532
|
+
)
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
asyncio.run(main())
|
|
536
|
+
"""
|
|
537
|
+
_response = await self._raw_client.update(
|
|
538
|
+
project_id,
|
|
539
|
+
name=name,
|
|
540
|
+
metadata=metadata,
|
|
541
|
+
retention=retention,
|
|
542
|
+
request_options=request_options,
|
|
543
|
+
)
|
|
544
|
+
return _response.data
|
|
545
|
+
|
|
546
|
+
async def delete(
|
|
547
|
+
self,
|
|
548
|
+
project_id: str,
|
|
549
|
+
*,
|
|
550
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
551
|
+
) -> ProjectDeletionResponse:
|
|
552
|
+
"""
|
|
553
|
+
Delete a project by ID (requires organization-scoped API key). Project deletion is processed asynchronously.
|
|
554
|
+
|
|
555
|
+
Parameters
|
|
556
|
+
----------
|
|
557
|
+
project_id : str
|
|
558
|
+
|
|
559
|
+
request_options : typing.Optional[RequestOptions]
|
|
560
|
+
Request-specific configuration.
|
|
561
|
+
|
|
562
|
+
Returns
|
|
563
|
+
-------
|
|
564
|
+
ProjectDeletionResponse
|
|
565
|
+
|
|
566
|
+
Examples
|
|
567
|
+
--------
|
|
568
|
+
import asyncio
|
|
569
|
+
|
|
570
|
+
from aeri import AsyncAeriAPI
|
|
571
|
+
|
|
572
|
+
client = AsyncAeriAPI(
|
|
573
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
574
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
575
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
576
|
+
username="YOUR_USERNAME",
|
|
577
|
+
password="YOUR_PASSWORD",
|
|
578
|
+
base_url="https://yourhost.com/path/to/api",
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
async def main() -> None:
|
|
583
|
+
await client.projects.delete(
|
|
584
|
+
project_id="projectId",
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
asyncio.run(main())
|
|
589
|
+
"""
|
|
590
|
+
_response = await self._raw_client.delete(
|
|
591
|
+
project_id, request_options=request_options
|
|
592
|
+
)
|
|
593
|
+
return _response.data
|
|
594
|
+
|
|
595
|
+
async def get_api_keys(
|
|
596
|
+
self,
|
|
597
|
+
project_id: str,
|
|
598
|
+
*,
|
|
599
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
600
|
+
) -> ApiKeyList:
|
|
601
|
+
"""
|
|
602
|
+
Get all API keys for a project (requires organization-scoped API key)
|
|
603
|
+
|
|
604
|
+
Parameters
|
|
605
|
+
----------
|
|
606
|
+
project_id : str
|
|
607
|
+
|
|
608
|
+
request_options : typing.Optional[RequestOptions]
|
|
609
|
+
Request-specific configuration.
|
|
610
|
+
|
|
611
|
+
Returns
|
|
612
|
+
-------
|
|
613
|
+
ApiKeyList
|
|
614
|
+
|
|
615
|
+
Examples
|
|
616
|
+
--------
|
|
617
|
+
import asyncio
|
|
618
|
+
|
|
619
|
+
from aeri import AsyncAeriAPI
|
|
620
|
+
|
|
621
|
+
client = AsyncAeriAPI(
|
|
622
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
623
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
624
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
625
|
+
username="YOUR_USERNAME",
|
|
626
|
+
password="YOUR_PASSWORD",
|
|
627
|
+
base_url="https://yourhost.com/path/to/api",
|
|
628
|
+
)
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
async def main() -> None:
|
|
632
|
+
await client.projects.get_api_keys(
|
|
633
|
+
project_id="projectId",
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
asyncio.run(main())
|
|
638
|
+
"""
|
|
639
|
+
_response = await self._raw_client.get_api_keys(
|
|
640
|
+
project_id, request_options=request_options
|
|
641
|
+
)
|
|
642
|
+
return _response.data
|
|
643
|
+
|
|
644
|
+
async def create_api_key(
|
|
645
|
+
self,
|
|
646
|
+
project_id: str,
|
|
647
|
+
*,
|
|
648
|
+
note: typing.Optional[str] = OMIT,
|
|
649
|
+
public_key: typing.Optional[str] = OMIT,
|
|
650
|
+
secret_key: typing.Optional[str] = OMIT,
|
|
651
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
652
|
+
) -> ApiKeyResponse:
|
|
653
|
+
"""
|
|
654
|
+
Create a new API key for a project (requires organization-scoped API key)
|
|
655
|
+
|
|
656
|
+
Parameters
|
|
657
|
+
----------
|
|
658
|
+
project_id : str
|
|
659
|
+
|
|
660
|
+
note : typing.Optional[str]
|
|
661
|
+
Optional note for the API key
|
|
662
|
+
|
|
663
|
+
public_key : typing.Optional[str]
|
|
664
|
+
Optional predefined public key. Must start with 'pk-lf-'. If provided, secretKey must also be provided.
|
|
665
|
+
|
|
666
|
+
secret_key : typing.Optional[str]
|
|
667
|
+
Optional predefined secret key. Must start with 'sk-lf-'. If provided, publicKey must also be provided.
|
|
668
|
+
|
|
669
|
+
request_options : typing.Optional[RequestOptions]
|
|
670
|
+
Request-specific configuration.
|
|
671
|
+
|
|
672
|
+
Returns
|
|
673
|
+
-------
|
|
674
|
+
ApiKeyResponse
|
|
675
|
+
|
|
676
|
+
Examples
|
|
677
|
+
--------
|
|
678
|
+
import asyncio
|
|
679
|
+
|
|
680
|
+
from aeri import AsyncAeriAPI
|
|
681
|
+
|
|
682
|
+
client = AsyncAeriAPI(
|
|
683
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
684
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
685
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
686
|
+
username="YOUR_USERNAME",
|
|
687
|
+
password="YOUR_PASSWORD",
|
|
688
|
+
base_url="https://yourhost.com/path/to/api",
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
async def main() -> None:
|
|
693
|
+
await client.projects.create_api_key(
|
|
694
|
+
project_id="projectId",
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
asyncio.run(main())
|
|
699
|
+
"""
|
|
700
|
+
_response = await self._raw_client.create_api_key(
|
|
701
|
+
project_id,
|
|
702
|
+
note=note,
|
|
703
|
+
public_key=public_key,
|
|
704
|
+
secret_key=secret_key,
|
|
705
|
+
request_options=request_options,
|
|
706
|
+
)
|
|
707
|
+
return _response.data
|
|
708
|
+
|
|
709
|
+
async def delete_api_key(
|
|
710
|
+
self,
|
|
711
|
+
project_id: str,
|
|
712
|
+
api_key_id: str,
|
|
713
|
+
*,
|
|
714
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
715
|
+
) -> ApiKeyDeletionResponse:
|
|
716
|
+
"""
|
|
717
|
+
Delete an API key for a project (requires organization-scoped API key)
|
|
718
|
+
|
|
719
|
+
Parameters
|
|
720
|
+
----------
|
|
721
|
+
project_id : str
|
|
722
|
+
|
|
723
|
+
api_key_id : str
|
|
724
|
+
|
|
725
|
+
request_options : typing.Optional[RequestOptions]
|
|
726
|
+
Request-specific configuration.
|
|
727
|
+
|
|
728
|
+
Returns
|
|
729
|
+
-------
|
|
730
|
+
ApiKeyDeletionResponse
|
|
731
|
+
|
|
732
|
+
Examples
|
|
733
|
+
--------
|
|
734
|
+
import asyncio
|
|
735
|
+
|
|
736
|
+
from aeri import AsyncAeriAPI
|
|
737
|
+
|
|
738
|
+
client = AsyncAeriAPI(
|
|
739
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
740
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
741
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
742
|
+
username="YOUR_USERNAME",
|
|
743
|
+
password="YOUR_PASSWORD",
|
|
744
|
+
base_url="https://yourhost.com/path/to/api",
|
|
745
|
+
)
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
async def main() -> None:
|
|
749
|
+
await client.projects.delete_api_key(
|
|
750
|
+
project_id="projectId",
|
|
751
|
+
api_key_id="apiKeyId",
|
|
752
|
+
)
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
asyncio.run(main())
|
|
756
|
+
"""
|
|
757
|
+
_response = await self._raw_client.delete_api_key(
|
|
758
|
+
project_id, api_key_id, request_options=request_options
|
|
759
|
+
)
|
|
760
|
+
return _response.data
|