remotion-lambda 4.0.207__tar.gz → 4.0.209__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.207 → remotion_lambda-4.0.209}/PKG-INFO +2 -4
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda/models.py +25 -6
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda/remotionclient.py +11 -6
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda/version.py +1 -1
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda.egg-info/PKG-INFO +3 -5
- remotion_lambda-4.0.209/tests/test_get_render_progress_client.py +22 -0
- remotion_lambda-4.0.207/tests/test_get_render_progress_client.py +0 -13
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/LICENSE +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/README.md +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda/__init__.py +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda.egg-info/SOURCES.txt +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda.egg-info/dependency_links.txt +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda.egg-info/requires.txt +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/remotion_lambda.egg-info/top_level.txt +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/setup.cfg +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/setup.py +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/tests/__init__.py +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/tests/test_render_client_render_media.py +0 -0
- {remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/tests/test_render_client_render_still.py +0 -0
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: remotion_lambda
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.209
|
|
4
4
|
Summary: Remotion Lambda client
|
|
5
5
|
Home-page: https://github.com/remotion-dev/remotion/tree/main/packages/lambda-python
|
|
6
6
|
Author: Jonny Burger
|
|
7
7
|
Author-email: jonny@remotion.dev
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Platform: UNKNOWN
|
|
10
8
|
Requires-Python: >=3.6
|
|
11
9
|
Description-Content-Type: text/markdown
|
|
12
10
|
License-File: LICENSE
|
|
11
|
+
Requires-Dist: boto3<1.35.0,>=1.34.23
|
|
13
12
|
|
|
14
13
|
Remotion is a framework for creating videos programmatically using React.
|
|
15
|
-
|
|
@@ -108,14 +108,27 @@ class CustomCredentialsWithoutSensitiveData:
|
|
|
108
108
|
@dataclass
|
|
109
109
|
class CustomCredentials(CustomCredentialsWithoutSensitiveData):
|
|
110
110
|
"""
|
|
111
|
-
|
|
111
|
+
Represents custom credentials, extending credentials without sensitive data.
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
Attributes:
|
|
114
|
+
access_key_id (Optional[str]): The access key ID.
|
|
115
|
+
secret_access_key (Optional[str]): The secret access key.
|
|
116
|
+
"""
|
|
117
117
|
access_key_id: Optional[str] = None
|
|
118
118
|
secret_access_key: Optional[str] = None
|
|
119
|
+
region: Optional[str] = None
|
|
120
|
+
|
|
121
|
+
def serialize_params(self) -> Dict:
|
|
122
|
+
"""
|
|
123
|
+
Serializes the credentials to a dictionary.
|
|
124
|
+
"""
|
|
125
|
+
parameters = {
|
|
126
|
+
'accessKeyId': self.access_key_id,
|
|
127
|
+
'secretAccessKey': self.secret_access_key,
|
|
128
|
+
'region': self.region,
|
|
129
|
+
'endpoint': self.endpoint,
|
|
130
|
+
}
|
|
131
|
+
return parameters
|
|
119
132
|
|
|
120
133
|
|
|
121
134
|
@dataclass
|
|
@@ -184,6 +197,7 @@ class RenderProgressParams:
|
|
|
184
197
|
region: str
|
|
185
198
|
log_level: str
|
|
186
199
|
force_path_style: Optional[bool] = None
|
|
200
|
+
s3_output_provider: Optional[CustomCredentials] = None
|
|
187
201
|
|
|
188
202
|
def serialize_params(self) -> Dict:
|
|
189
203
|
"""
|
|
@@ -195,12 +209,17 @@ class RenderProgressParams:
|
|
|
195
209
|
'type': 'status',
|
|
196
210
|
"version": VERSION,
|
|
197
211
|
"logLevel": self.log_level,
|
|
198
|
-
"s3OutputProvider":
|
|
212
|
+
"s3OutputProvider": self.s3_output_provider,
|
|
199
213
|
}
|
|
200
214
|
if self.force_path_style is not None:
|
|
201
215
|
parameters['forcePathStyle'] = self.force_path_style
|
|
202
216
|
else:
|
|
203
217
|
parameters['forcePathStyle'] = False
|
|
218
|
+
|
|
219
|
+
if self.s3_output_provider is not None:
|
|
220
|
+
parameters['s3OutputProvider'] = self.s3_output_provider.serialize_params()
|
|
221
|
+
else:
|
|
222
|
+
parameters['s3OutputProvider'] = None
|
|
204
223
|
return parameters
|
|
205
224
|
|
|
206
225
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
from dataclasses import asdict
|
|
3
3
|
import json
|
|
4
4
|
from math import ceil
|
|
5
|
-
from typing import Union, Literal
|
|
5
|
+
from typing import Optional, Union, Literal
|
|
6
6
|
from enum import Enum
|
|
7
7
|
import boto3
|
|
8
|
-
from .models import (CostsInfo, RenderMediaParams, RenderMediaProgress,
|
|
8
|
+
from .models import (CostsInfo, CustomCredentials, RenderMediaParams, RenderMediaProgress,
|
|
9
9
|
RenderMediaResponse, RenderProgressParams, RenderStillResponse,
|
|
10
10
|
RenderStillParams)
|
|
11
11
|
|
|
@@ -153,7 +153,9 @@ class RemotionClient:
|
|
|
153
153
|
def construct_render_progress_request(self,
|
|
154
154
|
render_id: str,
|
|
155
155
|
bucket_name: str,
|
|
156
|
-
log_level="info"
|
|
156
|
+
log_level="info",
|
|
157
|
+
s3_output_provider: Optional[CustomCredentials] = None
|
|
158
|
+
) -> str:
|
|
157
159
|
"""
|
|
158
160
|
Construct a render progress request in JSON format.
|
|
159
161
|
|
|
@@ -169,7 +171,8 @@ class RemotionClient:
|
|
|
169
171
|
bucket_name=bucket_name,
|
|
170
172
|
function_name=self.function_name,
|
|
171
173
|
region=self.region,
|
|
172
|
-
log_level=log_level
|
|
174
|
+
log_level=log_level,
|
|
175
|
+
s3_output_provider=s3_output_provider
|
|
173
176
|
)
|
|
174
177
|
return json.dumps(progress_params.serialize_params())
|
|
175
178
|
|
|
@@ -228,7 +231,9 @@ class RemotionClient:
|
|
|
228
231
|
def get_render_progress(self,
|
|
229
232
|
render_id: str,
|
|
230
233
|
bucket_name: str,
|
|
231
|
-
log_level="info"
|
|
234
|
+
log_level="info",
|
|
235
|
+
s3_output_provider: Optional[CustomCredentials] = None
|
|
236
|
+
) -> RenderMediaProgress:
|
|
232
237
|
"""
|
|
233
238
|
Get the progress of a render.
|
|
234
239
|
|
|
@@ -241,7 +246,7 @@ class RemotionClient:
|
|
|
241
246
|
RenderProgress: Progress of the render.
|
|
242
247
|
"""
|
|
243
248
|
params = self.construct_render_progress_request(
|
|
244
|
-
render_id, bucket_name, log_level=log_level)
|
|
249
|
+
render_id, bucket_name, log_level=log_level, s3_output_provider=s3_output_provider)
|
|
245
250
|
progress_response = self._invoke_lambda(
|
|
246
251
|
function_name=self.function_name, payload=params)
|
|
247
252
|
if progress_response:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# pylint: disable=missing-module-docstring, missing-final-newline
|
|
2
|
-
VERSION = "4.0.
|
|
2
|
+
VERSION = "4.0.209"
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 4.0.
|
|
2
|
+
Name: remotion_lambda
|
|
3
|
+
Version: 4.0.209
|
|
4
4
|
Summary: Remotion Lambda client
|
|
5
5
|
Home-page: https://github.com/remotion-dev/remotion/tree/main/packages/lambda-python
|
|
6
6
|
Author: Jonny Burger
|
|
7
7
|
Author-email: jonny@remotion.dev
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Platform: UNKNOWN
|
|
10
8
|
Requires-Python: >=3.6
|
|
11
9
|
Description-Content-Type: text/markdown
|
|
12
10
|
License-File: LICENSE
|
|
11
|
+
Requires-Dist: boto3<1.35.0,>=1.34.23
|
|
13
12
|
|
|
14
13
|
Remotion is a framework for creating videos programmatically using React.
|
|
15
|
-
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from unittest import TestCase
|
|
2
|
+
|
|
3
|
+
from remotion_lambda.remotionclient import RemotionClient, CustomCredentials
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TestRemotionClient(TestCase):
|
|
7
|
+
def test_remotionprogress_construct_request(self):
|
|
8
|
+
client = RemotionClient(region="us-east-1",
|
|
9
|
+
serve_url="testbed",
|
|
10
|
+
function_name="remotion-render")
|
|
11
|
+
|
|
12
|
+
print(client.construct_render_progress_request(
|
|
13
|
+
render_id="abcdef",
|
|
14
|
+
bucket_name="remotion-render",
|
|
15
|
+
s3_output_provider=CustomCredentials(
|
|
16
|
+
endpoint="https://s3.us-east-1.amazonaws.com",
|
|
17
|
+
access_key_id="accessKeyId",
|
|
18
|
+
secret_access_key="secretAccessKey",
|
|
19
|
+
region="us-east-1"
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
)
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from unittest import TestCase
|
|
2
|
-
|
|
3
|
-
from remotion_lambda.remotionclient import RemotionClient
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class TestRemotionClient(TestCase):
|
|
7
|
-
def test_remotionprogress_construct_request(self):
|
|
8
|
-
client = RemotionClient(region="us-east-1",
|
|
9
|
-
serve_url="testbed",
|
|
10
|
-
function_name="remotion-render")
|
|
11
|
-
|
|
12
|
-
print(client.construct_render_progress_request(
|
|
13
|
-
render_id="abcdef", bucket_name="remotion-render"))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/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
|
{remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/tests/test_render_client_render_media.py
RENAMED
|
File without changes
|
{remotion_lambda-4.0.207 → remotion_lambda-4.0.209}/tests/test_render_client_render_still.py
RENAMED
|
File without changes
|