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

@@ -1,5 +1,39 @@
1
1
  # v1_files
2
2
 
3
+ <!-- CUSTOM DOCS START -->
4
+
5
+ ### Upload File <a name="upload-file"></a>
6
+
7
+ Upload a local file to Magic Hour Storage. The returned value is used for subsequent API calls.
8
+
9
+ #### Parameters
10
+
11
+ | Parameter | Required | Description | Example |
12
+ | --------- | :------: | ------------------------------------------------------------------- | ------------------ |
13
+ | `file` | ✓ | A local file path, path like object, file URL, or file like object. | `"/tmp/image.png"` |
14
+
15
+ #### Synchronous Client
16
+
17
+ ```python
18
+ from magic_hour import Client
19
+ from os import getenv
20
+
21
+ client = Client(token=getenv("API_TOKEN"))
22
+ file_path = client.v1.files.upload_file("/path/to/your/image.jpg")
23
+ ```
24
+
25
+ #### Asynchronous Client
26
+
27
+ ```python
28
+ from magic_hour import AsyncClient
29
+ from os import getenv
30
+
31
+ client = AsyncClient(token=getenv("API_TOKEN"))
32
+ file_path = await client.v1.files.upload_file("/path/to/your/image.jpg")
33
+ ```
34
+
35
+
36
+ <!-- CUSTOM DOCS END -->
3
37
 
4
38
  ## Submodules
5
39
  - [upload_urls](upload_urls/README.md) - upload_urls
@@ -4,6 +4,50 @@
4
4
 
5
5
  <!-- CUSTOM DOCS START -->
6
6
 
7
+ ### Check results <a name="check-result"></a>
8
+
9
+ Poll the details API to check on the status of the rendering. Optionally can also download the output
10
+
11
+ #### Parameters
12
+
13
+ | Parameter | Required | Description | Example |
14
+ | --------------------- | :------: | ---------------------------------------------------------------------------------------------------- | ---------------- |
15
+ | `id` | ✓ | Unique ID of the image project. This value is returned by all of the POST APIs that create an image. | `"cuid-example"` |
16
+ | `wait_for_completion` | ✗ | Whether to wait for the project to complete. | `True` |
17
+ | `download_outputs` | ✗ | Whether to download the generated files | `True` |
18
+ | `download_directory` | ✗ | Directory to save downloaded files (defaults to current directory) | `"./outputs"` |
19
+
20
+ #### Synchronous Client
21
+
22
+ ```python
23
+ from magic_hour import Client
24
+ from os import getenv
25
+
26
+ client = Client(token=getenv("API_TOKEN"))
27
+ res = client.v1.image_projects.check_result(
28
+ id="cuid-example",
29
+ wait_for_completion=True,
30
+ download_outputs=True,
31
+ download_directory="outputs",
32
+ )
33
+
34
+ ```
35
+
36
+ #### Asynchronous Client
37
+
38
+ ```python
39
+ from magic_hour import AsyncClient
40
+ from os import getenv
41
+
42
+ client = AsyncClient(token=getenv("API_TOKEN"))
43
+ res = await client.v1.image_projects.check_result(
44
+ id="cuid-example",
45
+ wait_for_completion=True,
46
+ download_outputs=True,
47
+ download_directory="outputs",
48
+ )
49
+ ```
50
+
7
51
  <!-- CUSTOM DOCS END -->
8
52
 
9
53
  ### Delete image <a name="delete"></a>
@@ -4,6 +4,50 @@
4
4
 
5
5
  <!-- CUSTOM DOCS START -->
6
6
 
7
+ ### Check results <a name="check-result"></a>
8
+
9
+ Poll the details API to check on the status of the rendering. Optionally can also download the output
10
+
11
+ #### Parameters
12
+
13
+ | Parameter | Required | Description | Example |
14
+ | --------------------- | :------: | ---------------------------------------------------------------------------------------------------- | ---------------- |
15
+ | `id` | ✓ | Unique ID of the video project. This value is returned by all of the POST APIs that create an video. | `"cuid-example"` |
16
+ | `wait_for_completion` | ✗ | Whether to wait for the project to complete. | `True` |
17
+ | `download_outputs` | ✗ | Whether to download the generated files | `True` |
18
+ | `download_directory` | ✗ | Directory to save downloaded files (defaults to current directory) | `"./outputs"` |
19
+
20
+ #### Synchronous Client
21
+
22
+ ```python
23
+ from magic_hour import Client
24
+ from os import getenv
25
+
26
+ client = Client(token=getenv("API_TOKEN"))
27
+ res = client.v1.video_projects.check_result(
28
+ id="cuid-example",
29
+ wait_for_completion=True,
30
+ download_outputs=True,
31
+ download_directory="outputs",
32
+ )
33
+
34
+ ```
35
+
36
+ #### Asynchronous Client
37
+
38
+ ```python
39
+ from magic_hour import AsyncClient
40
+ from os import getenv
41
+
42
+ client = AsyncClient(token=getenv("API_TOKEN"))
43
+ res = await client.v1.video_projects.check_result(
44
+ id="cuid-example",
45
+ wait_for_completion=True,
46
+ download_outputs=True,
47
+ download_directory="outputs",
48
+ )
49
+ ```
50
+
7
51
  <!-- CUSTOM DOCS END -->
