Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
635 changes: 509 additions & 126 deletions README.md

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from setuptools import setup, find_packages # noqa: H301
from setuptools import setup, find_packages
from pathlib import Path

NAME = "shotstack-sdk"
VERSION = "0.2.5"
VERSION = "0.2.6"
# To install the library, run the following
#
# python setup.py install
Expand All @@ -14,6 +15,9 @@
"python-dateutil",
]

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()

setup(
name=NAME,
version=VERSION,
Expand All @@ -26,15 +30,6 @@
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
long_description_content_type="text/markdown",
long_description="""\
Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON
and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file
location when complete.

For more details visit [shotstack.io](https://shotstack.io) or checkout our
[getting started](https://shotstack.gitbook.io/docs/guides/getting-started) documentation.

View the GitHub repo for full [SDK documentation](https://github.com/shotstack/shotstack-sdk-python/).
"""
long_description=long_description,
long_description_content_type="text/markdown"
)
9 changes: 9 additions & 0 deletions shotstack_sdk/model/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ class Asset(ModelComposed):
"""

allowed_values = {
('volume_effect',): {
'FADEIN': "fadeIn",
'FADEOUT': "fadeOut",
'FADEINFADEOUT': "fadeInFadeOut",
},
('style',): {
'MINIMAL': "minimal",
'BLOCKBUSTER': "blockbuster",
Expand Down Expand Up @@ -133,6 +138,7 @@ def openapi_types():
return {
'trim': (float,), # noqa: E501
'volume': (float,), # noqa: E501
'volume_effect': (str,), # noqa: E501
'crop': (Crop,), # noqa: E501
'style': (str,), # noqa: E501
'color': (str,), # noqa: E501
Expand Down Expand Up @@ -168,6 +174,7 @@ def discriminator():
attribute_map = {
'trim': 'trim', # noqa: E501
'volume': 'volume', # noqa: E501
'volume_effect': 'volumeEffect', # noqa: E501
'crop': 'crop', # noqa: E501
'style': 'style', # noqa: E501
'color': 'color', # noqa: E501
Expand Down Expand Up @@ -226,6 +233,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
trim (float): The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached.. [optional] # noqa: E501
volume (float): Set the volume for the audio clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1).. [optional] # noqa: E501
volume_effect (str): The volume effect to apply to the video asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
crop (Crop): [optional] # noqa: E501
style (str): Uses a preset to apply font properties and styling to the title. <ul> <li>`minimal`</li> <li>`blockbuster`</li> <li>`vogue`</li> <li>`sketchy`</li> <li>`skinny`</li> <li>`chunk`</li> <li>`chunkLight`</li> <li>`marker`</li> <li>`future`</li> <li>`subtitle`</li> </ul>. [optional] # noqa: E501
color (str): Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.. [optional] # noqa: E501
Expand Down Expand Up @@ -342,6 +350,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
trim (float): The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached.. [optional] # noqa: E501
volume (float): Set the volume for the audio clip between 0 and 1 where 0 is muted and 1 is full volume (defaults to 1).. [optional] # noqa: E501
volume_effect (str): The volume effect to apply to the video asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
crop (Crop): [optional] # noqa: E501
style (str): Uses a preset to apply font properties and styling to the title. <ul> <li>`minimal`</li> <li>`blockbuster`</li> <li>`vogue`</li> <li>`sketchy`</li> <li>`skinny`</li> <li>`chunk`</li> <li>`chunkLight`</li> <li>`marker`</li> <li>`future`</li> <li>`subtitle`</li> </ul>. [optional] # noqa: E501
color (str): Set the text color using hexadecimal color notation. Transparency is supported by setting the first two characters of the hex string (opposite to HTML), i.e. #80ffffff will be white with 50% transparency.. [optional] # noqa: E501
Expand Down
24 changes: 18 additions & 6 deletions shotstack_sdk/model/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,23 @@ class Clip(ModelNormal):
},
('effect',): {
'ZOOMIN': "zoomIn",
'ZOOMINSLOW': "zoomInSlow",
'ZOOMINFAST': "zoomInFast",
'ZOOMOUT': "zoomOut",
'ZOOMOUTSLOW': "zoomOutSlow",
'ZOOMOUTFAST': "zoomOutFast",
'SLIDELEFT': "slideLeft",
'SLIDELEFTSLOW': "slideLeftSLow",
'SLIDELEFTFAST': "slideLeftFast",
'SLIDERIGHT': "slideRight",
'SLIDERIGHTSLOW': "slideRightSlow",
'SLIDERIGHTFAST': "slideRightFast",
'SLIDEUP': "slideUp",
'SLIDEUPSLOW': "slideUpSlow",
'SLIDEUPFAST': "slideUpFast",
'SLIDEDOWN': "slideDown",
'SLIDEDOWNSLOW': "slideDownSlow",
'SLIDEDOWNFAST': "slideDownFast",
},
('filter',): {
'BOOST': "boost",
Expand Down Expand Up @@ -207,13 +219,13 @@ def _from_openapi_data(cls, asset, start, length, *args, **kwargs): # noqa: E50
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
fit (str): Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`crop` (default) - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>. [optional] # noqa: E501
fit (str): Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`crop` <b>(default)</b> - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>. [optional] # noqa: E501
scale (float): Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks.. [optional] # noqa: E501
position (str): Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>. [optional] # noqa: E501
offset (Offset): [optional] # noqa: E501
transition (Transition): [optional] # noqa: E501
effect (str): A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul>. [optional] # noqa: E501
filter (str): A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`invert` - invert colors</li> </ul>. [optional] # noqa: E501
effect (str): A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul> The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`.. [optional] # noqa: E501
filter (str): A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`negative` - negative colors</li> </ul>. [optional] # noqa: E501
opacity (float): Sets the opacity of the Clip where 1 is opaque and 0 is transparent.. [optional] # noqa: E501
transform (Transformation): [optional] # noqa: E501
"""
Expand Down Expand Up @@ -305,13 +317,13 @@ def __init__(self, asset, start, length, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
fit (str): Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`crop` (default) - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>. [optional] # noqa: E501
fit (str): Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`crop` <b>(default)</b> - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>. [optional] # noqa: E501
scale (float): Scale the asset to a fraction of the viewport size - i.e. setting the scale to 0.5 will scale asset to half the size of the viewport. This is useful for picture-in-picture video and scaling images such as logos and watermarks.. [optional] # noqa: E501
position (str): Place the asset in one of nine predefined positions of the viewport. This is most effective for when the asset is scaled and you want to position the element to a specific position. <ul> <li>`top` - top (center)</li> <li>`topRight` - top right</li> <li>`right` - right (center)</li> <li>`bottomRight` - bottom right</li> <li>`bottom` - bottom (center)</li> <li>`bottomLeft` - bottom left</li> <li>`left` - left (center)</li> <li>`topLeft` - top left</li> <li>`center` - center</li> </ul>. [optional] # noqa: E501
offset (Offset): [optional] # noqa: E501
transition (Transition): [optional] # noqa: E501
effect (str): A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul>. [optional] # noqa: E501
filter (str): A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`invert` - invert colors</li> </ul>. [optional] # noqa: E501
effect (str): A motion effect to apply to the Clip. <ul> <li>`zoomIn` - slow zoom in</li> <li>`zoomOut` - slow zoom out</li> <li>`slideLeft` - slow slide (pan) left</li> <li>`slideRight` - slow slide (pan) right</li> <li>`slideUp` - slow slide (pan) up</li> <li>`slideDown` - slow slide (pan) down</li> </ul> The motion effect speed can also be controlled by appending `Fast` or `Slow` to the effect, e.g. `zoomInFast` or `slideRightSlow`.. [optional] # noqa: E501
filter (str): A filter effect to apply to the Clip. <ul> <li>`boost` - boost contrast and saturation</li> <li>`contrast` - increase contrast</li> <li>`darken` - darken the scene</li> <li>`greyscale` - remove colour</li> <li>`lighten` - lighten the scene</li> <li>`muted` - reduce saturation and contrast</li> <li>`negative` - negative colors</li> </ul>. [optional] # noqa: E501
opacity (float): Sets the opacity of the Clip where 1 is opaque and 0 is transparent.. [optional] # noqa: E501
transform (Transformation): [optional] # noqa: E501
"""
Expand Down
22 changes: 13 additions & 9 deletions shotstack_sdk/model/destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@

def lazy_import():
from shotstack_sdk.model.mux_destination import MuxDestination
from shotstack_sdk.model.mux_destination_options import MuxDestinationOptions
from shotstack_sdk.model.s3_destination import S3Destination
from shotstack_sdk.model.s3_destination_options import S3DestinationOptions
from shotstack_sdk.model.shotstack_destination import ShotstackDestination
globals()['MuxDestination'] = MuxDestination
globals()['MuxDestinationOptions'] = MuxDestinationOptions
globals()['S3Destination'] = S3Destination
globals()['S3DestinationOptions'] = S3DestinationOptions
globals()['ShotstackDestination'] = ShotstackDestination


Expand Down Expand Up @@ -92,7 +94,7 @@ def openapi_types():
lazy_import()
return {
'exclude': (bool,), # noqa: E501
'options': (MuxDestinationOptions,), # noqa: E501
'options': (S3DestinationOptions,), # noqa: E501
'provider': (str,), # noqa: E501
}

Expand All @@ -101,6 +103,7 @@ def discriminator():
lazy_import()
val = {
'MuxDestination': MuxDestination,
'S3Destination': S3Destination,
'ShotstackDestination': ShotstackDestination,
}
if not val:
Expand Down Expand Up @@ -152,9 +155,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
exclude (bool): Set to `true` to opt-out from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.. [optional] # noqa: E501
options (MuxDestinationOptions): [optional] # noqa: E501
provider (str): The destination to send rendered assets to - set to `mux` for Mux.. [optional] if omitted the server will use the default value of "mux" # noqa: E501
exclude (bool): Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.. [optional] # noqa: E501
options (S3DestinationOptions): [optional] # noqa: E501
provider (str): The destination to send rendered assets to - set to `s3` for S3.. [optional] if omitted the server will use the default value of "s3" # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -254,9 +257,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
exclude (bool): Set to `true` to opt-out from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.. [optional] # noqa: E501
options (MuxDestinationOptions): [optional] # noqa: E501
provider (str): The destination to send rendered assets to - set to `mux` for Mux.. [optional] if omitted the server will use the default value of "mux" # noqa: E501
exclude (bool): Set to `true` to [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host) from the Shotstack hosting and CDN service. All files must be downloaded within 24 hours of rendering.. [optional] # noqa: E501
options (S3DestinationOptions): [optional] # noqa: E501
provider (str): The destination to send rendered assets to - set to `s3` for S3.. [optional] if omitted the server will use the default value of "s3" # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -321,6 +324,7 @@ def _composed_schemas():
return {
'anyOf': [
MuxDestination,
S3Destination,
ShotstackDestination,
],
'allOf': [
Expand Down
Loading