XMPP implementation in Python
Project description
- About:
Python 2/3 implementation of XMPP
- Standards:
- Documentation:
- Source Code:
Installation
Using pip, you can install the package with:
pip install --upgrade xmpppy
Usage
As a library
Regularly, the module is used as a library, like:
import xmpp
jabberid = "foobar@xmpp.domain.tld"
password = "secret"
receiver = "bazqux@xmpp.domain.tld"
message = "hello world"
def main():
jid = xmpp.protocol.JID(jabberid)
connection = xmpp.Client(server=jid.getDomain(), debug=True)
connection.connect()
connection.auth(user=jid.getNode(), password=password, resource=jid.getResource())
connection.send(xmpp.protocol.Message(to=receiver, body=message))
if __name__ == "__main__":
main()
Command line interface
The package also installs a command line program called xmpp-message. Its synopsis is:
xmpp-message --debug \
--jabberid foobar@xmpp.domain.tld --password secret \
--receiver bazqux@xmpp.domain.tld --message 'hello world'
You can also put your credentials into an ~/.xsend file, like:
JID=foobar@xmpp.domain.tld PASSWORD=secret
and then invoke xmpp-message omitting the --jabberid and --password options, like:
xmpp-message --receiver bazqux@xmpp.domain.tld --message 'hello world'
Documentation
The canonical documentation is hosted at https://xmpppy.github.io/ and http://xmpppy.sourceforge.net/.
For learning about how to use this module, please have a look at these spots within the code base.
The xmpp-message program, located at xmpp/cli.py, for sending a single XMPP message.
The other programs within the doc/examples directory.
The docstrings within the library itself.
Development
Acquire sources and bootstrap sandbox:
git clone https://github.com/xmpppy/xmpppy cd xmpppy python3 -m venv .venv source .venv/bin/activate pip install --upgrade --editable='.[test]'
Run software tests:
docker compose --file tests/compose.yml up pytest
Run particular tests:
pytest --no-cov -k compile
Support
If you have any questions about xmpppy usage or you have found a bug or want to share some ideas - you are welcome to join us on the issue tracker or on the xmpppy-devel mailing list.
Other projects
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xmpppy-0.7.3.tar.gz.
File metadata
- Download URL: xmpppy-0.7.3.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0f4ab504cfecf8b127d857b260e480598ae5522cb7b084c84537503646b3bb6
|
|
| MD5 |
387f09bf66002f8daf789350ce49edf3
|
|
| BLAKE2b-256 |
629a424ef63cdb0af7431495523c396a7deb7db8f17e7a8c18b3f9489f7fccb1
|
File details
Details for the file xmpppy-0.7.3-py3-none-any.whl.
File metadata
- Download URL: xmpppy-0.7.3-py3-none-any.whl
- Upload date:
- Size: 86.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d951a480aeb51d32a0e92776b1d05f744d2d7402da95d2175f3e4ca14d0aa9db
|
|
| MD5 |
ef1f58a4f66a29828741e9d71632078c
|
|
| BLAKE2b-256 |
03b158b412948774544156882df6cb395d1141d79cdd5986a658e0e5584f8653
|