Commit graph

137 commits

Author SHA1 Message Date
Emmanuel Gil Peyrot
67ca2dd0f4 Import getpass from getpass, instead of using getpass.getpass everytime. 2014-09-01 02:47:15 +02:00
Emmanuel Gil Peyrot
882f984b26 Remove (usually) useless comments in examples about OpenFire and how to verify a certificate. 2014-09-01 02:47:15 +02:00
Emmanuel Gil Peyrot
6175cbcd99 Reintroduce XMLStream.process, making it run the asyncio event loop. 2014-09-01 02:47:08 +02:00
Emmanuel Gil Peyrot
476d76a533 Remove threaded from examples’ add_event_handler. 2014-09-01 02:42:45 +02:00
Emmanuel Gil Peyrot
df68bb4896 Remove raw_input usage and other python2 support in examples 2014-09-01 02:42:45 +02:00
Emmanuel Gil Peyrot
815e647c97 Set the shebang to python3 everywhere. 2014-09-01 02:42:45 +02:00
Robin Gloster
afc939708f cleanup semicolons, whitespace and mutable default arguments 2014-08-23 12:47:29 +02:00
Robin Gloster
3dd379cdf1 Revert "cleanup semicolons, whitespace and mutable default arguments"
This reverts commit 7265682a4d.
2014-08-18 15:15:14 +02:00
Robin Gloster
7265682a4d cleanup semicolons, whitespace and mutable default arguments 2014-08-18 00:52:24 +02:00
Florent Le Coz
373505f483 Clean a new bunch of stuf 2014-07-21 20:32:09 +02:00
Florent Le Coz
5ab77c7452 Rename to slixmpp 2014-07-17 14:19:04 +02:00
Anton Ryzhov
cebfd84416 Examples fixes 2014-01-21 16:19:27 +04:00
Lance Stout
cd2d25cf87 Chmod +x examples, and add shebang lines 2013-09-20 11:50:51 -07:00
Lance Stout
24c474a9ec Merge branch 'xep_0323_325' of git://github.com/joachimlindborg/SleekXMPP into joachimlindborg-xep_0323_325
Conflicts:
	sleekxmpp/plugins/__init__.py
2013-09-05 16:26:18 -07:00
Joachim Lindborg
c85f2494a8 first functional IoT_Test 2013-09-03 22:51:11 +02:00
Lance Stout
c0437d2de8 Add roster migration example 2013-06-22 14:35:00 -07:00
Lance Stout
fae39e1ab4 Fix some errors in the IBB plugin. 2013-03-29 13:16:18 -07:00
Lance Stout
82bbe5d1a6 Merge branch 'develop' 2013-02-25 09:53:35 -08:00
Anton Ryzhov
d9906756cf Don't use internally deprecated methods 2013-02-22 01:48:03 +04:00
Lance Stout
9a6bfc6614 Enable force_registration in the register account example. 2013-02-08 09:44:39 -08:00
Lance Stout
79914fb56b Add option to XEP-0077 plugin to force registration attempts. 2013-02-08 09:36:51 -08:00
Lance Stout
3423589ba1 Updated XEP-0199 to take and return standardized values.
Handles Iq errors appropriately when the recipient can't be found.
2013-01-20 20:14:16 -08:00
Lance Stout
12e8bb6ddc Turns out not all data is UTF-8, so don't try to decode it.
Fixes issue #204
2012-10-31 00:16:58 -07:00
Paul Molodowitch
52feabbe76 added setdefaultencoding method so reload(sys) not needed
reload(sys) could cause problem in user code - ie, sys.stdout, excepthook, and displayhook would be reset, etc
2012-10-24 13:06:36 -07:00
Lance Stout
295d23ccf3 Fix disco browser example to handle errors. 2012-08-07 16:44:52 -07:00
Lance Stout
26dc6e90ea Add example for setting an avatar. 2012-07-25 01:37:03 -07:00
Lance Stout
fb221a8dc0 Add XEP-0133 support, which just makes the appropriate XEP-0050 calls. 2012-07-22 13:58:23 -07:00
Lance Stout
474390fa00 Add example for retrieving avatars. 2012-07-20 18:10:14 -07:00
Lance Stout
9307a6915f Add notes to echo_client.py example on working with Facebook and MSN. 2012-06-23 22:30:24 -07:00
Lance Stout
95a0e51b41 Add example for dealing with GTalk custom domain certificates. 2012-06-19 00:02:36 -07:00
Lance Stout
110e45e187 Add examples for using IBB. 2012-06-19 00:02:17 -07:00
Lance Stout
6ddb430fef Spell thirdparty correctly. 2012-05-16 12:00:00 -07:00
Lance Stout
9c4886e746 Remove extra connection info so that examples run without modification.
GTalk users may still need to change the connect() call if dnspython is
not installed, as usual.
2012-05-14 22:17:39 -07:00
Lance Stout
e0bcd5d722 Add more documentation to the custom stanza examples. 2012-05-14 22:12:52 -07:00
Erick Pérez Castellanos
ba854e7d85 Added custom_stanza example 2012-05-14 21:47:43 -07:00
Lance Stout
24234bf718 Update other examples to use threaded mode for handlers that call disconnect() 2012-05-06 20:19:02 -07:00
Lance Stout
ec99339140 Update send_client.py to call disconnect() from a threaded handler. 2012-05-06 20:07:05 -07:00
Lance Stout
1c83391948 Merge remote-tracking branch 'hansent/master' into develop 2012-03-20 11:50:57 -07:00
Lance Stout
b077ef9150 Fix error in the registration example.
The now=True parameter was not being passed to allow the registration
submission to be submitted while the send queue is paused.
2012-03-19 06:05:15 -07:00
Lance Stout
e2ce5ae222 Add example for using user location.
Uses http://freegeoip.com to get an approximate location based
on the machine's IP address.
2012-03-18 23:42:03 -07:00
Lance Stout
0c24fbdb06 Add pubsub examples.
Run pubsub commands via pubsub_client, and watch events as they come in
with pubsub_events.
2012-03-16 23:18:59 -07:00
Lance Stout
549a9ab472 Add support for XEP-0118.
See examples/user_tune.py for a demonstration using the currently
playing song in iTunes.
2012-03-10 10:30:32 -08:00
Thomas Hansen
5a4df56836 examples: fix rpc examples. __init__ method was wrongly named "__init" causing proxy and handler class to not be initialized. 2012-01-31 12:38:41 -06:00
Lance Stout
69940a8ab9 Fix a few typos. 2012-01-24 00:07:31 -08:00
Lance Stout
13158e3cdf Revert the X-GOOGLE-TOKEN mech to not perform HTTP requests.
Added new example for how to retrieve a Google token, following
the best case, non-browser, workflow. Other thirdparty auth
mechs (Facebook, MSN) follow a similar pattern of using an
access token.
2012-01-23 23:58:40 -08:00
Lance Stout
02f4006153 Add basic start for a client side XEP-0077 plugin. 2012-01-19 02:37:36 -08:00
Lance Stout
4f4c121d9b Fix merge errors and bot example. 2012-01-18 15:16:56 -08:00
Lance Stout
72e1ab47fc Merge branch 'docs' into develop
Conflicts:
	docs/_static/haiku.css
	docs/_static/header.png
	docs/conf.py
	docs/getting_started/muc.rst
	docs/index.rst
	examples/muc.py
