Skip to main content

A friendly and easy to use XMPP client for Python

Project description

TinyXMPP

TinyXMPP is a small XMPP client for Python applications. It allows developers to easily connect to XMPP servers and exchange messages in a fast and secure way.

Getting Started

pip install tinyxmpp

To connect to an XMPP server:

from tinyxmpp import XMPPClient

async def main():
    client = XMPPClient(jid='user@xmppserver.net/python',
                        password='mypassword')
    client.on_message = on_message
    client.on_iq = on_iq
    client.on_presence = on_presence
    await client.connect(host_addr='xmppserver.net')
    await client.send_message(to='someuser@xmppserver.net/Resource',
                              message='Hello There')

async def on_message(message):
    print(message)

async def on_presence(element):
    print(element)

async def on_iq(element):
    print(element)

loop = asyncio.get_event_loop()
loop.create_task(main())
loop.run_forever()

License

TinyXMPP is made available under the Apache 2.0 license.

Development

You can follow the development of TinyXMPP on GitHub.

Contributing

To contribute to TinyXMPP, please open an issue on our GitHub issue tracker and/or leave a Pull Request. Thanks!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinyxmpp-0.1.1.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

tinyxmpp-0.1.1-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page