image.py 411 B

12345678910111213141516
  1. from pathlib import Path
  2. from typing import Union
  3. from .mixins.source_element import SourceElement
  4. class Image(SourceElement, component='image.js'):
  5. def __init__(self, source: Union[str, Path] = '') -> None:
  6. """Image
  7. Displays an image.
  8. :param source: the source of the image; can be a URL, local file path or a base64 string
  9. """
  10. super().__init__(source=source)