videogen 0.0.19__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.
Files changed (77) hide show
  1. videogen-0.0.19/PKG-INFO +218 -0
  2. videogen-0.0.19/README.md +184 -0
  3. videogen-0.0.19/pyproject.toml +109 -0
  4. videogen-0.0.19/src/videogen/__init__.py +176 -0
  5. videogen-0.0.19/src/videogen/_default_clients.py +30 -0
  6. videogen-0.0.19/src/videogen/client.py +262 -0
  7. videogen-0.0.19/src/videogen/core/__init__.py +127 -0
  8. videogen-0.0.19/src/videogen/core/api_error.py +23 -0
  9. videogen-0.0.19/src/videogen/core/client_wrapper.py +106 -0
  10. videogen-0.0.19/src/videogen/core/datetime_utils.py +70 -0
  11. videogen-0.0.19/src/videogen/core/file.py +67 -0
  12. videogen-0.0.19/src/videogen/core/force_multipart.py +18 -0
  13. videogen-0.0.19/src/videogen/core/http_client.py +840 -0
  14. videogen-0.0.19/src/videogen/core/http_response.py +59 -0
  15. videogen-0.0.19/src/videogen/core/http_sse/__init__.py +42 -0
  16. videogen-0.0.19/src/videogen/core/http_sse/_api.py +112 -0
  17. videogen-0.0.19/src/videogen/core/http_sse/_decoders.py +61 -0
  18. videogen-0.0.19/src/videogen/core/http_sse/_exceptions.py +7 -0
  19. videogen-0.0.19/src/videogen/core/http_sse/_models.py +17 -0
  20. videogen-0.0.19/src/videogen/core/jsonable_encoder.py +120 -0
  21. videogen-0.0.19/src/videogen/core/logging.py +107 -0
  22. videogen-0.0.19/src/videogen/core/parse_error.py +36 -0
  23. videogen-0.0.19/src/videogen/core/pydantic_utilities.py +634 -0
  24. videogen-0.0.19/src/videogen/core/query_encoder.py +58 -0
  25. videogen-0.0.19/src/videogen/core/remove_none_from_dict.py +11 -0
  26. videogen-0.0.19/src/videogen/core/request_options.py +35 -0
  27. videogen-0.0.19/src/videogen/core/serialization.py +276 -0
  28. videogen-0.0.19/src/videogen/environment.py +7 -0
  29. videogen-0.0.19/src/videogen/files/__init__.py +34 -0
  30. videogen-0.0.19/src/videogen/files/client.py +589 -0
  31. videogen-0.0.19/src/videogen/files/raw_client.py +697 -0
  32. videogen-0.0.19/src/videogen/files/types/__init__.py +34 -0
  33. videogen-0.0.19/src/videogen/files/types/create_file_upload_request_type.py +5 -0
  34. videogen-0.0.19/src/videogen/py.typed +0 -0
  35. videogen-0.0.19/src/videogen/resources/__init__.py +4 -0
  36. videogen-0.0.19/src/videogen/resources/client.py +185 -0
  37. videogen-0.0.19/src/videogen/resources/raw_client.py +202 -0
  38. videogen-0.0.19/src/videogen/tools/__init__.py +4 -0
  39. videogen-0.0.19/src/videogen/tools/client.py +1720 -0
  40. videogen-0.0.19/src/videogen/tools/raw_client.py +1999 -0
  41. videogen-0.0.19/src/videogen/types/__init__.py +131 -0
  42. videogen-0.0.19/src/videogen/types/api_error.py +20 -0
  43. videogen-0.0.19/src/videogen/types/aspect_ratio.py +24 -0
  44. videogen-0.0.19/src/videogen/types/avatar_presenter.py +53 -0
  45. videogen-0.0.19/src/videogen/types/avatar_presenter_displayable_gender.py +5 -0
  46. videogen-0.0.19/src/videogen/types/avatar_presenter_list_response.py +24 -0
  47. videogen-0.0.19/src/videogen/types/executed_tool.py +40 -0
  48. videogen-0.0.19/src/videogen/types/executed_tool_status.py +5 -0
  49. videogen-0.0.19/src/videogen/types/file_source.py +57 -0
  50. videogen-0.0.19/src/videogen/types/file_source_status.py +5 -0
  51. videogen-0.0.19/src/videogen/types/file_upload_response.py +32 -0
  52. videogen-0.0.19/src/videogen/types/file_upload_webhook_event_name.py +15 -0
  53. videogen-0.0.19/src/videogen/types/file_upload_webhook_payload.py +45 -0
  54. videogen-0.0.19/src/videogen/types/get_files_response.py +20 -0
  55. videogen-0.0.19/src/videogen/types/image_asset_request.py +41 -0
  56. videogen-0.0.19/src/videogen/types/pronunciation_replacement.py +20 -0
  57. videogen-0.0.19/src/videogen/types/search_files_response.py +20 -0
  58. videogen-0.0.19/src/videogen/types/search_files_result.py +25 -0
  59. videogen-0.0.19/src/videogen/types/start_tool_execution_response.py +29 -0
  60. videogen-0.0.19/src/videogen/types/storage_file.py +131 -0
  61. videogen-0.0.19/src/videogen/types/storage_file_scope.py +5 -0
  62. videogen-0.0.19/src/videogen/types/storage_file_type.py +5 -0
  63. videogen-0.0.19/src/videogen/types/tool_execution_webhook_event_name.py +7 -0
  64. videogen-0.0.19/src/videogen/types/tool_execution_webhook_payload.py +55 -0
  65. videogen-0.0.19/src/videogen/types/tool_success_result.py +40 -0
  66. videogen-0.0.19/src/videogen/types/tool_success_result_type.py +5 -0
  67. videogen-0.0.19/src/videogen/types/tts_voice.py +82 -0
  68. videogen-0.0.19/src/videogen/types/tts_voice_display_gender.py +5 -0
  69. videogen-0.0.19/src/videogen/types/tts_voice_list_response.py +24 -0
  70. videogen-0.0.19/src/videogen/types/video_asset_request.py +41 -0
  71. videogen-0.0.19/src/videogen/types/webhook_endpoint.py +47 -0
  72. videogen-0.0.19/src/videogen/types/webhook_endpoint_list_response.py +20 -0
  73. videogen-0.0.19/src/videogen/types/webhook_event_name.py +18 -0
  74. videogen-0.0.19/src/videogen/version.py +3 -0
  75. videogen-0.0.19/src/videogen/webhooks/__init__.py +4 -0
  76. videogen-0.0.19/src/videogen/webhooks/client.py +277 -0
  77. videogen-0.0.19/src/videogen/webhooks/raw_client.py +299 -0
