icalendar.prop.image module#

This contains the IMAGE property from RFC 7986.

class icalendar.prop.image.Image(uri=None, b64data=None, fmttype=None, altrep=None, display=None)[source]#

Bases: object

An image as URI or BINARY according to RFC 7986.

The value must be a URI or binary data with a media type of "image" or refer to such data.

This property specifies an image for an iCalendar object or a calendar component via a URI or directly with inline data that can be used by calendar user agents when presenting the calendar data to a user.

Parameters:
  • altrep (str | None) – Link target of the image.

  • b64data (str | None) – The data of the image, base64 encoded.

  • display (str | None) – The display mode, for example, "BADGE".

  • fmttype (str | None) – The format type, for example, "image/png".

  • uri (str | None) – The URI of the image.

property data: bytes | None#

Return the binary data, if available.

classmethod from_property_value(value)[source]#

Create an Image from a property value.

Return type:

Image