version — Software Version (XEP-0092) support

This subpackage provides support for querying and answering queries adhering to the XEP-0092 (Software Support) protocol.

New in version 0.10.

The protocol allows entities to find out the software version and operating system of other entities in the XMPP network.

class aioxmpp.VersionServer[source]

Service which handles inbound XEP-0092 Software Version requests.

Warning

Do not depend on this service in another service. This service exposes possibily private or sensitive information over the XMPP network without any filtering. Implicitly summoning this service via a dependency is thus discouraged.

If you absolutely need to do this for the implementation of another published XEP, please file an issue against aioxmpp so that we can work out a good solution.

Warning

This service does answer version queries, no matter who asks. This may not be desirable, in which case this service is not for you.

See also

query_version()
for a function to obtain another entities software version.

Note

By default, this service does not reply to version queries. The name attribute needs to be set first.

The response can be configured with the following attributes:

name = None

The software name of this entity.

Defaults to None.

If this attribute is None, version requests are not answered but fail with a service-unavailable error.

version = None

The software version of this entity.

Defaults to None.

If this attribute is None or the empty string, the version will be shown as "unspecified" to other entities. This can be used to avoid disclosing the specific version of the software.

os = distro.name() or platform.system()

The operating system of this entity.

Defaults to distro.name() or platform.system() (if distro is not available).

This attribute can be set to None or deleted to prevent inclusion of the OS element in the reply.

coroutine aioxmpp.version.query_version(stream: aioxmpp.stream.StanzaStream, target: aioxmpp.structs.JID) → aioxmpp.version.xso.Query[source]

Query the software version of an entity.

Parameters:
Raises:
Return type:

aioxmpp.version.xso.Query

Returns:

The response from the peer.

The response is returned as Query object. The attributes hold the data returned by the peer. Each attribute may be None if the peer chose to omit that information. In an extreme case, all attributes are None.

XSO Definitions

class aioxmpp.version.xso.Query(*args, **kwargs)[source]

XEP-0092 Software Version query XSO.

name

Software name as string. May be None.

version

Software version as string. May be None.

os

Operating system as string. May be None.