vcard — vcard-temp support (XEP-0054)

This subpackage provides minimal support for setting and retrieving vCard as per XEP-0054.

New in version 0.10.

We supply the service:

class aioxmpp.vcard.VCardService[source]

Service for handling vcard-temp.

The VCards are exposed as:

class aioxmpp.vcard.xso.VCard[source]

The container for vCard data as per vcard-temp.

elements

The raw elements of the vCard (as etree).

The following methods are defined to access and modify certain entries of the vCard in a highlevel manner:

get_photo_data()[source]

Get the photo stored in the vCard.

Returns

the photo as bytes or None.

set_photo_data(mime_type, data)[source]

Set the photo stored in the vCard.

Parameters
  • mime_type – the MIME type of the image data

  • data – the image data as bytes

clear_photo_data()[source]

Remove the photo stored in the vCard.