The ejabberd developers created their application to be extremely modular so functionality can be precisely tailored to meet your requirements. It is capable of hosting over 2 million users on a single node as well as operating on clusters of servers. Refactored method validator/serializer systemīig refactor, interface changed to better match the ejabberdctl interface.Ejabberd is an XMPP messaging server that is designed to be powerful, scalable and reliable. Made constructor more strict (no more kwargs)Īdded optional function to create a client instance from a service url, compliant with the ‘12factor app’ ideaĪligned MUC room options with currently supported options in Ejabberd, build from master branch To run the all tests run: tox Changelog 0.2.11 () unregister ( user = 'alice', host = '' ) Development destroy_room ( name = 'room1', service = 'conference', host = '' ) # Unregister a user client. get_room_affiliations ( name = 'room1', service = 'conference' ) # Destroy a muc room client. member ) # Get room affiliations affiliations = client. set_room_affiliation ( name = 'room1', service = 'conference', jid =, affiliation = Affiliation. members_only, value = True ) # Set room affiliation from import Affiliation client. change_room_option ( name = 'room1', service = 'conference', option = MUCRoomOption. get_room_options ( name = 'room1', service = 'conference' ) # Set room option from import MUCRoomOption client. create_room ( name = 'room1', service = 'conference', host = '' ) # Get room options room_options = client. ] where 'conference' is the muc service name # Create a muc room client. muc_online_rooms () # result is in the format. user_sessions_info ( user = "jim", host = "" ): # Get muc rooms muc_online_rooms = client. connected_users_number () # Get information for all sessions for a user client. connected_users_info () # Get number of connected users client. connected_users () # Get list of *all* connected users and information about their sessions client. delete_rosteritem ( localuser = 'bob', localserver = '', user = 'alice', server = '' ) # Get list of *all* connected users client. add_rosteritem ( localuser = 'bob', localserver = '', user = 'alice', server = '', nick = 'Alice from Wonderland', group = 'Friends', subs = 'both' ) # Delete Alice from Bob's contacts client. get_roster ( user = 'bob', host = '' ) # Add Alice to Bob's contact group Friends client. set_nickname ( user = 'bob', host = '', nickname = 'Bob the builder' ) # Get Bob's contacts client. check_password_hash ( user = 'bob', host = '', password = 'newpwd' ) is True # Set nickname client. change_password ( user = 'alice', host = '', newpass = 'newpwd' ) # Verify password assert client. register ( user = 'alice', host = '', password = ) # Change a password client. registered_users ( '' ) # result is in the format # Register a new user client. echo ( sentence ) assert result = sentence # Get a list of users that are on the server registered_users = client. Usage from pyejabberd import EjabberdAPIClient # Create a client and authenticate with elevated user client = EjabberdAPIClient ( host = 'localhost', port = 5222, username = 'bob', password =, user_domain = '', protocol = 'https' ) # Test the connection by sending an echo request to the server sentence = 'some random data' result = client. Installation pip install pyejabberd Contributors A Python client for the Ejabberd XMLRPC API
0 Comments
Leave a Reply. |