Contents Menu Expand Light mode Dark mode Auto light/dark mode
Slidge documentation
Slidge documentation
  • For admins
    • Installation
    • Configuration
    • XMPP server config
    • Attachments
    • Privileges
    • Running as a daemon
    • Example XMPP server configurations
  • For users
    • Registration
    • Finding legacy contacts
    • Commands
    • Keeping a low profile
  • For devs
    • Contributing
    • Slidge Design
    • Tutorial: minimal legacy module from scratch
    • How to…?
    • slidge
      • slidge.command
        • slidge.command.register
      • slidge.contact
      • slidge.group
    • superduper
      • superduper.gateway
      • superduper.group
      • superduper.session
  • Glossary
Back to top

slidge.slixfix.link_preview.stanza#

Module Contents#

Classes#

LinkPreview

The core of Slixmpp's stanza XML manipulation and handling is provided

OpenGraphMixin

The core of Slixmpp's stanza XML manipulation and handling is provided

Title

The core of Slixmpp's stanza XML manipulation and handling is provided

Description

The core of Slixmpp's stanza XML manipulation and handling is provided

Url

The core of Slixmpp's stanza XML manipulation and handling is provided

Image

The core of Slixmpp's stanza XML manipulation and handling is provided

Type_

The core of Slixmpp's stanza XML manipulation and handling is provided

SiteName

The core of Slixmpp's stanza XML manipulation and handling is provided

