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,56 @@
|
|
|
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 .get_media_response import GetMediaResponse
|
|
10
|
+
from .get_media_upload_url_request import GetMediaUploadUrlRequest
|
|
11
|
+
from .get_media_upload_url_response import GetMediaUploadUrlResponse
|
|
12
|
+
from .media_content_type import MediaContentType
|
|
13
|
+
from .patch_media_body import PatchMediaBody
|
|
14
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
15
|
+
"GetMediaResponse": ".get_media_response",
|
|
16
|
+
"GetMediaUploadUrlRequest": ".get_media_upload_url_request",
|
|
17
|
+
"GetMediaUploadUrlResponse": ".get_media_upload_url_response",
|
|
18
|
+
"MediaContentType": ".media_content_type",
|
|
19
|
+
"PatchMediaBody": ".patch_media_body",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
24
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
25
|
+
if module_name is None:
|
|
26
|
+
raise AttributeError(
|
|
27
|
+
f"No {attr_name} found in _dynamic_imports for module name -> {__name__}"
|
|
28
|
+
)
|
|
29
|
+
try:
|
|
30
|
+
module = import_module(module_name, __package__)
|
|
31
|
+
if module_name == f".{attr_name}":
|
|
32
|
+
return module
|
|
33
|
+
else:
|
|
34
|
+
return getattr(module, attr_name)
|
|
35
|
+
except ImportError as e:
|
|
36
|
+
raise ImportError(
|
|
37
|
+
f"Failed to import {attr_name} from {module_name}: {e}"
|
|
38
|
+
) from e
|
|
39
|
+
except AttributeError as e:
|
|
40
|
+
raise AttributeError(
|
|
41
|
+
f"Failed to get {attr_name} from {module_name}: {e}"
|
|
42
|
+
) from e
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def __dir__():
|
|
46
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
47
|
+
return sorted(lazy_attrs)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"GetMediaResponse",
|
|
52
|
+
"GetMediaUploadUrlRequest",
|
|
53
|
+
"GetMediaUploadUrlResponse",
|
|
54
|
+
"MediaContentType",
|
|
55
|
+
"PatchMediaBody",
|
|
56
|
+
]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
import typing_extensions
|
|
8
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
9
|
+
from ...core.serialization import FieldMetadata
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GetMediaResponse(UniversalBaseModel):
|
|
13
|
+
media_id: typing_extensions.Annotated[str, FieldMetadata(alias="mediaId")] = (
|
|
14
|
+
pydantic.Field()
|
|
15
|
+
)
|
|
16
|
+
"""
|
|
17
|
+
The unique aeri identifier of a media record
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
content_type: typing_extensions.Annotated[
|
|
21
|
+
str, FieldMetadata(alias="contentType")
|
|
22
|
+
] = pydantic.Field()
|
|
23
|
+
"""
|
|
24
|
+
The MIME type of the media record
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
content_length: typing_extensions.Annotated[
|
|
28
|
+
int, FieldMetadata(alias="contentLength")
|
|
29
|
+
] = pydantic.Field()
|
|
30
|
+
"""
|
|
31
|
+
The size of the media record in bytes
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
uploaded_at: typing_extensions.Annotated[
|
|
35
|
+
dt.datetime, FieldMetadata(alias="uploadedAt")
|
|
36
|
+
] = pydantic.Field()
|
|
37
|
+
"""
|
|
38
|
+
The date and time when the media record was uploaded
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
url: str = pydantic.Field()
|
|
42
|
+
"""
|
|
43
|
+
The download URL of the media record
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
url_expiry: typing_extensions.Annotated[str, FieldMetadata(alias="urlExpiry")] = (
|
|
47
|
+
pydantic.Field()
|
|
48
|
+
)
|
|
49
|
+
"""
|
|
50
|
+
The expiry date and time of the media record download URL
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
54
|
+
extra="allow", frozen=True
|
|
55
|
+
)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
8
|
+
from ...core.serialization import FieldMetadata
|
|
9
|
+
from .media_content_type import MediaContentType
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GetMediaUploadUrlRequest(UniversalBaseModel):
|
|
13
|
+
trace_id: typing_extensions.Annotated[str, FieldMetadata(alias="traceId")] = (
|
|
14
|
+
pydantic.Field()
|
|
15
|
+
)
|
|
16
|
+
"""
|
|
17
|
+
The trace ID associated with the media record
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
observation_id: typing_extensions.Annotated[
|
|
21
|
+
typing.Optional[str], FieldMetadata(alias="observationId")
|
|
22
|
+
] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
The observation ID associated with the media record. If the media record is associated directly with a trace, this will be null.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
content_type: typing_extensions.Annotated[
|
|
28
|
+
MediaContentType, FieldMetadata(alias="contentType")
|
|
29
|
+
]
|
|
30
|
+
content_length: typing_extensions.Annotated[
|
|
31
|
+
int, FieldMetadata(alias="contentLength")
|
|
32
|
+
] = pydantic.Field()
|
|
33
|
+
"""
|
|
34
|
+
The size of the media record in bytes
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
sha256hash: typing_extensions.Annotated[str, FieldMetadata(alias="sha256Hash")] = (
|
|
38
|
+
pydantic.Field()
|
|
39
|
+
)
|
|
40
|
+
"""
|
|
41
|
+
The SHA-256 hash of the media record
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
field: str = pydantic.Field()
|
|
45
|
+
"""
|
|
46
|
+
The trace / observation field the media record is associated with. This can be one of `input`, `output`, `metadata`
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
50
|
+
extra="allow", frozen=True
|
|
51
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
8
|
+
from ...core.serialization import FieldMetadata
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GetMediaUploadUrlResponse(UniversalBaseModel):
|
|
12
|
+
upload_url: typing_extensions.Annotated[
|
|
13
|
+
typing.Optional[str], FieldMetadata(alias="uploadUrl")
|
|
14
|
+
] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
The presigned upload URL. If the asset is already uploaded, this will be null
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
media_id: typing_extensions.Annotated[str, FieldMetadata(alias="mediaId")] = (
|
|
20
|
+
pydantic.Field()
|
|
21
|
+
)
|
|
22
|
+
"""
|
|
23
|
+
The unique aeri identifier of a media record
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
27
|
+
extra="allow", frozen=True
|
|
28
|
+
)
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core import enum
|
|
6
|
+
|
|
7
|
+
T_Result = typing.TypeVar("T_Result")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MediaContentType(enum.StrEnum):
|
|
11
|
+
"""
|
|
12
|
+
The MIME type of the media record
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
IMAGE_PNG = "image/png"
|
|
16
|
+
IMAGE_JPEG = "image/jpeg"
|
|
17
|
+
IMAGE_JPG = "image/jpg"
|
|
18
|
+
IMAGE_WEBP = "image/webp"
|
|
19
|
+
IMAGE_GIF = "image/gif"
|
|
20
|
+
IMAGE_SVG_XML = "image/svg+xml"
|
|
21
|
+
IMAGE_TIFF = "image/tiff"
|
|
22
|
+
IMAGE_BMP = "image/bmp"
|
|
23
|
+
IMAGE_AVIF = "image/avif"
|
|
24
|
+
IMAGE_HEIC = "image/heic"
|
|
25
|
+
AUDIO_MPEG = "audio/mpeg"
|
|
26
|
+
AUDIO_MP3 = "audio/mp3"
|
|
27
|
+
AUDIO_WAV = "audio/wav"
|
|
28
|
+
AUDIO_OGG = "audio/ogg"
|
|
29
|
+
AUDIO_OGA = "audio/oga"
|
|
30
|
+
AUDIO_AAC = "audio/aac"
|
|
31
|
+
AUDIO_MP4 = "audio/mp4"
|
|
32
|
+
AUDIO_FLAC = "audio/flac"
|
|
33
|
+
AUDIO_OPUS = "audio/opus"
|
|
34
|
+
AUDIO_WEBM = "audio/webm"
|
|
35
|
+
VIDEO_MP4 = "video/mp4"
|
|
36
|
+
VIDEO_WEBM = "video/webm"
|
|
37
|
+
VIDEO_OGG = "video/ogg"
|
|
38
|
+
VIDEO_MPEG = "video/mpeg"
|
|
39
|
+
VIDEO_QUICKTIME = "video/quicktime"
|
|
40
|
+
VIDEO_X_MSVIDEO = "video/x-msvideo"
|
|
41
|
+
VIDEO_X_MATROSKA = "video/x-matroska"
|
|
42
|
+
TEXT_PLAIN = "text/plain"
|
|
43
|
+
TEXT_HTML = "text/html"
|
|
44
|
+
TEXT_CSS = "text/css"
|
|
45
|
+
TEXT_CSV = "text/csv"
|
|
46
|
+
TEXT_MARKDOWN = "text/markdown"
|
|
47
|
+
TEXT_X_PYTHON = "text/x-python"
|
|
48
|
+
APPLICATION_JAVASCRIPT = "application/javascript"
|
|
49
|
+
TEXT_X_TYPESCRIPT = "text/x-typescript"
|
|
50
|
+
APPLICATION_X_YAML = "application/x-yaml"
|
|
51
|
+
APPLICATION_PDF = "application/pdf"
|
|
52
|
+
APPLICATION_MSWORD = "application/msword"
|
|
53
|
+
APPLICATION_MS_EXCEL = "application/vnd.ms-excel"
|
|
54
|
+
APPLICATION_OPENXML_SPREADSHEET = (
|
|
55
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
56
|
+
)
|
|
57
|
+
APPLICATION_ZIP = "application/zip"
|
|
58
|
+
APPLICATION_JSON = "application/json"
|
|
59
|
+
APPLICATION_XML = "application/xml"
|
|
60
|
+
APPLICATION_OCTET_STREAM = "application/octet-stream"
|
|
61
|
+
APPLICATION_OPENXML_WORD = (
|
|
62
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
63
|
+
)
|
|
64
|
+
APPLICATION_OPENXML_PRESENTATION = (
|
|
65
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
66
|
+
)
|
|
67
|
+
APPLICATION_RTF = "application/rtf"
|
|
68
|
+
APPLICATION_X_NDJSON = "application/x-ndjson"
|
|
69
|
+
APPLICATION_PARQUET = "application/vnd.apache.parquet"
|
|
70
|
+
APPLICATION_GZIP = "application/gzip"
|
|
71
|
+
APPLICATION_X_TAR = "application/x-tar"
|
|
72
|
+
APPLICATION_X7Z_COMPRESSED = "application/x-7z-compressed"
|
|
73
|
+
|
|
74
|
+
def visit(
|
|
75
|
+
self,
|
|
76
|
+
image_png: typing.Callable[[], T_Result],
|
|
77
|
+
image_jpeg: typing.Callable[[], T_Result],
|
|
78
|
+
image_jpg: typing.Callable[[], T_Result],
|
|
79
|
+
image_webp: typing.Callable[[], T_Result],
|
|
80
|
+
image_gif: typing.Callable[[], T_Result],
|
|
81
|
+
image_svg_xml: typing.Callable[[], T_Result],
|
|
82
|
+
image_tiff: typing.Callable[[], T_Result],
|
|
83
|
+
image_bmp: typing.Callable[[], T_Result],
|
|
84
|
+
image_avif: typing.Callable[[], T_Result],
|
|
85
|
+
image_heic: typing.Callable[[], T_Result],
|
|
86
|
+
audio_mpeg: typing.Callable[[], T_Result],
|
|
87
|
+
audio_mp3: typing.Callable[[], T_Result],
|
|
88
|
+
audio_wav: typing.Callable[[], T_Result],
|
|
89
|
+
audio_ogg: typing.Callable[[], T_Result],
|
|
90
|
+
audio_oga: typing.Callable[[], T_Result],
|
|
91
|
+
audio_aac: typing.Callable[[], T_Result],
|
|
92
|
+
audio_mp4: typing.Callable[[], T_Result],
|
|
93
|
+
audio_flac: typing.Callable[[], T_Result],
|
|
94
|
+
audio_opus: typing.Callable[[], T_Result],
|
|
95
|
+
audio_webm: typing.Callable[[], T_Result],
|
|
96
|
+
video_mp4: typing.Callable[[], T_Result],
|
|
97
|
+
video_webm: typing.Callable[[], T_Result],
|
|
98
|
+
video_ogg: typing.Callable[[], T_Result],
|
|
99
|
+
video_mpeg: typing.Callable[[], T_Result],
|
|
100
|
+
video_quicktime: typing.Callable[[], T_Result],
|
|
101
|
+
video_x_msvideo: typing.Callable[[], T_Result],
|
|
102
|
+
video_x_matroska: typing.Callable[[], T_Result],
|
|
103
|
+
text_plain: typing.Callable[[], T_Result],
|
|
104
|
+
text_html: typing.Callable[[], T_Result],
|
|
105
|
+
text_css: typing.Callable[[], T_Result],
|
|
106
|
+
text_csv: typing.Callable[[], T_Result],
|
|
107
|
+
text_markdown: typing.Callable[[], T_Result],
|
|
108
|
+
text_x_python: typing.Callable[[], T_Result],
|
|
109
|
+
application_javascript: typing.Callable[[], T_Result],
|
|
110
|
+
text_x_typescript: typing.Callable[[], T_Result],
|
|
111
|
+
application_x_yaml: typing.Callable[[], T_Result],
|
|
112
|
+
application_pdf: typing.Callable[[], T_Result],
|
|
113
|
+
application_msword: typing.Callable[[], T_Result],
|
|
114
|
+
application_ms_excel: typing.Callable[[], T_Result],
|
|
115
|
+
application_openxml_spreadsheet: typing.Callable[[], T_Result],
|
|
116
|
+
application_zip: typing.Callable[[], T_Result],
|
|
117
|
+
application_json: typing.Callable[[], T_Result],
|
|
118
|
+
application_xml: typing.Callable[[], T_Result],
|
|
119
|
+
application_octet_stream: typing.Callable[[], T_Result],
|
|
120
|
+
application_openxml_word: typing.Callable[[], T_Result],
|
|
121
|
+
application_openxml_presentation: typing.Callable[[], T_Result],
|
|
122
|
+
application_rtf: typing.Callable[[], T_Result],
|
|
123
|
+
application_x_ndjson: typing.Callable[[], T_Result],
|
|
124
|
+
application_parquet: typing.Callable[[], T_Result],
|
|
125
|
+
application_gzip: typing.Callable[[], T_Result],
|
|
126
|
+
application_x_tar: typing.Callable[[], T_Result],
|
|
127
|
+
application_x7z_compressed: typing.Callable[[], T_Result],
|
|
128
|
+
) -> T_Result:
|
|
129
|
+
if self is MediaContentType.IMAGE_PNG:
|
|
130
|
+
return image_png()
|
|
131
|
+
if self is MediaContentType.IMAGE_JPEG:
|
|
132
|
+
return image_jpeg()
|
|
133
|
+
if self is MediaContentType.IMAGE_JPG:
|
|
134
|
+
return image_jpg()
|
|
135
|
+
if self is MediaContentType.IMAGE_WEBP:
|
|
136
|
+
return image_webp()
|
|
137
|
+
if self is MediaContentType.IMAGE_GIF:
|
|
138
|
+
return image_gif()
|
|
139
|
+
if self is MediaContentType.IMAGE_SVG_XML:
|
|
140
|
+
return image_svg_xml()
|
|
141
|
+
if self is MediaContentType.IMAGE_TIFF:
|
|
142
|
+
return image_tiff()
|
|
143
|
+
if self is MediaContentType.IMAGE_BMP:
|
|
144
|
+
return image_bmp()
|
|
145
|
+
if self is MediaContentType.IMAGE_AVIF:
|
|
146
|
+
return image_avif()
|
|
147
|
+
if self is MediaContentType.IMAGE_HEIC:
|
|
148
|
+
return image_heic()
|
|
149
|
+
if self is MediaContentType.AUDIO_MPEG:
|
|
150
|
+
return audio_mpeg()
|
|
151
|
+
if self is MediaContentType.AUDIO_MP3:
|
|
152
|
+
return audio_mp3()
|
|
153
|
+
if self is MediaContentType.AUDIO_WAV:
|
|
154
|
+
return audio_wav()
|
|
155
|
+
if self is MediaContentType.AUDIO_OGG:
|
|
156
|
+
return audio_ogg()
|
|
157
|
+
if self is MediaContentType.AUDIO_OGA:
|
|
158
|
+
return audio_oga()
|
|
159
|
+
if self is MediaContentType.AUDIO_AAC:
|
|
160
|
+
return audio_aac()
|
|
161
|
+
if self is MediaContentType.AUDIO_MP4:
|
|
162
|
+
return audio_mp4()
|
|
163
|
+
if self is MediaContentType.AUDIO_FLAC:
|
|
164
|
+
return audio_flac()
|
|
165
|
+
if self is MediaContentType.AUDIO_OPUS:
|
|
166
|
+
return audio_opus()
|
|
167
|
+
if self is MediaContentType.AUDIO_WEBM:
|
|
168
|
+
return audio_webm()
|
|
169
|
+
if self is MediaContentType.VIDEO_MP4:
|
|
170
|
+
return video_mp4()
|
|
171
|
+
if self is MediaContentType.VIDEO_WEBM:
|
|
172
|
+
return video_webm()
|
|
173
|
+
if self is MediaContentType.VIDEO_OGG:
|
|
174
|
+
return video_ogg()
|
|
175
|
+
if self is MediaContentType.VIDEO_MPEG:
|
|
176
|
+
return video_mpeg()
|
|
177
|
+
if self is MediaContentType.VIDEO_QUICKTIME:
|
|
178
|
+
return video_quicktime()
|
|
179
|
+
if self is MediaContentType.VIDEO_X_MSVIDEO:
|
|
180
|
+
return video_x_msvideo()
|
|
181
|
+
if self is MediaContentType.VIDEO_X_MATROSKA:
|
|
182
|
+
return video_x_matroska()
|
|
183
|
+
if self is MediaContentType.TEXT_PLAIN:
|
|
184
|
+
return text_plain()
|
|
185
|
+
if self is MediaContentType.TEXT_HTML:
|
|
186
|
+
return text_html()
|
|
187
|
+
if self is MediaContentType.TEXT_CSS:
|
|
188
|
+
return text_css()
|
|
189
|
+
if self is MediaContentType.TEXT_CSV:
|
|
190
|
+
return text_csv()
|
|
191
|
+
if self is MediaContentType.TEXT_MARKDOWN:
|
|
192
|
+
return text_markdown()
|
|
193
|
+
if self is MediaContentType.TEXT_X_PYTHON:
|
|
194
|
+
return text_x_python()
|
|
195
|
+
if self is MediaContentType.APPLICATION_JAVASCRIPT:
|
|
196
|
+
return application_javascript()
|
|
197
|
+
if self is MediaContentType.TEXT_X_TYPESCRIPT:
|
|
198
|
+
return text_x_typescript()
|
|
199
|
+
if self is MediaContentType.APPLICATION_X_YAML:
|
|
200
|
+
return application_x_yaml()
|
|
201
|
+
if self is MediaContentType.APPLICATION_PDF:
|
|
202
|
+
return application_pdf()
|
|
203
|
+
if self is MediaContentType.APPLICATION_MSWORD:
|
|
204
|
+
return application_msword()
|
|
205
|
+
if self is MediaContentType.APPLICATION_MS_EXCEL:
|
|
206
|
+
return application_ms_excel()
|
|
207
|
+
if self is MediaContentType.APPLICATION_OPENXML_SPREADSHEET:
|
|
208
|
+
return application_openxml_spreadsheet()
|
|
209
|
+
if self is MediaContentType.APPLICATION_ZIP:
|
|
210
|
+
return application_zip()
|
|
211
|
+
if self is MediaContentType.APPLICATION_JSON:
|
|
212
|
+
return application_json()
|
|
213
|
+
if self is MediaContentType.APPLICATION_XML:
|
|
214
|
+
return application_xml()
|
|
215
|
+
if self is MediaContentType.APPLICATION_OCTET_STREAM:
|
|
216
|
+
return application_octet_stream()
|
|
217
|
+
if self is MediaContentType.APPLICATION_OPENXML_WORD:
|
|
218
|
+
return application_openxml_word()
|
|
219
|
+
if self is MediaContentType.APPLICATION_OPENXML_PRESENTATION:
|
|
220
|
+
return application_openxml_presentation()
|
|
221
|
+
if self is MediaContentType.APPLICATION_RTF:
|
|
222
|
+
return application_rtf()
|
|
223
|
+
if self is MediaContentType.APPLICATION_X_NDJSON:
|
|
224
|
+
return application_x_ndjson()
|
|
225
|
+
if self is MediaContentType.APPLICATION_PARQUET:
|
|
226
|
+
return application_parquet()
|
|
227
|
+
if self is MediaContentType.APPLICATION_GZIP:
|
|
228
|
+
return application_gzip()
|
|
229
|
+
if self is MediaContentType.APPLICATION_X_TAR:
|
|
230
|
+
return application_x_tar()
|
|
231
|
+
if self is MediaContentType.APPLICATION_X7Z_COMPRESSED:
|
|
232
|
+
return application_x7z_compressed()
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
import typing_extensions
|
|
8
|
+
from ...core.pydantic_utilities import UniversalBaseModel
|
|
9
|
+
from ...core.serialization import FieldMetadata
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PatchMediaBody(UniversalBaseModel):
|
|
13
|
+
uploaded_at: typing_extensions.Annotated[
|
|
14
|
+
dt.datetime, FieldMetadata(alias="uploadedAt")
|
|
15
|
+
] = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
The date and time when the media record was uploaded
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
upload_http_status: typing_extensions.Annotated[
|
|
21
|
+
int, FieldMetadata(alias="uploadHttpStatus")
|
|
22
|
+
] = pydantic.Field()
|
|
23
|
+
"""
|
|
24
|
+
The HTTP status code of the upload
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
upload_http_error: typing_extensions.Annotated[
|
|
28
|
+
typing.Optional[str], FieldMetadata(alias="uploadHttpError")
|
|
29
|
+
] = pydantic.Field(default=None)
|
|
30
|
+
"""
|
|
31
|
+
The HTTP error message of the upload
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
upload_time_ms: typing_extensions.Annotated[
|
|
35
|
+
typing.Optional[int], FieldMetadata(alias="uploadTimeMs")
|
|
36
|
+
] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
The time in milliseconds it took to upload the media record
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
42
|
+
extra="allow", frozen=True
|
|
43
|
+
)
|
|
@@ -0,0 +1,40 @@
|
|
|
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 MetricsV2Response
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {"MetricsV2Response": ".types"}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
14
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
15
|
+
if module_name is None:
|
|
16
|
+
raise AttributeError(
|
|
17
|
+
f"No {attr_name} found in _dynamic_imports for module name -> {__name__}"
|
|
18
|
+
)
|
|
19
|
+
try:
|
|
20
|
+
module = import_module(module_name, __package__)
|
|
21
|
+
if module_name == f".{attr_name}":
|
|
22
|
+
return module
|
|
23
|
+
else:
|
|
24
|
+
return getattr(module, attr_name)
|
|
25
|
+
except ImportError as e:
|
|
26
|
+
raise ImportError(
|
|
27
|
+
f"Failed to import {attr_name} from {module_name}: {e}"
|
|
28
|
+
) from e
|
|
29
|
+
except AttributeError as e:
|
|
30
|
+
raise AttributeError(
|
|
31
|
+
f"Failed to get {attr_name} from {module_name}: {e}"
|
|
32
|
+
) from e
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def __dir__():
|
|
36
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
37
|
+
return sorted(lazy_attrs)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
__all__ = ["MetricsV2Response"]
|