2012-01-18 15:04:33 -08:00
Lance Stout
be9e26b4a3 Apply Te-Je's MUC guide patch. 2012-01-05 13:09:20 -05:00
Lance Stout
3a4e3d3f51 Update doc settings to new theme, add examples, use 1.0 2012-01-05 12:13:06 -05:00
Lance Stout
fb5a6a7d71 Merge pull request #132 from rhcarvalho/master
Fix a typo in several files.
2012-01-02 13:10:46 -08:00
Rodolfo Carvalho
7d1c5f4a2b Fix a typo in several files.
This fixes several instances of "intial" for "initial".
2012-01-02 18:59:39 -02:00
Lance Stout
1b0fd76b45 Merge pull request #131 from rhcarvalho/master
Small changes to the examples
2011-12-31 17:27:57 -08:00
Rodolfo Carvalho
46e93bea09 Remove unused import.
I forgot about this one before!
2011-12-31 20:14:24 -02:00
Rodolfo Carvalho
cbc6a0296b Ask interactively for missing command line arguments.
Instead of complaining that the arguments were not given, ask interactively for input.
This example was the only one to behave differently from the others.
2011-12-31 19:54:14 -02:00
Rodolfo Carvalho
cc63bef179 Remove unused imports in the examples. 2011-12-31 19:50:53 -02:00
Rodolfo Carvalho
cbcfa156c4 Add missing import. 2011-12-31 19:48:03 -02:00
Lance Stout
4e23a4e08e Merge pull request #130 from rhcarvalho/master
Some small fixes
2011-12-30 20:14:54 -08:00
Rodolfo Carvalho
8cafa8578f Update examples to use the block'' argument instead of the deprecated threaded''. 2011-12-30 17:25:03 -02:00
Rodolfo Carvalho
2dc230a68b Replace pydns with dnspython in the comments of the examples. 2011-12-30 00:08:05 -02:00
Lance Stout
429c94d6a9 Tidy up logging calls. 2011-11-19 12:07:57 -08:00
Vijay Pandurangan
deb52ad350 This change stops sleekxmpp from spending huge amounts of time unnecessarily computing logging data that may never be used. This is a HUGE performance improvement; in some of my test runs, unnecessary string creation was accounting for > 60% of all CPU time.
Note that using % in a string will _always_ perform the sting substitutions, because the strings are constructed before the function is called. So log.debug('%s' % expensiveoperation()) will take about the same CPU time whether or not the logging level is DEBUG or INFO. if you use , no substitutions are performed unless the string is actually logged
2011-11-20 03:39:05 +08:00
Lance Stout
7945b3e738 Remove the config_component example in favor of echo_component.
The roster portion of the example is too outdated.
2011-11-18 16:26:02 -08:00
Lance Stout
2de1be188c Add echo component example. 2011-11-17 12:25:56 -08:00
Lance Stout
2a80824076 Remove extra debugging code that made it into a commit. 2011-08-23 14:14:21 -07:00
Lance Stout
015f662249 Update examples to work with Python3 (raw_input vs input) 2011-08-18 01:06:59 -07:00
Nathan Fritz
fb78bf0996 fixed manual address definition 2011-08-18 00:59:27 -07:00
Lance Stout
7d8aa4157b Add an example for dumping the roster to the command line. 2011-08-18 00:08:52 -07:00
Lance Stout
961668d420 Add guide for sending a message and then disconnecting. 2011-08-17 21:21:37 -07:00
Lance Stout
01061a0355 More documentation!
Finished the echo bot quickstart.

