remotion-lambda 4.0.540__tar.gz → 4.0.541__tar.gz
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.
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/PKG-INFO +1 -1
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda/remotionclient.py +19 -4
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda/version.py +1 -1
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda.egg-info/PKG-INFO +1 -1
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_remotion_client.py +4 -1
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/LICENSE +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/README.md +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda/__init__.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda/asyncremotionclient.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda/exception.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda/models.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda/webhook.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda.egg-info/SOURCES.txt +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda.egg-info/dependency_links.txt +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda.egg-info/requires.txt +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda.egg-info/top_level.txt +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/setup.cfg +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/setup.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/__init__.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/conftest.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/constants.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_get_render_progress_client.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_large_payload_compression.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_render_client_render_media.py +0 -0
- {remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_render_client_render_still.py +0 -0
|
@@ -401,13 +401,21 @@ class RemotionClient:
|
|
|
401
401
|
return True
|
|
402
402
|
return False
|
|
403
403
|
|
|
404
|
-
def _serialize_input_props(
|
|
404
|
+
def _serialize_input_props(
|
|
405
|
+
self,
|
|
406
|
+
input_props: Optional[Dict[str, Any]],
|
|
407
|
+
render_type: RenderType,
|
|
408
|
+
user_specified_bucket_name: Optional[str] = None,
|
|
409
|
+
) -> Dict[str, Any]: # Added type hints
|
|
405
410
|
"""
|
|
406
411
|
Serialize inputProps to a format compatible with Lambda.
|
|
407
412
|
|
|
408
413
|
Args:
|
|
409
414
|
input_props (dict): Input properties to be serialized.
|
|
410
415
|
render_type (RenderType): Type of the render (e.g., 'still' or 'video-or-audio').
|
|
416
|
+
user_specified_bucket_name (Optional[str]): Bucket to upload input props to
|
|
417
|
+
when they exceed the inline limit. When not provided, the default
|
|
418
|
+
Remotion bucket is used.
|
|
411
419
|
|
|
412
420
|
Returns:
|
|
413
421
|
dict: Serialized inputProps in either payload or bucket-url format.
|
|
@@ -418,7 +426,7 @@ class RemotionClient:
|
|
|
418
426
|
|
|
419
427
|
if self._needs_upload(payload_size, render_type):
|
|
420
428
|
hash_value = self._generate_hash(payload)
|
|
421
|
-
bucket_name = self._get_or_create_bucket()
|
|
429
|
+
bucket_name = user_specified_bucket_name or self._get_or_create_bucket()
|
|
422
430
|
key = self._input_props_key(hash_value)
|
|
423
431
|
|
|
424
432
|
self._upload_to_s3(bucket_name, key, payload)
|
|
@@ -571,7 +579,12 @@ class RemotionClient:
|
|
|
571
579
|
# Assuming RenderMediaParams and RenderStillParams both have an input_props attribute
|
|
572
580
|
# and a private_serialized_input_props attribute (even if Optional)
|
|
573
581
|
render_params.private_serialized_input_props = self._serialize_input_props(
|
|
574
|
-
input_props=render_params.input_props,
|
|
582
|
+
input_props=render_params.input_props,
|
|
583
|
+
render_type=render_type,
|
|
584
|
+
user_specified_bucket_name=getattr(
|
|
585
|
+
render_params, "force_bucket_name", None
|
|
586
|
+
)
|
|
587
|
+
or getattr(render_params, "bucket_name", None),
|
|
575
588
|
)
|
|
576
589
|
except (RemotionInvalidArgumentException, ClientError) as e:
|
|
577
590
|
raise RemotionInvalidArgumentException(
|
|
@@ -788,7 +801,9 @@ class RemotionClient:
|
|
|
788
801
|
str: JSON representation of the get compositions request.
|
|
789
802
|
"""
|
|
790
803
|
serialized_input_props = self._serialize_input_props(
|
|
791
|
-
input_props=input_props or {},
|
|
804
|
+
input_props=input_props or {},
|
|
805
|
+
render_type="video-or-audio",
|
|
806
|
+
user_specified_bucket_name=force_bucket_name,
|
|
792
807
|
)
|
|
793
808
|
|
|
794
809
|
params = GetCompositionsParams(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# pylint: disable=missing-module-docstring, missing-final-newline
|
|
2
|
-
VERSION = "4.0.
|
|
2
|
+
VERSION = "4.0.541"
|
|
@@ -317,6 +317,8 @@ def test_construct_render_request_client_error_from_serialize_input_props(
|
|
|
317
317
|
|
|
318
318
|
mock_render_params = Mock()
|
|
319
319
|
mock_render_params.input_props = {"dummy": "data"}
|
|
320
|
+
mock_render_params.force_bucket_name = None
|
|
321
|
+
mock_render_params.bucket_name = None
|
|
320
322
|
mock_render_params.serialize_params.return_value = {"serialized": "params"}
|
|
321
323
|
|
|
322
324
|
with pytest.raises(RemotionInvalidArgumentException) as excinfo:
|
|
@@ -327,7 +329,8 @@ def test_construct_render_request_client_error_from_serialize_input_props(
|
|
|
327
329
|
assert "AccessDenied" in str(excinfo.value) # Ensure the original ClientError info is present
|
|
328
330
|
mock_serialize_input_props.assert_called_once_with(
|
|
329
331
|
input_props=mock_render_params.input_props,
|
|
330
|
-
render_type="still"
|
|
332
|
+
render_type="still",
|
|
333
|
+
user_specified_bucket_name=None,
|
|
331
334
|
)
|
|
332
335
|
|
|
333
336
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/remotion_lambda.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_get_render_progress_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_render_client_render_media.py
RENAMED
|
File without changes
|
{remotion_lambda-4.0.540 → remotion_lambda-4.0.541}/tests/test_render_client_render_still.py
RENAMED
|
File without changes
|