class slidge.slixfix.link_preview.stanza.LinkPreview(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

class slidge.slixfix.link_preview.stanza.OpenGraphMixin(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

class slidge.slixfix.link_preview.stanza.Title(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

class slidge.slixfix.link_preview.stanza.Description(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

class slidge.slixfix.link_preview.stanza.Url(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

class slidge.slixfix.link_preview.stanza.Image(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

class slidge.slixfix.link_preview.stanza.Type_(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

class slidge.slixfix.link_preview.stanza.SiteName(xml=None, parent=None)#

The core of Slixmpp’s stanza XML manipulation and handling is provided by ElementBase. ElementBase wraps XML ElementTree objects and enables access to the XML contents through dictionary syntax, similar in style to the Ruby XMPP library Blather’s stanza implementation.

Stanzas are defined by their name, namespace, and interfaces. For example, a simplistic Message stanza could be defined as:

>>> class Message(ElementBase):
...     name = "message"
...     namespace = "jabber:client"
...     interfaces = {'to', 'from', 'type', 'body'}
...     sub_interfaces = {'body'}

The resulting Message stanza’s contents may be accessed as so:

>>> message['to'] = "user@example.com"
>>> message['body'] = "Hi!"
>>> message['body']
"Hi!"
>>> del message['body']
>>> message['body']
""

The interface values map to either custom access methods, stanza XML attributes, or (if the interface is also in sub_interfaces) the text contents of a stanza’s subelement.

Custom access methods may be created by adding methods of the form “getInterface”, “setInterface”, or “delInterface”, where “Interface” is the titlecase version of the interface name.

Stanzas may be extended through the use of plugins. A plugin is simply a stanza that has a plugin_attrib value. For example:

>>> class MessagePlugin(ElementBase):
...     name = "custom_plugin"
...     namespace = "custom"
...     interfaces = {'useful_thing', 'custom'}
...     plugin_attrib = "custom"

The plugin stanza class must be associated with its intended container stanza by using register_stanza_plugin as so:

>>> register_stanza_plugin(Message, MessagePlugin)

The plugin may then be accessed as if it were built-in to the parent stanza:

>>> message['custom']['useful_thing'] = 'foo'

If a plugin provides an interface that is the same as the plugin’s plugin_attrib value, then the plugin’s interface may be assigned directly from the parent stanza, as shown below, but retrieving information will require all interfaces to be used, as so:

>>> # Same as using message['custom']['custom']
>>> message['custom'] = 'bar'
>>> # Must use all interfaces
>>> message['custom']['custom']
'bar'

If the plugin sets is_extension to True, then both setting and getting an interface value that is the same as the plugin’s plugin_attrib value will work, as so:

>>> message['custom'] = 'bar'  # Using is_extension=True
>>> message['custom']
'bar'
Parameters:
  • xml (Optional[xml.etree.ElementTree.Element]) – Initialize the stanza object with an existing XML object.

  • parent (Union[Optional[ElementBase], weakref.ReferenceType[ElementBase]]) – Optionally specify a parent stanza object will contain this substanza.

setup(xml=None)#

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters:

xml (Optional[xml.etree.ElementTree.Element]) – An existing XML object to use for the stanza’s content instead of generating new XML.

Return type:

bool

enable(attrib, lang=None)#

Enable and initialize a stanza plugin.

Alias for init_plugin().

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

Return type:

ElementBase

get_plugin(name, lang=None, check=False)#

Retrieve a stanza plugin.

Parameters:
  • check (bool) – Return None instead of creating the object if True.

  • name (str) – Stanza plugin attribute name.

  • lang (Optional[str]) – xml:lang of the element to retrieve.

Return type:

Optional[ElementBase]

init_plugin(attrib, lang=None, existing_xml=None, reuse=True, element=None)#

Enable and initialize a stanza plugin.

Parameters:
  • attrib (string) – The plugin_attrib value of the plugin to enable.

  • lang (Optional[str]) –

  • existing_xml (Optional[xml.etree.ElementTree.Element]) –

  • reuse (bool) –

  • element (Optional[ElementBase]) –

Return type:

ElementBase

match(xpath)#

Compare a stanza object with an XPath-like expression.

If the XPath matches the contents of the stanza object, the match is successful.

The XPath expression may include checks for stanza attributes. For example:

'presence@show=xa@priority=2/status'

Would match a presence stanza whose show value is set to 'xa', has a priority value of '2', and has a status element.

Parameters:

xpath (string) – The XPath expression to check against. It may be either a string or a list of element names with attribute checks.

Return type:

bool

get(key, default=None)#

Return the value of a stanza interface.

If the found value is None or an empty string, return the supplied default value.

Allows stanza objects to be used like dictionaries.

Parameters:
  • key (string) – The name of the stanza interface to check.

  • default (Optional[Any]) – Value to return if the stanza interface has a value of None or "". Will default to returning None.

Return type:

Any

keys()#

Return the names of all stanza interfaces provided by the stanza object.

Allows stanza objects to be used like dictionaries.

Return type:

List[str]

append(item)#

Append either an XML object or a substanza to this stanza object.

If a substanza object is appended, it will be added to the list of iterable stanzas.

Allows stanza objects to be used like lists.

Parameters:

item (Union[xml.etree.ElementTree.Element, ElementBase]) – Either an XML object or a stanza object to add to this stanza’s contents.

Return type:

ElementBase

appendxml(xml)#

Append an XML object to the stanza’s XML.

The added XML will not be included in the list of iterable substanzas.

Parameters:

xml (XML) – The XML object to add to the stanza.

Return type:

ElementBase

pop(index=0)#

Remove and return the last substanza in the list of iterable substanzas.

Allows stanza objects to be used like lists.

Parameters:

index (int) – The index of the substanza to remove.

Return type:

ElementBase

next()#

Return the next iterable substanza.

Return type:

ElementBase

clear()#

Remove all XML element contents and plugins.

Any attribute values will be preserved.

Return type:

ElementBase

classmethod tag_name()#

Return the namespaced name of the stanza’s root element.

The format for the tag name is:

'{namespace}elementname'

For example, for the stanza <foo xmlns="bar" />, stanza.tag_name() would return "{bar}foo".

Return type:

str

Copyright © 2023, Nicolas Cedilnik
Made with Sphinx and @pradyunsg's Furo
On this page
  • slidge.slixfix.link_preview.stanza
    • Module Contents
      • Classes
        • LinkPreview
          • LinkPreview.setup()
          • LinkPreview.enable()
          • LinkPreview.get_plugin()
          • LinkPreview.init_plugin()
          • LinkPreview.match()
          • LinkPreview.get()
          • LinkPreview.keys()
          • LinkPreview.append()
          • LinkPreview.appendxml()
          • LinkPreview.pop()
          • LinkPreview.next()
          • LinkPreview.clear()
          • LinkPreview.tag_name()
        • OpenGraphMixin
          • OpenGraphMixin.setup()
          • OpenGraphMixin.enable()
          • OpenGraphMixin.get_plugin()
          • OpenGraphMixin.init_plugin()
          • OpenGraphMixin.match()
          • OpenGraphMixin.get()
          • OpenGraphMixin.keys()
          • OpenGraphMixin.append()
          • OpenGraphMixin.appendxml()
          • OpenGraphMixin.pop()
          • OpenGraphMixin.next()
          • OpenGraphMixin.clear()
          • OpenGraphMixin.tag_name()
        • Title
          • Title.setup()
          • Title.enable()
          • Title.get_plugin()
          • Title.init_plugin()
          • Title.match()
          • Title.get()
          • Title.keys()
          • Title.append()
          • Title.appendxml()
          • Title.pop()
          • Title.next()
          • Title.clear()
          • Title.tag_name()
        • Description
          • Description.setup()
          • Description.enable()
          • Description.get_plugin()
          • Description.init_plugin()
          • Description.match()
          • Description.get()
          • Description.keys()
          • Description.append()
          • Description.appendxml()
          • Description.pop()
          • Description.next()
          • Description.clear()
          • Description.tag_name()
        • Url
          • Url.setup()
          • Url.enable()
          • Url.get_plugin()
          • Url.init_plugin()
          • Url.match()
          • Url.get()
          • Url.keys()
          • Url.append()
          • Url.appendxml()
          • Url.pop()
          • Url.next()
          • Url.clear()
          • Url.tag_name()
        • Image
          • Image.setup()
          • Image.enable()
          • Image.get_plugin()
          • Image.init_plugin()
          • Image.match()
          • Image.get()
          • Image.keys()
          • Image.append()
          • Image.appendxml()
          • Image.pop()
          • Image.next()
          • Image.clear()
          • Image.tag_name()
        • Type_
          • Type_.setup()
          • Type_.enable()
          • Type_.get_plugin()
          • Type_.init_plugin()
          • Type_.match()
          • Type_.get()
          • Type_.keys()
          • Type_.append()
          • Type_.appendxml()
          • Type_.pop()
          • Type_.next()
          • Type_.clear()
          • Type_.tag_name()
        • SiteName
          • SiteName.setup()
          • SiteName.enable()
          • SiteName.get_plugin()
          • SiteName.init_plugin()
          • SiteName.match()
          • SiteName.get()
          • SiteName.keys()
          • SiteName.append()
          • SiteName.appendxml()
          • SiteName.pop()
          • SiteName.next()
          • SiteName.clear()
          • SiteName.tag_name()
        • LinkPreview
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name
        • OpenGraphMixin
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name
        • Title
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name
        • Description
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name
        • Url
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name
        • Image
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name
        • Type_
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name
        • SiteName
          • setup
          • enable
          • get_plugin
          • init_plugin
          • match
          • get
          • keys
          • append
          • appendxml
          • pop
          • next
          • clear
          • tag_name