@@ -0,0 +1,218 @@
1
+ Metadata-Version: 2.4
2
+ Name: videogen
3
+ Version: 0.0.19
4
+ Summary:
5
+ Keywords: videogen,video,ai,generative,api,sdk,text-to-video,text-to-speech,image-generation,video-generation,avatar
6
+ Requires-Python: >=3.10,<4.0
7
+ Classifier: Intended Audience :: Developers
8
+ Classifier: Operating System :: MacOS
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Operating System :: POSIX
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Provides-Extra: aiohttp
24
+ Requires-Dist: aiohttp (>=3.13.4,<4) ; (python_version >= "3.9") and (extra == "aiohttp")
25
+ Requires-Dist: httpx (>=0.21.2)
26
+ Requires-Dist: httpx-aiohttp (==0.1.8) ; (python_version >= "3.9") and (extra == "aiohttp")
27
+ Requires-Dist: pydantic (>=1.9.2)
28
+ Requires-Dist: pydantic-core (>=2.18.2,<2.44.0)
29
+ Requires-Dist: typing_extensions (>=4.0.0)
30
+ Project-URL: Homepage, https://videogen.io
31
+ Project-URL: Repository, https://github.com/video-gen/videogen-python-sdk
32
+ Description-Content-Type: text/markdown
33
+
34
+ # VideoGen Python Library
35
+
36
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fvideo-gen%2Fvideogen-python-sdk)
37
+ [![pypi](https://img.shields.io/pypi/v/videogen)](https://pypi.python.org/pypi/videogen)
38
+
39
+ Official client for the VideoGen Developer API (`https://api.videogen.io`).
40
+
41
+
42
+ ## Table of Contents
43
+
44
+ - [Documentation](#documentation)
45
+ - [Installation](#installation)
46
+ - [Reference](#reference)
47
+ - [Usage](#usage)
48
+ - [Environments](#environments)
49
+ - [Async Client](#async-client)
50
+ - [Exception Handling](#exception-handling)
51
+ - [Advanced](#advanced)
52
+ - [Access Raw Response Data](#access-raw-response-data)
53
+ - [Retries](#retries)
54
+ - [Timeouts](#timeouts)
55
+ - [Custom Client](#custom-client)
56
+ - [Contributing](#contributing)
57
+
58
+ ## Documentation
59
+
60
+ API reference documentation is available [here](https://videogen.docs.buildwithfern.com).
61
+
62
+ ## Installation
63
+
64
+ ```sh
65
+ pip install videogen
66
+ ```
67
+
68
+ ## Reference
69
+
70
+ A full reference for this library is available [here](https://github.com/video-gen/videogen-python-sdk/blob/HEAD/./reference.md).
71
+
72
+ ## Usage
73
+
74
+ Instantiate and use the client with the following:
75
+
76
+ ```python
77
+ from videogen import VideoGenApi
78
+
79
+ client = VideoGenApi(
80
+ token="<token>",
81
+ )
82
+
83
+ client.tools.prompt_to_video_clip(
84
+ prompt="A golden retriever running through a sunlit meadow in slow motion, cinematic",
85
+ )
86
+ ```
87
+
88
+ ## Environments
89
+
90
+ This SDK allows you to configure different environments for API requests.
91
+
92
+ ```python
93
+ from videogen import VideoGenApi
94
+ from videogen.environment import VideoGenApiEnvironment
95
+
96
+ client = VideoGenApi(
97
+ environment=VideoGenApiEnvironment.PRODUCTION,
98
+ )
99
+ ```
100
+
101
+ ## Async Client
102
+
103
+ The SDK also exports an `async` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use `httpx.AsyncClient()` instead of `httpx.Client()` (e.g. for the `httpx_client` parameter of this client).
104
+
105
+ ```python
106
+ import asyncio
107
+
108
+ from videogen import AsyncVideoGenApi
109
+
110
+ client = AsyncVideoGenApi(
111
+ token="<token>",
112
+ )
113
+
114
+
115
+ async def main() -> None:
116
+ await client.tools.prompt_to_video_clip(
117
+ prompt="A golden retriever running through a sunlit meadow in slow motion, cinematic",
118
+ )
119
+
120
+
121
+ asyncio.run(main())
122
+ ```
123
+
124
+ ## Exception Handling
125
+
126
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
127
+ will be thrown.
128
+
129
+ ```python
130
+ from videogen.core.api_error import ApiError
131
+
132
+ try:
133
+ client.tools.prompt_to_video_clip(...)
134
+ except ApiError as e:
135
+ print(e.status_code)
136
+ print(e.body)
137
+ ```
138
+
139
+ ## Advanced
140
+
141
+ ### Access Raw Response Data
142
+
143
+ The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
144
+ The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
145
+
146
+ ```python
147
+ from videogen import VideoGenApi
148
+
149
+ client = VideoGenApi(...)
150
+ response = client.tools.with_raw_response.prompt_to_video_clip(...)
151
+ print(response.headers) # access the response headers
152
+ print(response.status_code) # access the response status code
153
+ print(response.data) # access the underlying object
154
+ ```
155
+
156
+ ### Retries
157
+
158
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
159
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
160
+ retry limit (default: 2).
161
+
162
+ A request is deemed retryable when any of the following HTTP status codes is returned:
163
+
164
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
165
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
166
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
167
+
168
+ Use the `max_retries` request option to configure this behavior.
169
+
170
+ ```python
171
+ client.tools.prompt_to_video_clip(..., request_options={
172
+ "max_retries": 1
173
+ })
174
+ ```
175
+
176
+ ### Timeouts
177
+
178
+ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
179
+
180
+ ```python
181
+ from videogen import VideoGenApi
182
+
183
+ client = VideoGenApi(..., timeout=20.0)
184
+
185
+ # Override timeout for a specific method
186
+ client.tools.prompt_to_video_clip(..., request_options={
187
+ "timeout_in_seconds": 1
188
+ })
189
+ ```
190
+
191
+ ### Custom Client
192
+
193
+ You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
194
+ and transports.
195
+
196
+ ```python
197
+ import httpx
198
+ from videogen import VideoGenApi
199
+
200
+ client = VideoGenApi(
201
+ ...,
202
+ httpx_client=httpx.Client(
203
+ proxy="http://my.test.proxy.example.com",
204
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
205
+ ),
206
+ )
207
+ ```
208
+
209
+ ## Contributing
210
+
211
+ While we value open-source contributions to this SDK, this library is generated programmatically.
212
+ Additions made directly to this library would have to be moved over to our generation code,
213
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
214
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
215
+ an issue first to discuss with us!
216
+
217
+ On the other hand, contributions to the README are always very welcome!
218
+
@@ -0,0 +1,184 @@
1
+ # VideoGen Python Library
2
+
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fvideo-gen%2Fvideogen-python-sdk)
4
+ [![pypi](https://img.shields.io/pypi/v/videogen)](https://pypi.python.org/pypi/videogen)
5
+
6
+ Official client for the VideoGen Developer API (`https://api.videogen.io`).
7
+
8
+
9
+ ## Table of Contents
10
+
11
+ - [Documentation](#documentation)
12
+ - [Installation](#installation)
13
+ - [Reference](#reference)
14
+ - [Usage](#usage)
15
+ - [Environments](#environments)
16
+ - [Async Client](#async-client)
17
+ - [Exception Handling](#exception-handling)
18
+ - [Advanced](#advanced)
19
+ - [Access Raw Response Data](#access-raw-response-data)
20
+ - [Retries](#retries)
21
+ - [Timeouts](#timeouts)
22
+ - [Custom Client](#custom-client)
23
+ - [Contributing](#contributing)
24
+
25
+ ## Documentation
26
+
27
+ API reference documentation is available [here](https://videogen.docs.buildwithfern.com).
28
+
29
+ ## Installation
30
+
31
+ ```sh
32
+ pip install videogen
33
+ ```
34
+
35
+ ## Reference
36
+
37
+ A full reference for this library is available [here](https://github.com/video-gen/videogen-python-sdk/blob/HEAD/./reference.md).
38
+
39
+ ## Usage
40
+
41
+ Instantiate and use the client with the following:
42
+
43
+ ```python
44
+ from videogen import VideoGenApi
45
+
46
+ client = VideoGenApi(
47
+ token="<token>",
48
+ )
49
+
50
+ client.tools.prompt_to_video_clip(
51
+ prompt="A golden retriever running through a sunlit meadow in slow motion, cinematic",
52
+ )
53
+ ```
54
+
55
+ ## Environments
56
+
57
+ This SDK allows you to configure different environments for API requests.
58
+
59
+ ```python
60
+ from videogen import VideoGenApi
61
+ from videogen.environment import VideoGenApiEnvironment
62
+
63
+ client = VideoGenApi(
64
+ environment=VideoGenApiEnvironment.PRODUCTION,
65
+ )
66
+ ```
67
+
68
+ ## Async Client
69
+
70
+ The SDK also exports an `async` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use `httpx.AsyncClient()` instead of `httpx.Client()` (e.g. for the `httpx_client` parameter of this client).
71
+
72
+ ```python
73
+ import asyncio
74
+
75
+ from videogen import AsyncVideoGenApi
76
+
77
+ client = AsyncVideoGenApi(
78
+ token="<token>",
79
+ )
80
+
81
+
82
+ async def main() -> None:
83
+ await client.tools.prompt_to_video_clip(
84
+ prompt="A golden retriever running through a sunlit meadow in slow motion, cinematic",
85
+ )
86
+
87
+
88
+ asyncio.run(main())
89
+ ```
90
+
91
+ ## Exception Handling
92
+
93
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
94
+ will be thrown.
95
+
96
+ ```python
97
+ from videogen.core.api_error import ApiError
98
+
99
+ try:
100
+ client.tools.prompt_to_video_clip(...)
101
+ except ApiError as e:
102
+ print(e.status_code)
103
+ print(e.body)
104
+ ```
105
+
106
+ ## Advanced
107
+
108
+ ### Access Raw Response Data
109
+
110
+ The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
111
+ The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
112
+
113
+ ```python
114
+ from videogen import VideoGenApi
115
+
116
+ client = VideoGenApi(...)
117
+ response = client.tools.with_raw_response.prompt_to_video_clip(...)
118
+ print(response.headers) # access the response headers
119
+ print(response.status_code) # access the response status code
120
+ print(response.data) # access the underlying object
121
+ ```
122
+
123
+ ### Retries
124
+
125
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
126
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
127
+ retry limit (default: 2).
128
+
129
+ A request is deemed retryable when any of the following HTTP status codes is returned:
130
+
131
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
132
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
133
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
134
+
135
+ Use the `max_retries` request option to configure this behavior.
136
+
137
+ ```python
138
+ client.tools.prompt_to_video_clip(..., request_options={
139
+ "max_retries": 1
140
+ })
141
+ ```
142
+
143
+ ### Timeouts
144
+
145
+ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
146
+
147
+ ```python
148
+ from videogen import VideoGenApi
149
+
150
+ client = VideoGenApi(..., timeout=20.0)
151
+
152
+ # Override timeout for a specific method
153
+ client.tools.prompt_to_video_clip(..., request_options={
154
+ "timeout_in_seconds": 1
155
+ })
156
+ ```
157
+
158
+ ### Custom Client
159
+
160
+ You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
161
+ and transports.
162
+
163
+ ```python
164
+ import httpx
165
+ from videogen import VideoGenApi
166
+
167
+ client = VideoGenApi(
168
+ ...,
169
+ httpx_client=httpx.Client(
170
+ proxy="http://my.test.proxy.example.com",
171
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
172
+ ),
173
+ )
174
+ ```
175
+
176
+ ## Contributing
177
+
178
+ While we value open-source contributions to this SDK, this library is generated programmatically.
179
+ Additions made directly to this library would have to be moved over to our generation code,
180
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
181
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
182
+ an issue first to discuss with us!
183
+
184
+ On the other hand, contributions to the README are always very welcome!
@@ -0,0 +1,109 @@
1
+ [project]
2
+ name = "videogen"
3
+ dynamic = ["version"]
4
+
5
+ [tool.poetry]
6
+ name = "videogen"
7
+ version = "0.0.19"
8
+ description = ""
9
+ readme = "README.md"
10
+ authors = []
11
+ keywords = [
12
+ "videogen",
13
+ "video",
14
+ "ai",
15
+ "generative",
16
+ "api",
17
+ "sdk",
18
+ "text-to-video",
19
+ "text-to-speech",
20
+ "image-generation",
21
+ "video-generation",
22
+ "avatar"
23
+ ]
24
+
25
+ classifiers = [
26
+ "Intended Audience :: Developers",
27
+ "Programming Language :: Python",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3.10",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
32
+ "Programming Language :: Python :: 3.13",
33
+ "Programming Language :: Python :: 3.14",
34
+ "Programming Language :: Python :: 3.15",
35
+ "Operating System :: OS Independent",
36
+ "Operating System :: POSIX",
37
+ "Operating System :: MacOS",
38
+ "Operating System :: POSIX :: Linux",
39
+ "Operating System :: Microsoft :: Windows",
40
+ "Topic :: Software Development :: Libraries :: Python Modules",
41
+ "Typing :: Typed"
42
+ ]
43
+ packages = [
44
+ { include = "videogen", from = "src"}
45
+ ]
46
+
47
+ [tool.poetry.urls]
48
+ Homepage = 'https://videogen.io'
49
+ Repository = 'https://github.com/video-gen/videogen-python-sdk'
50
+
51
+ [tool.poetry.dependencies]
52
+ python = "^3.10"
53
+ aiohttp = { version = ">=3.13.4,<4", optional = true, python = ">=3.9"}
54
+ httpx = ">=0.21.2"
55
+ httpx-aiohttp = { version = "0.1.8", optional = true, python = ">=3.9"}
56
+ pydantic = ">= 1.9.2"
57
+ pydantic-core = ">=2.18.2,<2.44.0"
58
+ typing_extensions = ">= 4.0.0"
59
+
60
+ [tool.poetry.group.dev.dependencies]
61
+ mypy = "==1.13.0"
62
+ pytest = "^9.0.3"
63
+ pytest-asyncio = "^1.0.0"
64
+ pytest-xdist = "^3.6.1"
65
+ python-dateutil = "^2.9.0"
66
+ types-python-dateutil = "^2.9.0.20240316"
67
+ urllib3 = ">=1.26.19,<2.0.0 || >=2.2.2,<3.0.0"
68
+ ruff = "==0.11.5"
69
+
70
+ [tool.pytest.ini_options]
71
+ testpaths = [ "tests" ]
72
+ asyncio_mode = "auto"
73
+ markers = [
74
+ "aiohttp: tests that require httpx_aiohttp to be installed",
75
+ ]
76
+
77
+ [tool.mypy]
78
+ plugins = ["pydantic.mypy"]
79
+
80
+ [tool.ruff]
81
+ line-length = 120
82
+
83
+ [tool.ruff.lint]
84
+ select = [
85
+ "E", # pycodestyle errors
86
+ "F", # pyflakes
87
+ "I", # isort
88
+ ]
89
+ ignore = [
90
+ "E402", # Module level import not at top of file
91
+ "E501", # Line too long
92
+ "E711", # Comparison to `None` should be `cond is not None`
93
+ "E712", # Avoid equality comparisons to `True`; use `if ...:` checks
94
+ "E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks
95
+ "E722", # Do not use bare `except`
96
+ "E731", # Do not assign a `lambda` expression, use a `def`
97
+ "F821", # Undefined name
98
+ "F841" # Local variable ... is assigned to but never used
99
+ ]
100
+
101
+ [tool.ruff.lint.isort]
102
+ section-order = ["future", "standard-library", "third-party", "first-party"]
103
+
104
+ [build-system]
105
+ requires = ["poetry-core"]
106
+ build-backend = "poetry.core.masonry.api"
107
+
108
+ [tool.poetry.extras]
109
+ aiohttp=["aiohttp", "httpx-aiohttp"]
@@ -0,0 +1,176 @@
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 (
10
+ ApiError,
11
+ AspectRatio,
12
+ AvatarPresenter,
13
+ AvatarPresenterDisplayableGender,
14
+ AvatarPresenterListResponse,
15
+ ExecutedTool,
16
+ ExecutedToolStatus,
17
+ FileSource,
18
+ FileSourceStatus,
19
+ FileUploadResponse,
20
+ FileUploadWebhookEventName,
21
+ FileUploadWebhookPayload,
22
+ GetFilesResponse,
23
+ ImageAssetRequest,
24
+ PronunciationReplacement,
25
+ SearchFilesResponse,
26
+ SearchFilesResult,
27
+ StartToolExecutionResponse,
28
+ StorageFile,
29
+ StorageFileScope,
30
+ StorageFileType,
31
+ ToolExecutionWebhookEventName,
32
+ ToolExecutionWebhookPayload,
33
+ ToolSuccessResult,
34
+ ToolSuccessResultType,
35
+ TtsVoice,
36
+ TtsVoiceDisplayGender,
37
+ TtsVoiceListResponse,
38
+ VideoAssetRequest,
39
+ WebhookEndpoint,
40
+ WebhookEndpointListResponse,
41
+ WebhookEventName,
42
+ )
43
+ from . import files, resources, tools, webhooks
44
+ from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
45
+ from .client import AsyncVideoGenApi, VideoGenApi
46
+ from .download_file import download_file
47
+ from .environment import VideoGenApiEnvironment
48
+ from .files import CreateFileUploadRequestType
49
+ from .get_hydrated_file import get_hydrated_file
50
+ from .poll_executed_tool import poll_executed_tool
51
+ from .upload_file import upload_file
52
+ from .verify_webhook_signature import verify_webhook_signature
53
+ from .version import __version__
54
+ _dynamic_imports: typing.Dict[str, str] = {
55
+ "ApiError": ".types",
56
+ "AspectRatio": ".types",
57
+ "AsyncVideoGenApi": ".client",
58
+ "AvatarPresenter": ".types",
59
+ "AvatarPresenterDisplayableGender": ".types",
60
+ "AvatarPresenterListResponse": ".types",
61
+ "CreateFileUploadRequestType": ".files",
62
+ "DefaultAioHttpClient": "._default_clients",
63
+ "DefaultAsyncHttpxClient": "._default_clients",
64
+ "ExecutedTool": ".types",
65
+ "ExecutedToolStatus": ".types",
66
+ "FileSource": ".types",
67
+ "FileSourceStatus": ".types",
68
+ "FileUploadResponse": ".types",
69
+ "FileUploadWebhookEventName": ".types",
70
+ "FileUploadWebhookPayload": ".types",
71
+ "GetFilesResponse": ".types",
72
+ "ImageAssetRequest": ".types",
73
+ "PronunciationReplacement": ".types",
74
+ "SearchFilesResponse": ".types",
75
+ "SearchFilesResult": ".types",
76
+ "StartToolExecutionResponse": ".types",
77
+ "StorageFile": ".types",
78
+ "StorageFileScope": ".types",
79
+ "StorageFileType": ".types",
80
+ "ToolExecutionWebhookEventName": ".types",
81
+ "ToolExecutionWebhookPayload": ".types",
82
+ "ToolSuccessResult": ".types",
83
+ "ToolSuccessResultType": ".types",
84
+ "TtsVoice": ".types",
85
+ "TtsVoiceDisplayGender": ".types",
86
+ "TtsVoiceListResponse": ".types",
87
+ "VideoAssetRequest": ".types",
88
+ "VideoGenApi": ".client",
89
+ "VideoGenApiEnvironment": ".environment",
90
+ "WebhookEndpoint": ".types",
91
+ "WebhookEndpointListResponse": ".types",
92
+ "WebhookEventName": ".types",
93
+ "__version__": ".version",
94
+ "download_file": ".download_file",
95
+ "files": ".files",
96
+ "get_hydrated_file": ".get_hydrated_file",
97
+ "poll_executed_tool": ".poll_executed_tool",
98
+ "resources": ".resources",
99
+ "tools": ".tools",
100
+ "upload_file": ".upload_file",
101
+ "verify_webhook_signature": ".verify_webhook_signature",
102
+ "webhooks": ".webhooks",
103
+ }
104
+
105
+
106
+ def __getattr__(attr_name: str) -> typing.Any:
107
+ module_name = _dynamic_imports.get(attr_name)
108
+ if module_name is None:
109
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
110
+ try:
111
+ module = import_module(module_name, __package__)
112
+ if module_name == f".{attr_name}":
113
+ return module
114
+ else:
115
+ return getattr(module, attr_name)
116
+ except ImportError as e:
117
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
118
+ except AttributeError as e:
119
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
120
+
121
+
122
+ def __dir__():
123
+ lazy_attrs = list(_dynamic_imports.keys())
124
+ return sorted(lazy_attrs)
125
+
126
+
127
+ __all__ = [
128
+ "ApiError",
129
+ "AspectRatio",
130
+ "AsyncVideoGenApi",
131
+ "AvatarPresenter",
132
+ "AvatarPresenterDisplayableGender",
133
+ "AvatarPresenterListResponse",
134
+ "CreateFileUploadRequestType",
135
+ "DefaultAioHttpClient",
136
+ "DefaultAsyncHttpxClient",
137
+ "ExecutedTool",
138
+ "ExecutedToolStatus",
139
+ "FileSource",
140
+ "FileSourceStatus",
141
+ "FileUploadResponse",
142
+ "FileUploadWebhookEventName",
143
+ "FileUploadWebhookPayload",
144
+ "GetFilesResponse",
145
+ "ImageAssetRequest",
146
+ "PronunciationReplacement",
147
+ "SearchFilesResponse",
148
+ "SearchFilesResult",
149
+ "StartToolExecutionResponse",
150
+ "StorageFile",
151
+ "StorageFileScope",
152
+ "StorageFileType",
153
+ "ToolExecutionWebhookEventName",
154
+ "ToolExecutionWebhookPayload",
155
+ "ToolSuccessResult",
156
+ "ToolSuccessResultType",
157
+ "TtsVoice",
158
+ "TtsVoiceDisplayGender",
159
+ "TtsVoiceListResponse",
160
+ "VideoAssetRequest",
161
+ "VideoGenApi",
162
+ "VideoGenApiEnvironment",
163
+ "WebhookEndpoint",
164
+ "WebhookEndpointListResponse",
165
+ "WebhookEventName",
166
+ "__version__",
167
+ "download_file",
168
+ "files",
169
+ "get_hydrated_file",
170
+ "poll_executed_tool",
171
+ "resources",
172
+ "tools",
173
+ "upload_file",
174
+ "verify_webhook_signature",
175
+ "webhooks",
176
+ ]