Package xmpp
[hide private]
[frames] | no frames]

Package xmpp

source code

All features of xmpppy library contained within separate modules. At present there are modules: simplexml - XML handling routines protocol - jabber-objects (I.e. JID and different stanzas and sub-stanzas) handling routines. debug - Jacob Lundquist's debugging module. Very handy if you like colored debug. auth - Non-SASL and SASL stuff. You will need it to auth as a client or transport. transports - low level connection handling. TCP and TLS currently. HTTP support planned. roster - simple roster for use in clients. dispatcher - decision-making logic. Handles all hooks. The first who takes control over fresh stanzas. features - different stuff that didn't worths separating into modules browser - DISCO server framework. Allows to build dynamic disco tree. filetransfer - Currently contains only IBB stuff. Can be used for bot-to-bot transfers.

Most of the classes that is defined in all these modules is an ancestors of class PlugIn so they share a single set of methods allowing you to compile a featured XMPP client. For every instance of PlugIn class the 'owner' is the class in what the plug was plugged. While plugging in such instance usually sets some methods of owner to it's own ones for easy access. All session specific info stored either in instance of PlugIn or in owner's instance. This is considered unhandy and there are plans to port 'Session' class from xmppd.py project for storing all session-related info. Though if you are not accessing instances variables directly and use only methods for access all values you should not have any problems.

Submodules [hide private]
  • xmpp.auth: Provides library with all Non-SASL and SASL authentication mechanisms.
  • xmpp.browser: Browser module provides DISCO server framework for your application.
  • xmpp.client: Provides PlugIn class functionality to develop extentions for xmpppy.
  • xmpp.commands: This module is a ad-hoc command processor for xmpppy.
  • xmpp.debug
  • xmpp.dispatcher: Main xmpppy mechanism.
  • xmpp.features: This module contains variable stuff that is not worth splitting into separate modules.
  • xmpp.filetransfer: This module contains IBB class that is the simple implementation of JEP-0047.
  • xmpp.jep0106: This file is the XEP-0106 commands.
  • xmpp.protocol: Protocol module contains tools that is needed for processing of xmpp-related data structures.
  • xmpp.roster: Simple roster implementation.
  • xmpp.session
  • xmpp.simplexml: Simplexml module provides xmpppy library with all needed tools to handle XML nodes and XML streams.
  • xmpp.transports: This module contains the low-level implementations of xmpppy connect methods or (in other words) transports for xmpp-stanzas.