Added placeholders for other guides we need.
2011-08-13 20:58:53 -07:00
Lance Stout
c26b716164 Update XEP-0050 to use new IQ exceptions.
IqError is now caught and forwarded to the command error handler referenced
in the session.

Errors are now caught and processed by the session's error handler
whether or not the results Iq stanza includes the <command> substanza.

Added the option for blocking command calls. The blocking option is set
during start_command with block=True. Subsequent command flow methods use
session['block'] to determine their blocking behaviour.

If you use blocking commands, then you will need to wrap your command calls
in a try/except block for IqTimeout exceptions.
2011-08-13 00:10:06 -07:00
Nathan Fritz
a189cb8333 Merge branch 'develop' of github.com:fritzy/SleekXMPP into develop 2011-08-10 13:37:49 -07:00
Nathan Fritz
0d4825d3ea added send_client example 2011-08-10 13:37:36 -07:00
Lance Stout
e022b2a36c Add support for HTTP Proxy connections. 2011-07-27 19:35:03 -07:00
Lance Stout
84e2589f22 Left too much unlrelated code in example. 2011-03-24 09:42:54 -04:00
Lance Stout
a3d111be12 Added new XEP-0050 implementation.
Backward incompatibility alert!

Please see examples/adhoc_provider.py for how to use the new
plugin implementation, or the test examples in the files
tests/test_stream_xep_0050.py and tests/test_stanza_xep_0050.py.

Major changes:
    - May now have zero-step commands. Useful if a command is
      intended to be a dynamic status report that doesn't
      require any user input.
    - May use payloads other than data forms, such as a
      completely custom stanza type.
    - May include multiple payload items, such as multiple
      data forms, or a form and a custom stanza type.
    - Includes a command user API for calling adhoc commands
      on remote agents and managing the workflow.
    - Added support for note elements.

Todo:
    - Add prev action support.

You may use register_plugin('old_0050') to continue using the
previous XEP-0050 implementation.
2011-03-24 09:35:36 -04:00
Lance Stout
4916a12b6f Tidy up the examples. 2011-03-23 22:59:21 -04:00
Lance Stout
c4b1212c44 Updated XEP-0199 plugin.
Now has docs and uses the new plugin format.
2011-02-11 00:30:45 -05:00
Nathan Fritz
3463bf46c6 added option to return false on ping error, added ping example 2011-02-10 13:45:35 -08:00
Dann Martens
2e6c27f665 Added examples. 2011-01-13 11:58:20 +01:00
Lance Stout
cbc42c29fb Updated echo_client example to mention SSL options. 2010-12-16 22:00:20 -05:00
Lance Stout
874c51d74d Added the disco browser as an example. 2010-12-16 21:58:53 -05:00
Lance Stout
afeb8f3f7c Made echo client print help message.
If the jid and password are not supplied, the options list will be
displayed instead of hanging trying to connect to a nonexistant server.
2010-11-17 17:30:53 -05:00
Lance Stout
cdbc0570ca Added a basic example for using MUC. 2010-11-17 17:28:04 -05:00
Lance Stout
4a2e7c5393 Fixed linespacing and whitespace issues in examples to make them PEP8 compliant. 2010-09-01 18:21:09 -04:00
Lance Stout
0b4320a196 Updated the client and component examples.
The component example now actually uses a config.xml file for its
connection information, and to initialize a roster.
2010-09-01 18:18:30 -04:00
Lance Stout
9bef4b4d4d Move the examples to a top-level examples directory. 2010-09-01 14:47:42 -04:00