icalendar.prop.uid module#

UID values from RFC 9253.

class icalendar.prop.uid.vUid(value, encoding='utf-8', /, params: dict[str, Any] | None = None)[source]#

Bases: vText

A UID of a component.

This is defined in RFC 9253, Section 7.

property FMTTYPE: str | None#

FMTTYPE specfies the content type of a referenced object.

Conformance:

RFC 5545 specifies the FMTTYPE. RFC 9253 adds FMTTYPE to LINK properties. In a LINK, FMTTYPE maps to the "type" attribute defined in Section 3.4.1 of RFC 8288. See RFC 6838.

Description:

This parameter can be specified on properties that are used to reference an object. The parameter specifies the media type RFC 4288 of the referenced object. For example, on the "ATTACH" property, an FTP type URI value does not, by itself, necessarily convey the type of content associated with the resource. The parameter value MUST be the text for either an IANA-registered media type or a non-standard media type.

Example

A Microsoft Word document:

ATTACH;FMTTYPE=application/msword:ftp://example.com/pub/docs/
 agenda.doc

A website:

LINK;FMTTYPE=text/html;LINKREL=SOURCE;LABEL=Venue;VALUE=URI:
 https://example.com/venue
property LABEL: str | None#

LABEL provides a human-readable label.

Conformance:

This property parameter is specified in RFC 7986, iCalendar Property Extensions.

RFC 9253 makes use of this for the LINK property. This parameter maps to the "title" attribute defined in Section 3.4.1 of RFC 8288. LABEL is used to label the destination of a link such that it can be used as a human-readable identifier (e.g., a menu entry) in the language indicated by the LANGUAGE (if present). The LABEL MUST NOT appear more than once in a given link; occurrences after the first MUST be ignored by parsers.

Description:

This property parameter MAY be specified on the "CONFERENCE" property. It is anticipated that other extensions to iCalendar will reuse this property parameter on new properties that they define. As a result, clients MUST expect to find this property parameter present on many different properties. It provides a human-readable label that can be presented to calendar users to allow them to discriminate between properties that might be similar or provide additional information for properties that are not self-describing. The "LANGUAGE" property parameter can be used to specify the language of the text in the parameter value (as per Section 3.2.10 of RFC 5545).

Examples

This is a label of a chat.

CONFERENCE;VALUE=URI;FEATURE=VIDEO;
    LABEL="Web video chat, access code=76543";
    :https://video-chat.example.com/;group-id=1234
property LINKREL: str | None#
Purpose:

LINKREL specifies the relationship of data referenced by a LINK property.

Conformance:

LINKREL is specified in RFC 9253. This parameter maps to the link relation type defined in Section 2.1 of RFC 8288. It is always quoted.

Description:

This parameter MUST be specified on all LINK properties and define the type of reference. This allows programs consuming this data to automatically scan for references they support. There is no default relation type. Any link relation in the link registry established by RFC 8288, or new link relations, may be used. It is expected that link relation types seeing significant usage in calendaring will have the calendaring usage described in an RFC.

In the simplest case, a link relation type identifies the semantics of a link. For example, a link with the relation type "copyright" indicates that the current link context has a copyright resource at the link target.

Link relation types can also be used to indicate that the target resource has particular attributes, or exhibits particular behaviours; for example, a "service" link implies that the link target can be used as part of a defined protocol (in this case, a service description).

Registration:

There are two kinds of relation types: registered and extension. These relation types are registered in RFC 8288.

Examples

This identifies the latest version of the event information.

LINKREL=latest-version
default_value: ClassVar[str] = 'UID'#
encoding#
classmethod examples()[source]#

Examples of vUid.

Return type:

list[None]

property ical_value: str#

The UID of this property.

classmethod new()[source]#

Create a new UID for convenience.

>>> from icalendar import vUid
>>> vUid.new()
vUid('d755cef5-2311-46ed-a0e1-6733c9e15c63')
params: Parameters#
property uid: str#

The UID of this property.