magic_hour 0.17.0__py3-none-any.whl → 0.18.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
@@ -5,4 +5,4 @@ class Environment(enum.Enum):
5
5
  """Pre-defined base URLs for the API"""
6
6
 
7
7
  ENVIRONMENT = "https://api.magichour.ai"
8
- MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.17.0"
8
+ MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.18.0"
@@ -19,10 +19,10 @@ client = Client(token=getenv("API_TOKEN"))
19
19
  res = client.v1.image_to_video.create(
20
20
  assets={"image_file_path": "api-assets/id/1234.png"},
21
21
  end_seconds=5.0,
22
- height=960,
23
22
  style={"prompt": "a dog running"},
24
- width=512,
23
+ height=960,
25
24
  name="Image To Video video",
25
+ width=512,
26
26
  )
27
27
  ```
28
28
 
@@ -36,9 +36,9 @@ client = AsyncClient(token=getenv("API_TOKEN"))
36
36
  res = await client.v1.image_to_video.create(
37
37
  assets={"image_file_path": "api-assets/id/1234.png"},
38
38
  end_seconds=5.0,
39
- height=960,
40
39
  style={"prompt": "a dog running"},
41
- width=512,
40
+ height=960,
42
41
  name="Image To Video video",
42
+ width=512,
43
43
  )
44
44
  ```
@@ -20,12 +20,16 @@ class ImageToVideoClient:
20
20
  *,
21
21
  assets: params.V1ImageToVideoCreateBodyAssets,
22
22
  end_seconds: float,
23
- height: int,
24
23
  style: params.V1ImageToVideoCreateBodyStyle,
25
- width: int,
24
+ height: typing.Union[
25
+ typing.Optional[int], type_utils.NotGiven
26
+ ] = type_utils.NOT_GIVEN,
26
27
  name: typing.Union[
27
28
  typing.Optional[str], type_utils.NotGiven
28
29
  ] = type_utils.NOT_GIVEN,
30
+ width: typing.Union[
31
+ typing.Optional[int], type_utils.NotGiven
32
+ ] = type_utils.NOT_GIVEN,
29
33
  request_options: typing.Optional[RequestOptions] = None,
30
34
  ) -> models.V1ImageToVideoCreateResponse:
31
35
  """
@@ -39,12 +43,16 @@ class ImageToVideoClient:
39
43
  POST /v1/image-to-video
40
44
 
41
45
  Args:
46
+ height: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
47
+
48
+ It is retained solely for backward compatibility and will be deprecated in the future.
42
49
  name: The name of video
50
+ width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
51
+
52
+ It is retained solely for backward compatibility and will be deprecated in the future.
43
53
  assets: Provide the assets for image-to-video.
44
54
  end_seconds: The total duration of the output video in seconds.
45
- height: The height of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
46
55
  style: Attributed used to dictate the style of the output
47
- width: The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
48
56
  request_options: Additional options to customize the HTTP request
49
57
 
50
58
  Returns:
@@ -59,21 +67,21 @@ class ImageToVideoClient:
59
67
  client.v1.image_to_video.create(
60
68
  assets={"image_file_path": "api-assets/id/1234.png"},
61
69
  end_seconds=5.0,
62
- height=960,
63
70
  style={"prompt": "a dog running"},
64
- width=512,
71
+ height=960,
65
72
  name="Image To Video video",
73
+ width=512,
66
74
  )
67
75
  ```
68
76
  """
69
77
  _json = to_encodable(
70
78
  item={
79
+ "height": height,
71
80
  "name": name,
81
+ "width": width,
72
82
  "assets": assets,
73
83
  "end_seconds": end_seconds,
74
- "height": height,
75
84
  "style": style,
76
- "width": width,
77
85
  },
78
86
  dump_with=params._SerializerV1ImageToVideoCreateBody,
79
87
  )
@@ -96,12 +104,16 @@ class AsyncImageToVideoClient:
96
104
  *,
97
105
  assets: params.V1ImageToVideoCreateBodyAssets,
98
106
  end_seconds: float,
99
- height: int,
100
107
  style: params.V1ImageToVideoCreateBodyStyle,
101
- width: int,
108
+ height: typing.Union[
109
+ typing.Optional[int], type_utils.NotGiven
110
+ ] = type_utils.NOT_GIVEN,
102
111
  name: typing.Union[
103
112
  typing.Optional[str], type_utils.NotGiven
104
113
  ] = type_utils.NOT_GIVEN,
114
+ width: typing.Union[
115
+ typing.Optional[int], type_utils.NotGiven
116
+ ] = type_utils.NOT_GIVEN,
105
117
  request_options: typing.Optional[RequestOptions] = None,
106
118
  ) -> models.V1ImageToVideoCreateResponse:
107
119
  """
@@ -115,12 +127,16 @@ class AsyncImageToVideoClient:
115
127
  POST /v1/image-to-video
116
128
 
117
129
  Args:
130
+ height: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
131
+
132
+ It is retained solely for backward compatibility and will be deprecated in the future.
118
133
  name: The name of video
134
+ width: This field does not affect the output video's resolution. The video's orientation will match that of the input image.
135
+
136
+ It is retained solely for backward compatibility and will be deprecated in the future.
119
137
  assets: Provide the assets for image-to-video.
120
138
  end_seconds: The total duration of the output video in seconds.
121
- height: The height of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
122
139
  style: Attributed used to dictate the style of the output
123
- width: The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
124
140
  request_options: Additional options to customize the HTTP request
125
141
 
126
142
  Returns:
@@ -135,21 +151,21 @@ class AsyncImageToVideoClient:
135
151
  await client.v1.image_to_video.create(
136
152
  assets={"image_file_path": "api-assets/id/1234.png"},
137
153
  end_seconds=5.0,
138
- height=960,
139
154
  style={"prompt": "a dog running"},
140
- width=512,
155
+ height=960,
141
156
  name="Image To Video video",
157
+ width=512,
142
158
  )
143
159
  ```
144
160
  """
145
161
  _json = to_encodable(
146
162
  item={
163
+ "height": height,
147
164
  "name": name,
165
+ "width": width,
148
166
  "assets": assets,
149
167
  "end_seconds": end_seconds,
150
- "height": height,
151
168
  "style": style,
152
- "width": width,
153
169
  },
154
170
  dump_with=params._SerializerV1ImageToVideoCreateBody,
155
171
  )
@@ -27,9 +27,11 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
27
27
  The total duration of the output video in seconds.
28
28
  """
29
29
 
30
- height: typing_extensions.Required[int]
30
+ height: typing_extensions.NotRequired[int]
31
31
  """
32
- The height of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
32
+ This field does not affect the output video's resolution. The video's orientation will match that of the input image.
33
+
34
+ It is retained solely for backward compatibility and will be deprecated in the future.
33
35
  """
34
36
 
35
37
  name: typing_extensions.NotRequired[str]
@@ -42,9 +44,11 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
42
44
  Attributed used to dictate the style of the output
43
45
  """
44
46
 
45
- width: typing_extensions.Required[int]
47
+ width: typing_extensions.NotRequired[int]
46
48
  """
47
- The width of the input video. This value will help determine the final orientation of the output video. The output video resolution may not match the input.
49
+ This field does not affect the output video's resolution. The video's orientation will match that of the input image.
50
+
51
+ It is retained solely for backward compatibility and will be deprecated in the future.
48
52
  """
49
53
 
50
54
 
@@ -64,13 +68,9 @@ class _SerializerV1ImageToVideoCreateBody(pydantic.BaseModel):
64
68
  end_seconds: float = pydantic.Field(
65
69
  alias="end_seconds",
66
70
  )
67
- height: int = pydantic.Field(
68
- alias="height",
69
- )
71
+ height: typing.Optional[int] = pydantic.Field(alias="height", default=None)
70
72
  name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
71
73
  style: _SerializerV1ImageToVideoCreateBodyStyle = pydantic.Field(
72
74
  alias="style",
73
75
  )