Variables [hide private]
  ERRORS = {'urn:ietf:params:xml:ns:xmpp-sasl aborted': ['', '',...
  ERR_BAD_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas bad-req...
  ERR_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-stanzas conflict'
  ERR_FEATURE_NOT_IMPLEMENTED = 'urn:ietf:params:xml:ns:xmpp-sta...
  ERR_FORBIDDEN = 'urn:ietf:params:xml:ns:xmpp-stanzas forbidden'
  ERR_GONE = 'urn:ietf:params:xml:ns:xmpp-stanzas gone'
  ERR_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-stanz...
  ERR_ITEM_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-stanzas item...
  ERR_JID_MALFORMED = 'urn:ietf:params:xml:ns:xmpp-stanzas jid-m...
  ERR_NOT_ACCEPTABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas not-...
  ERR_NOT_ALLOWED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-all...
  ERR_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-stanzas not-...
  ERR_PAYMENT_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanzas pa...
  ERR_RECIPIENT_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanz...
  ERR_REDIRECT = 'urn:ietf:params:xml:ns:xmpp-stanzas redirect'
  ERR_REGISTRATION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanz...
  ERR_REMOTE_SERVER_NOT_FOUND = 'urn:ietf:params:xml:ns:xmpp-sta...
  ERR_REMOTE_SERVER_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-stanz...
  ERR_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-stanzas...
  ERR_SERVICE_UNAVAILABLE = 'urn:ietf:params:xml:ns:xmpp-stanzas...
  ERR_SUBSCRIPTION_REQUIRED = 'urn:ietf:params:xml:ns:xmpp-stanz...
  ERR_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-stanzas...
  ERR_UNEXPECTED_REQUEST = 'urn:ietf:params:xml:ns:xmpp-stanzas ...
  SASL_ABORTED = 'urn:ietf:params:xml:ns:xmpp-sasl aborted'
  SASL_INCORRECT_ENCODING = 'urn:ietf:params:xml:ns:xmpp-sasl in...
  SASL_INVALID_AUTHZID = 'urn:ietf:params:xml:ns:xmpp-sasl inval...
  SASL_INVALID_MECHANISM = 'urn:ietf:params:xml:ns:xmpp-sasl inv...
  SASL_MECHANISM_TOO_WEAK = 'urn:ietf:params:xml:ns:xmpp-sasl me...
  SASL_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-sasl not-au...
  SASL_TEMPORARY_AUTH_FAILURE = 'urn:ietf:params:xml:ns:xmpp-sas...
  STREAM_BAD_FORMAT = 'urn:ietf:params:xml:ns:xmpp-streams bad-f...
  STREAM_BAD_NAMESPACE_PREFIX = 'urn:ietf:params:xml:ns:xmpp-str...
  STREAM_CONFLICT = 'urn:ietf:params:xml:ns:xmpp-streams conflict'
  STREAM_CONNECTION_TIMEOUT = 'urn:ietf:params:xml:ns:xmpp-strea...
  STREAM_HOST_GONE = 'urn:ietf:params:xml:ns:xmpp-streams host-g...
  STREAM_HOST_UNKNOWN = 'urn:ietf:params:xml:ns:xmpp-streams hos...
  STREAM_IMPROPER_ADDRESSING = 'urn:ietf:params:xml:ns:xmpp-stre...
  STREAM_INTERNAL_SERVER_ERROR = 'urn:ietf:params:xml:ns:xmpp-st...
  STREAM_INVALID_FROM = 'urn:ietf:params:xml:ns:xmpp-streams inv...
  STREAM_INVALID_ID = 'urn:ietf:params:xml:ns:xmpp-streams inval...
  STREAM_INVALID_NAMESPACE = 'urn:ietf:params:xml:ns:xmpp-stream...
  STREAM_INVALID_XML = 'urn:ietf:params:xml:ns:xmpp-streams inva...
  STREAM_NOT_AUTHORIZED = 'urn:ietf:params:xml:ns:xmpp-streams n...
  STREAM_POLICY_VIOLATION = 'urn:ietf:params:xml:ns:xmpp-streams...
  STREAM_REMOTE_CONNECTION_FAILED = 'urn:ietf:params:xml:ns:xmpp...
  STREAM_RESOURCE_CONSTRAINT = 'urn:ietf:params:xml:ns:xmpp-stre...
  STREAM_RESTRICTED_XML = 'urn:ietf:params:xml:ns:xmpp-streams r...
  STREAM_SEE_OTHER_HOST = 'urn:ietf:params:xml:ns:xmpp-streams s...
  STREAM_SYSTEM_SHUTDOWN = 'urn:ietf:params:xml:ns:xmpp-streams ...
  STREAM_UNDEFINED_CONDITION = 'urn:ietf:params:xml:ns:xmpp-stre...
  STREAM_UNSUPPORTED_ENCODING = 'urn:ietf:params:xml:ns:xmpp-str...
  STREAM_UNSUPPORTED_STANZA_TYPE = 'urn:ietf:params:xml:ns:xmpp-...
  STREAM_UNSUPPORTED_VERSION = 'urn:ietf:params:xml:ns:xmpp-stre...
  STREAM_XML_NOT_WELL_FORMED = 'urn:ietf:params:xml:ns:xmpp-stre...
  name = 'SASL_TEMPORARY_AUTH_FAILURE'
Variables Details [hide private]

ERRORS

Value:
{'urn:ietf:params:xml:ns:xmpp-sasl aborted': ['',
                                              '',
                                              'The receiving entity ac\
knowledges an <abort/> element sent by the initiating entity; sent in \
reply to the <abort/> element.'],
 'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding': ['',
                                                         '',
                                                         'The data pro\
...

ERR_BAD_REQUEST

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas bad-request'

ERR_FEATURE_NOT_IMPLEMENTED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas feature-not-implemented'

ERR_INTERNAL_SERVER_ERROR

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas internal-server-error'

ERR_ITEM_NOT_FOUND

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas item-not-found'

ERR_JID_MALFORMED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas jid-malformed'

ERR_NOT_ACCEPTABLE

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas not-acceptable'

ERR_NOT_ALLOWED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas not-allowed'

ERR_NOT_AUTHORIZED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas not-authorized'

ERR_PAYMENT_REQUIRED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas payment-required'

ERR_RECIPIENT_UNAVAILABLE

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas recipient-unavailable'

ERR_REGISTRATION_REQUIRED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas registration-required'

ERR_REMOTE_SERVER_NOT_FOUND

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-not-found'

ERR_REMOTE_SERVER_TIMEOUT

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas remote-server-timeout'

ERR_RESOURCE_CONSTRAINT

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas resource-constraint'

ERR_SERVICE_UNAVAILABLE

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas service-unavailable'

ERR_SUBSCRIPTION_REQUIRED

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas subscription-required'

ERR_UNDEFINED_CONDITION

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas undefined-condition'

ERR_UNEXPECTED_REQUEST

Value:
'urn:ietf:params:xml:ns:xmpp-stanzas unexpected-request'

SASL_INCORRECT_ENCODING

Value:
'urn:ietf:params:xml:ns:xmpp-sasl incorrect-encoding'

SASL_INVALID_AUTHZID

Value:
'urn:ietf:params:xml:ns:xmpp-sasl invalid-authzid'

SASL_INVALID_MECHANISM

Value:
'urn:ietf:params:xml:ns:xmpp-sasl invalid-mechanism'

SASL_MECHANISM_TOO_WEAK

Value:
'urn:ietf:params:xml:ns:xmpp-sasl mechanism-too-weak'

SASL_NOT_AUTHORIZED

Value:
'urn:ietf:params:xml:ns:xmpp-sasl not-authorized'

SASL_TEMPORARY_AUTH_FAILURE

Value:
'urn:ietf:params:xml:ns:xmpp-sasl temporary-auth-failure'

STREAM_BAD_FORMAT

Value:
'urn:ietf:params:xml:ns:xmpp-streams bad-format'

STREAM_BAD_NAMESPACE_PREFIX

Value:
'urn:ietf:params:xml:ns:xmpp-streams bad-namespace-prefix'

STREAM_CONNECTION_TIMEOUT

Value:
'urn:ietf:params:xml:ns:xmpp-streams connection-timeout'

STREAM_HOST_GONE

Value:
'urn:ietf:params:xml:ns:xmpp-streams host-gone'

STREAM_HOST_UNKNOWN

Value:
'urn:ietf:params:xml:ns:xmpp-streams host-unknown'

STREAM_IMPROPER_ADDRESSING

Value:
'urn:ietf:params:xml:ns:xmpp-streams improper-addressing'

STREAM_INTERNAL_SERVER_ERROR

Value:
'urn:ietf:params:xml:ns:xmpp-streams internal-server-error'

STREAM_INVALID_FROM

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-from'

STREAM_INVALID_ID

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-id'

STREAM_INVALID_NAMESPACE

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-namespace'

STREAM_INVALID_XML

Value:
'urn:ietf:params:xml:ns:xmpp-streams invalid-xml'

STREAM_NOT_AUTHORIZED

Value:
'urn:ietf:params:xml:ns:xmpp-streams not-authorized'

STREAM_POLICY_VIOLATION

Value:
'urn:ietf:params:xml:ns:xmpp-streams policy-violation'

STREAM_REMOTE_CONNECTION_FAILED

Value:
'urn:ietf:params:xml:ns:xmpp-streams remote-connection-failed'

STREAM_RESOURCE_CONSTRAINT

Value:
'urn:ietf:params:xml:ns:xmpp-streams resource-constraint'

STREAM_RESTRICTED_XML

Value:
'urn:ietf:params:xml:ns:xmpp-streams restricted-xml'

STREAM_SEE_OTHER_HOST

Value:
'urn:ietf:params:xml:ns:xmpp-streams see-other-host'

STREAM_SYSTEM_SHUTDOWN

Value:
'urn:ietf:params:xml:ns:xmpp-streams system-shutdown'

STREAM_UNDEFINED_CONDITION

Value:
'urn:ietf:params:xml:ns:xmpp-streams undefined-condition'

STREAM_UNSUPPORTED_ENCODING

Value:
'urn:ietf:params:xml:ns:xmpp-streams unsupported-encoding'

STREAM_UNSUPPORTED_STANZA_TYPE

Value:
'urn:ietf:params:xml:ns:xmpp-streams unsupported-stanza-type'

STREAM_UNSUPPORTED_VERSION

Value:
'urn:ietf:params:xml:ns:xmpp-streams unsupported-version'

STREAM_XML_NOT_WELL_FORMED

Value:
'urn:ietf:params:xml:ns:xmpp-streams xml-not-well-formed'