frameio 0.0.28__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.
- frameio/__init__.py +1158 -0
- frameio/account_permissions/__init__.py +4 -0
- frameio/account_permissions/client.py +193 -0
- frameio/account_permissions/raw_client.py +333 -0
- frameio/accounts/__init__.py +4 -0
- frameio/accounts/client.py +162 -0
- frameio/accounts/raw_client.py +309 -0
- frameio/client.py +439 -0
- frameio/comments/__init__.py +38 -0
- frameio/comments/client.py +654 -0
- frameio/comments/raw_client.py +1316 -0
- frameio/comments/types/__init__.py +40 -0
- frameio/comments/types/comments_show_request_include.py +5 -0
- frameio/comments/types/create_comment_params_data.py +33 -0
- frameio/comments/types/update_comment_params_data.py +33 -0
- frameio/core/__init__.py +122 -0
- frameio/core/api_error.py +23 -0
- frameio/core/client_wrapper.py +95 -0
- frameio/core/custom_pagination.py +152 -0
- frameio/core/datetime_utils.py +28 -0
- frameio/core/file.py +67 -0
- frameio/core/force_multipart.py +18 -0
- frameio/core/http_client.py +663 -0
- frameio/core/http_response.py +55 -0
- frameio/core/http_sse/__init__.py +42 -0
- frameio/core/http_sse/_api.py +112 -0
- frameio/core/http_sse/_decoders.py +61 -0
- frameio/core/http_sse/_exceptions.py +7 -0
- frameio/core/http_sse/_models.py +17 -0
- frameio/core/jsonable_encoder.py +100 -0
- frameio/core/pagination.py +82 -0
- frameio/core/pydantic_utilities.py +361 -0
- frameio/core/query_encoder.py +58 -0
- frameio/core/remove_none_from_dict.py +11 -0
- frameio/core/request_options.py +35 -0
- frameio/core/serialization.py +276 -0
- frameio/core/unchecked_base_model.py +376 -0
- frameio/environment.py +7 -0
- frameio/errors/__init__.py +53 -0
- frameio/errors/bad_request_error.py +11 -0
- frameio/errors/forbidden_error.py +11 -0
- frameio/errors/not_found_error.py +11 -0
- frameio/errors/too_many_requests_error.py +11 -0
- frameio/errors/unauthorized_error.py +11 -0
- frameio/errors/unprocessable_entity_error.py +10 -0
- frameio/files/__init__.py +58 -0
- frameio/files/client.py +1171 -0
- frameio/files/raw_client.py +2517 -0
- frameio/files/types/__init__.py +56 -0
- frameio/files/types/file_copy_params_data.py +15 -0
- frameio/files/types/file_create_local_upload_params_data.py +20 -0
- frameio/files/types/file_create_params_data.py +31 -0
- frameio/files/types/file_create_remote_upload_params_data.py +20 -0
- frameio/files/types/file_move_params_data.py +15 -0
- frameio/files/types/file_update_params_data.py +15 -0
- frameio/files/types/files_copy_request_copy_comments.py +5 -0
- frameio/folders/__init__.py +39 -0
- frameio/folders/client.py +1004 -0
- frameio/folders/raw_client.py +2074 -0
- frameio/folders/types/__init__.py +42 -0
- frameio/folders/types/folder_copy_params_data.py +15 -0
- frameio/folders/types/folder_create_params_data.py +15 -0
- frameio/folders/types/folder_move_params_data.py +15 -0
- frameio/folders/types/folder_update_params_data.py +15 -0
- frameio/metadata/__init__.py +37 -0
- frameio/metadata/client.py +293 -0
- frameio/metadata/raw_client.py +509 -0
- frameio/metadata/types/__init__.py +38 -0
- frameio/metadata/types/bulk_update_metadata_params_data.py +23 -0
- frameio/metadata/types/bulk_update_metadata_params_data_values_item.py +13 -0
- frameio/metadata_fields/__init__.py +103 -0
- frameio/metadata_fields/client.py +536 -0
- frameio/metadata_fields/raw_client.py +996 -0
- frameio/metadata_fields/types/__init__.py +105 -0
- frameio/metadata_fields/types/create_field_definition_params_data.py +112 -0
- frameio/metadata_fields/types/update_field_definition_params_data.py +118 -0
- frameio/project_permissions/__init__.py +4 -0
- frameio/project_permissions/client.py +426 -0
- frameio/project_permissions/raw_client.py +824 -0
- frameio/projects/__init__.py +38 -0
- frameio/projects/client.py +604 -0
- frameio/projects/raw_client.py +1286 -0
- frameio/projects/types/__init__.py +40 -0
- frameio/projects/types/project_params_data.py +20 -0
- frameio/projects/types/project_update_params_data.py +26 -0
- frameio/projects/types/project_update_params_data_status.py +5 -0
- frameio/py.typed +0 -0
- frameio/shares/__init__.py +64 -0
- frameio/shares/client.py +1217 -0
- frameio/shares/raw_client.py +2511 -0
- frameio/shares/types/__init__.py +61 -0
- frameio/shares/types/add_asset_params_data.py +15 -0
- frameio/shares/types/add_reviewers_to_share_params_data.py +18 -0
- frameio/shares/types/add_reviewers_to_share_params_data_reviewers.py +27 -0
- frameio/shares/types/create_share_params_data.py +26 -0
- frameio/shares/types/remove_reviewer_params_data.py +13 -0
- frameio/shares/types/remove_reviewer_params_data_reviewers.py +27 -0
- frameio/shares/types/update_share_params_data.py +34 -0
- frameio/shares/types/update_share_params_data_access.py +5 -0
- frameio/types/__init__.py +983 -0
- frameio/types/account.py +70 -0
- frameio/types/account_roles_item.py +5 -0
- frameio/types/account_user_role.py +23 -0
- frameio/types/account_user_role_role.py +5 -0
- frameio/types/account_user_roles_response.py +27 -0
- frameio/types/accounts_response.py +23 -0
- frameio/types/add_asset_response.py +13 -0
- frameio/types/add_asset_response_data.py +15 -0
- frameio/types/asset_common.py +48 -0
- frameio/types/asset_common_type.py +5 -0
- frameio/types/asset_common_with_includes.py +58 -0
- frameio/types/asset_common_with_includes_type.py +5 -0
- frameio/types/asset_include.py +5 -0
- frameio/types/asset_share_params.py +39 -0
- frameio/types/asset_share_params_access.py +5 -0
- frameio/types/asset_with_includes.py +76 -0
- frameio/types/assets_with_includes_response.py +23 -0
- frameio/types/bad_request.py +13 -0
- frameio/types/bad_request_errors_item.py +15 -0
- frameio/types/bad_request_errors_item_source.py +12 -0
- frameio/types/boolean_value.py +12 -0
- frameio/types/children_type.py +3 -0
- frameio/types/comment.py +59 -0
- frameio/types/comment_include.py +5 -0
- frameio/types/comment_response.py +13 -0
- frameio/types/comment_with_includes.py +17 -0
- frameio/types/comment_with_includes_response.py +13 -0
- frameio/types/comments_with_includes_response.py +23 -0
- frameio/types/date_definition.py +49 -0
- frameio/types/date_definition_field_configuration.py +21 -0
- frameio/types/date_definition_field_configuration_display_format.py +7 -0
- frameio/types/date_definition_field_configuration_time_format.py +5 -0
- frameio/types/date_definition_field_type.py +10 -0
- frameio/types/date_definition_params.py +17 -0
- frameio/types/date_definition_params_field_configuration.py +23 -0
- frameio/types/date_definition_params_field_configuration_display_format.py +7 -0
- frameio/types/date_definition_params_field_configuration_time_format.py +7 -0
- frameio/types/date_definition_with_includes.py +13 -0
- frameio/types/date_value.py +12 -0
- frameio/types/email.py +3 -0
- frameio/types/empty_json.py +5 -0
- frameio/types/field_definition.py +167 -0
- frameio/types/field_definition_include.py +5 -0
- frameio/types/field_definition_response.py +13 -0
- frameio/types/field_definition_with_includes.py +178 -0
- frameio/types/field_definitions_with_includes_response.py +27 -0
- frameio/types/field_value_common.py +29 -0
- frameio/types/file.py +60 -0
- frameio/types/file_copy_response.py +13 -0
- frameio/types/file_remote_upload_response.py +17 -0
- frameio/types/file_response.py +13 -0
- frameio/types/file_status.py +5 -0
- frameio/types/file_upload_status.py +41 -0
- frameio/types/file_upload_status_response.py +13 -0
- frameio/types/file_with_includes.py +25 -0
- frameio/types/file_with_includes_response.py +13 -0
- frameio/types/file_with_includes_status.py +5 -0
- frameio/types/file_with_media_links_include.py +19 -0
- frameio/types/file_with_upload_urls.py +16 -0
- frameio/types/file_with_upload_urls_response.py +13 -0
- frameio/types/folder.py +15 -0
- frameio/types/folder_copy_response.py +13 -0
- frameio/types/folder_response.py +13 -0
- frameio/types/folder_with_includes.py +63 -0
- frameio/types/folder_with_includes_response.py +13 -0
- frameio/types/folders_with_includes_response.py +23 -0
- frameio/types/forbidden.py +13 -0
- frameio/types/forbidden_errors_item.py +15 -0
- frameio/types/forbidden_errors_item_source.py +12 -0
- frameio/types/include.py +5 -0
- frameio/types/include_total_count.py +3 -0
- frameio/types/integer_value.py +12 -0
- frameio/types/json_error_response.py +13 -0
- frameio/types/json_error_response_errors_item.py +15 -0
- frameio/types/json_error_response_errors_item_source.py +12 -0
- frameio/types/links.py +22 -0
- frameio/types/long_text_definition.py +49 -0
- frameio/types/long_text_definition_field_configuration.py +10 -0
- frameio/types/long_text_definition_field_type.py +10 -0
- frameio/types/long_text_definition_params.py +15 -0
- frameio/types/long_text_definition_with_includes.py +13 -0
- frameio/types/media_link_common.py +17 -0
- frameio/types/media_links_collection.py +24 -0
- frameio/types/metadata_field.py +149 -0
- frameio/types/metadata_response.py +13 -0
- frameio/types/metadata_with_definition.py +21 -0
- frameio/types/multi_select_value.py +14 -0
- frameio/types/multi_user_value.py +20 -0
- frameio/types/multi_user_value_member_options_type.py +5 -0
- frameio/types/no_content.py +3 -0
- frameio/types/not_found.py +13 -0
- frameio/types/not_found_errors_item.py +15 -0
- frameio/types/not_found_errors_item_source.py +12 -0
- frameio/types/number_definition.py +43 -0
- frameio/types/number_definition_field_configuration.py +21 -0
- frameio/types/number_definition_field_configuration_number_format.py +7 -0
- frameio/types/number_definition_params.py +17 -0
- frameio/types/number_definition_params_field_configuration.py +23 -0
- frameio/types/number_definition_params_field_configuration_number_format.py +7 -0
- frameio/types/number_definition_with_includes.py +13 -0
- frameio/types/number_value.py +12 -0
- frameio/types/original_media_link.py +16 -0
- frameio/types/profile.py +34 -0
- frameio/types/profile_response.py +17 -0
- frameio/types/project.py +66 -0
- frameio/types/project_include.py +5 -0
- frameio/types/project_response.py +17 -0
- frameio/types/project_status.py +5 -0
- frameio/types/project_with_includes.py +18 -0
- frameio/types/project_with_includes_response.py +17 -0
- frameio/types/projects_with_includes_response.py +27 -0
- frameio/types/rating_definition.py +43 -0
- frameio/types/rating_definition_field_configuration.py +22 -0
- frameio/types/rating_definition_field_configuration_style.py +5 -0
- frameio/types/rating_definition_params.py +17 -0
- frameio/types/rating_definition_params_field_configuration.py +22 -0
- frameio/types/rating_definition_params_field_configuration_style.py +5 -0
- frameio/types/rating_definition_with_includes.py +13 -0
- frameio/types/remove_asset_response.py +13 -0
- frameio/types/remove_asset_response_data.py +15 -0
- frameio/types/rendition_media_link.py +19 -0
- frameio/types/request_after_opaque_cursor.py +5 -0
- frameio/types/request_page_size.py +3 -0
- frameio/types/select_definition.py +43 -0
- frameio/types/select_definition_field_configuration.py +18 -0
- frameio/types/select_definition_field_configuration_options_item.py +22 -0
- frameio/types/select_definition_params.py +17 -0
- frameio/types/select_definition_params_field_configuration.py +20 -0
- frameio/types/select_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/select_definition_with_includes.py +13 -0
- frameio/types/select_multi_definition.py +49 -0
- frameio/types/select_multi_definition_field_configuration.py +18 -0
- frameio/types/select_multi_definition_field_configuration_options_item.py +22 -0
- frameio/types/select_multi_definition_field_type.py +10 -0
- frameio/types/select_multi_definition_params.py +17 -0
- frameio/types/select_multi_definition_params_field_configuration.py +20 -0
- frameio/types/select_multi_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/select_multi_definition_with_includes.py +13 -0
- frameio/types/select_option.py +20 -0
- frameio/types/select_value.py +14 -0
- frameio/types/share.py +66 -0
- frameio/types/share_access.py +5 -0
- frameio/types/share_response.py +13 -0
- frameio/types/share_reviewers_response.py +27 -0
- frameio/types/shares_response.py +27 -0
- frameio/types/single_user_value.py +20 -0
- frameio/types/single_user_value_member_options_type.py +5 -0
- frameio/types/text_definition.py +49 -0
- frameio/types/text_definition_field_configuration.py +10 -0
- frameio/types/text_definition_field_type.py +10 -0
- frameio/types/text_definition_params.py +15 -0
- frameio/types/text_definition_with_includes.py +13 -0
- frameio/types/text_value.py +12 -0
- frameio/types/time_stamp.py +5 -0
- frameio/types/toggle_definition.py +43 -0
- frameio/types/toggle_definition_field_configuration.py +15 -0
- frameio/types/toggle_definition_params.py +17 -0
- frameio/types/toggle_definition_params_field_configuration.py +15 -0
- frameio/types/toggle_definition_with_includes.py +13 -0
- frameio/types/too_many_requests.py +13 -0
- frameio/types/too_many_requests_errors_item.py +15 -0
- frameio/types/too_many_requests_errors_item_source.py +12 -0
- frameio/types/unauthorized.py +13 -0
- frameio/types/unauthorized_errors_item.py +15 -0
- frameio/types/unauthorized_errors_item_source.py +12 -0
- frameio/types/unprocessable_entity.py +13 -0
- frameio/types/unprocessable_entity_errors_item.py +15 -0
- frameio/types/unprocessable_entity_errors_item_source.py +12 -0
- frameio/types/update_date_definition_params.py +17 -0
- frameio/types/update_date_definition_params_field_configuration.py +25 -0
- frameio/types/update_date_definition_params_field_configuration_display_format.py +7 -0
- frameio/types/update_date_definition_params_field_configuration_time_format.py +7 -0
- frameio/types/update_long_text_definition_params.py +15 -0
- frameio/types/update_number_definition_params.py +17 -0
- frameio/types/update_number_definition_params_field_configuration.py +25 -0
- frameio/types/update_number_definition_params_field_configuration_number_format.py +7 -0
- frameio/types/update_rating_definition_params.py +17 -0
- frameio/types/update_rating_definition_params_field_configuration.py +24 -0
- frameio/types/update_rating_definition_params_field_configuration_style.py +7 -0
- frameio/types/update_select_definition_params.py +17 -0
- frameio/types/update_select_definition_params_field_configuration.py +20 -0
- frameio/types/update_select_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/update_select_multi_definition_params.py +19 -0
- frameio/types/update_select_multi_definition_params_field_configuration.py +20 -0
- frameio/types/update_select_multi_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/update_text_definition_params.py +15 -0
- frameio/types/update_toggle_definition_params.py +17 -0
- frameio/types/update_toggle_definition_params_field_configuration.py +15 -0
- frameio/types/update_user_multi_definition_params.py +17 -0
- frameio/types/update_user_multi_definition_params_field_configuration.py +25 -0
- frameio/types/update_user_multi_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/update_user_multi_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/update_user_multi_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/update_user_roles_params.py +17 -0
- frameio/types/update_user_roles_params_data.py +13 -0
- frameio/types/update_user_roles_params_data_role.py +7 -0
- frameio/types/update_user_roles_response.py +13 -0
- frameio/types/update_user_roles_response_data.py +13 -0
- frameio/types/update_user_roles_response_data_role.py +7 -0
- frameio/types/update_user_single_definition_params.py +17 -0
- frameio/types/update_user_single_definition_params_field_configuration.py +25 -0
- frameio/types/update_user_single_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/update_user_single_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/update_user_single_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/upload_url.py +20 -0
- frameio/types/user.py +44 -0
- frameio/types/user_multi_definition.py +49 -0
- frameio/types/user_multi_definition_field_configuration.py +23 -0
- frameio/types/user_multi_definition_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_multi_definition_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_multi_definition_field_configuration_member_options_type.py +7 -0
- frameio/types/user_multi_definition_field_type.py +10 -0
- frameio/types/user_multi_definition_params.py +17 -0
- frameio/types/user_multi_definition_params_field_configuration.py +23 -0
- frameio/types/user_multi_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_multi_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_multi_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/user_multi_definition_with_includes.py +13 -0
- frameio/types/user_role.py +19 -0
- frameio/types/user_role_role.py +7 -0
- frameio/types/user_roles_response.py +27 -0
- frameio/types/user_single_definition.py +49 -0
- frameio/types/user_single_definition_field_configuration.py +23 -0
- frameio/types/user_single_definition_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_single_definition_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_single_definition_field_configuration_member_options_type.py +7 -0
- frameio/types/user_single_definition_field_type.py +10 -0
- frameio/types/user_single_definition_params.py +17 -0
- frameio/types/user_single_definition_params_field_configuration.py +23 -0
- frameio/types/user_single_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_single_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_single_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/user_single_definition_with_includes.py +13 -0
- frameio/types/user_value.py +18 -0
- frameio/types/user_value_type.py +5 -0
- frameio/types/uuid_.py +3 -0
- frameio/types/version_stack.py +50 -0
- frameio/types/version_stack_copy_response.py +13 -0
- frameio/types/version_stack_response.py +13 -0
- frameio/types/version_stack_with_includes.py +60 -0
- frameio/types/version_stack_with_includes_response.py +13 -0
- frameio/types/version_stacks_with_includes_response.py +19 -0
- frameio/types/webhook.py +36 -0
- frameio/types/webhook_create_response.py +17 -0
- frameio/types/webhook_create_response_data.py +15 -0
- frameio/types/webhook_events.py +5 -0
- frameio/types/webhook_response.py +13 -0
- frameio/types/webhook_with_includes.py +13 -0
- frameio/types/webhook_with_includes_response.py +13 -0
- frameio/types/webhooks_with_includes_response.py +23 -0
- frameio/types/workspace.py +40 -0
- frameio/types/workspace_include.py +5 -0
- frameio/types/workspace_params.py +17 -0
- frameio/types/workspace_params_data.py +15 -0
- frameio/types/workspace_response.py +17 -0
- frameio/types/workspace_with_includes.py +13 -0
- frameio/types/workspace_with_includes_response.py +17 -0
- frameio/types/workspaces_with_includes_response.py +27 -0
- frameio/users/__init__.py +4 -0
- frameio/users/client.py +100 -0
- frameio/users/raw_client.py +234 -0
- frameio/version.py +3 -0
- frameio/version_stacks/__init__.py +49 -0
- frameio/version_stacks/client.py +818 -0
- frameio/version_stacks/raw_client.py +1614 -0
- frameio/version_stacks/types/__init__.py +47 -0
- frameio/version_stacks/types/version_stack_copy_params_data.py +15 -0
- frameio/version_stacks/types/version_stack_create_params_data.py +19 -0
- frameio/version_stacks/types/version_stack_move_params_data.py +15 -0
- frameio/version_stacks/types/version_stacks_show_request_include.py +19 -0
- frameio/webhooks/__init__.py +34 -0
- frameio/webhooks/client.py +793 -0
- frameio/webhooks/raw_client.py +1347 -0
- frameio/webhooks/types/__init__.py +38 -0
- frameio/webhooks/types/webhook_create_params_data.py +18 -0
- frameio/webhooks/types/webhook_update_params_data.py +23 -0
- frameio/workspace_permissions/__init__.py +4 -0
- frameio/workspace_permissions/client.py +430 -0
- frameio/workspace_permissions/raw_client.py +824 -0
- frameio/workspaces/__init__.py +4 -0
- frameio/workspaces/client.py +563 -0
- frameio/workspaces/raw_client.py +1259 -0
- frameio-0.0.28.dist-info/METADATA +259 -0
- frameio-0.0.28.dist-info/RECORD +385 -0
- frameio-0.0.28.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# nopycln: file
|
|
4
|
+
import datetime as dt
|
|
5
|
+
import inspect
|
|
6
|
+
from collections import defaultdict
|
|
7
|
+
from typing import Any, Callable, ClassVar, Dict, List, Mapping, Optional, Set, Tuple, Type, TypeVar, Union, cast
|
|
8
|
+
|
|
9
|
+
import pydantic
|
|
10
|
+
|
|
11
|
+
IS_PYDANTIC_V2 = pydantic.VERSION.startswith("2.")
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
from pydantic.v1.datetime_parse import parse_date as parse_date
|
|
15
|
+
from pydantic.v1.datetime_parse import parse_datetime as parse_datetime
|
|
16
|
+
from pydantic.v1.fields import ModelField as ModelField
|
|
17
|
+
from pydantic.v1.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[attr-defined]
|
|
18
|
+
from pydantic.v1.typing import get_args as get_args
|
|
19
|
+
from pydantic.v1.typing import get_origin as get_origin
|
|
20
|
+
from pydantic.v1.typing import is_literal_type as is_literal_type
|
|
21
|
+
from pydantic.v1.typing import is_union as is_union
|
|
22
|
+
else:
|
|
23
|
+
from pydantic.datetime_parse import parse_date as parse_date # type: ignore[no-redef]
|
|
24
|
+
from pydantic.datetime_parse import parse_datetime as parse_datetime # type: ignore[no-redef]
|
|
25
|
+
from pydantic.fields import ModelField as ModelField # type: ignore[attr-defined, no-redef]
|
|
26
|
+
from pydantic.json import ENCODERS_BY_TYPE as encoders_by_type # type: ignore[no-redef]
|
|
27
|
+
from pydantic.typing import get_args as get_args # type: ignore[no-redef]
|
|
28
|
+
from pydantic.typing import get_origin as get_origin # type: ignore[no-redef]
|
|
29
|
+
from pydantic.typing import is_literal_type as is_literal_type # type: ignore[no-redef]
|
|
30
|
+
from pydantic.typing import is_union as is_union # type: ignore[no-redef]
|
|
31
|
+
|
|
32
|
+
from .datetime_utils import serialize_datetime
|
|
33
|
+
from .serialization import convert_and_respect_annotation_metadata
|
|
34
|
+
from typing_extensions import TypeAlias
|
|
35
|
+
|
|
36
|
+
T = TypeVar("T")
|
|
37
|
+
Model = TypeVar("Model", bound=pydantic.BaseModel)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def parse_obj_as(type_: Type[T], object_: Any) -> T:
|
|
41
|
+
# convert_and_respect_annotation_metadata is required for TypedDict aliasing.
|
|
42
|
+
#
|
|
43
|
+
# For Pydantic models, whether we should pre-dealias depends on how the model encodes aliasing:
|
|
44
|
+
# - If the model uses real Pydantic aliases (pydantic.Field(alias=...)), then we must pass wire keys through
|
|
45
|
+
# unchanged so Pydantic can validate them.
|
|
46
|
+
# - If the model encodes aliasing only via FieldMetadata annotations, then we MUST pre-dealias because Pydantic
|
|
47
|
+
# will not recognize those aliases during validation.
|
|
48
|
+
if inspect.isclass(type_) and issubclass(type_, pydantic.BaseModel):
|
|
49
|
+
has_pydantic_aliases = False
|
|
50
|
+
if IS_PYDANTIC_V2:
|
|
51
|
+
for field_name, field_info in getattr(type_, "model_fields", {}).items(): # type: ignore[attr-defined]
|
|
52
|
+
alias = getattr(field_info, "alias", None)
|
|
53
|
+
if alias is not None and alias != field_name:
|
|
54
|
+
has_pydantic_aliases = True
|
|
55
|
+
break
|
|
56
|
+
else:
|
|
57
|
+
for field in getattr(type_, "__fields__", {}).values():
|
|
58
|
+
alias = getattr(field, "alias", None)
|
|
59
|
+
name = getattr(field, "name", None)
|
|
60
|
+
if alias is not None and name is not None and alias != name:
|
|
61
|
+
has_pydantic_aliases = True
|
|
62
|
+
break
|
|
63
|
+
|
|
64
|
+
dealiased_object = (
|
|
65
|
+
object_
|
|
66
|
+
if has_pydantic_aliases
|
|
67
|
+
else convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read")
|
|
68
|
+
)
|
|
69
|
+
else:
|
|
70
|
+
dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read")
|
|
71
|
+
if IS_PYDANTIC_V2:
|
|
72
|
+
adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined]
|
|
73
|
+
return adapter.validate_python(dealiased_object)
|
|
74
|
+
return pydantic.parse_obj_as(type_, dealiased_object)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def to_jsonable_with_fallback(obj: Any, fallback_serializer: Callable[[Any], Any]) -> Any:
|
|
78
|
+
if IS_PYDANTIC_V2:
|
|
79
|
+
from pydantic_core import to_jsonable_python
|
|
80
|
+
|
|
81
|
+
return to_jsonable_python(obj, fallback=fallback_serializer)
|
|
82
|
+
return fallback_serializer(obj)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class UniversalBaseModel(pydantic.BaseModel):
|
|
86
|
+
if IS_PYDANTIC_V2:
|
|
87
|
+
model_config: ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( # type: ignore[typeddict-unknown-key]
|
|
88
|
+
# Allow fields beginning with `model_` to be used in the model
|
|
89
|
+
protected_namespaces=(),
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
@pydantic.model_validator(mode="before") # type: ignore[attr-defined]
|
|
93
|
+
@classmethod
|
|
94
|
+
def _coerce_field_names_to_aliases(cls, data: Any) -> Any:
|
|
95
|
+
"""
|
|
96
|
+
Accept Python field names in input by rewriting them to their Pydantic aliases,
|
|
97
|
+
while avoiding silent collisions when a key could refer to multiple fields.
|
|
98
|
+
"""
|
|
99
|
+
if not isinstance(data, Mapping):
|
|
100
|
+
return data
|
|
101
|
+
|
|
102
|
+
fields = getattr(cls, "model_fields", {}) # type: ignore[attr-defined]
|
|
103
|
+
name_to_alias: Dict[str, str] = {}
|
|
104
|
+
alias_to_name: Dict[str, str] = {}
|
|
105
|
+
|
|
106
|
+
for name, field_info in fields.items():
|
|
107
|
+
alias = getattr(field_info, "alias", None) or name
|
|
108
|
+
name_to_alias[name] = alias
|
|
109
|
+
if alias != name:
|
|
110
|
+
alias_to_name[alias] = name
|
|
111
|
+
|
|
112
|
+
# Detect ambiguous keys: a key that is an alias for one field and a name for another.
|
|
113
|
+
ambiguous_keys = set(alias_to_name.keys()).intersection(set(name_to_alias.keys()))
|
|
114
|
+
for key in ambiguous_keys:
|
|
115
|
+
if key in data and name_to_alias[key] not in data:
|
|
116
|
+
raise ValueError(
|
|
117
|
+
f"Ambiguous input key '{key}': it is both a field name and an alias. "
|
|
118
|
+
"Provide the explicit alias key to disambiguate."
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
original_keys = set(data.keys())
|
|
122
|
+
rewritten: Dict[str, Any] = dict(data)
|
|
123
|
+
for name, alias in name_to_alias.items():
|
|
124
|
+
if alias != name and name in original_keys and alias not in rewritten:
|
|
125
|
+
rewritten[alias] = rewritten.pop(name)
|
|
126
|
+
|
|
127
|
+
return rewritten
|
|
128
|
+
|
|
129
|
+
@pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined]
|
|
130
|
+
def serialize_model(self) -> Any: # type: ignore[name-defined]
|
|
131
|
+
serialized = self.dict() # type: ignore[attr-defined]
|
|
132
|
+
data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()}
|
|
133
|
+
return data
|
|
134
|
+
|
|
135
|
+
else:
|
|
136
|
+
|
|
137
|
+
class Config:
|
|
138
|
+
smart_union = True
|
|
139
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
140
|
+
|
|
141
|
+
@pydantic.root_validator(pre=True)
|
|
142
|
+
def _coerce_field_names_to_aliases(cls, values: Any) -> Any:
|
|
143
|
+
"""
|
|
144
|
+
Pydantic v1 equivalent of _coerce_field_names_to_aliases.
|
|
145
|
+
"""
|
|
146
|
+
if not isinstance(values, Mapping):
|
|
147
|
+
return values
|
|
148
|
+
|
|
149
|
+
fields = getattr(cls, "__fields__", {})
|
|
150
|
+
name_to_alias: Dict[str, str] = {}
|
|
151
|
+
alias_to_name: Dict[str, str] = {}
|
|
152
|
+
|
|
153
|
+
for name, field in fields.items():
|
|
154
|
+
alias = getattr(field, "alias", None) or name
|
|
155
|
+
name_to_alias[name] = alias
|
|
156
|
+
if alias != name:
|
|
157
|
+
alias_to_name[alias] = name
|
|
158
|
+
|
|
159
|
+
ambiguous_keys = set(alias_to_name.keys()).intersection(set(name_to_alias.keys()))
|
|
160
|
+
for key in ambiguous_keys:
|
|
161
|
+
if key in values and name_to_alias[key] not in values:
|
|
162
|
+
raise ValueError(
|
|
163
|
+
f"Ambiguous input key '{key}': it is both a field name and an alias. "
|
|
164
|
+
"Provide the explicit alias key to disambiguate."
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
original_keys = set(values.keys())
|
|
168
|
+
rewritten: Dict[str, Any] = dict(values)
|
|
169
|
+
for name, alias in name_to_alias.items():
|
|
170
|
+
if alias != name and name in original_keys and alias not in rewritten:
|
|
171
|
+
rewritten[alias] = rewritten.pop(name)
|
|
172
|
+
|
|
173
|
+
return rewritten
|
|
174
|
+
|
|
175
|
+
@classmethod
|
|
176
|
+
def model_construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model":
|
|
177
|
+
dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read")
|
|
178
|
+
return cls.construct(_fields_set, **dealiased_object)
|
|
179
|
+
|
|
180
|
+
@classmethod
|
|
181
|
+
def construct(cls: Type["Model"], _fields_set: Optional[Set[str]] = None, **values: Any) -> "Model":
|
|
182
|
+
dealiased_object = convert_and_respect_annotation_metadata(object_=values, annotation=cls, direction="read")
|
|
183
|
+
if IS_PYDANTIC_V2:
|
|
184
|
+
return super().model_construct(_fields_set, **dealiased_object) # type: ignore[misc]
|
|
185
|
+
return super().construct(_fields_set, **dealiased_object)
|
|
186
|
+
|
|
187
|
+
def json(self, **kwargs: Any) -> str:
|
|
188
|
+
kwargs_with_defaults = {
|
|
189
|
+
"by_alias": True,
|
|
190
|
+
"exclude_unset": True,
|
|
191
|
+
**kwargs,
|
|
192
|
+
}
|
|
193
|
+
if IS_PYDANTIC_V2:
|
|
194
|
+
return super().model_dump_json(**kwargs_with_defaults) # type: ignore[misc]
|
|
195
|
+
return super().json(**kwargs_with_defaults)
|
|
196
|
+
|
|
197
|
+
def dict(self, **kwargs: Any) -> Dict[str, Any]:
|
|
198
|
+
"""
|
|
199
|
+
Override the default dict method to `exclude_unset` by default. This function patches
|
|
200
|
+
`exclude_unset` to work include fields within non-None default values.
|
|
201
|
+
"""
|
|
202
|
+
# Note: the logic here is multiplexed given the levers exposed in Pydantic V1 vs V2
|
|
203
|
+
# Pydantic V1's .dict can be extremely slow, so we do not want to call it twice.
|
|
204
|
+
#
|
|
205
|
+
# We'd ideally do the same for Pydantic V2, but it shells out to a library to serialize models
|
|
206
|
+
# that we have less control over, and this is less intrusive than custom serializers for now.
|
|
207
|
+
if IS_PYDANTIC_V2:
|
|
208
|
+
kwargs_with_defaults_exclude_unset = {
|
|
209
|
+
**kwargs,
|
|
210
|
+
"by_alias": True,
|
|
211
|
+
"exclude_unset": True,
|
|
212
|
+
"exclude_none": False,
|
|
213
|
+
}
|
|
214
|
+
kwargs_with_defaults_exclude_none = {
|
|
215
|
+
**kwargs,
|
|
216
|
+
"by_alias": True,
|
|
217
|
+
"exclude_none": True,
|
|
218
|
+
"exclude_unset": False,
|
|
219
|
+
}
|
|
220
|
+
dict_dump = deep_union_pydantic_dicts(
|
|
221
|
+
super().model_dump(**kwargs_with_defaults_exclude_unset), # type: ignore[misc]
|
|
222
|
+
super().model_dump(**kwargs_with_defaults_exclude_none), # type: ignore[misc]
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
else:
|
|
226
|
+
_fields_set = self.__fields_set__.copy()
|
|
227
|
+
|
|
228
|
+
fields = _get_model_fields(self.__class__)
|
|
229
|
+
for name, field in fields.items():
|
|
230
|
+
if name not in _fields_set:
|
|
231
|
+
default = _get_field_default(field)
|
|
232
|
+
|
|
233
|
+
# If the default values are non-null act like they've been set
|
|
234
|
+
# This effectively allows exclude_unset to work like exclude_none where
|
|
235
|
+
# the latter passes through intentionally set none values.
|
|
236
|
+
if default is not None or ("exclude_unset" in kwargs and not kwargs["exclude_unset"]):
|
|
237
|
+
_fields_set.add(name)
|
|
238
|
+
|
|
239
|
+
if default is not None:
|
|
240
|
+
self.__fields_set__.add(name)
|
|
241
|
+
|
|
242
|
+
kwargs_with_defaults_exclude_unset_include_fields = {
|
|
243
|
+
"by_alias": True,
|
|
244
|
+
"exclude_unset": True,
|
|
245
|
+
"include": _fields_set,
|
|
246
|
+
**kwargs,
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields)
|
|
250
|
+
|
|
251
|
+
return cast(
|
|
252
|
+
Dict[str, Any],
|
|
253
|
+
convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write"),
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _union_list_of_pydantic_dicts(source: List[Any], destination: List[Any]) -> List[Any]:
|
|
258
|
+
converted_list: List[Any] = []
|
|
259
|
+
for i, item in enumerate(source):
|
|
260
|
+
destination_value = destination[i]
|
|
261
|
+
if isinstance(item, dict):
|
|
262
|
+
converted_list.append(deep_union_pydantic_dicts(item, destination_value))
|
|
263
|
+
elif isinstance(item, list):
|
|
264
|
+
converted_list.append(_union_list_of_pydantic_dicts(item, destination_value))
|
|
265
|
+
else:
|
|
266
|
+
converted_list.append(item)
|
|
267
|
+
return converted_list
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def deep_union_pydantic_dicts(source: Dict[str, Any], destination: Dict[str, Any]) -> Dict[str, Any]:
|
|
271
|
+
for key, value in source.items():
|
|
272
|
+
node = destination.setdefault(key, {})
|
|
273
|
+
if isinstance(value, dict):
|
|
274
|
+
deep_union_pydantic_dicts(value, node)
|
|
275
|
+
# Note: we do not do this same processing for sets given we do not have sets of models
|
|
276
|
+
# and given the sets are unordered, the processing of the set and matching objects would
|
|
277
|
+
# be non-trivial.
|
|
278
|
+
elif isinstance(value, list):
|
|
279
|
+
destination[key] = _union_list_of_pydantic_dicts(value, node)
|
|
280
|
+
else:
|
|
281
|
+
destination[key] = value
|
|
282
|
+
|
|
283
|
+
return destination
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
if IS_PYDANTIC_V2:
|
|
287
|
+
|
|
288
|
+
class V2RootModel(UniversalBaseModel, pydantic.RootModel): # type: ignore[misc, name-defined, type-arg]
|
|
289
|
+
pass
|
|
290
|
+
|
|
291
|
+
UniversalRootModel: TypeAlias = V2RootModel # type: ignore[misc]
|
|
292
|
+
else:
|
|
293
|
+
UniversalRootModel: TypeAlias = UniversalBaseModel # type: ignore[misc, no-redef]
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
def encode_by_type(o: Any) -> Any:
|
|
297
|
+
encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(tuple)
|
|
298
|
+
for type_, encoder in encoders_by_type.items():
|
|
299
|
+
encoders_by_class_tuples[encoder] += (type_,)
|
|
300
|
+
|
|
301
|
+
if type(o) in encoders_by_type:
|
|
302
|
+
return encoders_by_type[type(o)](o)
|
|
303
|
+
for encoder, classes_tuple in encoders_by_class_tuples.items():
|
|
304
|
+
if isinstance(o, classes_tuple):
|
|
305
|
+
return encoder(o)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
def update_forward_refs(model: Type["Model"], **localns: Any) -> None:
|
|
309
|
+
if IS_PYDANTIC_V2:
|
|
310
|
+
model.model_rebuild(raise_errors=False) # type: ignore[attr-defined]
|
|
311
|
+
else:
|
|
312
|
+
model.update_forward_refs(**localns)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
# Mirrors Pydantic's internal typing
|
|
316
|
+
AnyCallable = Callable[..., Any]
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
def universal_root_validator(
|
|
320
|
+
pre: bool = False,
|
|
321
|
+
) -> Callable[[AnyCallable], AnyCallable]:
|
|
322
|
+
def decorator(func: AnyCallable) -> AnyCallable:
|
|
323
|
+
if IS_PYDANTIC_V2:
|
|
324
|
+
# In Pydantic v2, for RootModel we always use "before" mode
|
|
325
|
+
# The custom validators transform the input value before the model is created
|
|
326
|
+
return cast(AnyCallable, pydantic.model_validator(mode="before")(func)) # type: ignore[attr-defined]
|
|
327
|
+
return cast(AnyCallable, pydantic.root_validator(pre=pre)(func)) # type: ignore[call-overload]
|
|
328
|
+
|
|
329
|
+
return decorator
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
def universal_field_validator(field_name: str, pre: bool = False) -> Callable[[AnyCallable], AnyCallable]:
|
|
333
|
+
def decorator(func: AnyCallable) -> AnyCallable:
|
|
334
|
+
if IS_PYDANTIC_V2:
|
|
335
|
+
return cast(AnyCallable, pydantic.field_validator(field_name, mode="before" if pre else "after")(func)) # type: ignore[attr-defined]
|
|
336
|
+
return cast(AnyCallable, pydantic.validator(field_name, pre=pre)(func))
|
|
337
|
+
|
|
338
|
+
return decorator
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
PydanticField = Union[ModelField, pydantic.fields.FieldInfo]
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def _get_model_fields(model: Type["Model"]) -> Mapping[str, PydanticField]:
|
|
345
|
+
if IS_PYDANTIC_V2:
|
|
346
|
+
return cast(Mapping[str, PydanticField], model.model_fields) # type: ignore[attr-defined]
|
|
347
|
+
return cast(Mapping[str, PydanticField], model.__fields__)
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
def _get_field_default(field: PydanticField) -> Any:
|
|
351
|
+
try:
|
|
352
|
+
value = field.get_default() # type: ignore[union-attr]
|
|
353
|
+
except:
|
|
354
|
+
value = field.default
|
|
355
|
+
if IS_PYDANTIC_V2:
|
|
356
|
+
from pydantic_core import PydanticUndefined
|
|
357
|
+
|
|
358
|
+
if value == PydanticUndefined:
|
|
359
|
+
return None
|
|
360
|
+
return value
|
|
361
|
+
return value
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional, Tuple
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Flattens dicts to be of the form {"key[subkey][subkey2]": value} where value is not a dict
|
|
9
|
+
def traverse_query_dict(dict_flat: Dict[str, Any], key_prefix: Optional[str] = None) -> List[Tuple[str, Any]]:
|
|
10
|
+
result = []
|
|
11
|
+
for k, v in dict_flat.items():
|
|
12
|
+
key = f"{key_prefix}[{k}]" if key_prefix is not None else k
|
|
13
|
+
if isinstance(v, dict):
|
|
14
|
+
result.extend(traverse_query_dict(v, key))
|
|
15
|
+
elif isinstance(v, list):
|
|
16
|
+
for arr_v in v:
|
|
17
|
+
if isinstance(arr_v, dict):
|
|
18
|
+
result.extend(traverse_query_dict(arr_v, key))
|
|
19
|
+
else:
|
|
20
|
+
result.append((key, arr_v))
|
|
21
|
+
else:
|
|
22
|
+
result.append((key, v))
|
|
23
|
+
return result
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def single_query_encoder(query_key: str, query_value: Any) -> List[Tuple[str, Any]]:
|
|
27
|
+
if isinstance(query_value, pydantic.BaseModel) or isinstance(query_value, dict):
|
|
28
|
+
if isinstance(query_value, pydantic.BaseModel):
|
|
29
|
+
obj_dict = query_value.dict(by_alias=True)
|
|
30
|
+
else:
|
|
31
|
+
obj_dict = query_value
|
|
32
|
+
return traverse_query_dict(obj_dict, query_key)
|
|
33
|
+
elif isinstance(query_value, list):
|
|
34
|
+
encoded_values: List[Tuple[str, Any]] = []
|
|
35
|
+
for value in query_value:
|
|
36
|
+
if isinstance(value, pydantic.BaseModel) or isinstance(value, dict):
|
|
37
|
+
if isinstance(value, pydantic.BaseModel):
|
|
38
|
+
obj_dict = value.dict(by_alias=True)
|
|
39
|
+
elif isinstance(value, dict):
|
|
40
|
+
obj_dict = value
|
|
41
|
+
|
|
42
|
+
encoded_values.extend(single_query_encoder(query_key, obj_dict))
|
|
43
|
+
else:
|
|
44
|
+
encoded_values.append((query_key, value))
|
|
45
|
+
|
|
46
|
+
return encoded_values
|
|
47
|
+
|
|
48
|
+
return [(query_key, query_value)]
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def encode_query(query: Optional[Dict[str, Any]]) -> Optional[List[Tuple[str, Any]]]:
|
|
52
|
+
if query is None:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
encoded_query = []
|
|
56
|
+
for k, v in query.items():
|
|
57
|
+
encoded_query.extend(single_query_encoder(k, v))
|
|
58
|
+
return encoded_query
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, Mapping, Optional
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def remove_none_from_dict(original: Mapping[str, Optional[Any]]) -> Dict[str, Any]:
|
|
7
|
+
new: Dict[str, Any] = {}
|
|
8
|
+
for key, value in original.items():
|
|
9
|
+
if value is not None:
|
|
10
|
+
new[key] = value
|
|
11
|
+
return new
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
from typing import NotRequired # type: ignore
|
|
7
|
+
except ImportError:
|
|
8
|
+
from typing_extensions import NotRequired
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RequestOptions(typing.TypedDict, total=False):
|
|
12
|
+
"""
|
|
13
|
+
Additional options for request-specific configuration when calling APIs via the SDK.
|
|
14
|
+
This is used primarily as an optional final parameter for service functions.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
- timeout_in_seconds: int. The number of seconds to await an API call before timing out.
|
|
18
|
+
|
|
19
|
+
- max_retries: int. The max number of retries to attempt if the API call fails.
|
|
20
|
+
|
|
21
|
+
- additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict
|
|
22
|
+
|
|
23
|
+
- additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict
|
|
24
|
+
|
|
25
|
+
- additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict
|
|
26
|
+
|
|
27
|
+
- chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
timeout_in_seconds: NotRequired[int]
|
|
31
|
+
max_retries: NotRequired[int]
|
|
32
|
+
additional_headers: NotRequired[typing.Dict[str, typing.Any]]
|
|
33
|
+
additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]]
|
|
34
|
+
additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]]
|
|
35
|
+
chunk_size: NotRequired[int]
|