magic_hour 0.36.1__py3-none-any.whl → 0.37.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/__init__.py +1 -1
- magic_hour/client.py +1 -1
- magic_hour/environment.py +1 -1
- magic_hour/helpers/__init__.py +2 -1
- magic_hour/helpers/logger.py +8 -0
- magic_hour/resources/v1/ai_clothes_changer/client.py +9 -10
- magic_hour/resources/v1/ai_face_editor/client.py +9 -10
- magic_hour/resources/v1/ai_gif_generator/client.py +8 -9
- magic_hour/resources/v1/ai_headshot_generator/client.py +9 -10
- magic_hour/resources/v1/ai_image_editor/client.py +9 -10
- magic_hour/resources/v1/ai_image_generator/client.py +8 -9
- magic_hour/resources/v1/ai_image_upscaler/client.py +9 -10
- magic_hour/resources/v1/ai_meme_generator/client.py +8 -9
- magic_hour/resources/v1/ai_photo_editor/client.py +9 -10
- magic_hour/resources/v1/ai_qr_code_generator/client.py +8 -9
- magic_hour/resources/v1/ai_talking_photo/client.py +9 -10
- magic_hour/resources/v1/animation/client.py +9 -10
- magic_hour/resources/v1/auto_subtitle_generator/client.py +9 -10
- magic_hour/resources/v1/client.py +1 -1
- magic_hour/resources/v1/face_detection/client.py +6 -6
- magic_hour/resources/v1/face_swap/client.py +9 -10
- magic_hour/resources/v1/face_swap_photo/client.py +9 -10
- magic_hour/resources/v1/files/client.py +3 -3
- magic_hour/resources/v1/files/upload_urls/client.py +2 -2
- magic_hour/resources/v1/image_background_remover/client.py +9 -10
- magic_hour/resources/v1/image_projects/client.py +5 -5
- magic_hour/resources/v1/image_to_video/client.py +9 -10
- magic_hour/resources/v1/lip_sync/client.py +9 -10
- magic_hour/resources/v1/photo_colorizer/client.py +9 -10
- magic_hour/resources/v1/text_to_video/client.py +8 -9
- magic_hour/resources/v1/video_projects/client.py +5 -5
- magic_hour/resources/v1/video_to_video/client.py +9 -10
- magic_hour/types/params/v1_ai_talking_photo_create_body_style.py +4 -3
- {magic_hour-0.36.1.dist-info → magic_hour-0.37.0.dist-info}/METADATA +2 -5
- {magic_hour-0.36.1.dist-info → magic_hour-0.37.0.dist-info}/RECORD +37 -46
- magic_hour/core/__init__.py +0 -50
- magic_hour/core/api_error.py +0 -56
- magic_hour/core/auth.py +0 -354
- magic_hour/core/base_client.py +0 -627
- magic_hour/core/binary_response.py +0 -23
- magic_hour/core/query.py +0 -124
- magic_hour/core/request.py +0 -162
- magic_hour/core/response.py +0 -297
- magic_hour/core/type_utils.py +0 -28
- magic_hour/core/utils.py +0 -55
- {magic_hour-0.36.1.dist-info → magic_hour-0.37.0.dist-info}/LICENSE +0 -0
- {magic_hour-0.36.1.dist-info → magic_hour-0.37.0.dist-info}/WHEEL +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import logging
|
|
3
2
|
import os
|
|
4
3
|
import pydantic
|
|
5
4
|
import time
|
|
6
5
|
import typing
|
|
7
6
|
|
|
8
|
-
from magic_hour.
|
|
7
|
+
from magic_hour.helpers.download import download_files_async, download_files_sync
|
|
8
|
+
from magic_hour.helpers.logger import get_sdk_logger
|
|
9
|
+
from magic_hour.types import models
|
|
10
|
+
from make_api_request import (
|
|
9
11
|
AsyncBaseClient,
|
|
10
12
|
RequestOptions,
|
|
11
13
|
SyncBaseClient,
|
|
12
14
|
default_request_options,
|
|
13
15
|
)
|
|
14
|
-
from magic_hour.helpers.download import download_files_async, download_files_sync
|
|
15
|
-
from magic_hour.types import models
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
logger =
|
|
18
|
+
logger = get_sdk_logger(__name__)
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class V1ImageProjectsGetResponseWithDownloads(models.V1ImageProjectsGetResponse):
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import typing
|
|
3
2
|
import typing_extensions
|
|
4
3
|
|
|
5
|
-
from magic_hour.
|
|
4
|
+
from magic_hour.helpers.logger import get_sdk_logger
|
|
5
|
+
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
6
|
+
from magic_hour.resources.v1.video_projects.client import (
|
|
7
|
+
AsyncVideoProjectsClient,
|
|
8
|
+
VideoProjectsClient,
|
|
9
|
+
)
|
|
10
|
+
from magic_hour.types import models, params
|
|
11
|
+
from make_api_request import (
|
|
6
12
|
AsyncBaseClient,
|
|
7
13
|
RequestOptions,
|
|
8
14
|
SyncBaseClient,
|
|
@@ -10,16 +16,9 @@ from magic_hour.core import (
|
|
|
10
16
|
to_encodable,
|
|
11
17
|
type_utils,
|
|
12
18
|
)
|
|
13
|
-
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
14
|
-
from magic_hour.resources.v1.video_projects.client import (
|
|
15
|
-
AsyncVideoProjectsClient,
|
|
16
|
-
VideoProjectsClient,
|
|
17
|
-
)
|
|
18
|
-
from magic_hour.types import models, params
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
logger = logging.getLogger(__name__)
|
|
21
|
+
logger = get_sdk_logger(__name__)
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
class ImageToVideoClient:
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import typing
|
|
3
2
|
|
|
4
|
-
from magic_hour.
|
|
3
|
+
from magic_hour.helpers.logger import get_sdk_logger
|
|
4
|
+
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
5
|
+
from magic_hour.resources.v1.video_projects.client import (
|
|
6
|
+
AsyncVideoProjectsClient,
|
|
7
|
+
VideoProjectsClient,
|
|
8
|
+
)
|
|
9
|
+
from magic_hour.types import models, params
|
|
10
|
+
from make_api_request import (
|
|
5
11
|
AsyncBaseClient,
|
|
6
12
|
RequestOptions,
|
|
7
13
|
SyncBaseClient,
|
|
@@ -9,16 +15,9 @@ from magic_hour.core import (
|
|
|
9
15
|
to_encodable,
|
|
10
16
|
type_utils,
|
|
11
17
|
)
|
|
12
|
-
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
13
|
-
from magic_hour.resources.v1.video_projects.client import (
|
|
14
|
-
AsyncVideoProjectsClient,
|
|
15
|
-
VideoProjectsClient,
|
|
16
|
-
)
|
|
17
|
-
from magic_hour.types import models, params
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
logger = logging.getLogger(__name__)
|
|
20
|
+
logger = get_sdk_logger(__name__)
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
class LipSyncClient:
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import typing
|
|
3
2
|
|
|
4
|
-
from magic_hour.
|
|
3
|
+
from magic_hour.helpers.logger import get_sdk_logger
|
|
4
|
+
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
5
|
+
from magic_hour.resources.v1.image_projects.client import (
|
|
6
|
+
AsyncImageProjectsClient,
|
|
7
|
+
ImageProjectsClient,
|
|
8
|
+
)
|
|
9
|
+
from magic_hour.types import models, params
|
|
10
|
+
from make_api_request import (
|
|
5
11
|
AsyncBaseClient,
|
|
6
12
|
RequestOptions,
|
|
7
13
|
SyncBaseClient,
|
|
@@ -9,16 +15,9 @@ from magic_hour.core import (
|
|
|
9
15
|
to_encodable,
|
|
10
16
|
type_utils,
|
|
11
17
|
)
|
|
12
|
-
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
13
|
-
from magic_hour.resources.v1.image_projects.client import (
|
|
14
|
-
AsyncImageProjectsClient,
|
|
15
|
-
ImageProjectsClient,
|
|
16
|
-
)
|
|
17
|
-
from magic_hour.types import models, params
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
logger = logging.getLogger(__name__)
|
|
20
|
+
logger = get_sdk_logger(__name__)
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
class PhotoColorizerClient:
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import typing
|
|
3
2
|
import typing_extensions
|
|
4
3
|
|
|
5
|
-
from magic_hour.
|
|
4
|
+
from magic_hour.helpers.logger import get_sdk_logger
|
|
5
|
+
from magic_hour.resources.v1.video_projects.client import (
|
|
6
|
+
AsyncVideoProjectsClient,
|
|
7
|
+
VideoProjectsClient,
|
|
8
|
+
)
|
|
9
|
+
from magic_hour.types import models, params
|
|
10
|
+
from make_api_request import (
|
|
6
11
|
AsyncBaseClient,
|
|
7
12
|
RequestOptions,
|
|
8
13
|
SyncBaseClient,
|
|
@@ -10,15 +15,9 @@ from magic_hour.core import (
|
|
|
10
15
|
to_encodable,
|
|
11
16
|
type_utils,
|
|
12
17
|
)
|
|
13
|
-
from magic_hour.resources.v1.video_projects.client import (
|
|
14
|
-
AsyncVideoProjectsClient,
|
|
15
|
-
VideoProjectsClient,
|
|
16
|
-
)
|
|
17
|
-
from magic_hour.types import models, params
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
logger = logging.getLogger(__name__)
|
|
20
|
+
logger = get_sdk_logger(__name__)
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
class TextToVideoClient:
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import os
|
|
3
2
|
import pydantic
|
|
4
3
|
import time
|
|
5
4
|
import typing
|
|
6
5
|
|
|
7
|
-
from magic_hour.
|
|
6
|
+
from magic_hour.helpers.download import download_files_async, download_files_sync
|
|
7
|
+
from magic_hour.helpers.logger import get_sdk_logger
|
|
8
|
+
from magic_hour.types import models
|
|
9
|
+
from make_api_request import (
|
|
8
10
|
AsyncBaseClient,
|
|
9
11
|
RequestOptions,
|
|
10
12
|
SyncBaseClient,
|
|
11
13
|
default_request_options,
|
|
12
14
|
)
|
|
13
|
-
from magic_hour.helpers.download import download_files_async, download_files_sync
|
|
14
|
-
from magic_hour.types import models
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
logger =
|
|
17
|
+
logger = get_sdk_logger(__name__)
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class V1VideoProjectsGetResponseWithDownloads(models.V1VideoProjectsGetResponse):
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import logging
|
|
2
1
|
import typing
|
|
3
2
|
import typing_extensions
|
|
4
3
|
|
|
5
|
-
from magic_hour.
|
|
4
|
+
from magic_hour.helpers.logger import get_sdk_logger
|
|
5
|
+
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
6
|
+
from magic_hour.resources.v1.video_projects.client import (
|
|
7
|
+
AsyncVideoProjectsClient,
|
|
8
|
+
VideoProjectsClient,
|
|
9
|
+
)
|
|
10
|
+
from magic_hour.types import models, params
|
|
11
|
+
from make_api_request import (
|
|
6
12
|
AsyncBaseClient,
|
|
7
13
|
RequestOptions,
|
|
8
14
|
SyncBaseClient,
|
|
@@ -10,16 +16,9 @@ from magic_hour.core import (
|
|
|
10
16
|
to_encodable,
|
|
11
17
|
type_utils,
|
|
12
18
|
)
|
|
13
|
-
from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
|
|
14
|
-
from magic_hour.resources.v1.video_projects.client import (
|
|
15
|
-
AsyncVideoProjectsClient,
|
|
16
|
-
VideoProjectsClient,
|
|
17
|
-
)
|
|
18
|
-
from magic_hour.types import models, params
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
logger = logging.getLogger(__name__)
|
|
21
|
+
logger = get_sdk_logger(__name__)
|
|
23
22
|
|
|
24
23
|
|
|
25
24
|
class VideoToVideoClient:
|
|
@@ -9,12 +9,13 @@ class V1AiTalkingPhotoCreateBodyStyle(typing_extensions.TypedDict):
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
generation_mode: typing_extensions.NotRequired[
|
|
12
|
-
typing_extensions.Literal["expressive", "stable"]
|
|
12
|
+
typing_extensions.Literal["expressive", "pro", "stable"]
|
|
13
13
|
]
|
|
14
14
|
"""
|
|
15
15
|
Controls overall motion style.
|
|
16
|
+
* `pro` - Realistic, high fidelity, accurate lip sync, slower.
|
|
16
17
|
* `expressive` - More motion and facial expressiveness; may introduce visual artifacts.
|
|
17
|
-
* `stable` - Reduced motion for cleaner output; may result in minimal animation.
|
|
18
|
+
* `stable` - Reduced motion for cleaner output; may result in minimal animation. (Deprecated: passing this value will be treated as `pro`)
|
|
18
19
|
"""
|
|
19
20
|
|
|
20
21
|
intensity: typing_extensions.NotRequired[float]
|
|
@@ -36,6 +37,6 @@ class _SerializerV1AiTalkingPhotoCreateBodyStyle(pydantic.BaseModel):
|
|
|
36
37
|
)
|
|
37
38
|
|
|
38
39
|
generation_mode: typing.Optional[
|
|
39
|
-
typing_extensions.Literal["expressive", "stable"]
|
|
40
|
+
typing_extensions.Literal["expressive", "pro", "stable"]
|
|
40
41
|
] = pydantic.Field(alias="generation_mode", default=None)
|
|
41
42
|
intensity: typing.Optional[float] = pydantic.Field(alias="intensity", default=None)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: magic_hour
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.37.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,10 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
-
Requires-Dist:
|
|
14
|
-
Requires-Dist: jsonpointer (>=3.0.0,<4.0.0)
|
|
15
|
-
Requires-Dist: pydantic (>=2.5.0,<3.0.0)
|
|
16
|
-
Requires-Dist: typing_extensions (>=4.0.0,<5.0.0)
|
|
13
|
+
Requires-Dist: make-api-request (>=0.1.3,<0.2.0)
|
|
17
14
|
Description-Content-Type: text/markdown
|
|
18
15
|
|
|
19
16
|
# Magic Hour Python SDK
|
|
@@ -1,103 +1,94 @@
|
|
|
1
1
|
magic_hour/README.md,sha256=SHZliiOYgWe_XUUYVCnIQCS5a7Fq41p6IgP-3JCxR_I,2151
|
|
2
|
-
magic_hour/__init__.py,sha256=
|
|
3
|
-
magic_hour/client.py,sha256=
|
|
4
|
-
magic_hour/
|
|
5
|
-
magic_hour/
|
|
6
|
-
magic_hour/core/auth.py,sha256=GA0lyYYXG_q-nRB8W0omRZ7DLbdXvhYeVzEc-WRI0G0,10774
|
|
7
|
-
magic_hour/core/base_client.py,sha256=lAHeb8UCwLK-isqfpNl-T1GPIi4o0NHcNaftemonLYk,19807
|
|
8
|
-
magic_hour/core/binary_response.py,sha256=T-DATvb21P2ZRnYa4LlXmF77VfM8Tut2951QHEQct_U,681
|
|
9
|
-
magic_hour/core/query.py,sha256=NnhmvsslcyLeXE8OdnJRkO6AJcgDvWABl4KtpqDSNXk,4600
|
|
10
|
-
magic_hour/core/request.py,sha256=KXF40VnRlIej2CXkaPj8U3gfBTRUxwrT9h8fDgCpOxw,5293
|
|
11
|
-
magic_hour/core/response.py,sha256=xXJocWPd8hy5q310NMNiiyHsmmWxUd2wVz3Kp2-93wc,10549
|
|
12
|
-
magic_hour/core/type_utils.py,sha256=4bU9WXnMXJ6YTtuqOMiB8t6Xw0RlfVWJ-IDBONlqEtQ,461
|
|
13
|
-
magic_hour/core/utils.py,sha256=BaPVdXmupBticb_5eGBWboagnRU5y5eUWj5x7Cwxsuo,1701
|
|
14
|
-
magic_hour/environment.py,sha256=KMv5Z9qr4JXKaDcKe78kl_4PNZf9bKqZGoOtg7ZbKLI,535
|
|
15
|
-
magic_hour/helpers/__init__.py,sha256=4myKNwqBNVwHg7_hn6rOhFGAW075iTtADLuQLjcxycU,123
|
|
2
|
+
magic_hour/__init__.py,sha256=ypWA4msPy3T-U2PAyRSAXIQc0m2J9aY8wXnfmIupAEc,214
|
|
3
|
+
magic_hour/client.py,sha256=oHuz0FRKuedtwwPSkFLaSjoEWt_0N57hJ0rEDKbNcFw,1712
|
|
4
|
+
magic_hour/environment.py,sha256=Ymvzle58kJe63TRqf9fF4-4BujsifTRWFgPr9rngPJM,535
|
|
5
|
+
magic_hour/helpers/__init__.py,sha256=pO6sgb41iVe_IN2dApfl2l3BXOWIb4i5pHl_if-oo_E,176
|
|
16
6
|
magic_hour/helpers/download.py,sha256=wZR-gddqU2rWzltHN2zqqaHaShHG33yx7BIlUn1jXG8,2212
|
|
7
|
+
magic_hour/helpers/logger.py,sha256=Z8ljney670Kc8DaSzlHdH9N8RXmj2_qWPovLUoC0tNY,210
|
|
17
8
|
magic_hour/resources/v1/README.md,sha256=CctlNTsepalcp9W3X-JrTg9MJ1EtD33MBovRdLyLlEo,1709
|
|
18
9
|
magic_hour/resources/v1/__init__.py,sha256=Aj0sjVcoijjQyieNBxv2_uewPYC2vO2UG-ehoBgCz5E,86
|
|
19
10
|
magic_hour/resources/v1/ai_clothes_changer/README.md,sha256=XzJDOauZ4fuKXyl8fms10YH6v072jmF3FlAa9BJH-R0,4574
|
|
20
11
|
magic_hour/resources/v1/ai_clothes_changer/__init__.py,sha256=6W_Y2HxG2sDOBiJyzngK3Q2S3xfQgpK-j8xFRmBAhbQ,142
|
|
21
|
-
magic_hour/resources/v1/ai_clothes_changer/client.py,sha256=
|
|
12
|
+
magic_hour/resources/v1/ai_clothes_changer/client.py,sha256=CdSE1ZiygLFusVpgCCFoqgIu1z8geN2XVUMxxgsSkAA,9963
|
|
22
13
|
magic_hour/resources/v1/ai_face_editor/README.md,sha256=aKnRhtuI9XZPN6UMI5kHn-gkFvzN4uZ1Z0KYcqnnLfM,7271
|
|
23
14
|
magic_hour/resources/v1/ai_face_editor/__init__.py,sha256=RY8GBMQcqsDFbFcUuK-4LPvablq-U9XmSSlQk4HLKmM,126
|
|
24
|
-
magic_hour/resources/v1/ai_face_editor/client.py,sha256=
|
|
15
|
+
magic_hour/resources/v1/ai_face_editor/client.py,sha256=qo8Lj7s0a9vanOMzWb5lw0FyrrcstQ-kUvfBkiBipGY,12313
|
|
25
16
|
magic_hour/resources/v1/ai_gif_generator/README.md,sha256=DLJAKNRfYfYhBJCITT5Qin68GLWHaFy6rB6XWTB_JVo,2951
|
|
26
17
|
magic_hour/resources/v1/ai_gif_generator/__init__.py,sha256=SG_WmxUnpQWlfNQoHfdXPEGQEPC0WZPgom8ATaR9jiY,134
|
|
27
|
-
magic_hour/resources/v1/ai_gif_generator/client.py,sha256=
|
|
18
|
+
magic_hour/resources/v1/ai_gif_generator/client.py,sha256=lwRYD_6IGxoI29I2USWZedL_rKOH-25IANgh1hebq7k,8205
|
|
28
19
|
magic_hour/resources/v1/ai_headshot_generator/README.md,sha256=1ysCdQ9Z_ijmr3O2o7gjJdDh3S35HfEEzRmrNRm29qM,3859
|
|
29
20
|
magic_hour/resources/v1/ai_headshot_generator/__init__.py,sha256=4WZ3jfrL2yPhQaPalMJrUEykwUoF3KBtop2VJEij-0s,154
|
|
30
|
-
magic_hour/resources/v1/ai_headshot_generator/client.py,sha256=
|
|
21
|
+
magic_hour/resources/v1/ai_headshot_generator/client.py,sha256=Ts_aLrp6M825opYZsJ66g1Ma4XOzvKwNdVFmUC4KSkQ,9979
|
|
31
22
|
magic_hour/resources/v1/ai_image_editor/README.md,sha256=0GTrgejG2STRWGxOIbCc-L596j_AapyHrhUsWlDZPRk,3747
|
|
32
23
|
magic_hour/resources/v1/ai_image_editor/__init__.py,sha256=VvGqS2j_VQ7iz8TueD2R2L0YLlRsqRyGBSP4Tf-Uml8,130
|
|
33
|
-
magic_hour/resources/v1/ai_image_editor/client.py,sha256=
|
|
24
|
+
magic_hour/resources/v1/ai_image_editor/client.py,sha256=77prh_ckyXxfEhIENrDAVcQRqTiAJ9ruDJO6UWpyRlU,9483
|
|
34
25
|
magic_hour/resources/v1/ai_image_generator/README.md,sha256=hek8oMvwXyDnu7vh1Oe7JPF-UuBuVgfs_xjn2DwC6dM,3580
|
|
35
26
|
magic_hour/resources/v1/ai_image_generator/__init__.py,sha256=qZws7N5CALYAbnIUc2ERV8Cy-QJmHcJ9tU7W-epEnaQ,142
|
|
36
|
-
magic_hour/resources/v1/ai_image_generator/client.py,sha256=
|
|
27
|
+
magic_hour/resources/v1/ai_image_generator/client.py,sha256=FQmoaq1pgnbs02Y6lzhaTyIYEUUGeTbxA1DWTl2ttJc,10102
|
|
37
28
|
magic_hour/resources/v1/ai_image_upscaler/README.md,sha256=0fzHZeUK2XMWDP7m3VuslKBnRojCzx7t21t1cXV1d54,4128
|
|
38
29
|
magic_hour/resources/v1/ai_image_upscaler/__init__.py,sha256=9b1-2XfnAVa4qE3S-4WL8vN3wuqLkUuHKjdl_km8hUc,138
|
|
39
|
-
magic_hour/resources/v1/ai_image_upscaler/client.py,sha256=
|
|
30
|
+
magic_hour/resources/v1/ai_image_upscaler/client.py,sha256=WPqVMzN1-O1IVxkAMx0O1M4VRZ1cl7QPi94Ej2E5sBM,10713
|
|
40
31
|
magic_hour/resources/v1/ai_meme_generator/README.md,sha256=zcBWHs9RuUBxIJyfOVuolvMlufyfyj3aqHNjNl93Xi0,3544
|
|
41
32
|
magic_hour/resources/v1/ai_meme_generator/__init__.py,sha256=x4vtin1KKvoA-va7vhaQ91c__M2z3PmDySLX7yJpRDA,138
|
|
42
|
-
magic_hour/resources/v1/ai_meme_generator/client.py,sha256=
|
|
33
|
+
magic_hour/resources/v1/ai_meme_generator/client.py,sha256=jtWQj_k_MZhoyT1nhXkg8YIeVTIPHw66G-tmGcZlOa4,8679
|
|
43
34
|
magic_hour/resources/v1/ai_photo_editor/README.md,sha256=Ph99t0pxco1DvlCntQLFAqzrU26zTPbpvxoGlP1Ih7I,7210
|
|
44
35
|
magic_hour/resources/v1/ai_photo_editor/__init__.py,sha256=RPG6WaL2KN_DmgrtxImA_jNnEDMm-Ku2o2m2EnNwxts,130
|
|
45
|
-
magic_hour/resources/v1/ai_photo_editor/client.py,sha256=
|
|
36
|
+
magic_hour/resources/v1/ai_photo_editor/client.py,sha256=xdNR8PX2C0VHVETTjFIpcMZygOMnFKrIQSYr6AF5uVk,13221
|
|
46
37
|
magic_hour/resources/v1/ai_qr_code_generator/README.md,sha256=vqM3oDfyj9DQZq6RUECkeWWHdKzwf0pxbRmBm4T1HBU,3380
|
|
47
38
|
magic_hour/resources/v1/ai_qr_code_generator/__init__.py,sha256=HnSTg7tB8M5LibZoCDRdE5Q71efmiqZIkNEve5SO1Mg,146
|
|
48
|
-
magic_hour/resources/v1/ai_qr_code_generator/client.py,sha256=
|
|
39
|
+
magic_hour/resources/v1/ai_qr_code_generator/client.py,sha256=rLw0V6cE2AncqM9Bz_mRXWkmkdVasS44BBWLLX4GQSc,8771
|
|
49
40
|
magic_hour/resources/v1/ai_talking_photo/README.md,sha256=tI7OOW2pyZN7lFomFL4YO9NhlhUDsStZvQyRK-twPkw,5343
|
|
50
41
|
magic_hour/resources/v1/ai_talking_photo/__init__.py,sha256=ZTDD_IRBoR7GSdGWCVEK2-LOEsKUdGEHZZvDHa9MOnA,134
|
|
51
|
-
magic_hour/resources/v1/ai_talking_photo/client.py,sha256=
|
|
42
|
+
magic_hour/resources/v1/ai_talking_photo/client.py,sha256=kbFM3peM5NEzUle1miup7Xe2q_HwL7u7kzuD1DkcEBc,12529
|
|
52
43
|
magic_hour/resources/v1/animation/README.md,sha256=d3VmJ2JPyK4w-v4584UCHKEjwseaSAiXG_1S8C5KnzI,7599
|
|
53
44
|
magic_hour/resources/v1/animation/__init__.py,sha256=M6KUe6TEZl_DAdyn1HFQ2kHYanZo6xy3mvUdCN264hQ,114
|
|
54
|
-
magic_hour/resources/v1/animation/client.py,sha256=
|
|
45
|
+
magic_hour/resources/v1/animation/client.py,sha256=vVoYF6P-OU83kAXwZyRJngv6C_zoArXXuM6nTPy-Jvw,15447
|
|
55
46
|
magic_hour/resources/v1/auto_subtitle_generator/README.md,sha256=j1QMqeiU2LBwwsCQP4_7CM637tIUizAw_y81UvtUMMU,5306
|
|
56
47
|
magic_hour/resources/v1/auto_subtitle_generator/__init__.py,sha256=dnWFEiSdIl3AwFVprqWHSMzqpeHgZz9wPEMxm7c3Xnc,162
|
|
57
|
-
magic_hour/resources/v1/auto_subtitle_generator/client.py,sha256=
|
|
58
|
-
magic_hour/resources/v1/client.py,sha256=
|
|
48
|
+
magic_hour/resources/v1/auto_subtitle_generator/client.py,sha256=QZREuGcgIVc3hNaBvTfDuBRj0pvnr_uu0YzFkFhsd_s,14803
|
|
49
|
+
magic_hour/resources/v1/client.py,sha256=FI5p4G51h6zd3RnUtIhl9ytWpShCTFIitxed7DCNXkQ,7564
|
|
59
50
|
magic_hour/resources/v1/face_detection/README.md,sha256=Krn1NJvERkChvJlL_ie9GszgE9ltnZftbZwq3yqi5tU,5246
|
|
60
51
|
magic_hour/resources/v1/face_detection/__init__.py,sha256=gGsbucNf0ibSUORv4FBlzTmMHAKEnPZuIqmhh7Qjxfk,246
|
|
61
|
-
magic_hour/resources/v1/face_detection/client.py,sha256=
|
|
52
|
+
magic_hour/resources/v1/face_detection/client.py,sha256=v35yArONM6OuQ0Ze_fwpHt_eSHdYcs4teR0gRMjcGdA,14831
|
|
62
53
|
magic_hour/resources/v1/face_swap/README.md,sha256=qOJagPa_3mWoZMbZ4yybsdfgduMZcsCdLvWgj4cEhuI,8574
|
|
63
54
|
magic_hour/resources/v1/face_swap/__init__.py,sha256=lyg5uAHyYHEUVAiAZtP3zwjGCEGqq8IWbQKexVdhr00,110
|
|
64
|
-
magic_hour/resources/v1/face_swap/client.py,sha256=
|
|
55
|
+
magic_hour/resources/v1/face_swap/client.py,sha256=AYkOAoCGrGvhMeuQe9yTad4krx81S9S5e8l5wNIn3RI,19783
|
|
65
56
|
magic_hour/resources/v1/face_swap_photo/README.md,sha256=rOuood1s9flFb0s8ARyG2zRVXmFrZQFCLu8rWAz_Zxk,5944
|
|
66
57
|
magic_hour/resources/v1/face_swap_photo/__init__.py,sha256=NZEplYX5kDPL_0qY0Q5tuxhDevipN0otByTYKMmF_1k,130
|
|
67
|
-
magic_hour/resources/v1/face_swap_photo/client.py,sha256=
|
|
58
|
+
magic_hour/resources/v1/face_swap_photo/client.py,sha256=dXolLVvto4h13QcEYd2gQ1E-aNn5EAAi5QwUl1durOU,11739
|
|
68
59
|
magic_hour/resources/v1/files/README.md,sha256=idxf1Qw76wHd3FX6ip6QY-69yQs30kVrKtqCqJHIa8w,1067
|
|
69
60
|
magic_hour/resources/v1/files/__init__.py,sha256=ucXmaXDdZqXfRhnnioJeQAXeRLzBDb44gTfWijrub28,98
|
|
70
|
-
magic_hour/resources/v1/files/client.py,sha256=
|
|
61
|
+
magic_hour/resources/v1/files/client.py,sha256=wVIKaz7NzKsdASbKyhQzcaHrFkluEAQBtZ5fynebUSY,13281
|
|
71
62
|
magic_hour/resources/v1/files/client_test.py,sha256=4mUFWuxr9R0YmeZ468KPvt8p4zUvZBhPcbszHBtLE4s,13970
|
|
72
63
|
magic_hour/resources/v1/files/upload_urls/README.md,sha256=YZR-Gk1xgviM1bTg5me7Wc0-f_7wzStPFJMFJCiDbMU,2407
|
|
73
64
|
magic_hour/resources/v1/files/upload_urls/__init__.py,sha256=hRp0s_emx-wib7z42V4L9VzYR9MQ3hnmS5bNv4QtfFM,118
|
|
74
|
-
magic_hour/resources/v1/files/upload_urls/client.py,sha256=
|
|
65
|
+
magic_hour/resources/v1/files/upload_urls/client.py,sha256=ZosQgveds46TZJQzZO5qWT6qINEVrKcLiYjRmk3evKs,5218
|
|
75
66
|
magic_hour/resources/v1/image_background_remover/README.md,sha256=u2LiYWT3aHHZHQp5DrpVi69LPDH1B2BkQZ-jXiB0jb8,4526
|
|
76
67
|
magic_hour/resources/v1/image_background_remover/__init__.py,sha256=Vb_e8zKEh7bdrq0q1175DqyOd1ptPBUIfSKSLFPBVU4,166
|
|
77
|
-
magic_hour/resources/v1/image_background_remover/client.py,sha256=
|
|
68
|
+
magic_hour/resources/v1/image_background_remover/client.py,sha256=SPRZjRJPTu2zpRRq3BRna9Rl0fywOBfo5DgNhn3gqdM,9367
|
|
78
69
|
magic_hour/resources/v1/image_projects/README.md,sha256=mSBoZwFCS0eqkRKwsjURKzLppq2UlPbnMFMsNHhvgK8,4404
|
|
79
70
|
magic_hour/resources/v1/image_projects/__init__.py,sha256=FtA1OC8s-CCOwQ0AaUqlkt9IC0CIZ4_p65E97m3ZcGE,246
|
|
80
|
-
magic_hour/resources/v1/image_projects/client.py,sha256=
|
|
71
|
+
magic_hour/resources/v1/image_projects/client.py,sha256=gDhND6b2KkIHEbAHJgYUjQeCsxLFGi2P7zTjg2CDyjc,10993
|
|
81
72
|
magic_hour/resources/v1/image_projects/client_test.py,sha256=5KH4s0vG13SEUkB6pAa9m7M2dqBUoqIERPhAu1DgPfA,16015
|
|
82
73
|
magic_hour/resources/v1/image_to_video/README.md,sha256=7DjTtEUNEj00xQS7tO74vTf9pYsJpv_dHLrREiLeEZE,6270
|
|
83
74
|
magic_hour/resources/v1/image_to_video/__init__.py,sha256=tY_ABo6evwKQBRSq-M84lNX-pXqmxoozukmrO6NhCgA,126
|
|
84
|
-
magic_hour/resources/v1/image_to_video/client.py,sha256=
|
|
75
|
+
magic_hour/resources/v1/image_to_video/client.py,sha256=fUajB5-kKzT3WC5u7EAeY8_N4k1_r36JmwML4GquQwc,17392
|
|
85
76
|
magic_hour/resources/v1/lip_sync/README.md,sha256=8LCB83V5PY85JnqFXumKdzhHCLZRItMZwYGdKJJu82k,6723
|
|
86
77
|
magic_hour/resources/v1/lip_sync/__init__.py,sha256=MlKUAoHNSKcuNzVyqNfLnLtD_PsqEn3l1TtVpPC1JqQ,106
|
|
87
|
-
magic_hour/resources/v1/lip_sync/client.py,sha256=
|
|
78
|
+
magic_hour/resources/v1/lip_sync/client.py,sha256=_2nMKC7ApWNuB6xFQA91d6s7SK_O28tj2kMvFNDlz90,19035
|
|
88
79
|
magic_hour/resources/v1/photo_colorizer/README.md,sha256=0jcn_EAI70OYOuXywcwFvsmyV-_Q9yuDLckUvDOhr3Y,3427
|
|
89
80
|
magic_hour/resources/v1/photo_colorizer/__init__.py,sha256=7rDjkeUzWG5GXw_4RD1XH7Ygy-_0_OUFX99IgE_RVbE,134
|
|
90
|
-
magic_hour/resources/v1/photo_colorizer/client.py,sha256=
|
|
81
|
+
magic_hour/resources/v1/photo_colorizer/client.py,sha256=mW5VYDmsvU9phtkiY008zarM1CCaWTMTeOTY4zaWDfI,8861
|
|
91
82
|
magic_hour/resources/v1/text_to_video/README.md,sha256=zcQRpUQDWZImGKJwiGUEvI3uo68RU4e9Rks6KxGeaxw,4708
|
|
92
83
|
magic_hour/resources/v1/text_to_video/__init__.py,sha256=F18iHSi9tuYSdgpatznBzb7lbSySNpK-82w96-Om_k4,122
|
|
93
|
-
magic_hour/resources/v1/text_to_video/client.py,sha256=
|
|
84
|
+
magic_hour/resources/v1/text_to_video/client.py,sha256=Cx7NjpcWv_5Ucl42K09jYGUzJ9l04bvBQUlBf9Fk7dI,13620
|
|
94
85
|
magic_hour/resources/v1/video_projects/README.md,sha256=VjX5oB_qd9Bow1qdKySuXvzwmH1tv1RcI38GLkP-A3M,4579
|
|
95
86
|
magic_hour/resources/v1/video_projects/__init__.py,sha256=Pm2S3V2tVycoR5x5zPiFCZSoeY15s5WJaR0pLkJq-Pg,246
|
|
96
|
-
magic_hour/resources/v1/video_projects/client.py,sha256
|
|
87
|
+
magic_hour/resources/v1/video_projects/client.py,sha256=-cB6zYCKNHldfIS0LwapvhjPi9UoUKaPGrXqMXdYlGU,10955
|
|
97
88
|
magic_hour/resources/v1/video_projects/client_test.py,sha256=iOJWM0cFg4QmFOYNVRRvMPX7nCg-1rCnSUh_1aDq96A,15967
|
|
98
89
|
magic_hour/resources/v1/video_to_video/README.md,sha256=DV2WD6o9v_rBRpgB4li0VB5XDb4TyKlqlCZIP9J_irk,8178
|
|
99
90
|
magic_hour/resources/v1/video_to_video/__init__.py,sha256=1SHaRLlsrlBkdxxKBYgdbHrGATlRvqlXc22RpjjHaOA,126
|
|
100
|
-
magic_hour/resources/v1/video_to_video/client.py,sha256=
|
|
91
|
+
magic_hour/resources/v1/video_to_video/client.py,sha256=JkwmlBVa1VR0KFhzgLSdQjzu-CTc2eqisdgeixzTIi0,20060
|
|
101
92
|
magic_hour/types/models/__init__.py,sha256=VLH_NXpUAVSZd16zlv4DobqAQdQFPWkWORqttLv5iDw,4048
|
|
102
93
|
magic_hour/types/models/v1_ai_clothes_changer_create_response.py,sha256=rQJqlDf7Ql46hR4eAepU6SnZS3fH-gewmSJ-OvEY5K0,1102
|
|
103
94
|
magic_hour/types/models/v1_ai_face_editor_create_response.py,sha256=pGpfZMCRhhDYCV-tj3hfmuXvQPhb44csnyrcwh9tfQM,1098
|
|
@@ -166,7 +157,7 @@ magic_hour/types/params/v1_ai_qr_code_generator_create_body.py,sha256=k3HgloxyGC
|
|
|
166
157
|
magic_hour/types/params/v1_ai_qr_code_generator_create_body_style.py,sha256=i3ldwmoQPEnrw654PNIARmpsX-kUHZqaT8wjcc22JoA,839
|
|
167
158
|
magic_hour/types/params/v1_ai_talking_photo_create_body.py,sha256=2UjXVz2uKL3M6qVD3V7eLjj8RFyAeFwFYK2od2tdZxs,1984
|
|
168
159
|
magic_hour/types/params/v1_ai_talking_photo_create_body_assets.py,sha256=PI3lZWCidt1wJtuHeNwV8R2V10ZK6rif5LYraKqtqko,1574
|
|
169
|
-
magic_hour/types/params/v1_ai_talking_photo_create_body_style.py,sha256=
|
|
160
|
+
magic_hour/types/params/v1_ai_talking_photo_create_body_style.py,sha256=bzt72Mdhgj_ItRkHetyQxB2dR9n4TLLog-WF-RyOD8M,1574
|
|
170
161
|
magic_hour/types/params/v1_ai_talking_photo_generate_body_assets.py,sha256=08gLlPEQ2RH9DxrTyEAMFMKAbig85a2NXRwV2jBG9gM,868
|
|
171
162
|
magic_hour/types/params/v1_animation_create_body.py,sha256=02iyLeTcgI4HqfWOSzozX6J5CKmEqpsdVjuyiap5qkY,2303
|
|
172
163
|
magic_hour/types/params/v1_animation_create_body_assets.py,sha256=Mg9teD9lRljt4s4Fl4Ld7S_EsrFiA0Mu-3bed00WA34,2309
|
|
@@ -212,7 +203,7 @@ magic_hour/types/params/v1_video_to_video_create_body.py,sha256=BV52jJcXnOsKaw-M
|
|
|
212
203
|
magic_hour/types/params/v1_video_to_video_create_body_assets.py,sha256=XwdoqT1x5ElcWb6qUfmtabNsyaatEsOygB4gJ154y-M,1660
|
|
213
204
|
magic_hour/types/params/v1_video_to_video_create_body_style.py,sha256=RrDBhN2KQnCf9hGsnl3sAYvuFRsxth2JXfe5la0IYJg,5749
|
|
214
205
|
magic_hour/types/params/v1_video_to_video_generate_body_assets.py,sha256=j06Y1RKZKwEXW9Zdfhr3Lntx7eDAKpH-k1N1XkKuqPM,915
|
|
215
|
-
magic_hour-0.
|
|
216
|
-
magic_hour-0.
|
|
217
|
-
magic_hour-0.
|
|
218
|
-
magic_hour-0.
|
|
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,,
|
magic_hour/core/__init__.py
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
from .api_error import ApiError
|
|
2
|
-
from .auth import (
|
|
3
|
-
AuthKey,
|
|
4
|
-
AuthBasic,
|
|
5
|
-
AuthBearer,
|
|
6
|
-
AuthProvider,
|
|
7
|
-
GrantType,
|
|
8
|
-
OAuth2,
|
|
9
|
-
OAuth2ClientCredentials,
|
|
10
|
-
OAuth2Password,
|
|
11
|
-
)
|
|
12
|
-
from .base_client import AsyncBaseClient, BaseClient, SyncBaseClient
|
|
13
|
-
from .binary_response import BinaryResponse
|
|
14
|
-
from .query import encode_query_param, QueryParams
|
|
15
|
-
from .request import (
|
|
16
|
-
filter_not_given,
|
|
17
|
-
to_content,
|
|
18
|
-
to_encodable,
|
|
19
|
-
to_form_urlencoded,
|
|
20
|
-
RequestOptions,
|
|
21
|
-
default_request_options,
|
|
22
|
-
)
|
|
23
|
-
from .response import from_encodable, AsyncStreamResponse, StreamResponse
|
|
24
|
-
|
|
25
|
-
__all__ = [
|
|
26
|
-
"ApiError",
|
|
27
|
-
"AsyncBaseClient",
|
|
28
|
-
"BaseClient",
|
|
29
|
-
"BinaryResponse",
|
|
30
|
-
"RequestOptions",
|
|
31
|
-
"default_request_options",
|
|
32
|
-
"SyncBaseClient",
|
|
33
|
-
"AuthKey",
|
|
34
|
-
"AuthBasic",
|
|
35
|
-
"AuthBearer",
|
|
36
|
-
"AuthProvider",
|
|
37
|
-
"GrantType",
|
|
38
|
-
"OAuth2",
|
|
39
|
-
"OAuth2ClientCredentials",
|
|
40
|
-
"OAuth2Password",
|
|
41
|
-
"to_encodable",
|
|
42
|
-
"to_form_urlencoded",
|
|
43
|
-
"filter_not_given",
|
|
44
|
-
"to_content",
|
|
45
|
-
"encode_query_param",
|
|
46
|
-
"from_encodable",
|
|
47
|
-
"AsyncStreamResponse",
|
|
48
|
-
"StreamResponse",
|
|
49
|
-
"QueryParams",
|
|
50
|
-
]
|
magic_hour/core/api_error.py
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Generated by Sideko (sideko.dev)
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from json import JSONDecodeError
|
|
6
|
-
import typing
|
|
7
|
-
import httpx
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class ApiError(Exception):
|
|
11
|
-
"""
|
|
12
|
-
A custom exception class for handling API-related errors.
|
|
13
|
-
|
|
14
|
-
This class extends the base Exception class to provide additional context
|
|
15
|
-
for API errors, including the HTTP status code and response body.
|
|
16
|
-
|
|
17
|
-
Attributes:
|
|
18
|
-
status_code: The HTTP status code associated with the error.
|
|
19
|
-
None if no status code is applicable.
|
|
20
|
-
body: The response body or error message content.
|
|
21
|
-
Can be any type depending on the API response format.
|
|
22
|
-
response: The raw httpx response object. See https://www.python-httpx.org/api/#response for object reference
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
status_code: typing.Optional[int]
|
|
26
|
-
body: typing.Any
|
|
27
|
-
response: httpx.Response
|
|
28
|
-
|
|
29
|
-
def __init__(self, *, response: httpx.Response) -> None:
|
|
30
|
-
"""
|
|
31
|
-
Initialize the ApiError with optional status code and body.
|
|
32
|
-
|
|
33
|
-
Args:
|
|
34
|
-
status_code: The HTTP status code of the error.
|
|
35
|
-
Defaults to None.
|
|
36
|
-
|
|
37
|
-
Note:
|
|
38
|
-
The asterisk (*) in the parameters forces keyword arguments,
|
|
39
|
-
making the instantiation more explicit.
|
|
40
|
-
"""
|
|
41
|
-
try:
|
|
42
|
-
self.body = response.json()
|
|
43
|
-
except JSONDecodeError:
|
|
44
|
-
self.body = None
|
|
45
|
-
self.status_code = response.status_code
|
|
46
|
-
self.response = response
|
|
47
|
-
|
|
48
|
-
def __str__(self) -> str:
|
|
49
|
-
"""
|
|
50
|
-
Return a string representation of the ApiError.
|
|
51
|
-
|
|
52
|
-
Returns:
|
|
53
|
-
str: A formatted string containing the status code and body.
|
|
54
|
-
Format: "status_code: {status_code}, body: {body}"
|
|
55
|
-
"""
|
|
56
|
-
return f"status_code: {self.status_code}, body: {self.body}"
|