8
52
 
9
53
  ### Delete video <a name="delete"></a>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: magic_hour
3
- Version: 0.36.0
3
+ Version: 0.36.1
4
4
  Summary: Python SDK for Magic Hour API
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -254,6 +254,7 @@ download_urls = result.downloads
254
254
 
255
255
  ### [v1.files](magic_hour/resources/v1/files/README.md)
256
256
 
257
+ * [upload-file](magic_hour/resources/v1/files/README.md#upload-file) - Upload File
257
258
 
258
259
  ### [v1.files.upload_urls](magic_hour/resources/v1/files/upload_urls/README.md)
259
260
 
@@ -266,6 +267,7 @@ download_urls = result.downloads
266
267
 
267
268
  ### [v1.image_projects](magic_hour/resources/v1/image_projects/README.md)
268
269
 
270
+ * [check-result](magic_hour/resources/v1/image_projects/README.md#check-result) - Check results
269
271
  * [delete](magic_hour/resources/v1/image_projects/README.md#delete) - Delete image
270
272
  * [get](magic_hour/resources/v1/image_projects/README.md#get) - Get image details
271
273
 
@@ -291,6 +293,7 @@ download_urls = result.downloads
291
293
 
292
294
  ### [v1.video_projects](magic_hour/resources/v1/video_projects/README.md)
293
295
 
296
+ * [check-result](magic_hour/resources/v1/video_projects/README.md#check-result) - Check results
294
297
  * [delete](magic_hour/resources/v1/video_projects/README.md#delete) - Delete video
295
298
  * [get](magic_hour/resources/v1/video_projects/README.md#get) - Get video details
296
299
 
@@ -65,7 +65,7 @@ magic_hour/resources/v1/face_swap/client.py,sha256=OU0hlZH2aIW60k-YurBuIOoCSG764
65
65
  magic_hour/resources/v1/face_swap_photo/README.md,sha256=rOuood1s9flFb0s8ARyG2zRVXmFrZQFCLu8rWAz_Zxk,5944
66
66
  magic_hour/resources/v1/face_swap_photo/__init__.py,sha256=NZEplYX5kDPL_0qY0Q5tuxhDevipN0otByTYKMmF_1k,130
67
67
  magic_hour/resources/v1/face_swap_photo/client.py,sha256=esXW9FEs_5pjH92amw-z5xV4hFuOSilyanVw6D8qiDM,11743
68
- magic_hour/resources/v1/files/README.md,sha256=o4_3DdKQG4LzPHAyWqAvCmpjDjBuCvCa2FzRxUiI_c4,81
68
+ magic_hour/resources/v1/files/README.md,sha256=idxf1Qw76wHd3FX6ip6QY-69yQs30kVrKtqCqJHIa8w,1067
69
69
  magic_hour/resources/v1/files/__init__.py,sha256=ucXmaXDdZqXfRhnnioJeQAXeRLzBDb44gTfWijrub28,98
70
70
  magic_hour/resources/v1/files/client.py,sha256=s5DWJA9HsxBpNwLT05tcC1bJXNZDiwQMMyQkEzKlcBY,13245
71
71
  magic_hour/resources/v1/files/client_test.py,sha256=4mUFWuxr9R0YmeZ468KPvt8p4zUvZBhPcbszHBtLE4s,13970
@@ -75,7 +75,7 @@ magic_hour/resources/v1/files/upload_urls/client.py,sha256=i4Fx3lQp3LGuySU-XA8AK
75
75
  magic_hour/resources/v1/image_background_remover/README.md,sha256=u2LiYWT3aHHZHQp5DrpVi69LPDH1B2BkQZ-jXiB0jb8,4526
76
76
  magic_hour/resources/v1/image_background_remover/__init__.py,sha256=Vb_e8zKEh7bdrq0q1175DqyOd1ptPBUIfSKSLFPBVU4,166
77
77
  magic_hour/resources/v1/image_background_remover/client.py,sha256=Femsd5exMNcE8K8TytEwXQQU89Fpnxl1PU2RXdFxCGA,9371
78
- magic_hour/resources/v1/image_projects/README.md,sha256=V15BieFIYdmwd4pzyT6JCWcnw5d47owjbGGLlOZJQPE,2678
78
+ magic_hour/resources/v1/image_projects/README.md,sha256=mSBoZwFCS0eqkRKwsjURKzLppq2UlPbnMFMsNHhvgK8,4404
79
79
  magic_hour/resources/v1/image_projects/__init__.py,sha256=FtA1OC8s-CCOwQ0AaUqlkt9IC0CIZ4_p65E97m3ZcGE,246
80
80
  magic_hour/resources/v1/image_projects/client.py,sha256=yG3OV9Y38psY6gQYnV7rbvkpIZ_tJ-vS15rKWa10Do0,10957
81
81
  magic_hour/resources/v1/image_projects/client_test.py,sha256=5KH4s0vG13SEUkB6pAa9m7M2dqBUoqIERPhAu1DgPfA,16015
@@ -91,7 +91,7 @@ magic_hour/resources/v1/photo_colorizer/client.py,sha256=3YRWXOB8rpzJcfqGuYE-Ilh
91
91
  magic_hour/resources/v1/text_to_video/README.md,sha256=zcQRpUQDWZImGKJwiGUEvI3uo68RU4e9Rks6KxGeaxw,4708
92
92
  magic_hour/resources/v1/text_to_video/__init__.py,sha256=F18iHSi9tuYSdgpatznBzb7lbSySNpK-82w96-Om_k4,122
93
93
  magic_hour/resources/v1/text_to_video/client.py,sha256=dxtlUpqGc6ZFrM8JseEiicPOQbHTe3zTpouSmKg3PMQ,13624
94
- magic_hour/resources/v1/video_projects/README.md,sha256=b8bxxx3eBqK_w8k5nQEx7xbBmRUPSCP0w1Ugaoun6l0,2853
94
+ magic_hour/resources/v1/video_projects/README.md,sha256=VjX5oB_qd9Bow1qdKySuXvzwmH1tv1RcI38GLkP-A3M,4579
95
95
  magic_hour/resources/v1/video_projects/__init__.py,sha256=Pm2S3V2tVycoR5x5zPiFCZSoeY15s5WJaR0pLkJq-Pg,246
96
96
  magic_hour/resources/v1/video_projects/client.py,sha256=cMZH9Q0SJmLISz3dJmoxY0zNA_BG6RhlpR29lnX5G0o,10919
97
97
  magic_hour/resources/v1/video_projects/client_test.py,sha256=iOJWM0cFg4QmFOYNVRRvMPX7nCg-1rCnSUh_1aDq96A,15967
@@ -212,7 +212,7 @@ magic_hour/types/params/v1_video_to_video_create_body.py,sha256=BV52jJcXnOsKaw-M
212
212
  magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=XwdoqT1x5ElcWb6qUfmtabNsyaatEsOygB4gJ154y-M,1660
213
213
  magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=RrDBhN2KQnCf9hGsnl3sAYvuFRsxth2JXfe5la0IYJg,5749
214
214
  magic_hour/types/params/v1_video_to_video_generate_body_assets.py,sha256=j06Y1RKZKwEXW9Zdfhr3Lntx7eDAKpH-k1N1XkKuqPM,915
215
- magic_hour-0.36.0.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
216
- magic_hour-0.36.0.dist-info/METADATA,sha256=XGAFfek5alJhSdGhalm3d_eCHBOsk87mcuohYUpEfp8,12405
217
- magic_hour-0.36.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
218
- magic_hour-0.36.0.dist-info/RECORD,,
215
+ magic_hour-0.36.1.dist-info/LICENSE,sha256=F3fxj7JXPgB2K0uj8YXRsVss4u-Dgt_-U3V4VXsivNI,1070
216
+ magic_hour-0.36.1.dist-info/METADATA,sha256=SNxw-xTQsD4DCj_2dRufO4S9f54-GEDyCPoZPmmHNow,12680
217
+ magic_hour-0.36.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
218
+ magic_hour-0.36.1.dist-info/RECORD,,