xmpp-backends is a Python library and provides a set of classes with a common interface to communicate with admin interfaces of various XMPP servers. It also includes helper libraries to make it easier to use and configure with Django.
Detailed documentation is available at http://xmpp-backends.rtfd.org/.
Simply do:
pip install xmpp-backends
ejabberd_rest: Connects to ejabberd viamod_http_api. This is the recommended backend for ejabberd.ejabberd_xmlrpc: Connects to ejabberd viamod_xmlrpc. The backend uses it's own version of Python's xmlrpc library to correctly encode UTF-8 characters.ejabberdctl: Uses theejabberdctlcommand line utility that obviously needs to be available on the local machine.FakeXMPP: Uses Djangos ORM store data in the database.dummy: Uses Django's chache backend, useful for testing.
- Add support for Python 3.7 and 3.8.
- Add support for Django 2.2 and 3.0.
- Add support for ejabberd 18.09.
- Drop support for Python 2.7 and 3.4.
- Drop support for Django 1.11, 2.0 and 2.1.
- Drop support for ejabberd 14.07.
- Run test suite with warnings turned into errors to make sure that deprecated Django code is found.
- Run test suite with coverage to check code coverage.
- Add more tests to increaste test coverage.
- Update requirements.
- Current xmpp-backends version is no available as a tuple in xmpp_backends.VERSION.
- Also test ejabberd versions 18.03, 18.04 and 18.06.
- Backend classes now get the API version directly from the backend via the
api_versionproperty. - The
versionparameter andget_versionfunctions are now deprecated in favor ofapi_version. - Fully support Django 2.1.
- Modify the test-suite so that DeprecationWarnings from Django are an error.
all_user_sessions()returns a valid status and status text for ejabberd >= 18.06 (the fields were added to the underlying API call).
- Update requirements.
- New
xmpp_backends.fake_xmppDjango app to allow easier development if you're developing a Django app. ejabberdctlbackend now also accepts a list of commands to enable running this backend together with an ejabberd instance running inside a Docker container.- Fix autodoc documentation for
xmpp_backends.django. - Test interface based on blacklist of functions, not on whitelist.
- New
fab test_servercommand that tests all backends for a specific server. fab test_backendnow starts Docker containers for historic versions of ejabberd.
- New methods
all_domains()andall_user_sessions(). user_sessionsnow also returns a list ofUserSessioninstances, likeall_sessions().ipaddressis now a dependency in Python2.- Raise
NotImplementedErrorif a backend constructor gets an unsupported version. get_last_activitynow raisesUserNotFoundif the user does not exist. In ejabberd < 17.04, this means a second API call.set_passwordchecks if the user exists with ejabberd < 16.01, as ejabberd just creates a user with the underlying API call in those versions.block_user()andset_last_activityanduser_sessions()raiseNotSupportedErrorfor ejabberd 14.07, as the underlying API call is broken in that version.- Fix
message_user()to work with all versions.
- Raise new
BackendConnectionErrorif the backend can't be reached. This case was previously unhandled in theejabberd_restbackend.
- Account for API changes in ejabberd 17.04.
- Add a fabfile for common development tasks.
- Update development requirements.
- Update language quantifiers for setup.py.
- Use Travis CI to run at least some basic in continuous integration.
- Fix
start_user_sessionin the dummy backend. - Fix Python3 support for the
ejabberdctlbackend. set_last_activitynow has an empty default status.- Various minor fixes in returned values and raised exceptions in all backends.
- Move django-xmpp-backends to the
xmpp_backends.djangomodule. - New XMPP backend accessing ejabberds REST API interface.
- Add new commands:
stats,get_last_activity,user_sessionsandstop_user_session. - Implement
block_userfor ejabberd backends using theban_accountcommand. - Add a consistent
versionparameter to handle version-specific behaviour in APIs. - The
ejabberdctlbackend now accepts thepathinstead ofEJABBERDCTL_PATHfor consistency with other backends. - Write documentation hosted on http://xmpp-backends.readthedocs.io/.
- Add a test-script that runs the most important commands against a live XMPP server.
- ejabberd_xmlrpc backend: Ignore the
contextparameter in Python3. The parameter is still documented in the official documentation but in fact the constructor no longer accepts it.
- Fix import in the dummy backend.
- Release also adds a Python Wheel.
- Initial release.
This project is licensed as GPL v3.0+ except where noted below, see LICENSE file found in this repository.
xmpp_backends/xmlrpclib.pyis a copy of the xmlrpclib module found in Python 2.7.10 modified to work to encode UTF-8 characters the way ejabberd does. The file is licensed under the same license as the original, please see the file itself for details.