magic_hour 0.37.0__py3-none-any.whl → 0.38.0__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 magic_hour might be problematic. Click here for more details.

magic_hour/environment.py CHANGED
@@ -6,7 +6,7 @@ class Environment(enum.Enum):
6
6
  """Pre-defined base URLs for the API"""
7
7
 
8
8
  ENVIRONMENT = "https://api.magichour.ai"
9
- MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.37.0"
9
+ MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.38.0"
10
10
 
11
11
 
12
12
  def _get_base_url(
@@ -1,4 +1,5 @@
1
1
  import typing
2
+ import typing_extensions
2
3
 
3
4
  from magic_hour.helpers.logger import get_sdk_logger
4
5
  from magic_hour.resources.v1.image_projects.client import (
@@ -85,6 +86,10 @@ class AiGifGeneratorClient:
85
86
  name: typing.Union[
86
87
  typing.Optional[str], type_utils.NotGiven
87
88
  ] = type_utils.NOT_GIVEN,
89
+ output_format: typing.Union[
90
+ typing.Optional[typing_extensions.Literal["gif", "mp4", "webm"]],
91
+ type_utils.NotGiven,
92
+ ] = type_utils.NOT_GIVEN,
88
93
  request_options: typing.Optional[RequestOptions] = None,
89
94
  ) -> models.V1AiGifGeneratorCreateResponse:
90
95
  """
@@ -96,6 +101,7 @@ class AiGifGeneratorClient:
96
101
 
97
102
  Args:
98
103
  name: The name of gif. This value is mainly used for your own identification of the gif.
104
+ output_format: The output file format for the generated animation.
99
105
  style: V1AiGifGeneratorCreateBodyStyle
100
106
  request_options: Additional options to customize the HTTP request
101
107
 
@@ -109,12 +115,14 @@ class AiGifGeneratorClient:
109
115
  Examples:
110
116
  ```py
111
117
  client.v1.ai_gif_generator.create(
112
- style={"prompt": "Cute dancing cat, pixel art"}, name="Ai Gif gif"
118
+ style={"prompt": "Cute dancing cat, pixel art"},
119
+ name="Ai Gif gif",
120
+ output_format="gif",
113
121
  )
114
122
  ```
115
123
  """
116
124
  _json = to_encodable(
117
- item={"name": name, "style": style},
125
+ item={"name": name, "output_format": output_format, "style": style},
118
126
  dump_with=params._SerializerV1AiGifGeneratorCreateBody,
119
127
  )
120
128
  return self._base_client.request(
@@ -193,6 +201,10 @@ class AsyncAiGifGeneratorClient:
193
201
  name: typing.Union[
194
202
  typing.Optional[str], type_utils.NotGiven
195
203
  ] = type_utils.NOT_GIVEN,
204
+ output_format: typing.Union[
205
+ typing.Optional[typing_extensions.Literal["gif", "mp4", "webm"]],
206
+ type_utils.NotGiven,
207
+ ] = type_utils.NOT_GIVEN,
196
208
  request_options: typing.Optional[RequestOptions] = None,
197
209
  ) -> models.V1AiGifGeneratorCreateResponse:
198
210
  """
@@ -204,6 +216,7 @@ class AsyncAiGifGeneratorClient:
204
216
 
205
217
  Args:
206
218
  name: The name of gif. This value is mainly used for your own identification of the gif.
219
+ output_format: The output file format for the generated animation.
207
220
  style: V1AiGifGeneratorCreateBodyStyle
208
221
  request_options: Additional options to customize the HTTP request
209
222
 
@@ -217,12 +230,14 @@ class AsyncAiGifGeneratorClient:
217
230
  Examples:
218
231
  ```py
219
232
  await client.v1.ai_gif_generator.create(
220
- style={"prompt": "Cute dancing cat, pixel art"}, name="Ai Gif gif"
233
+ style={"prompt": "Cute dancing cat, pixel art"},
234
+ name="Ai Gif gif",
235
+ output_format="gif",
221
236
  )
222
237
  ```
223
238
  """
224
239
  _json = to_encodable(
225
- item={"name": name, "style": style},
240
+ item={"name": name, "output_format": output_format, "style": style},
226
241
  dump_with=params._SerializerV1AiGifGeneratorCreateBody,
227
242
  )
228
243
  return await self._base_client.request(
@@ -18,6 +18,13 @@ class V1AiGifGeneratorCreateBody(typing_extensions.TypedDict):
18
18
  The name of gif. This value is mainly used for your own identification of the gif.
19
19
  """
20
20
 
21
+ output_format: typing_extensions.NotRequired[
22
+ typing_extensions.Literal["gif", "mp4", "webm"]
23
+ ]
24
+ """
25
+ The output file format for the generated animation.
26
+ """
27
+
21
28
  style: typing_extensions.Required[V1AiGifGeneratorCreateBodyStyle]
22
29
 
23
30
 
@@ -32,6 +39,9 @@ class _SerializerV1AiGifGeneratorCreateBody(pydantic.BaseModel):
32
39
  )
33
40
 
34
41
  name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
42
+ output_format: typing.Optional[typing_extensions.Literal["gif", "mp4", "webm"]] = (
43
+ pydantic.Field(alias="output_format", default=None)
44
+ )
35
45
  style: _SerializerV1AiGifGeneratorCreateBodyStyle = pydantic.Field(
36
46
  alias="style",
37
47
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: magic_hour
3
- Version: 0.37.0
3
+ Version: 0.38.0
4
4
  Summary: Python SDK for Magic Hour API
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,7 +1,7 @@
1
1
  magic_hour/README.md,sha256=SHZliiOYgWe_XUUYVCnIQCS5a7Fq41p6IgP-3JCxR_I,2151
2
2
  magic_hour/__init__.py,sha256=ypWA4msPy3T-U2PAyRSAXIQc0m2J9aY8wXnfmIupAEc,214
3
3
  magic_hour/client.py,sha256=oHuz0FRKuedtwwPSkFLaSjoEWt_0N57hJ0rEDKbNcFw,1712
4
- magic_hour/environment.py,sha256=Ymvzle58kJe63TRqf9fF4-4BujsifTRWFgPr9rngPJM,535
4
+ magic_hour/environment.py,sha256=kz3Dnxp5IGdzcV-CZlwuTvpgUoplyrvQ2a_BL17J2wc,535
5
5
  magic_hour/helpers/__init__.py,sha256=pO6sgb41iVe_IN2dApfl2l3BXOWIb4i5pHl_if-oo_E,176
6
6
  magic_hour/helpers/download.py,sha256=wZR-gddqU2rWzltHN2zqqaHaShHG33yx7BIlUn1jXG8,2212
7
7
  magic_hour/helpers/logger.py,sha256=Z8ljney670Kc8DaSzlHdH9N8RXmj2_qWPovLUoC0tNY,210
@@ -15,7 +15,7 @@ magic_hour/resources/v1/ai_face_editor/__init__.py,sha256=RY8GBMQcqsDFbFcUuK-4LP
15
15
  magic_hour/resources/v1/ai_face_editor/client.py,sha256=qo8Lj7s0a9vanOMzWb5lw0FyrrcstQ-kUvfBkiBipGY,12313
16
16
  magic_hour/resources/v1/ai_gif_generator/README.md,sha256=DLJAKNRfYfYhBJCITT5Qin68GLWHaFy6rB6XWTB_JVo,2951
17
17
  magic_hour/resources/v1/ai_gif_generator/__init__.py,sha256=SG_WmxUnpQWlfNQoHfdXPEGQEPC0WZPgom8ATaR9jiY,134
18
- magic_hour/resources/v1/ai_gif_generator/client.py,sha256=lwRYD_6IGxoI29I2USWZedL_rKOH-25IANgh1hebq7k,8205
18
+ magic_hour/resources/v1/ai_gif_generator/client.py,sha256=0jxcwQhgcrQVPNMQDk3nJvYMI8gCZbG7INXpzbtc8XQ,8908
19
19
  magic_hour/resources/v1/ai_headshot_generator/README.md,sha256=1ysCdQ9Z_ijmr3O2o7gjJdDh3S35HfEEzRmrNRm29qM,3859
20
20
  magic_hour/resources/v1/ai_headshot_generator/__init__.py,sha256=4WZ3jfrL2yPhQaPalMJrUEykwUoF3KBtop2VJEij-0s,154
21
21
  magic_hour/resources/v1/ai_headshot_generator/client.py,sha256=Ts_aLrp6M825opYZsJ66g1Ma4XOzvKwNdVFmUC4KSkQ,9979
@@ -131,7 +131,7 @@ magic_hour/types/params/v1_ai_face_editor_create_body.py,sha256=3Ryr4npOkAdIPzs1
131
131
  magic_hour/types/params/v1_ai_face_editor_create_body_assets.py,sha256=HA9v6_tdKgvNcJ-NIhd_tWoVJONThDKOkcy59HtKxJk,1015
132
132
  magic_hour/types/params/v1_ai_face_editor_create_body_style.py,sha256=vhU38XF6e1VBefYDLxMAvECgMkcQMxGdrQgge2t_o0M,3983
133
133
  magic_hour/types/params/v1_ai_face_editor_generate_body_assets.py,sha256=pbj_4o83Vod7LImuXuJbNyz-4MN0gDalO_8wOOBQ68I,521
134
- magic_hour/types/params/v1_ai_gif_generator_create_body.py,sha256=LIZS30j6Awal-eSAZdf5gN5ahCkCizS7kkmEsQWrtGM,986
134
+ magic_hour/types/params/v1_ai_gif_generator_create_body.py,sha256=hge1E7m4zxoYm0hFiTJqFRyP0IN5YL91UiuC9aam-2Q,1325
135
135
  magic_hour/types/params/v1_ai_gif_generator_create_body_style.py,sha256=xefwoS15Iu9sbhc8oszcH8otTamk-ZTvSMuV1qvcYuQ,611
136
136
  magic_hour/types/params/v1_ai_headshot_generator_create_body.py,sha256=rvvvXsVLP2xQ4dEeShGorCwwdFKbhRmGOCK5cJOd3Ks,1474
137
137
  magic_hour/types/params/v1_ai_headshot_generator_create_body_assets.py,sha256=iogqsl75ReVEhhslFccrNjUaXfHdcul8eqvWZ9QPABw,1080
@@ -203,7 +203,7 @@ magic_hour/types/params/v1_video_to_video_create_body.py,sha256=BV52jJcXnOsKaw-M
203
203
  magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=XwdoqT1x5ElcWb6qUfmtabNsyaatEsOygB4gJ154y-M,1660
204
204
  magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=RrDBhN2KQnCf9hGsnl3sAYvuFRsxth2JXfe5la0IYJg,5749
205
205
  magic_hour/types/params/v1_video_to_video_generate_body_assets.py,sha256=j06Y1RKZKwEXW9Zdfhr3Lntx7eDAKpH-k1N1XkKuqPM,915
206
- magic_hour-0.37.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
207
- magic_hour-0.37.0.dist-info/METADATA,sha256=1jJXRS0HMa7TE55FY0RCbSqwauGcPgjZGkiPNVGekCA,12559
208
- magic_hour-0.37.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
209
- magic_hour-0.37.0.dist-info/RECORD,,
206
+ magic_hour-0.38.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
207
+ magic_hour-0.38.0.dist-info/METADATA,sha256=f6WGHhB4bOVyYK-MUWn0fFEK-ky88JwIxw5W0zdM24Q,12559
208
+ magic_hour-0.38.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
209
+ magic_hour-0.38.0.dist-info/RECORD,,