Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stan-janssen/tinyxmpp
Tiny XMPP Client for Python
https://github.com/stan-janssen/tinyxmpp
python3 xmpp xmpp-client
Last synced: 3 months ago
JSON representation
Tiny XMPP Client for Python
- Host: GitHub
- URL: https://github.com/stan-janssen/tinyxmpp
- Owner: stan-janssen
- License: apache-2.0
- Created: 2020-10-26T07:39:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-20T05:38:10.000Z (over 3 years ago)
- Last Synced: 2024-10-07T18:41:01.279Z (4 months ago)
- Topics: python3, xmpp, xmpp-client
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```python
from tinyxmpp import XMPPClientasync def main():
client = XMPPClient(jid='[email protected]/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='[email protected]/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()```
## LicenseTinyXMPP is made available under the Apache 2.0 license.
## Development
You can follow the development of TinyXMPP on [GitHub](https://github.com/stan-janssen/tinysasl).
## Contributing
To contribute to TinyXMPP, please open an issue on our [GitHub issue tracker](https://github.com/stan-janssen/tinysasl/issues) and/or leave a Pull Request. Thanks!