videogen-apimatic 1.0.0__tar.gz
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.
- videogen_apimatic-1.0.0/LICENSE +21 -0
- videogen_apimatic-1.0.0/PKG-INFO +149 -0
- videogen_apimatic-1.0.0/README.md +122 -0
- videogen_apimatic-1.0.0/pyproject.toml +88 -0
- videogen_apimatic-1.0.0/videogen/__init__.py +6 -0
- videogen_apimatic-1.0.0/videogen/apis/__init__.py +33 -0
- videogen_apimatic-1.0.0/videogen/apis/account.py +101 -0
- videogen_apimatic-1.0.0/videogen/apis/assistant.py +586 -0
- videogen_apimatic-1.0.0/videogen/apis/entities.py +738 -0
- videogen_apimatic-1.0.0/videogen/apis/files.py +818 -0
- videogen_apimatic-1.0.0/videogen/apis/projects.py +1121 -0
- videogen_apimatic-1.0.0/videogen/apis/resources.py +287 -0
- videogen_apimatic-1.0.0/videogen/apis/text.py +138 -0
- videogen_apimatic-1.0.0/videogen/apis/tools.py +1650 -0
- videogen_apimatic-1.0.0/videogen/apis/webhooks.py +314 -0
- videogen_apimatic-1.0.0/videogen/apis/workflows.py +725 -0
- videogen_apimatic-1.0.0/videogen/async_client.py +109 -0
- videogen_apimatic-1.0.0/videogen/auth.py +15 -0
- videogen_apimatic-1.0.0/videogen/base_client.py +18 -0
- videogen_apimatic-1.0.0/videogen/client.py +98 -0
- videogen_apimatic-1.0.0/videogen/core/__init__.py +345 -0
- videogen_apimatic-1.0.0/videogen/core/_internal/__init__.py +7 -0
- videogen_apimatic-1.0.0/videogen/core/_internal/content_disposition.py +122 -0
- videogen_apimatic-1.0.0/videogen/core/_internal/flattening.py +139 -0
- videogen_apimatic-1.0.0/videogen/core/_internal/headers.py +144 -0
- videogen_apimatic-1.0.0/videogen/core/_internal/urls.py +166 -0
- videogen_apimatic-1.0.0/videogen/core/_internal/wire.py +173 -0
- videogen_apimatic-1.0.0/videogen/core/adapters.py +177 -0
- videogen_apimatic-1.0.0/videogen/core/auth/__init__.py +70 -0
- videogen_apimatic-1.0.0/videogen/core/auth/composition.py +175 -0
- videogen_apimatic-1.0.0/videogen/core/auth/models.py +217 -0
- videogen_apimatic-1.0.0/videogen/core/auth/protocols.py +103 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/__init__.py +94 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/api_key_auth.py +53 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/basic_auth.py +73 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/bearer_auth.py +21 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/oauth2_authorization_code.py +393 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/oauth2_client_credentials.py +127 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/oauth2_password.py +142 -0
- videogen_apimatic-1.0.0/videogen/core/auth/schemes/oauth2_schemes.py +300 -0
- videogen_apimatic-1.0.0/videogen/core/base_raw_response.py +49 -0
- videogen_apimatic-1.0.0/videogen/core/bodies.py +489 -0
- videogen_apimatic-1.0.0/videogen/core/converters/__init__.py +68 -0
- videogen_apimatic-1.0.0/videogen/core/converters/date_time.py +237 -0
- videogen_apimatic-1.0.0/videogen/core/converters/encoded_bytes.py +272 -0
- videogen_apimatic-1.0.0/videogen/core/converters/open_enum.py +35 -0
- videogen_apimatic-1.0.0/videogen/core/decoding.py +263 -0
- videogen_apimatic-1.0.0/videogen/core/discriminators.py +115 -0
- videogen_apimatic-1.0.0/videogen/core/exceptions.py +41 -0
- videogen_apimatic-1.0.0/videogen/core/file_responses.py +324 -0
- videogen_apimatic-1.0.0/videogen/core/files.py +92 -0
- videogen_apimatic-1.0.0/videogen/core/httpx_transport.py +439 -0
- videogen_apimatic-1.0.0/videogen/core/models.py +143 -0
- videogen_apimatic-1.0.0/videogen/core/optionality.py +130 -0
- videogen_apimatic-1.0.0/videogen/core/params.py +161 -0
- videogen_apimatic-1.0.0/videogen/core/raw_client.py +394 -0
- videogen_apimatic-1.0.0/videogen/core/request_options.py +94 -0
- videogen_apimatic-1.0.0/videogen/core/results.py +110 -0
- videogen_apimatic-1.0.0/videogen/core/runtime_env.py +43 -0
- videogen_apimatic-1.0.0/videogen/core/servers.py +33 -0
- videogen_apimatic-1.0.0/videogen/core/transport.py +211 -0
- videogen_apimatic-1.0.0/videogen/models/__init__.py +344 -0
- videogen_apimatic-1.0.0/videogen/models/act_on_assistant_action_request.py +15 -0
- videogen_apimatic-1.0.0/videogen/models/act_on_assistant_action_response.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/add_entity_reference_request.py +23 -0
- videogen_apimatic-1.0.0/videogen/models/api_error_model.py +41 -0
- videogen_apimatic-1.0.0/videogen/models/aspect_ratio.py +17 -0
- videogen_apimatic-1.0.0/videogen/models/aspect_ratio1.py +17 -0
- videogen_apimatic-1.0.0/videogen/models/aspect_ratio2.py +17 -0
- videogen_apimatic-1.0.0/videogen/models/aspect_ratio4.py +17 -0
- videogen_apimatic-1.0.0/videogen/models/assistant_action.py +40 -0
- videogen_apimatic-1.0.0/videogen/models/assistant_action_detail.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/assistant_action_detail1.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/assistant_message.py +42 -0
- videogen_apimatic-1.0.0/videogen/models/assistant_message1.py +65 -0
- videogen_apimatic-1.0.0/videogen/models/assistant_message_attachment.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/assistant_workflow_suggestion.py +31 -0
- videogen_apimatic-1.0.0/videogen/models/content_policy_config.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/create_entity_request.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/create_file_upload_request.py +37 -0
- videogen_apimatic-1.0.0/videogen/models/create_timeline_interchange_request.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/create_timeline_interchange_response.py +16 -0
- videogen_apimatic-1.0.0/videogen/models/create_webhook_endpoint_request.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/entity.py +56 -0
- videogen_apimatic-1.0.0/videogen/models/entity_actor_config.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/entity_archive_response.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/entity_reference.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/enums/__init__.py +168 -0
- videogen_apimatic-1.0.0/videogen/models/enums/act_on_assistant_action_request_decision.py +18 -0
- videogen_apimatic-1.0.0/videogen/models/enums/assistant_action_kind.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/enums/assistant_message_status.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/enums/create_entity_request_entity_type.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/enums/end_screen_mode.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/entity_entity_type.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/export_delivery_destination_type.py +18 -0
- videogen_apimatic-1.0.0/videogen/models/enums/export_project_quality.py +18 -0
- videogen_apimatic-1.0.0/videogen/models/enums/file_analysis_metadata_analysis_loading_state.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/enums/file_info_scope.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/enums/file_source_status.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/file_type.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/enums/file_type1.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/enums/file_type2.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/enums/job_status.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality.py +24 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality1.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality10.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality11.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality12.py +18 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality13.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality2.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality3.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality4.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/model_quality9.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/motion_graphic_sub_tool_mode.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/enums/motion_graphic_sub_tool_mode1.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/motion_graphic_sub_tool_mode2.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/motion_graphic_sub_tool_mode3.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/motion_graphic_sub_tool_mode4.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/project_response_status.py +18 -0
- videogen_apimatic-1.0.0/videogen/models/enums/remix_action_discriminator_mapping_set_logo_position.py +23 -0
- videogen_apimatic-1.0.0/videogen/models/enums/remix_action_type.py +29 -0
- videogen_apimatic-1.0.0/videogen/models/enums/remix_transition_style.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/enums/timeline_interchange_format.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/enums/timeline_interchange_media_delivery.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/tts_voice_display_gender.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/v1_entities_get_parameters_entity_type.py +18 -0
- videogen_apimatic-1.0.0/videogen/models/enums/visual_pacing.py +17 -0
- videogen_apimatic-1.0.0/videogen/models/enums/watermark_mode.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/webhook_event_name.py +32 -0
- videogen_apimatic-1.0.0/videogen/models/enums/workflow_caption_background_style_type.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/workflow_caption_style_font_weight.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/enums/workflow_caption_style_text_justification.py +17 -0
- videogen_apimatic-1.0.0/videogen/models/enums/workflow_caption_style_vertical_alignment.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/enums/workflow_type.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/workflow_type1.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/enums/workflow_visual_style_type.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/error_requirement.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/executed_tool.py +45 -0
- videogen_apimatic-1.0.0/videogen/models/export_delivery_destination.py +28 -0
- videogen_apimatic-1.0.0/videogen/models/export_project_request.py +38 -0
- videogen_apimatic-1.0.0/videogen/models/export_project_response.py +16 -0
- videogen_apimatic-1.0.0/videogen/models/file_analysis_metadata.py +36 -0
- videogen_apimatic-1.0.0/videogen/models/file_analysis_metadata1.py +36 -0
- videogen_apimatic-1.0.0/videogen/models/file_info.py +134 -0
- videogen_apimatic-1.0.0/videogen/models/file_info1.py +135 -0
- videogen_apimatic-1.0.0/videogen/models/file_source.py +41 -0
- videogen_apimatic-1.0.0/videogen/models/file_upload_response.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/generate_avatar_request.py +50 -0
- videogen_apimatic-1.0.0/videogen/models/generate_image_request.py +66 -0
- videogen_apimatic-1.0.0/videogen/models/generate_motion_graphic_request.py +66 -0
- videogen_apimatic-1.0.0/videogen/models/generate_music_request.py +30 -0
- videogen_apimatic-1.0.0/videogen/models/generate_sound_effect_request.py +39 -0
- videogen_apimatic-1.0.0/videogen/models/generate_text_request.py +33 -0
- videogen_apimatic-1.0.0/videogen/models/generate_text_response.py +14 -0
- videogen_apimatic-1.0.0/videogen/models/generate_video_clip_request.py +110 -0
- videogen_apimatic-1.0.0/videogen/models/get_assistant_response.py +31 -0
- videogen_apimatic-1.0.0/videogen/models/get_files_response.py +23 -0
- videogen_apimatic-1.0.0/videogen/models/image_asset_request.py +38 -0
- videogen_apimatic-1.0.0/videogen/models/language.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/language_list_response.py +14 -0
- videogen_apimatic-1.0.0/videogen/models/list_entities_response.py +23 -0
- videogen_apimatic-1.0.0/videogen/models/list_project_exports_response.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/list_projects_response.py +26 -0
- videogen_apimatic-1.0.0/videogen/models/list_remix_actions_response.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/me_response.py +31 -0
- videogen_apimatic-1.0.0/videogen/models/motion_graphic_sub_tool_modes.py +33 -0
- videogen_apimatic-1.0.0/videogen/models/motion_graphic_sub_tool_modes1.py +35 -0
- videogen_apimatic-1.0.0/videogen/models/project_export.py +73 -0
- videogen_apimatic-1.0.0/videogen/models/project_response.py +50 -0
- videogen_apimatic-1.0.0/videogen/models/prompt_to_video_clip_request.py +56 -0
- videogen_apimatic-1.0.0/videogen/models/pronunciation_replacement.py +15 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action.py +28 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action1.py +35 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action10.py +29 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action11.py +44 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action12.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action13.py +24 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action14.py +37 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action2.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action3.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action4.py +32 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action5.py +21 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action6.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action7.py +37 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action8.py +39 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action9.py +32 -0
- videogen_apimatic-1.0.0/videogen/models/remix_action_run.py +51 -0
- videogen_apimatic-1.0.0/videogen/models/remix_project_request.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/remix_project_response.py +28 -0
- videogen_apimatic-1.0.0/videogen/models/remove_entity_reference_request.py +15 -0
- videogen_apimatic-1.0.0/videogen/models/scene_description_range.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/script_to_video_request.py +104 -0
- videogen_apimatic-1.0.0/videogen/models/search_files_request.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/search_files_response.py +14 -0
- videogen_apimatic-1.0.0/videogen/models/search_files_result.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/send_assistant_message_request.py +14 -0
- videogen_apimatic-1.0.0/videogen/models/send_assistant_message_response.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/slideshow_to_video_request.py +95 -0
- videogen_apimatic-1.0.0/videogen/models/start_assistant_chat_request.py +22 -0
- videogen_apimatic-1.0.0/videogen/models/start_assistant_chat_response.py +32 -0
- videogen_apimatic-1.0.0/videogen/models/start_tool_execution_response.py +17 -0
- videogen_apimatic-1.0.0/videogen/models/start_workflow_run_response.py +35 -0
- videogen_apimatic-1.0.0/videogen/models/text_to_speech_request.py +54 -0
- videogen_apimatic-1.0.0/videogen/models/timeline_interchange.py +77 -0
- videogen_apimatic-1.0.0/videogen/models/tool_execution_list_response.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/tool_success_result.py +52 -0
- videogen_apimatic-1.0.0/videogen/models/transcript.py +23 -0
- videogen_apimatic-1.0.0/videogen/models/transcript_word.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/tts_voice.py +54 -0
- videogen_apimatic-1.0.0/videogen/models/tts_voice_list_response.py +23 -0
- videogen_apimatic-1.0.0/videogen/models/unions/__init__.py +4 -0
- videogen_apimatic-1.0.0/videogen/models/unions/assistant_message2.py +11 -0
- videogen_apimatic-1.0.0/videogen/models/unions/remix_action15.py +58 -0
- videogen_apimatic-1.0.0/videogen/models/update_entity_request.py +20 -0
- videogen_apimatic-1.0.0/videogen/models/video_asset_request.py +38 -0
- videogen_apimatic-1.0.0/videogen/models/voiceover_to_video_request.py +101 -0
- videogen_apimatic-1.0.0/videogen/models/webhook_endpoint.py +35 -0
- videogen_apimatic-1.0.0/videogen/models/webhook_endpoint_list_response.py +23 -0
- videogen_apimatic-1.0.0/videogen/models/workflow_caption_background_style.py +31 -0
- videogen_apimatic-1.0.0/videogen/models/workflow_caption_style.py +71 -0
- videogen_apimatic-1.0.0/videogen/models/workflow_rgb_color.py +19 -0
- videogen_apimatic-1.0.0/videogen/models/workflow_run.py +51 -0
- videogen_apimatic-1.0.0/videogen/models/workflow_run_list_response.py +25 -0
- videogen_apimatic-1.0.0/videogen/models/workflow_visual_style.py +37 -0
- videogen_apimatic-1.0.0/videogen/py.typed +0 -0
- videogen_apimatic-1.0.0/videogen/server/__init__.py +4 -0
- videogen_apimatic-1.0.0/videogen/server/server.py +14 -0
- videogen_apimatic-1.0.0/videogen/server/server_config.py +13 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 APIMatic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: videogen-apimatic
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary:
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: sdk,api-client,openapi,rest,http,apimatic
|
|
8
|
+
Maintainer: APIMatic
|
|
9
|
+
Maintainer-email: support@apimatic.io
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Requires-Dist: httpx (>=0.28.1,<1.0.0)
|
|
23
|
+
Requires-Dist: pydantic[email] (>=2.11.0,<3.0.0)
|
|
24
|
+
Requires-Dist: typing-extensions (>=4.13.0,<5.0.0)
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# Videogen SDK
|
|
28
|
+
|
|
29
|
+
[![Built with APIMatic][apimatic-badge]][apimatic-url] [![License: MIT][license-badge]][license-url] [![Python 3.10+][python-badge]][python-url]
|
|
30
|
+
|
|
31
|
+
The Videogen SDK for Python provides access to the Videogen REST APIs from Python applications.
|
|
32
|
+
|
|
33
|
+
> [!TIP]
|
|
34
|
+
> **Looking for a specific signature, model, enum, or error type?** This SDK ships a generated
|
|
35
|
+
> **[SDK map](sdk-map.md)** -- a lookup index of the SDK's entire Python surface. Consult it before
|
|
36
|
+
> scanning the source tree; details under [SDK map](#sdk-map).
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
Install the Python SDK from PyPI, with whichever package manager your project uses:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install videogen-apimatic
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
uv add videogen-apimatic
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
poetry add videogen-apimatic
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Quick Start
|
|
59
|
+
|
|
60
|
+
### Synchronous client
|
|
61
|
+
|
|
62
|
+
Construct `VideogenClient` with keyword arguments, and call `close()` when you are done. Every argument is optional; the full list is in the [SDK map](sdk-map.md).
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from videogen import VideogenClient
|
|
66
|
+
|
|
67
|
+
client = VideogenClient(bearer_auth="YOUR_BEARER_TOKEN")
|
|
68
|
+
|
|
69
|
+
# TODO: call endpoints here -- see api-reference.md
|
|
70
|
+
|
|
71
|
+
client.close()
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Alternatively, scope it -- `with VideogenClient(...) as client:` closes the pool on exit; see [Best Practices](#best-practices).
|
|
75
|
+
|
|
76
|
+
`Client` is exported as an alias of `VideogenClient`, so `from videogen import Client` also works.
|
|
77
|
+
|
|
78
|
+
The SDK accepts every model-typed input in two interchangeable spellings, both type-checked: the typed model, or a plain dict with the same keys -- the `OrDict` and `Model | ModelDict` unions in the [SDK map](sdk-map.md). Pick whichever suits the call site: the dict form needs no import, while the model form adds a keyword-checked constructor and editor completion.
|
|
79
|
+
|
|
80
|
+
### Asynchronous client
|
|
81
|
+
|
|
82
|
+
`AsyncVideogenClient` mirrors `VideogenClient` with **identical method names**, and every endpoint method is a coroutine. It takes the same arguments, with some differences -- for example, the transport argument is `custom_async_http_client`.
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from asyncio import run
|
|
86
|
+
|
|
87
|
+
from videogen import AsyncVideogenClient
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
async def main() -> None:
|
|
91
|
+
client = AsyncVideogenClient(bearer_auth="YOUR_BEARER_TOKEN")
|
|
92
|
+
# TODO: call endpoints here, awaiting each -- see api-reference.md
|
|
93
|
+
await client.aclose()
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
run(main())
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Alternatively, scope it -- `async with AsyncVideogenClient(...) as client:` closes the pool on exit. Only the async spelling is `aclose`, matching httpx; see [Best Practices](#best-practices).
|
|
100
|
+
|
|
101
|
+
`AsyncClient` is the exported alias. Each client accepts **only** its own transport argument; passing the other's is a `TypeError` at runtime and an error under mypy.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Usage
|
|
106
|
+
|
|
107
|
+
Two generated references cover the SDK; each answers a different question:
|
|
108
|
+
|
|
109
|
+
| Reference | For |
|
|
110
|
+
| --- | --- |
|
|
111
|
+
| **[API Reference](api-reference.md)** | Usage guidance for a single **parsed** operation: `client.<group>.<operation>(...)` returns the typed payload and raises `ApiError` on any non-2xx, with `.error` the typed error body, or `RawError` for a status the operation does not document. |
|
|
112
|
+
| **[Raw API Reference](raw-api-reference.md)** | The same for the **raw** variant: `client.<group>.with_raw_response.<operation>(...)` returns `ApiResult[T, E]` and never raises for an API error. |
|
|
113
|
+
|
|
114
|
+
Both API references carry every one of the 59 operations, with a sync and an async sample and a parameter table each.
|
|
115
|
+
|
|
116
|
+
## SDK map
|
|
117
|
+
|
|
118
|
+
This SDK ships a generated **SDK map** -- [`sdk-map.md`](sdk-map.md) -- a deterministic, lookup-oriented table of contents of the SDK's Python surface, generated by APIMatic alongside this SDK.
|
|
119
|
+
|
|
120
|
+
Consult the map before scanning or grepping the source: it answers call-level contract questions by lookup, and for anything it does not carry -- model shapes, enum values, an endpoint's route or behavioural prose -- it names the one source file to read. How to read the map itself, including the SDK-wide defaults its rows rely on, is stated at the top of [`sdk-map.md`](sdk-map.md).
|
|
121
|
+
|
|
122
|
+
## Best Practices
|
|
123
|
+
|
|
124
|
+
> [!TIP]
|
|
125
|
+
> Use a **single `VideogenClient` instance** for the lifetime of your application and reuse it across
|
|
126
|
+
> all requests. Each instance owns its own connection pool, so an instance per request forfeits
|
|
127
|
+
> connection reuse and leaks pools that are never closed.
|
|
128
|
+
|
|
129
|
+
Match the disposal to the client's lifetime: an application-lifetime client is closed once at shutdown with `close()` / `aclose()`; where the lifetime fits a block, `with VideogenClient() as client:` / `async with AsyncVideogenClient() as client:` releases it automatically. Both are idempotent, but a closed client is not reusable: the next call raises. The client closes **whatever transport it holds**, including one you supplied via `custom_http_client` / `custom_async_http_client`; if you intend to reuse your own transport across clients, don't hand its lifetime to a `with` block.
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
This SDK is distributed under the [MIT License][license-url].
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Support
|
|
138
|
+
|
|
139
|
+
Refer to the [API reference](api-reference.md) for detailed information on available operations with code samples.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
[license-url]: LICENSE
|
|
144
|
+
[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg
|
|
145
|
+
[apimatic-url]: https://www.apimatic.io
|
|
146
|
+
[apimatic-badge]: https://www.apimatic.io/hubfs/Built-with-APIMatic-badge.svg
|
|
147
|
+
[python-url]: https://www.python.org/downloads/
|
|
148
|
+
[python-badge]: https://img.shields.io/badge/python-3.10%2B-blue.svg
|
|
149
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Videogen SDK
|
|
2
|
+
|
|
3
|
+
[![Built with APIMatic][apimatic-badge]][apimatic-url] [![License: MIT][license-badge]][license-url] [![Python 3.10+][python-badge]][python-url]
|
|
4
|
+
|
|
5
|
+
The Videogen SDK for Python provides access to the Videogen REST APIs from Python applications.
|
|
6
|
+
|
|
7
|
+
> [!TIP]
|
|
8
|
+
> **Looking for a specific signature, model, enum, or error type?** This SDK ships a generated
|
|
9
|
+
> **[SDK map](sdk-map.md)** -- a lookup index of the SDK's entire Python surface. Consult it before
|
|
10
|
+
> scanning the source tree; details under [SDK map](#sdk-map).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Install the Python SDK from PyPI, with whichever package manager your project uses:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install videogen-apimatic
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv add videogen-apimatic
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
poetry add videogen-apimatic
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
### Synchronous client
|
|
35
|
+
|
|
36
|
+
Construct `VideogenClient` with keyword arguments, and call `close()` when you are done. Every argument is optional; the full list is in the [SDK map](sdk-map.md).
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
from videogen import VideogenClient
|
|
40
|
+
|
|
41
|
+
client = VideogenClient(bearer_auth="YOUR_BEARER_TOKEN")
|
|
42
|
+
|
|
43
|
+
# TODO: call endpoints here -- see api-reference.md
|
|
44
|
+
|
|
45
|
+
client.close()
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Alternatively, scope it -- `with VideogenClient(...) as client:` closes the pool on exit; see [Best Practices](#best-practices).
|
|
49
|
+
|
|
50
|
+
`Client` is exported as an alias of `VideogenClient`, so `from videogen import Client` also works.
|
|
51
|
+
|
|
52
|
+
The SDK accepts every model-typed input in two interchangeable spellings, both type-checked: the typed model, or a plain dict with the same keys -- the `OrDict` and `Model | ModelDict` unions in the [SDK map](sdk-map.md). Pick whichever suits the call site: the dict form needs no import, while the model form adds a keyword-checked constructor and editor completion.
|
|
53
|
+
|
|
54
|
+
### Asynchronous client
|
|
55
|
+
|
|
56
|
+
`AsyncVideogenClient` mirrors `VideogenClient` with **identical method names**, and every endpoint method is a coroutine. It takes the same arguments, with some differences -- for example, the transport argument is `custom_async_http_client`.
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from asyncio import run
|
|
60
|
+
|
|
61
|
+
from videogen import AsyncVideogenClient
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
async def main() -> None:
|
|
65
|
+
client = AsyncVideogenClient(bearer_auth="YOUR_BEARER_TOKEN")
|
|
66
|
+
# TODO: call endpoints here, awaiting each -- see api-reference.md
|
|
67
|
+
await client.aclose()
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
run(main())
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Alternatively, scope it -- `async with AsyncVideogenClient(...) as client:` closes the pool on exit. Only the async spelling is `aclose`, matching httpx; see [Best Practices](#best-practices).
|
|
74
|
+
|
|
75
|
+
`AsyncClient` is the exported alias. Each client accepts **only** its own transport argument; passing the other's is a `TypeError` at runtime and an error under mypy.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Usage
|
|
80
|
+
|
|
81
|
+
Two generated references cover the SDK; each answers a different question:
|
|
82
|
+
|
|
83
|
+
| Reference | For |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| **[API Reference](api-reference.md)** | Usage guidance for a single **parsed** operation: `client.<group>.<operation>(...)` returns the typed payload and raises `ApiError` on any non-2xx, with `.error` the typed error body, or `RawError` for a status the operation does not document. |
|
|
86
|
+
| **[Raw API Reference](raw-api-reference.md)** | The same for the **raw** variant: `client.<group>.with_raw_response.<operation>(...)` returns `ApiResult[T, E]` and never raises for an API error. |
|
|
87
|
+
|
|
88
|
+
Both API references carry every one of the 59 operations, with a sync and an async sample and a parameter table each.
|
|
89
|
+
|
|
90
|
+
## SDK map
|
|
91
|
+
|
|
92
|
+
This SDK ships a generated **SDK map** -- [`sdk-map.md`](sdk-map.md) -- a deterministic, lookup-oriented table of contents of the SDK's Python surface, generated by APIMatic alongside this SDK.
|
|
93
|
+
|
|
94
|
+
Consult the map before scanning or grepping the source: it answers call-level contract questions by lookup, and for anything it does not carry -- model shapes, enum values, an endpoint's route or behavioural prose -- it names the one source file to read. How to read the map itself, including the SDK-wide defaults its rows rely on, is stated at the top of [`sdk-map.md`](sdk-map.md).
|
|
95
|
+
|
|
96
|
+
## Best Practices
|
|
97
|
+
|
|
98
|
+
> [!TIP]
|
|
99
|
+
> Use a **single `VideogenClient` instance** for the lifetime of your application and reuse it across
|
|
100
|
+
> all requests. Each instance owns its own connection pool, so an instance per request forfeits
|
|
101
|
+
> connection reuse and leaks pools that are never closed.
|
|
102
|
+
|
|
103
|
+
Match the disposal to the client's lifetime: an application-lifetime client is closed once at shutdown with `close()` / `aclose()`; where the lifetime fits a block, `with VideogenClient() as client:` / `async with AsyncVideogenClient() as client:` releases it automatically. Both are idempotent, but a closed client is not reusable: the next call raises. The client closes **whatever transport it holds**, including one you supplied via `custom_http_client` / `custom_async_http_client`; if you intend to reuse your own transport across clients, don't hand its lifetime to a `with` block.
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
This SDK is distributed under the [MIT License][license-url].
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Support
|
|
112
|
+
|
|
113
|
+
Refer to the [API reference](api-reference.md) for detailed information on available operations with code samples.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
[license-url]: LICENSE
|
|
118
|
+
[license-badge]: https://img.shields.io/badge/License-MIT-blue.svg
|
|
119
|
+
[apimatic-url]: https://www.apimatic.io
|
|
120
|
+
[apimatic-badge]: https://www.apimatic.io/hubfs/Built-with-APIMatic-badge.svg
|
|
121
|
+
[python-url]: https://www.python.org/downloads/
|
|
122
|
+
[python-badge]: https://img.shields.io/badge/python-3.10%2B-blue.svg
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "videogen-apimatic"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
maintainers = [
|
|
5
|
+
{ name = "APIMatic", email = "support@apimatic.io" },
|
|
6
|
+
]
|
|
7
|
+
keywords = ["sdk", "api-client", "openapi", "rest", "http", "apimatic"]
|
|
8
|
+
license = "MIT" # SPDX expression (PEP 639); poetry-core bundles the root LICENSE
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"httpx (>=0.28.1,<1.0.0)",
|
|
13
|
+
# 2.11 added the alias-control `model_config` keys core/models.py names --
|
|
14
|
+
# validate_by_name, validate_by_alias and serialize_by_alias. No 2.12-only pydantic API
|
|
15
|
+
# is used anywhere.
|
|
16
|
+
"pydantic[email] (>=2.11.0,<3.0.0)",
|
|
17
|
+
# NotRequired / TypedDict backport for the 3.10 floor (both live in `typing` from 3.11),
|
|
18
|
+
# used by the model input companions; and TypeForm (PEP 747, added in 4.13.0), which
|
|
19
|
+
# core/ uses to type the runtime type expressions its factories accept. PEP 747 is Final
|
|
20
|
+
# and TypeForm reaches `typing` in 3.15, so both move when the floor does.
|
|
21
|
+
"typing-extensions (>=4.13.0,<5.0.0)",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"Programming Language :: Python :: 3",
|
|
27
|
+
"Programming Language :: Python :: 3.10",
|
|
28
|
+
"Programming Language :: Python :: 3.11",
|
|
29
|
+
"Programming Language :: Python :: 3.12",
|
|
30
|
+
"Programming Language :: Python :: 3.13",
|
|
31
|
+
"Programming Language :: Python :: 3.14",
|
|
32
|
+
"Typing :: Typed",
|
|
33
|
+
"Operating System :: OS Independent",
|
|
34
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
35
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[dependency-groups]
|
|
39
|
+
dev = [
|
|
40
|
+
# 2.2 is where PEP 747 TypeForm became default-on; below it, core/'s signatures need an
|
|
41
|
+
# --enable-incomplete-feature flag.
|
|
42
|
+
"mypy (>=2.2.0,<3.0.0)",
|
|
43
|
+
"ruff (>=0.14.14,<0.15.0)",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
[build-system]
|
|
48
|
+
# 2.2.0 is the first release that understands PEP 639 -- below it the backend emits the
|
|
49
|
+
# deprecated `License:` field, re-adds the license classifier and drops `:: 3.14`.
|
|
50
|
+
requires = ["poetry-core>=2.2.0,<3.0.0"]
|
|
51
|
+
build-backend = "poetry.core.masonry.api"
|
|
52
|
+
|
|
53
|
+
[tool.poetry]
|
|
54
|
+
# The distribution is `videogen-apimatic` but the import package stays `videogen`,
|
|
55
|
+
# so masonry cannot derive the package directory from the name -- state it.
|
|
56
|
+
packages = [{ include = "videogen" }]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
[tool.ruff]
|
|
60
|
+
# target-version is inferred from requires-python -- the floor is single-sourced there
|
|
61
|
+
line-length = 120
|
|
62
|
+
|
|
63
|
+
[tool.ruff.lint]
|
|
64
|
+
select = ["E", "W", "F", "I", "UP", "B", "RUF"]
|
|
65
|
+
# Deliberately excluded:
|
|
66
|
+
# TC - would move pydantic-validated imports under TYPE_CHECKING, breaking the
|
|
67
|
+
# runtime annotation resolution that pydantic depends on
|
|
68
|
+
# Q - the CI-gated formatter normalizes quotes everywhere it runs
|
|
69
|
+
ignore = [
|
|
70
|
+
# Typographic punctuation flagged as confusable. Every docstring here is the spec
|
|
71
|
+
# author's own description, copied verbatim -- normalizing their apostrophes and
|
|
72
|
+
# dashes would silently alter the API's documentation.
|
|
73
|
+
"RUF001", "RUF002", "RUF003",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
[tool.ruff.lint.per-file-ignores]
|
|
77
|
+
"**/__init__.py" = ["RUF022"] # curated, grouped __all__
|
|
78
|
+
|
|
79
|
+
[tool.mypy]
|
|
80
|
+
python_version = "3.10" # the supported floor, not whichever interpreter is local
|
|
81
|
+
files = ["videogen"]
|
|
82
|
+
strict = true
|
|
83
|
+
warn_unreachable = true
|
|
84
|
+
enable_error_code = ["redundant-expr", "truthy-bool", "ignore-without-code", "possibly-undefined"]
|
|
85
|
+
# already inside `strict` at mypy 2.3, pinned deliberately: `strict`'s flag set is versioned
|
|
86
|
+
# and the dev floor spans >=2.2.0,<3.0.0
|
|
87
|
+
warn_return_any = true
|
|
88
|
+
pretty = true
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from .account import Account, AsyncAccount
|
|
2
|
+
from .assistant import Assistant, AsyncAssistant
|
|
3
|
+
from .entities import AsyncEntities, Entities
|
|
4
|
+
from .files import AsyncFiles, Files
|
|
5
|
+
from .projects import AsyncProjects, Projects
|
|
6
|
+
from .resources import AsyncResources, Resources
|
|
7
|
+
from .text import AsyncText, Text
|
|
8
|
+
from .tools import AsyncTools, Tools
|
|
9
|
+
from .webhooks import AsyncWebhooks, Webhooks
|
|
10
|
+
from .workflows import AsyncWorkflows, Workflows
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"Account",
|
|
14
|
+
"Assistant",
|
|
15
|
+
"AsyncAccount",
|
|
16
|
+
"AsyncAssistant",
|
|
17
|
+
"AsyncEntities",
|
|
18
|
+
"AsyncFiles",
|
|
19
|
+
"AsyncProjects",
|
|
20
|
+
"AsyncResources",
|
|
21
|
+
"AsyncText",
|
|
22
|
+
"AsyncTools",
|
|
23
|
+
"AsyncWebhooks",
|
|
24
|
+
"AsyncWorkflows",
|
|
25
|
+
"Entities",
|
|
26
|
+
"Files",
|
|
27
|
+
"Projects",
|
|
28
|
+
"Resources",
|
|
29
|
+
"Text",
|
|
30
|
+
"Tools",
|
|
31
|
+
"Webhooks",
|
|
32
|
+
"Workflows",
|
|
33
|
+
]
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from ..auth import AsyncAuthSchemes, AuthSchemes
|
|
4
|
+
from ..core import (
|
|
5
|
+
ApiResult,
|
|
6
|
+
AsyncRawClient,
|
|
7
|
+
RawClient,
|
|
8
|
+
RawError,
|
|
9
|
+
RequestOptionsOrDict,
|
|
10
|
+
SecuredRawResponse,
|
|
11
|
+
json_decoder,
|
|
12
|
+
raw_error_response,
|
|
13
|
+
)
|
|
14
|
+
from ..models.me_response import MeResponse
|
|
15
|
+
from ..server.server import Server
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Account:
|
|
19
|
+
def __init__(self, client: RawClient, server: Server, auth: AuthSchemes) -> None:
|
|
20
|
+
self._with_raw_response = AccountWithRawResponse(client, server, auth)
|
|
21
|
+
|
|
22
|
+
def get_me(self, *, request_options: RequestOptionsOrDict | None = None) -> MeResponse:
|
|
23
|
+
"""Return the account and team behind the API key making the request. Takes no parameters. Call it as a
|
|
24
|
+
connection test to confirm a key is valid and to discover the ``teamId`` and account ``email`` a key belongs to.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
request_options: Per-call overrides for this one request, such as a timeout or extra headers.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
The account and team for the authenticated API key.
|
|
31
|
+
|
|
32
|
+
Raises:
|
|
33
|
+
ApiError: If the API responds with an error status code. ``error`` is ``RawError``."""
|
|
34
|
+
return self._with_raw_response.get_me(request_options=request_options).unwrap()
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def with_raw_response(self) -> AccountWithRawResponse:
|
|
38
|
+
return self._with_raw_response
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class AsyncAccount:
|
|
42
|
+
def __init__(self, client: AsyncRawClient, server: Server, auth: AsyncAuthSchemes) -> None:
|
|
43
|
+
self._with_raw_response = AsyncAccountWithRawResponse(client, server, auth)
|
|
44
|
+
|
|
45
|
+
async def get_me(self, *, request_options: RequestOptionsOrDict | None = None) -> MeResponse:
|
|
46
|
+
"""Return the account and team behind the API key making the request. Takes no parameters. Call it as a
|
|
47
|
+
connection test to confirm a key is valid and to discover the ``teamId`` and account ``email`` a key belongs to.
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
request_options: Per-call overrides for this one request, such as a timeout or extra headers.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
The account and team for the authenticated API key.
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
ApiError: If the API responds with an error status code. ``error`` is ``RawError``."""
|
|
57
|
+
return (await self._with_raw_response.get_me(request_options=request_options)).unwrap()
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def with_raw_response(self) -> AsyncAccountWithRawResponse:
|
|
61
|
+
return self._with_raw_response
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class AccountWithRawResponse(SecuredRawResponse[RawClient, Server, AuthSchemes]):
|
|
65
|
+
def get_me(self, *, request_options: RequestOptionsOrDict | None = None) -> ApiResult[MeResponse, RawError]:
|
|
66
|
+
"""Return the account and team behind the API key making the request. Takes no parameters. Call it as a
|
|
67
|
+
connection test to confirm a key is valid and to discover the ``teamId`` and account ``email`` a key belongs to.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
request_options: Per-call overrides for this one request, such as a timeout or extra headers.
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
An ``ApiResult`` holding the deserialized response or the error body."""
|
|
74
|
+
return self._client.execute(
|
|
75
|
+
http_method="GET",
|
|
76
|
+
url_template=self._server.default("/v1/me"),
|
|
77
|
+
auth_scheme=self._auth.bearer_auth,
|
|
78
|
+
decoder=json_decoder[MeResponse],
|
|
79
|
+
error_mapper=raw_error_response,
|
|
80
|
+
request_options=request_options,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class AsyncAccountWithRawResponse(SecuredRawResponse[AsyncRawClient, Server, AsyncAuthSchemes]):
|
|
85
|
+
async def get_me(self, *, request_options: RequestOptionsOrDict | None = None) -> ApiResult[MeResponse, RawError]:
|
|
86
|
+
"""Return the account and team behind the API key making the request. Takes no parameters. Call it as a
|
|
87
|
+
connection test to confirm a key is valid and to discover the ``teamId`` and account ``email`` a key belongs to.
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
request_options: Per-call overrides for this one request, such as a timeout or extra headers.
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
An ``ApiResult`` holding the deserialized response or the error body."""
|
|
94
|
+
return await self._client.execute(
|
|
95
|
+
http_method="GET",
|
|
96
|
+
url_template=self._server.default("/v1/me"),
|
|
97
|
+
auth_scheme=self._auth.bearer_auth,
|
|
98
|
+
decoder=json_decoder[MeResponse],
|
|
99
|
+
error_mapper=raw_error_response,
|
|
100
|
+
request_options=request_options,
|
|
101
|
+
)
|