frameio 0.0.23__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.
Potentially problematic release.
This version of frameio might be problematic. Click here for more details.
- frameio/__init__.py +1115 -0
- frameio/account_permissions/__init__.py +4 -0
- frameio/account_permissions/client.py +182 -0
- frameio/account_permissions/raw_client.py +301 -0
- frameio/accounts/__init__.py +4 -0
- frameio/accounts/client.py +151 -0
- frameio/accounts/raw_client.py +281 -0
- frameio/client.py +439 -0
- frameio/comments/__init__.py +34 -0
- frameio/comments/client.py +596 -0
- frameio/comments/raw_client.py +1252 -0
- frameio/comments/types/__init__.py +38 -0
- frameio/comments/types/create_comment_params_data.py +25 -0
- frameio/comments/types/update_comment_params_data.py +25 -0
- frameio/core/__init__.py +110 -0
- frameio/core/api_error.py +23 -0
- frameio/core/client_wrapper.py +87 -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 +543 -0
- frameio/core/http_response.py +55 -0
- frameio/core/jsonable_encoder.py +100 -0
- frameio/core/pagination.py +82 -0
- frameio/core/pydantic_utilities.py +258 -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/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 +55 -0
- frameio/files/client.py +1136 -0
- frameio/files/raw_client.py +2492 -0
- frameio/files/types/__init__.py +53 -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/folders/__init__.py +39 -0
- frameio/folders/client.py +988 -0
- frameio/folders/raw_client.py +2058 -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 +291 -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 +108 -0
- frameio/metadata_fields/types/update_field_definition_params_data.py +114 -0
- frameio/project_permissions/__init__.py +4 -0
- frameio/project_permissions/client.py +415 -0
- frameio/project_permissions/raw_client.py +789 -0
- frameio/projects/__init__.py +4 -0
- frameio/projects/client.py +582 -0
- frameio/projects/raw_client.py +1250 -0
- frameio/py.typed +0 -0
- frameio/shares/__init__.py +64 -0
- frameio/shares/client.py +1192 -0
- frameio/shares/raw_client.py +2446 -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 +25 -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 +33 -0
- frameio/shares/types/update_share_params_data_access.py +5 -0
- frameio/types/__init__.py +959 -0
- frameio/types/account.py +65 -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 +56 -0
- frameio/types/asset_include.py +5 -0
- frameio/types/asset_share_params.py +38 -0
- frameio/types/asset_share_params_access.py +5 -0
- frameio/types/asset_with_includes.py +72 -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 +52 -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 +43 -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_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/field_definition.py +163 -0
- frameio/types/field_definition_include.py +5 -0
- frameio/types/field_definition_response.py +13 -0
- frameio/types/field_definition_with_includes.py +174 -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 +61 -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 +43 -0
- frameio/types/long_text_definition_field_configuration.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 +23 -0
- frameio/types/metadata_field.py +145 -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 +55 -0
- frameio/types/project_include.py +5 -0
- frameio/types/project_params.py +17 -0
- frameio/types/project_params_data.py +15 -0
- frameio/types/project_response.py +17 -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 +43 -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_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 +43 -0
- frameio/types/text_definition_field_configuration.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/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 +43 -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_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 +43 -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_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 +58 -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 +38 -0
- frameio/version_stacks/client.py +699 -0
- frameio/version_stacks/raw_client.py +1359 -0
- frameio/version_stacks/types/__init__.py +40 -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/webhooks/__init__.py +34 -0
- frameio/webhooks/client.py +782 -0
- frameio/webhooks/raw_client.py +1312 -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 +419 -0
- frameio/workspace_permissions/raw_client.py +789 -0
- frameio/workspaces/__init__.py +4 -0
- frameio/workspaces/client.py +552 -0
- frameio/workspaces/raw_client.py +1226 -0
- frameio-0.0.23.dist-info/METADATA +255 -0
- frameio-0.0.23.dist-info/RECORD +363 -0
- frameio-0.0.23.dist-info/WHEEL +4 -0
frameio/client.py
ADDED
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
9
|
+
from .environment import FrameioEnvironment
|
|
10
|
+
|
|
11
|
+
if typing.TYPE_CHECKING:
|
|
12
|
+
from .account_permissions.client import AccountPermissionsClient, AsyncAccountPermissionsClient
|
|
13
|
+
from .accounts.client import AccountsClient, AsyncAccountsClient
|
|
14
|
+
from .comments.client import AsyncCommentsClient, CommentsClient
|
|
15
|
+
from .files.client import AsyncFilesClient, FilesClient
|
|
16
|
+
from .folders.client import AsyncFoldersClient, FoldersClient
|
|
17
|
+
from .metadata.client import AsyncMetadataClient, MetadataClient
|
|
18
|
+
from .metadata_fields.client import AsyncMetadataFieldsClient, MetadataFieldsClient
|
|
19
|
+
from .project_permissions.client import AsyncProjectPermissionsClient, ProjectPermissionsClient
|
|
20
|
+
from .projects.client import AsyncProjectsClient, ProjectsClient
|
|
21
|
+
from .shares.client import AsyncSharesClient, SharesClient
|
|
22
|
+
from .users.client import AsyncUsersClient, UsersClient
|
|
23
|
+
from .version_stacks.client import AsyncVersionStacksClient, VersionStacksClient
|
|
24
|
+
from .webhooks.client import AsyncWebhooksClient, WebhooksClient
|
|
25
|
+
from .workspace_permissions.client import AsyncWorkspacePermissionsClient, WorkspacePermissionsClient
|
|
26
|
+
from .workspaces.client import AsyncWorkspacesClient, WorkspacesClient
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Frameio:
|
|
30
|
+
"""
|
|
31
|
+
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
|
|
32
|
+
|
|
33
|
+
Parameters
|
|
34
|
+
----------
|
|
35
|
+
base_url : typing.Optional[str]
|
|
36
|
+
The base url to use for requests from the client.
|
|
37
|
+
|
|
38
|
+
environment : FrameioEnvironment
|
|
39
|
+
The environment to use for requests from the client. from .environment import FrameioEnvironment
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Defaults to FrameioEnvironment.DEFAULT
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
token : typing.Optional[typing.Union[str, typing.Callable[[], str]]]
|
|
48
|
+
headers : typing.Optional[typing.Dict[str, str]]
|
|
49
|
+
Additional headers to send with every request.
|
|
50
|
+
|
|
51
|
+
timeout : typing.Optional[float]
|
|
52
|
+
The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
|
|
53
|
+
|
|
54
|
+
follow_redirects : typing.Optional[bool]
|
|
55
|
+
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
|
|
56
|
+
|
|
57
|
+
httpx_client : typing.Optional[httpx.Client]
|
|
58
|
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
|
|
59
|
+
|
|
60
|
+
Examples
|
|
61
|
+
--------
|
|
62
|
+
from frameio import Frameio
|
|
63
|
+
|
|
64
|
+
client = Frameio(
|
|
65
|
+
token="YOUR_TOKEN",
|
|
66
|
+
)
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
def __init__(
|
|
70
|
+
self,
|
|
71
|
+
*,
|
|
72
|
+
base_url: typing.Optional[str] = None,
|
|
73
|
+
environment: FrameioEnvironment = FrameioEnvironment.DEFAULT,
|
|
74
|
+
token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
|
|
75
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
76
|
+
timeout: typing.Optional[float] = None,
|
|
77
|
+
follow_redirects: typing.Optional[bool] = True,
|
|
78
|
+
httpx_client: typing.Optional[httpx.Client] = None,
|
|
79
|
+
):
|
|
80
|
+
_defaulted_timeout = (
|
|
81
|
+
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
|
|
82
|
+
)
|
|
83
|
+
self._client_wrapper = SyncClientWrapper(
|
|
84
|
+
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
85
|
+
token=token,
|
|
86
|
+
headers=headers,
|
|
87
|
+
httpx_client=httpx_client
|
|
88
|
+
if httpx_client is not None
|
|
89
|
+
else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
|
|
90
|
+
if follow_redirects is not None
|
|
91
|
+
else httpx.Client(timeout=_defaulted_timeout),
|
|
92
|
+
timeout=_defaulted_timeout,
|
|
93
|
+
)
|
|
94
|
+
self._metadata_fields: typing.Optional[MetadataFieldsClient] = None
|
|
95
|
+
self._project_permissions: typing.Optional[ProjectPermissionsClient] = None
|
|
96
|
+
self._folders: typing.Optional[FoldersClient] = None
|
|
97
|
+
self._version_stacks: typing.Optional[VersionStacksClient] = None
|
|
98
|
+
self._account_permissions: typing.Optional[AccountPermissionsClient] = None
|
|
99
|
+
self._accounts: typing.Optional[AccountsClient] = None
|
|
100
|
+
self._comments: typing.Optional[CommentsClient] = None
|
|
101
|
+
self._webhooks: typing.Optional[WebhooksClient] = None
|
|
102
|
+
self._workspace_permissions: typing.Optional[WorkspacePermissionsClient] = None
|
|
103
|
+
self._shares: typing.Optional[SharesClient] = None
|
|
104
|
+
self._metadata: typing.Optional[MetadataClient] = None
|
|
105
|
+
self._files: typing.Optional[FilesClient] = None
|
|
106
|
+
self._users: typing.Optional[UsersClient] = None
|
|
107
|
+
self._projects: typing.Optional[ProjectsClient] = None
|
|
108
|
+
self._workspaces: typing.Optional[WorkspacesClient] = None
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def metadata_fields(self):
|
|
112
|
+
if self._metadata_fields is None:
|
|
113
|
+
from .metadata_fields.client import MetadataFieldsClient # noqa: E402
|
|
114
|
+
|
|
115
|
+
self._metadata_fields = MetadataFieldsClient(client_wrapper=self._client_wrapper)
|
|
116
|
+
return self._metadata_fields
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def project_permissions(self):
|
|
120
|
+
if self._project_permissions is None:
|
|
121
|
+
from .project_permissions.client import ProjectPermissionsClient # noqa: E402
|
|
122
|
+
|
|
123
|
+
self._project_permissions = ProjectPermissionsClient(client_wrapper=self._client_wrapper)
|
|
124
|
+
return self._project_permissions
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def folders(self):
|
|
128
|
+
if self._folders is None:
|
|
129
|
+
from .folders.client import FoldersClient # noqa: E402
|
|
130
|
+
|
|
131
|
+
self._folders = FoldersClient(client_wrapper=self._client_wrapper)
|
|
132
|
+
return self._folders
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def version_stacks(self):
|
|
136
|
+
if self._version_stacks is None:
|
|
137
|
+
from .version_stacks.client import VersionStacksClient # noqa: E402
|
|
138
|
+
|
|
139
|
+
self._version_stacks = VersionStacksClient(client_wrapper=self._client_wrapper)
|
|
140
|
+
return self._version_stacks
|
|
141
|
+
|
|
142
|
+
@property
|
|
143
|
+
def account_permissions(self):
|
|
144
|
+
if self._account_permissions is None:
|
|
145
|
+
from .account_permissions.client import AccountPermissionsClient # noqa: E402
|
|
146
|
+
|
|
147
|
+
self._account_permissions = AccountPermissionsClient(client_wrapper=self._client_wrapper)
|
|
148
|
+
return self._account_permissions
|
|
149
|
+
|
|
150
|
+
@property
|
|
151
|
+
def accounts(self):
|
|
152
|
+
if self._accounts is None:
|
|
153
|
+
from .accounts.client import AccountsClient # noqa: E402
|
|
154
|
+
|
|
155
|
+
self._accounts = AccountsClient(client_wrapper=self._client_wrapper)
|
|
156
|
+
return self._accounts
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
def comments(self):
|
|
160
|
+
if self._comments is None:
|
|
161
|
+
from .comments.client import CommentsClient # noqa: E402
|
|
162
|
+
|
|
163
|
+
self._comments = CommentsClient(client_wrapper=self._client_wrapper)
|
|
164
|
+
return self._comments
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def webhooks(self):
|
|
168
|
+
if self._webhooks is None:
|
|
169
|
+
from .webhooks.client import WebhooksClient # noqa: E402
|
|
170
|
+
|
|
171
|
+
self._webhooks = WebhooksClient(client_wrapper=self._client_wrapper)
|
|
172
|
+
return self._webhooks
|
|
173
|
+
|
|
174
|
+
@property
|
|
175
|
+
def workspace_permissions(self):
|
|
176
|
+
if self._workspace_permissions is None:
|
|
177
|
+
from .workspace_permissions.client import WorkspacePermissionsClient # noqa: E402
|
|
178
|
+
|
|
179
|
+
self._workspace_permissions = WorkspacePermissionsClient(client_wrapper=self._client_wrapper)
|
|
180
|
+
return self._workspace_permissions
|
|
181
|
+
|
|
182
|
+
@property
|
|
183
|
+
def shares(self):
|
|
184
|
+
if self._shares is None:
|
|
185
|
+
from .shares.client import SharesClient # noqa: E402
|
|
186
|
+
|
|
187
|
+
self._shares = SharesClient(client_wrapper=self._client_wrapper)
|
|
188
|
+
return self._shares
|
|
189
|
+
|
|
190
|
+
@property
|
|
191
|
+
def metadata(self):
|
|
192
|
+
if self._metadata is None:
|
|
193
|
+
from .metadata.client import MetadataClient # noqa: E402
|
|
194
|
+
|
|
195
|
+
self._metadata = MetadataClient(client_wrapper=self._client_wrapper)
|
|
196
|
+
return self._metadata
|
|
197
|
+
|
|
198
|
+
@property
|
|
199
|
+
def files(self):
|
|
200
|
+
if self._files is None:
|
|
201
|
+
from .files.client import FilesClient # noqa: E402
|
|
202
|
+
|
|
203
|
+
self._files = FilesClient(client_wrapper=self._client_wrapper)
|
|
204
|
+
return self._files
|
|
205
|
+
|
|
206
|
+
@property
|
|
207
|
+
def users(self):
|
|
208
|
+
if self._users is None:
|
|
209
|
+
from .users.client import UsersClient # noqa: E402
|
|
210
|
+
|
|
211
|
+
self._users = UsersClient(client_wrapper=self._client_wrapper)
|
|
212
|
+
return self._users
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def projects(self):
|
|
216
|
+
if self._projects is None:
|
|
217
|
+
from .projects.client import ProjectsClient # noqa: E402
|
|
218
|
+
|
|
219
|
+
self._projects = ProjectsClient(client_wrapper=self._client_wrapper)
|
|
220
|
+
return self._projects
|
|
221
|
+
|
|
222
|
+
@property
|
|
223
|
+
def workspaces(self):
|
|
224
|
+
if self._workspaces is None:
|
|
225
|
+
from .workspaces.client import WorkspacesClient # noqa: E402
|
|
226
|
+
|
|
227
|
+
self._workspaces = WorkspacesClient(client_wrapper=self._client_wrapper)
|
|
228
|
+
return self._workspaces
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class AsyncFrameio:
|
|
232
|
+
"""
|
|
233
|
+
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propagate to these functions.
|
|
234
|
+
|
|
235
|
+
Parameters
|
|
236
|
+
----------
|
|
237
|
+
base_url : typing.Optional[str]
|
|
238
|
+
The base url to use for requests from the client.
|
|
239
|
+
|
|
240
|
+
environment : FrameioEnvironment
|
|
241
|
+
The environment to use for requests from the client. from .environment import FrameioEnvironment
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
Defaults to FrameioEnvironment.DEFAULT
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
token : typing.Optional[typing.Union[str, typing.Callable[[], str]]]
|
|
250
|
+
headers : typing.Optional[typing.Dict[str, str]]
|
|
251
|
+
Additional headers to send with every request.
|
|
252
|
+
|
|
253
|
+
timeout : typing.Optional[float]
|
|
254
|
+
The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced.
|
|
255
|
+
|
|
256
|
+
follow_redirects : typing.Optional[bool]
|
|
257
|
+
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
|
|
258
|
+
|
|
259
|
+
httpx_client : typing.Optional[httpx.AsyncClient]
|
|
260
|
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
|
|
261
|
+
|
|
262
|
+
Examples
|
|
263
|
+
--------
|
|
264
|
+
from frameio import AsyncFrameio
|
|
265
|
+
|
|
266
|
+
client = AsyncFrameio(
|
|
267
|
+
token="YOUR_TOKEN",
|
|
268
|
+
)
|
|
269
|
+
"""
|
|
270
|
+
|
|
271
|
+
def __init__(
|
|
272
|
+
self,
|
|
273
|
+
*,
|
|
274
|
+
base_url: typing.Optional[str] = None,
|
|
275
|
+
environment: FrameioEnvironment = FrameioEnvironment.DEFAULT,
|
|
276
|
+
token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None,
|
|
277
|
+
headers: typing.Optional[typing.Dict[str, str]] = None,
|
|
278
|
+
timeout: typing.Optional[float] = None,
|
|
279
|
+
follow_redirects: typing.Optional[bool] = True,
|
|
280
|
+
httpx_client: typing.Optional[httpx.AsyncClient] = None,
|
|
281
|
+
):
|
|
282
|
+
_defaulted_timeout = (
|
|
283
|
+
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
|
|
284
|
+
)
|
|
285
|
+
self._client_wrapper = AsyncClientWrapper(
|
|
286
|
+
base_url=_get_base_url(base_url=base_url, environment=environment),
|
|
287
|
+
token=token,
|
|
288
|
+
headers=headers,
|
|
289
|
+
httpx_client=httpx_client
|
|
290
|
+
if httpx_client is not None
|
|
291
|
+
else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects)
|
|
292
|
+
if follow_redirects is not None
|
|
293
|
+
else httpx.AsyncClient(timeout=_defaulted_timeout),
|
|
294
|
+
timeout=_defaulted_timeout,
|
|
295
|
+
)
|
|
296
|
+
self._metadata_fields: typing.Optional[AsyncMetadataFieldsClient] = None
|
|
297
|
+
self._project_permissions: typing.Optional[AsyncProjectPermissionsClient] = None
|
|
298
|
+
self._folders: typing.Optional[AsyncFoldersClient] = None
|
|
299
|
+
self._version_stacks: typing.Optional[AsyncVersionStacksClient] = None
|
|
300
|
+
self._account_permissions: typing.Optional[AsyncAccountPermissionsClient] = None
|
|
301
|
+
self._accounts: typing.Optional[AsyncAccountsClient] = None
|
|
302
|
+
self._comments: typing.Optional[AsyncCommentsClient] = None
|
|
303
|
+
self._webhooks: typing.Optional[AsyncWebhooksClient] = None
|
|
304
|
+
self._workspace_permissions: typing.Optional[AsyncWorkspacePermissionsClient] = None
|
|
305
|
+
self._shares: typing.Optional[AsyncSharesClient] = None
|
|
306
|
+
self._metadata: typing.Optional[AsyncMetadataClient] = None
|
|
307
|
+
self._files: typing.Optional[AsyncFilesClient] = None
|
|
308
|
+
self._users: typing.Optional[AsyncUsersClient] = None
|
|
309
|
+
self._projects: typing.Optional[AsyncProjectsClient] = None
|
|
310
|
+
self._workspaces: typing.Optional[AsyncWorkspacesClient] = None
|
|
311
|
+
|
|
312
|
+
@property
|
|
313
|
+
def metadata_fields(self):
|
|
314
|
+
if self._metadata_fields is None:
|
|
315
|
+
from .metadata_fields.client import AsyncMetadataFieldsClient # noqa: E402
|
|
316
|
+
|
|
317
|
+
self._metadata_fields = AsyncMetadataFieldsClient(client_wrapper=self._client_wrapper)
|
|
318
|
+
return self._metadata_fields
|
|
319
|
+
|
|
320
|
+
@property
|
|
321
|
+
def project_permissions(self):
|
|
322
|
+
if self._project_permissions is None:
|
|
323
|
+
from .project_permissions.client import AsyncProjectPermissionsClient # noqa: E402
|
|
324
|
+
|
|
325
|
+
self._project_permissions = AsyncProjectPermissionsClient(client_wrapper=self._client_wrapper)
|
|
326
|
+
return self._project_permissions
|
|
327
|
+
|
|
328
|
+
@property
|
|
329
|
+
def folders(self):
|
|
330
|
+
if self._folders is None:
|
|
331
|
+
from .folders.client import AsyncFoldersClient # noqa: E402
|
|
332
|
+
|
|
333
|
+
self._folders = AsyncFoldersClient(client_wrapper=self._client_wrapper)
|
|
334
|
+
return self._folders
|
|
335
|
+
|
|
336
|
+
@property
|
|
337
|
+
def version_stacks(self):
|
|
338
|
+
if self._version_stacks is None:
|
|
339
|
+
from .version_stacks.client import AsyncVersionStacksClient # noqa: E402
|
|
340
|
+
|
|
341
|
+
self._version_stacks = AsyncVersionStacksClient(client_wrapper=self._client_wrapper)
|
|
342
|
+
return self._version_stacks
|
|
343
|
+
|
|
344
|
+
@property
|
|
345
|
+
def account_permissions(self):
|
|
346
|
+
if self._account_permissions is None:
|
|
347
|
+
from .account_permissions.client import AsyncAccountPermissionsClient # noqa: E402
|
|
348
|
+
|
|
349
|
+
self._account_permissions = AsyncAccountPermissionsClient(client_wrapper=self._client_wrapper)
|
|
350
|
+
return self._account_permissions
|
|
351
|
+
|
|
352
|
+
@property
|
|
353
|
+
def accounts(self):
|
|
354
|
+
if self._accounts is None:
|
|
355
|
+
from .accounts.client import AsyncAccountsClient # noqa: E402
|
|
356
|
+
|
|
357
|
+
self._accounts = AsyncAccountsClient(client_wrapper=self._client_wrapper)
|
|
358
|
+
return self._accounts
|
|
359
|
+
|
|
360
|
+
@property
|
|
361
|
+
def comments(self):
|
|
362
|
+
if self._comments is None:
|
|
363
|
+
from .comments.client import AsyncCommentsClient # noqa: E402
|
|
364
|
+
|
|
365
|
+
self._comments = AsyncCommentsClient(client_wrapper=self._client_wrapper)
|
|
366
|
+
return self._comments
|
|
367
|
+
|
|
368
|
+
@property
|
|
369
|
+
def webhooks(self):
|
|
370
|
+
if self._webhooks is None:
|
|
371
|
+
from .webhooks.client import AsyncWebhooksClient # noqa: E402
|
|
372
|
+
|
|
373
|
+
self._webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper)
|
|
374
|
+
return self._webhooks
|
|
375
|
+
|
|
376
|
+
@property
|
|
377
|
+
def workspace_permissions(self):
|
|
378
|
+
if self._workspace_permissions is None:
|
|
379
|
+
from .workspace_permissions.client import AsyncWorkspacePermissionsClient # noqa: E402
|
|
380
|
+
|
|
381
|
+
self._workspace_permissions = AsyncWorkspacePermissionsClient(client_wrapper=self._client_wrapper)
|
|
382
|
+
return self._workspace_permissions
|
|
383
|
+
|
|
384
|
+
@property
|
|
385
|
+
def shares(self):
|
|
386
|
+
if self._shares is None:
|
|
387
|
+
from .shares.client import AsyncSharesClient # noqa: E402
|
|
388
|
+
|
|
389
|
+
self._shares = AsyncSharesClient(client_wrapper=self._client_wrapper)
|
|
390
|
+
return self._shares
|
|
391
|
+
|
|
392
|
+
@property
|
|
393
|
+
def metadata(self):
|
|
394
|
+
if self._metadata is None:
|
|
395
|
+
from .metadata.client import AsyncMetadataClient # noqa: E402
|
|
396
|
+
|
|
397
|
+
self._metadata = AsyncMetadataClient(client_wrapper=self._client_wrapper)
|
|
398
|
+
return self._metadata
|
|
399
|
+
|
|
400
|
+
@property
|
|
401
|
+
def files(self):
|
|
402
|
+
if self._files is None:
|
|
403
|
+
from .files.client import AsyncFilesClient # noqa: E402
|
|
404
|
+
|
|
405
|
+
self._files = AsyncFilesClient(client_wrapper=self._client_wrapper)
|
|
406
|
+
return self._files
|
|
407
|
+
|
|
408
|
+
@property
|
|
409
|
+
def users(self):
|
|
410
|
+
if self._users is None:
|
|
411
|
+
from .users.client import AsyncUsersClient # noqa: E402
|
|
412
|
+
|
|
413
|
+
self._users = AsyncUsersClient(client_wrapper=self._client_wrapper)
|
|
414
|
+
return self._users
|
|
415
|
+
|
|
416
|
+
@property
|
|
417
|
+
def projects(self):
|
|
418
|
+
if self._projects is None:
|
|
419
|
+
from .projects.client import AsyncProjectsClient # noqa: E402
|
|
420
|
+
|
|
421
|
+
self._projects = AsyncProjectsClient(client_wrapper=self._client_wrapper)
|
|
422
|
+
return self._projects
|
|
423
|
+
|
|
424
|
+
@property
|
|
425
|
+
def workspaces(self):
|
|
426
|
+
if self._workspaces is None:
|
|
427
|
+
from .workspaces.client import AsyncWorkspacesClient # noqa: E402
|
|
428
|
+
|
|
429
|
+
self._workspaces = AsyncWorkspacesClient(client_wrapper=self._client_wrapper)
|
|
430
|
+
return self._workspaces
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: FrameioEnvironment) -> str:
|
|
434
|
+
if base_url is not None:
|
|
435
|
+
return base_url
|
|
436
|
+
elif environment is not None:
|
|
437
|
+
return environment.value
|
|
438
|
+
else:
|
|
439
|
+
raise Exception("Please pass in either base_url or environment to construct the client")
|
|
@@ -0,0 +1,34 @@
|
|
|
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 CreateCommentParamsData, UpdateCommentParamsData
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {"CreateCommentParamsData": ".types", "UpdateCommentParamsData": ".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(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
17
|
+
try:
|
|
18
|
+
module = import_module(module_name, __package__)
|
|
19
|
+
if module_name == f".{attr_name}":
|
|
20
|
+
return module
|
|
21
|
+
else:
|
|
22
|
+
return getattr(module, attr_name)
|
|
23
|
+
except ImportError as e:
|
|
24
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
25
|
+
except AttributeError as e:
|
|
26
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def __dir__():
|
|
30
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
31
|
+
return sorted(lazy_attrs)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
__all__ = ["CreateCommentParamsData", "UpdateCommentParamsData"]
|