sprocket-systems.coda.sdk 2.0.5__py3-none-any.whl → 2.0.6__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.
- coda/__init__.py +1 -1
- coda/sdk/essence.py +7 -5
- coda/sdk/job.py +43 -0
- coda/sdk/preset.py +25 -1
- {sprocket_systems_coda_sdk-2.0.5.dist-info → sprocket_systems_coda_sdk-2.0.6.dist-info}/METADATA +4 -7
- sprocket_systems_coda_sdk-2.0.6.dist-info/RECORD +15 -0
- sprocket_systems_coda_sdk-2.0.5.dist-info/RECORD +0 -15
- {sprocket_systems_coda_sdk-2.0.5.dist-info → sprocket_systems_coda_sdk-2.0.6.dist-info}/WHEEL +0 -0
- {sprocket_systems_coda_sdk-2.0.5.dist-info → sprocket_systems_coda_sdk-2.0.6.dist-info}/entry_points.txt +0 -0
- {sprocket_systems_coda_sdk-2.0.5.dist-info → sprocket_systems_coda_sdk-2.0.6.dist-info}/licenses/LICENSE +0 -0
coda/__init__.py
CHANGED
coda/sdk/essence.py
CHANGED
|
@@ -298,12 +298,13 @@ class Essence:
|
|
|
298
298
|
|
|
299
299
|
@staticmethod
|
|
300
300
|
def essences_from_files(
|
|
301
|
-
files:
|
|
301
|
+
files: list,
|
|
302
302
|
io_location_id: str | None = None,
|
|
303
|
-
file_info:
|
|
303
|
+
file_info: dict | None = None,
|
|
304
304
|
program: str = "",
|
|
305
|
-
forced_frame_rate: str | None = None
|
|
306
|
-
|
|
305
|
+
forced_frame_rate: str | None = None,
|
|
306
|
+
no_file_scan: bool = False
|
|
307
|
+
) -> list["Essence"]:
|
|
307
308
|
"""Create a list of CodaEssence objects from files.
|
|
308
309
|
|
|
309
310
|
This method inspects local files using the 'coda inspect' command-line tool
|
|
@@ -328,6 +329,7 @@ class Essence:
|
|
|
328
329
|
program (str, optional): The program identifier to assign to the essences.
|
|
329
330
|
Defaults to "".
|
|
330
331
|
forced_frame_rate (str, optional): Specify the frame rate to calculate the FFOA and LFOA
|
|
332
|
+
no_file_scan (bool, optional): Do not use Coda CLI to scan files for metadata
|
|
331
333
|
|
|
332
334
|
Raises:
|
|
333
335
|
ValueError: If `files` is not populated with a list of file paths.
|
|
@@ -355,7 +357,7 @@ class Essence:
|
|
|
355
357
|
|
|
356
358
|
absfiles = [str(Path(f).resolve()) for f in local_files]
|
|
357
359
|
codaexe = shutil.which("coda") or os.getenv(ENV_CODA_CLI_EXE)
|
|
358
|
-
if not codaexe or os.getenv(ENV_NO_CODA_EXE) is not None:
|
|
360
|
+
if not codaexe or os.getenv(ENV_NO_CODA_EXE) is not None or no_file_scan is True:
|
|
359
361
|
if not file_info:
|
|
360
362
|
raise ValueError("Coda CLI not found and file_info was not provided for manual creation.")
|
|
361
363
|
|
coda/sdk/job.py
CHANGED
|
@@ -214,9 +214,16 @@ class JobPayloadBuilder:
|
|
|
214
214
|
JobPayloadBuilder: The builder instance for fluent chaining.
|
|
215
215
|
|
|
216
216
|
Raises:
|
|
217
|
+
ValueError: If no essences have been added yet.
|
|
217
218
|
ValueError: If any essence has an incompatible format.
|
|
218
219
|
|
|
219
220
|
"""
|
|
221
|
+
if not self._essences:
|
|
222
|
+
raise ValueError(
|
|
223
|
+
"Cannot force imax5. No essences have been added. "
|
|
224
|
+
"Call with_essences() before using this method."
|
|
225
|
+
)
|
|
226
|
+
|
|
220
227
|
incompatible_formats = [
|
|
221
228
|
essence.payload["definition"]["format"]
|
|
222
229
|
for essence in self._essences
|
|
@@ -242,7 +249,16 @@ class JobPayloadBuilder:
|
|
|
242
249
|
Returns:
|
|
243
250
|
JobPayloadBuilder: The builder instance for fluent chaining.
|
|
244
251
|
|
|
252
|
+
Raises:
|
|
253
|
+
ValueError: If no essences have been added yet.
|
|
254
|
+
|
|
245
255
|
"""
|
|
256
|
+
if not self._essences:
|
|
257
|
+
raise ValueError(
|
|
258
|
+
"Cannot set input language. No essences have been added. "
|
|
259
|
+
"Call with_essences() before using this method."
|
|
260
|
+
)
|
|
261
|
+
|
|
246
262
|
for essence in self._essences:
|
|
247
263
|
essence.payload["definition"]["language"] = language.value
|
|
248
264
|
return self
|
|
@@ -259,7 +275,16 @@ class JobPayloadBuilder:
|
|
|
259
275
|
Returns:
|
|
260
276
|
JobPayloadBuilder: The builder instance for fluent chaining.
|
|
261
277
|
|
|
278
|
+
Raises:
|
|
279
|
+
ValueError: If no essences have been added yet.
|
|
280
|
+
|
|
262
281
|
"""
|
|
282
|
+
if not self._essences:
|
|
283
|
+
raise ValueError(
|
|
284
|
+
"Cannot set program for type. No essences have been added. "
|
|
285
|
+
"Call with_essences() before using this method."
|
|
286
|
+
)
|
|
287
|
+
|
|
263
288
|
for essence in self._essences:
|
|
264
289
|
if type in essence.payload["definition"]["type"]:
|
|
265
290
|
essence.payload["definition"]["program"] = program
|
|
@@ -277,7 +302,16 @@ class JobPayloadBuilder:
|
|
|
277
302
|
Returns:
|
|
278
303
|
JobPayloadBuilder: The builder instance for fluent chaining.
|
|
279
304
|
|
|
305
|
+
Raises:
|
|
306
|
+
ValueError: If no essences have been added yet.
|
|
307
|
+
|
|
280
308
|
"""
|
|
309
|
+
if not self._essences:
|
|
310
|
+
raise ValueError(
|
|
311
|
+
"Cannot set program for format. No essences have been added. "
|
|
312
|
+
"Call with_essences() before using this method."
|
|
313
|
+
)
|
|
314
|
+
|
|
281
315
|
for essence in self._essences:
|
|
282
316
|
if format == essence.payload["definition"]["format"]:
|
|
283
317
|
essence.payload["definition"]["program"] = program
|
|
@@ -292,7 +326,16 @@ class JobPayloadBuilder:
|
|
|
292
326
|
Returns:
|
|
293
327
|
JobPayloadBuilder: The builder instance for fluent chaining.
|
|
294
328
|
|
|
329
|
+
Raises:
|
|
330
|
+
ValueError: If no essences have been added yet.
|
|
331
|
+
|
|
295
332
|
"""
|
|
333
|
+
if not self._essences:
|
|
334
|
+
raise ValueError(
|
|
335
|
+
"Cannot set unique program. No essences have been added. "
|
|
336
|
+
"Call with_essences() before using this method."
|
|
337
|
+
)
|
|
338
|
+
|
|
296
339
|
for essence in self._essences:
|
|
297
340
|
essence.payload["definition"]["program"] = program
|
|
298
341
|
return self
|
coda/sdk/preset.py
CHANGED
|
@@ -168,7 +168,7 @@ class Preset:
|
|
|
168
168
|
|
|
169
169
|
@staticmethod
|
|
170
170
|
def get_io_location_id_by_name(io_location_name: str) -> str:
|
|
171
|
-
"""Get an IO Location ID by its name.
|
|
171
|
+
"""Get an IO Location ID by its name. Requires Org Admin/Owner API token.
|
|
172
172
|
|
|
173
173
|
Args:
|
|
174
174
|
io_location_name (str): The name of the IO location to search for.
|
|
@@ -213,3 +213,27 @@ class Preset:
|
|
|
213
213
|
raise ValueError(f"Multiple workflows found with name '{workflow_name}': {[w['id'] for w in matches]}")
|
|
214
214
|
|
|
215
215
|
return matches[0]
|
|
216
|
+
|
|
217
|
+
@staticmethod
|
|
218
|
+
def get_naming_convention_by_name(naming_convention_name: str) -> dict:
|
|
219
|
+
"""Get a naming convention by its name.
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
naming_convention_name (str): The name of the naming convention to search for.
|
|
223
|
+
|
|
224
|
+
Returns:
|
|
225
|
+
dict: The complete naming_convention object.
|
|
226
|
+
|
|
227
|
+
Raises:
|
|
228
|
+
ValueError: If no naming convention with the given name is found, or if multiple match.
|
|
229
|
+
|
|
230
|
+
"""
|
|
231
|
+
naming_conventions = Preset.get_presets(PresetType.NAMING)
|
|
232
|
+
matches = [n for n in naming_conventions if n["name"] == naming_convention_name]
|
|
233
|
+
|
|
234
|
+
if len(matches) == 0:
|
|
235
|
+
raise ValueError(f"No naming convention found with name '{naming_convention_name}'")
|
|
236
|
+
if len(matches) > 1:
|
|
237
|
+
raise ValueError(f"Multiple naming conventions found with name '{naming_convention_name}': {[n['id'] for n in matches]}")
|
|
238
|
+
|
|
239
|
+
return matches[0]["convention_data"]
|
{sprocket_systems_coda_sdk-2.0.5.dist-info → sprocket_systems_coda_sdk-2.0.6.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sprocket-systems.coda.sdk
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: The Coda SDK provides a Python interface to define Coda workflows, create jobs and run them.
|
|
5
5
|
Keywords: python,coda,sdk
|
|
6
6
|
Author-Email: Sprocket Systems <support@sprocket.systems>
|
|
@@ -9,13 +9,10 @@ License-File: LICENSE
|
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
14
|
Project-URL: Documentation, https://v2.coda.sprocket.systems/docs/sdks/python/
|
|
18
|
-
Requires-Python: >=3.
|
|
15
|
+
Requires-Python: >=3.11
|
|
19
16
|
Requires-Dist: requests
|
|
20
17
|
Requires-Dist: soundfile>=0.13.1
|
|
21
18
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
coda/__init__.py,sha256=e52umPb_buoXPUDoFPRK2lJpeuFNwbVGNfsRFwy5y3w,229
|
|
2
|
+
coda/sdk/__init__.py,sha256=wOCrh1piLbgLVOMhKuLFYA62n60IN89eXGHpFKwFAE4,691
|
|
3
|
+
coda/sdk/constants.py,sha256=HRWf8zE8IFVRy-2apsae4BSecXod3BsQiozaMkJkY88,674
|
|
4
|
+
coda/sdk/enums.py,sha256=1l4pK8pNofV56WVAiQXitlY6m9iTfEv9I159GWkTZKE,6582
|
|
5
|
+
coda/sdk/essence.py,sha256=x70SwSJWc95mHL8y9vHNc-hg5TDgy_TxPVykU7CVAqc,20414
|
|
6
|
+
coda/sdk/job.py,sha256=DfQGI9bKoji_dPLqVoAiufNKeupSDg_kdkNSfaLDhs0,21315
|
|
7
|
+
coda/sdk/preset.py,sha256=OtaRVJU6luBBD_6Ehd8ZkcjXL_YVoXfziI14E-GS4Xw,8934
|
|
8
|
+
coda/sdk/utils.py,sha256=uC9hHJtMkGu3pLvJOwq9kIdf6r7KxMRAbzaRyf95EdQ,10565
|
|
9
|
+
coda/sdk/workflow.py,sha256=4-r3hWUEabyzS1vA0Ql-1VY5FoQA3KNnWlhwqQ0umbw,62899
|
|
10
|
+
coda/tc_tools.py,sha256=hEtVE6xtPqg93WfJ-lQdRQroPdQTkH5HkMLWCIkwIlo,22010
|
|
11
|
+
sprocket_systems_coda_sdk-2.0.6.dist-info/METADATA,sha256=PRa_kJe7JPsmiRLHWuKhpHnnIjqcx8a9TLIGbu6QOVw,1106
|
|
12
|
+
sprocket_systems_coda_sdk-2.0.6.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
|
|
13
|
+
sprocket_systems_coda_sdk-2.0.6.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
14
|
+
sprocket_systems_coda_sdk-2.0.6.dist-info/licenses/LICENSE,sha256=wrFjizFlraIAPW8JIteGftNH2laAZBBRhdEnPVUsKTM,10198
|
|
15
|
+
sprocket_systems_coda_sdk-2.0.6.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
coda/__init__.py,sha256=A5O6J7ACQsUK8TvmgzsxIrWX_dYll0VQGuGAuI7X5FE,229
|
|
2
|
-
coda/sdk/__init__.py,sha256=wOCrh1piLbgLVOMhKuLFYA62n60IN89eXGHpFKwFAE4,691
|
|
3
|
-
coda/sdk/constants.py,sha256=HRWf8zE8IFVRy-2apsae4BSecXod3BsQiozaMkJkY88,674
|
|
4
|
-
coda/sdk/enums.py,sha256=1l4pK8pNofV56WVAiQXitlY6m9iTfEv9I159GWkTZKE,6582
|
|
5
|
-
coda/sdk/essence.py,sha256=sv4ge8d--cTzXj0Qp7tHOn3skUIhV_KIej3v2kB2XvE,20264
|
|
6
|
-
coda/sdk/job.py,sha256=7wV9-y9Xvi8QN9BJ3AtugMj-CQqH226DYf_GXLe-Ucw,19868
|
|
7
|
-
coda/sdk/preset.py,sha256=93IKUSSEWe-E-jOOdM_TxJveICc3aKD8fY8_avg1Gbw,7951
|
|
8
|
-
coda/sdk/utils.py,sha256=uC9hHJtMkGu3pLvJOwq9kIdf6r7KxMRAbzaRyf95EdQ,10565
|
|
9
|
-
coda/sdk/workflow.py,sha256=4-r3hWUEabyzS1vA0Ql-1VY5FoQA3KNnWlhwqQ0umbw,62899
|
|
10
|
-
coda/tc_tools.py,sha256=hEtVE6xtPqg93WfJ-lQdRQroPdQTkH5HkMLWCIkwIlo,22010
|
|
11
|
-
sprocket_systems_coda_sdk-2.0.5.dist-info/METADATA,sha256=ha_aEO7RaRRntAQYzBsLVf1geHXvFoVfcso8mB6Vyvc,1252
|
|
12
|
-
sprocket_systems_coda_sdk-2.0.5.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
|
|
13
|
-
sprocket_systems_coda_sdk-2.0.5.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
14
|
-
sprocket_systems_coda_sdk-2.0.5.dist-info/licenses/LICENSE,sha256=wrFjizFlraIAPW8JIteGftNH2laAZBBRhdEnPVUsKTM,10198
|
|
15
|
-
sprocket_systems_coda_sdk-2.0.5.dist-info/RECORD,,
|
{sprocket_systems_coda_sdk-2.0.5.dist-info → sprocket_systems_coda_sdk-2.0.6.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|