74
- width: int = pydantic.Field(
75
- alias="width",
76
- )
76
+ width: typing.Optional[int] = pydantic.Field(alias="width", default=None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: magic_hour
3
- Version: 0.17.0
3
+ Version: 0.18.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
@@ -10,7 +10,7 @@ magic_hour/core/request.py,sha256=lyHrh2VWY238D7JPbgZJlodTqBlHSmQn4fBJiBfE1Es,50
10
10
  magic_hour/core/response.py,sha256=Sl7nPL2axmz7em_6d9TkFSnQQKUpalWaVWbPPWoXJgM,10180
11
11
  magic_hour/core/type_utils.py,sha256=4bU9WXnMXJ6YTtuqOMiB8t6Xw0RlfVWJ-IDBONlqEtQ,461
12
12
  magic_hour/core/utils.py,sha256=34SiC1vw2A0TkYHONgMA_d09soIIYiiBWRXCZGdwGIk,1669
13
- magic_hour/environment.py,sha256=oD7PyvYFh9vMbbIKTbAYteOd9eNg3gn9VIMEPH51GwY,213
13
+ magic_hour/environment.py,sha256=Qodwn0_lYoL2oFefrZzADTnkrEe6VnzOU_xKyEFeLKs,213
14
14
  magic_hour/resources/v1/__init__.py,sha256=Aj0sjVcoijjQyieNBxv2_uewPYC2vO2UG-ehoBgCz5E,86
15
15
  magic_hour/resources/v1/ai_clothes_changer/README.md,sha256=KQTvbttct5GcdOJW3NG5gCsWF6G2qlwIoBjBd92TjUs,977
16
16
  magic_hour/resources/v1/ai_clothes_changer/__init__.py,sha256=6W_Y2HxG2sDOBiJyzngK3Q2S3xfQgpK-j8xFRmBAhbQ,142
@@ -60,9 +60,9 @@ magic_hour/resources/v1/image_background_remover/client.py,sha256=xhinD3VIPOFamp
60
60
  magic_hour/resources/v1/image_projects/README.md,sha256=-mcL1vJbk9PI3bT1VAmq7XWl7hruM73PbCURdndz-f4,1589
61
61
  magic_hour/resources/v1/image_projects/__init__.py,sha256=oBlV4e5IVYe8SclhoEy2VOYB53kKP2DORXwcztAwU3E,130
62
62
  magic_hour/resources/v1/image_projects/client.py,sha256=FbqvgvoLFcAjBtqgGtQZMNT8jG5f2bJH7Poxod446sw,5527
63
- magic_hour/resources/v1/image_to_video/README.md,sha256=RHo1mqVzymPELMVroYrJN_F4VGzuWuTSufa94iKWcFw,1180
63
+ magic_hour/resources/v1/image_to_video/README.md,sha256=NtNctIiq6uHCcjmF6zdp3TDDv-vOyem24iSjQ62kYuU,1180
64
64
  magic_hour/resources/v1/image_to_video/__init__.py,sha256=tY_ABo6evwKQBRSq-M84lNX-pXqmxoozukmrO6NhCgA,126
65
- magic_hour/resources/v1/image_to_video/client.py,sha256=m512tJStl0prro97wyIetZ9jWqbVxI83HslnbBBu6Vs,6043
65
+ magic_hour/resources/v1/image_to_video/client.py,sha256=W3meTAs3ii6JDI8xi5Adv9ZKi9pMWMLENdLiqvXV08g,6657
66
66
  magic_hour/resources/v1/lip_sync/README.md,sha256=ycNJtGNz5CXtEKw4XxYoAT2odUQ4TNy6X5c_RZLOcgY,1350
67
67
  magic_hour/resources/v1/lip_sync/__init__.py,sha256=MlKUAoHNSKcuNzVyqNfLnLtD_PsqEn3l1TtVpPC1JqQ,106
68
68
  magic_hour/resources/v1/lip_sync/client.py,sha256=LnIzY3bTqSwB0h-44d9Escv7iQAiYsGOSzL4GKn3iMs,9475
@@ -140,7 +140,7 @@ magic_hour/types/params/v1_files_upload_urls_create_body.py,sha256=X6-ZcUqVVTM3w
140
140
  magic_hour/types/params/v1_files_upload_urls_create_body_items_item.py,sha256=I26O2Jx5_uhsCOrQCL_-wPeenu0rzhNwCDy0AEI6YuQ,962
141
141
  magic_hour/types/params/v1_image_background_remover_create_body.py,sha256=l3sb8UTXjie3gMd4ZJhHik-N1o3zaVzsZ7xDaS_uTG4,1063
142
142
  magic_hour/types/params/v1_image_background_remover_create_body_assets.py,sha256=aw9P_bdBTi8YMvgJxH8G0adwn1YswQzvtc0LgNAPQ8s,873
143
- magic_hour/types/params/v1_image_to_video_create_body.py,sha256=jU1k75k6Q30RC1Hf41h2_e2fhQbSydiCKhF_ESTTZKc,2113
143
+ magic_hour/types/params/v1_image_to_video_create_body.py,sha256=BRPmhk6w_yEQHiX3_wFYOZ6FexDx1YYFYCjF1A_xC9M,2264
144
144
  magic_hour/types/params/v1_image_to_video_create_body_assets.py,sha256=J39Jv5Bv9bjMaskHzMfbO5VE6QWh-saN3eWOUPRtuRk,830
145
145
  magic_hour/types/params/v1_image_to_video_create_body_style.py,sha256=Q7KKr3i0ed7pj2HtwYW0dHQgY-Jjh9xTxUKxGYcBnU0,1535
146
146
  magic_hour/types/params/v1_lip_sync_create_body.py,sha256=PkmNdjIq7RfS_qMBsbiFEEf7Wl841pggPhCgmY6y8VI,3358
@@ -152,7 +152,7 @@ magic_hour/types/params/v1_text_to_video_create_body_style.py,sha256=9NTboy7J4ef
152
152
  magic_hour/types/params/v1_video_to_video_create_body.py,sha256=iOb3qGXySlI4unyWPAXDmiLMUSHH6ymuDHeiwpmhKeE,2942
153
153
  magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=_-6iA5d8ndka6iJWyWvlJwzRkQcmurJE6hkg-fDwBmQ,1531
154
154
  magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=2jgpJ3A8LNXksTPQ5pp1tWXtd753zBuhBjA22qqCsTE,5697
155
- magic_hour-0.17.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
156
- magic_hour-0.17.0.dist-info/METADATA,sha256=mmkXIdItGvdUMj-YSIxrIKtzTDLF9St3K8FH7-6hy18,5323
157
- magic_hour-0.17.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
158
- magic_hour-0.17.0.dist-info/RECORD,,
155
+ magic_hour-0.18.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
156
+ magic_hour-0.18.0.dist-info/METADATA,sha256=VjdrNtXy4yjhjzxXWH2KeBQBX9ooWvvZURFQDfNzXNo,5323
157
+ magic_hour-0.18.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
158
+ magic_hour-0.18.0.dist-info/RECORD,,