Git Product home page Git Product logo

xmpppy's Introduction

xmpppy

Python 2/3 implementation of XMPP (RFC3920, RFC3921).

Documentation: http://xmpppy.sf.net/

Source Code: https://github.com/xmpppy/xmpppy

Status:


About

This library has been written to be compliant with RFC3920 and RFC3921.

Installation

Using pip, you can install the package with:

pip install xmpppy --upgrade

Usage

As a library

Regularly, the module is used as a library, like:

import xmpp

jabberid = "[email protected]"
password = "secret"
receiver = "[email protected]"
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 [email protected] --password secret \
    --receiver [email protected] --message 'hello world'

You can also put your credentials into an ~/.xsend file, like:

[email protected]
PASSWORD=secret

and then invoke xmpp-message omitting the --jabberid and --password options, like:

xmpp-message --receiver [email protected] --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.

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

xmpppy's People

Contributors

amotl avatar destroy avatar gebner avatar iamsudip avatar ivucica avatar juanvalino avatar lilmike avatar malbon avatar mic92 avatar mpasternak avatar neustradamus avatar normanr avatar provonet avatar rogue73 avatar rulexec avatar snakeru avatar umonkey avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.