image

class virtualitics_sdk.elements.image.Image(content, size=ImageSize.MEDIUM, title='', description='', show_title=True, show_description=True, extension='jpeg', raw_image_bytes=False)

Bases: Element

An image to show on a flow.

Parameters:
  • content (Image) – The PIL image to show on a flow.

  • size (ImageSize) – The size of the image to display, defaults to ImageSize.MEDIUM.

  • title (str) – The title of the element, defaults to ‘’.

  • description (str) – The element’s description, defaults to ‘’.

  • show_title (bool) – Whether to show the title on the page when rendered, defaults to True.

  • show_description (bool) – Whether to show the description to the page when rendered, defaults to True.

save(link)

Save an Image serialization into a Link.

Parameters:

link (Link) – The link to save the element to.

set_content(content)

Validate and set content (python best practice is to set instance attributes in constructor).

Parameters:

kwargs – new content for the Element.

set_params(params)

Validate and set params (python best practice is to set instance attributes in constructor).

Parameters:

kwargs – new params for the Element.

class virtualitics_sdk.elements.image.ImageSize(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

LARGE = 'large'
MEDIUM = 'medium'
SMALL = 'small'