murf 1.0.2__py3-none-any.whl → 1.1.1__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 murf might be problematic. Click here for more details.

Files changed (36) hide show
  1. murf/__init__.py +28 -1
  2. murf/base_client.py +4 -0
  3. murf/client.py +3 -1
  4. murf/core/client_wrapper.py +1 -1
  5. murf/dubbing/__init__.py +14 -0
  6. murf/dubbing/client.py +26 -0
  7. murf/dubbing/jobs/__init__.py +5 -0
  8. murf/dubbing/jobs/client.py +712 -0
  9. murf/dubbing/jobs/types/__init__.py +6 -0
  10. murf/dubbing/jobs/types/jobs_create_request_priority.py +5 -0
  11. murf/dubbing/jobs/types/jobs_create_with_project_id_request_priority.py +5 -0
  12. murf/dubbing/languages/__init__.py +2 -0
  13. murf/dubbing/languages/client.py +369 -0
  14. murf/dubbing/projects/__init__.py +5 -0
  15. murf/dubbing/projects/client.py +682 -0
  16. murf/dubbing/projects/types/__init__.py +5 -0
  17. murf/dubbing/projects/types/api_create_project_request_dubbing_type.py +5 -0
  18. murf/dubbing_client.py +120 -0
  19. murf/types/__init__.py +24 -0
  20. murf/types/api_job_response.py +53 -0
  21. murf/types/api_job_response_dubbing_type.py +5 -0
  22. murf/types/api_job_response_priority.py +5 -0
  23. murf/types/api_project_response.py +44 -0
  24. murf/types/api_project_response_dubbing_type.py +5 -0
  25. murf/types/dub_api_detail_response.py +23 -0
  26. murf/types/dub_job_status_response.py +39 -0
  27. murf/types/form_data_content_disposition.py +31 -0
  28. murf/types/group_api_project_response.py +24 -0
  29. murf/types/locale_response.py +25 -0
  30. murf/types/locale_response_supports_item.py +5 -0
  31. murf/types/source_locale_response.py +20 -0
  32. {murf-1.0.2.dist-info → murf-1.1.1.dist-info}/METADATA +65 -15
  33. murf-1.1.1.dist-info/RECORD +70 -0
  34. murf-1.0.2.dist-info/RECORD +0 -44
  35. {murf-1.0.2.dist-info → murf-1.1.1.dist-info}/LICENSE +0 -0
  36. {murf-1.0.2.dist-info → murf-1.1.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,6 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .jobs_create_request_priority import JobsCreateRequestPriority
4
+ from .jobs_create_with_project_id_request_priority import JobsCreateWithProjectIdRequestPriority
5
+
6
+ __all__ = ["JobsCreateRequestPriority", "JobsCreateWithProjectIdRequestPriority"]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ JobsCreateRequestPriority = typing.Union[typing.Literal["LOW", "NORMAL", "HIGH"], typing.Any]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ JobsCreateWithProjectIdRequestPriority = typing.Union[typing.Literal["LOW", "NORMAL", "HIGH"], typing.Any]
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,369 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.client_wrapper import SyncClientWrapper
4
+ import typing
5
+ from ...core.request_options import RequestOptions
6
+ from ...types.locale_response import LocaleResponse
7
+ from ...core.pydantic_utilities import parse_obj_as
8
+ from ...errors.bad_request_error import BadRequestError
9
+ from ...errors.forbidden_error import ForbiddenError
10
+ from ...errors.internal_server_error import InternalServerError
11
+ from ...errors.service_unavailable_error import ServiceUnavailableError
12
+ from json.decoder import JSONDecodeError
13
+ from ...core.api_error import ApiError
14
+ from ...types.source_locale_response import SourceLocaleResponse
15
+ from ...core.client_wrapper import AsyncClientWrapper
16
+
17
+
18
+ class LanguagesClient:
19
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
20
+ self._client_wrapper = client_wrapper
21
+
22
+ def list_destination_languages(
23
+ self, *, request_options: typing.Optional[RequestOptions] = None
24
+ ) -> typing.List[LocaleResponse]:
25
+ """
26
+ Parameters
27
+ ----------
28
+ request_options : typing.Optional[RequestOptions]
29
+ Request-specific configuration.
30
+
31
+ Returns
32
+ -------
33
+ typing.List[LocaleResponse]
34
+ Ok
35
+
36
+ Examples
37
+ --------
38
+ from murf import Murf
39
+
40
+ client = Murf(
41
+ api_key="YOUR_API_KEY",
42
+ )
43
+ client.dubbing.languages.list_destination_languages()
44
+ """
45
+ _response = self._client_wrapper.httpx_client.request(
46
+ "v1/murfdub/list-destination-languages",
47
+ method="GET",
48
+ request_options=request_options,
49
+ )
50
+ try:
51
+ if 200 <= _response.status_code < 300:
52
+ return typing.cast(
53
+ typing.List[LocaleResponse],
54
+ parse_obj_as(
55
+ type_=typing.List[LocaleResponse], # type: ignore
56
+ object_=_response.json(),
57
+ ),
58
+ )
59
+ if _response.status_code == 400:
60
+ raise BadRequestError(
61
+ typing.cast(
62
+ typing.Optional[typing.Any],
63
+ parse_obj_as(
64
+ type_=typing.Optional[typing.Any], # type: ignore
65
+ object_=_response.json(),
66
+ ),
67
+ )
68
+ )
69
+ if _response.status_code == 403:
70
+ raise ForbiddenError(
71
+ typing.cast(
72
+ typing.Optional[typing.Any],
73
+ parse_obj_as(
74
+ type_=typing.Optional[typing.Any], # type: ignore
75
+ object_=_response.json(),
76
+ ),
77
+ )
78
+ )
79
+ if _response.status_code == 500:
80
+ raise InternalServerError(
81
+ typing.cast(
82
+ typing.Optional[typing.Any],
83
+ parse_obj_as(
84
+ type_=typing.Optional[typing.Any], # type: ignore
85
+ object_=_response.json(),
86
+ ),
87
+ )
88
+ )
89
+ if _response.status_code == 503:
90
+ raise ServiceUnavailableError(
91
+ typing.cast(
92
+ typing.Optional[typing.Any],
93
+ parse_obj_as(
94
+ type_=typing.Optional[typing.Any], # type: ignore
95
+ object_=_response.json(),
96
+ ),
97
+ )
98
+ )
99
+ _response_json = _response.json()
100
+ except JSONDecodeError:
101
+ raise ApiError(status_code=_response.status_code, body=_response.text)
102
+ raise ApiError(status_code=_response.status_code, body=_response_json)
103
+
104
+ def list_source_languages(
105
+ self, *, request_options: typing.Optional[RequestOptions] = None
106
+ ) -> typing.List[SourceLocaleResponse]:
107
+ """
108
+ Parameters
109
+ ----------
110
+ request_options : typing.Optional[RequestOptions]
111
+ Request-specific configuration.
112
+
113
+ Returns
114
+ -------
115
+ typing.List[SourceLocaleResponse]
116
+ Ok
117
+
118
+ Examples
119
+ --------
120
+ from murf import Murf
121
+
122
+ client = Murf(
123
+ api_key="YOUR_API_KEY",
124
+ )
125
+ client.dubbing.languages.list_source_languages()
126
+ """
127
+ _response = self._client_wrapper.httpx_client.request(
128
+ "v1/murfdub/list-source-languages",
129
+ method="GET",
130
+ request_options=request_options,
131
+ )
132
+ try:
133
+ if 200 <= _response.status_code < 300:
134
+ return typing.cast(
135
+ typing.List[SourceLocaleResponse],
136
+ parse_obj_as(
137
+ type_=typing.List[SourceLocaleResponse], # type: ignore
138
+ object_=_response.json(),
139
+ ),
140
+ )
141
+ if _response.status_code == 400:
142
+ raise BadRequestError(
143
+ typing.cast(
144
+ typing.Optional[typing.Any],
145
+ parse_obj_as(
146
+ type_=typing.Optional[typing.Any], # type: ignore
147
+ object_=_response.json(),
148
+ ),
149
+ )
150
+ )
151
+ if _response.status_code == 403:
152
+ raise ForbiddenError(
153
+ typing.cast(
154
+ typing.Optional[typing.Any],
155
+ parse_obj_as(
156
+ type_=typing.Optional[typing.Any], # type: ignore
157
+ object_=_response.json(),
158
+ ),
159
+ )
160
+ )
161
+ if _response.status_code == 500:
162
+ raise InternalServerError(
163
+ typing.cast(
164
+ typing.Optional[typing.Any],
165
+ parse_obj_as(
166
+ type_=typing.Optional[typing.Any], # type: ignore
167
+ object_=_response.json(),
168
+ ),
169
+ )
170
+ )
171
+ if _response.status_code == 503:
172
+ raise ServiceUnavailableError(
173
+ typing.cast(
174
+ typing.Optional[typing.Any],
175
+ parse_obj_as(
176
+ type_=typing.Optional[typing.Any], # type: ignore
177
+ object_=_response.json(),
178
+ ),
179
+ )
180
+ )
181
+ _response_json = _response.json()
182
+ except JSONDecodeError:
183
+ raise ApiError(status_code=_response.status_code, body=_response.text)
184
+ raise ApiError(status_code=_response.status_code, body=_response_json)
185
+
186
+
187
+ class AsyncLanguagesClient:
188
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
189
+ self._client_wrapper = client_wrapper
190
+
191
+ async def list_destination_languages(
192
+ self, *, request_options: typing.Optional[RequestOptions] = None
193
+ ) -> typing.List[LocaleResponse]:
194
+ """
195
+ Parameters
196
+ ----------
197
+ request_options : typing.Optional[RequestOptions]
198
+ Request-specific configuration.
199
+
200
+ Returns
201
+ -------
202
+ typing.List[LocaleResponse]
203
+ Ok
204
+
205
+ Examples
206
+ --------
207
+ import asyncio
208
+
209
+ from murf import AsyncMurf
210
+
211
+ client = AsyncMurf(
212
+ api_key="YOUR_API_KEY",
213
+ )
214
+
215
+
216
+ async def main() -> None:
217
+ await client.dubbing.languages.list_destination_languages()
218
+
219
+
220
+ asyncio.run(main())
221
+ """
222
+ _response = await self._client_wrapper.httpx_client.request(
223
+ "v1/murfdub/list-destination-languages",
224
+ method="GET",
225
+ request_options=request_options,
226
+ )
227
+ try:
228
+ if 200 <= _response.status_code < 300:
229
+ return typing.cast(
230
+ typing.List[LocaleResponse],
231
+ parse_obj_as(
232
+ type_=typing.List[LocaleResponse], # type: ignore
233
+ object_=_response.json(),
234
+ ),
235
+ )
236
+ if _response.status_code == 400:
237
+ raise BadRequestError(
238
+ typing.cast(
239
+ typing.Optional[typing.Any],
240
+ parse_obj_as(
241
+ type_=typing.Optional[typing.Any], # type: ignore
242
+ object_=_response.json(),
243
+ ),
244
+ )
245
+ )
246
+ if _response.status_code == 403:
247
+ raise ForbiddenError(
248
+ typing.cast(
249
+ typing.Optional[typing.Any],
250
+ parse_obj_as(
251
+ type_=typing.Optional[typing.Any], # type: ignore
252
+ object_=_response.json(),
253
+ ),
254
+ )
255
+ )
256
+ if _response.status_code == 500:
257
+ raise InternalServerError(
258
+ typing.cast(
259
+ typing.Optional[typing.Any],
260
+ parse_obj_as(
261
+ type_=typing.Optional[typing.Any], # type: ignore
262
+ object_=_response.json(),
263
+ ),
264
+ )
265
+ )
266
+ if _response.status_code == 503:
267
+ raise ServiceUnavailableError(
268
+ typing.cast(
269
+ typing.Optional[typing.Any],
270
+ parse_obj_as(
271
+ type_=typing.Optional[typing.Any], # type: ignore
272
+ object_=_response.json(),
273
+ ),
274
+ )
275
+ )
276
+ _response_json = _response.json()
277
+ except JSONDecodeError:
278
+ raise ApiError(status_code=_response.status_code, body=_response.text)
279
+ raise ApiError(status_code=_response.status_code, body=_response_json)
280
+
281
+ async def list_source_languages(
282
+ self, *, request_options: typing.Optional[RequestOptions] = None
283
+ ) -> typing.List[SourceLocaleResponse]:
284
+ """
285
+ Parameters
286
+ ----------
287
+ request_options : typing.Optional[RequestOptions]
288
+ Request-specific configuration.
289
+
290
+ Returns
291
+ -------
292
+ typing.List[SourceLocaleResponse]
293
+ Ok
294
+
295
+ Examples
296
+ --------
297
+ import asyncio
298
+
299
+ from murf import AsyncMurf
300
+
301
+ client = AsyncMurf(
302
+ api_key="YOUR_API_KEY",
303
+ )
304
+
305
+
306
+ async def main() -> None:
307
+ await client.dubbing.languages.list_source_languages()
308
+
309
+
310
+ asyncio.run(main())
311
+ """
312
+ _response = await self._client_wrapper.httpx_client.request(
313
+ "v1/murfdub/list-source-languages",
314
+ method="GET",
315
+ request_options=request_options,
316
+ )
317
+ try:
318
+ if 200 <= _response.status_code < 300:
319
+ return typing.cast(
320
+ typing.List[SourceLocaleResponse],
321
+ parse_obj_as(
322
+ type_=typing.List[SourceLocaleResponse], # type: ignore
323
+ object_=_response.json(),
324
+ ),
325
+ )
326
+ if _response.status_code == 400:
327
+ raise BadRequestError(
328
+ typing.cast(
329
+ typing.Optional[typing.Any],
330
+ parse_obj_as(
331
+ type_=typing.Optional[typing.Any], # type: ignore
332
+ object_=_response.json(),
333
+ ),
334
+ )
335
+ )
336
+ if _response.status_code == 403:
337
+ raise ForbiddenError(
338
+ typing.cast(
339
+ typing.Optional[typing.Any],
340
+ parse_obj_as(
341
+ type_=typing.Optional[typing.Any], # type: ignore
342
+ object_=_response.json(),
343
+ ),
344
+ )
345
+ )
346
+ if _response.status_code == 500:
347
+ raise InternalServerError(
348
+ typing.cast(
349
+ typing.Optional[typing.Any],
350
+ parse_obj_as(
351
+ type_=typing.Optional[typing.Any], # type: ignore
352
+ object_=_response.json(),
353
+ ),
354
+ )
355
+ )
356
+ if _response.status_code == 503:
357
+ raise ServiceUnavailableError(
358
+ typing.cast(
359
+ typing.Optional[typing.Any],
360
+ parse_obj_as(
361
+ type_=typing.Optional[typing.Any], # type: ignore
362
+ object_=_response.json(),
363
+ ),
364
+ )
365
+ )
366
+ _response_json = _response.json()
367
+ except JSONDecodeError:
368
+ raise ApiError(status_code=_response.status_code, body=_response.text)
369
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import ApiCreateProjectRequestDubbingType
4
+
5
+ __all__ = ["ApiCreateProjectRequestDubbingType"]