typed-ffmpeg-compatible 2.7.2__tar.gz → 2.7.3__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.
Files changed (47) hide show
  1. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/PKG-INFO +1 -1
  2. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/pyproject.toml +1 -1
  3. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/factory.py +25 -4
  4. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/LICENSE +0 -0
  5. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/README.md +0 -0
  6. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/__init__.py +0 -0
  7. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/base.py +0 -0
  8. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/common/__init__.py +0 -0
  9. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/common/schema.py +0 -0
  10. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/common/serialize.py +0 -0
  11. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/__init__.py +0 -0
  12. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/compile.py +0 -0
  13. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/context.py +0 -0
  14. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/global_runnable/__init__.py +0 -0
  15. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/global_runnable/global_args.py +0 -0
  16. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/global_runnable/runnable.py +0 -0
  17. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/io/__init__.py +0 -0
  18. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/io/_input.py +0 -0
  19. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/io/_output.py +0 -0
  20. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/io/output_args.py +0 -0
  21. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/nodes.py +0 -0
  22. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/schema.py +0 -0
  23. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/utils.py +0 -0
  24. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/dag/validate.py +0 -0
  25. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/exceptions.py +0 -0
  26. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/filters.py +0 -0
  27. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/info.py +0 -0
  28. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/probe.py +0 -0
  29. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/py.typed +0 -0
  30. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/schema.py +0 -0
  31. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/sources.py +0 -0
  32. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/streams/__init__.py +0 -0
  33. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/streams/audio.py +0 -0
  34. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/streams/av.py +0 -0
  35. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/streams/channel_layout.py +0 -0
  36. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/streams/video.py +0 -0
  37. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/types.py +0 -0
  38. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/__init__.py +0 -0
  39. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/escaping.py +0 -0
  40. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/forzendict.py +0 -0
  41. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/lazy_eval/__init__.py +0 -0
  42. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/lazy_eval/operator.py +0 -0
  43. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/lazy_eval/schema.py +0 -0
  44. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/run.py +0 -0
  45. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/snapshot.py +0 -0
  46. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/typing.py +0 -0
  47. {typed_ffmpeg_compatible-2.7.2 → typed_ffmpeg_compatible-2.7.3}/src/typed_ffmpeg/utils/view.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: typed-ffmpeg-compatible
3
- Version: 2.7.2
3
+ Version: 2.7.3
4
4
  Summary: Modern Python FFmpeg wrappers offer comprehensive support for complex filters, complete with detailed typing and documentation.
5
5
  Home-page: https://livingbio.github.io/typed-ffmpeg/
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "typed-ffmpeg-compatible"
3
- version = "2.7.2"
3
+ version = "2.7.3"
4
4
  description = "Modern Python FFmpeg wrappers offer comprehensive support for complex filters, complete with detailed typing and documentation."
5
5
  authors = ["lucemia <lucemia@gmail.com>"]
6
6
  readme = "README.md"
@@ -15,6 +15,27 @@ from ..utils.run import ignore_default
15
15
  from .nodes import FilterableStream, FilterNode
16
16
 
17
17
 
18
+ def eval_formula(formula: str, **kwargs: Any) -> list[StreamType]:
19
+ """
20
+ Evaluate a formula string with the given parameters.
21
+
22
+ This function evaluates a formula string using the provided parameters.
23
+ It supports basic arithmetic operations and conditional logic.
24
+
25
+ Args:
26
+ formula: The formula string to evaluate
27
+ **kwargs: Additional keyword arguments to pass to the formula
28
+
29
+ Returns:
30
+ The result of the formula evaluation
31
+ """
32
+ # Convert formula to Python code
33
+ return eval(
34
+ formula,
35
+ {"StreamType": StreamType, "re": re, **kwargs},
36
+ )
37
+
38
+
18
39
  def filter_node_factory(
19
40
  ffmpeg_filter_def: FFMpegFilterDef, *inputs: FilterableStream, **kwargs: Any
20
41
  ) -> FilterNode:
@@ -45,9 +66,9 @@ def filter_node_factory(
45
66
 
46
67
  if isinstance(ffmpeg_filter_def.typings_input, str):
47
68
  input_typings = tuple(
48
- eval(
69
+ eval_formula(
49
70
  ffmpeg_filter_def.typings_input,
50
- {"StreamType": StreamType, "re": re, **kwargs},
71
+ **kwargs,
51
72
  )
52
73
  )
53
74
  else:
@@ -58,9 +79,9 @@ def filter_node_factory(
58
79
 
59
80
  if isinstance(ffmpeg_filter_def.typings_output, str):
60
81
  output_typings = tuple(
61
- eval(
82
+ eval_formula(
62
83
  ffmpeg_filter_def.typings_output,
63
- {"StreamType": StreamType, "re": re, **kwargs},
84
+ **kwargs,
64
85
  )
65
86
  )
66
87
  else: