Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python binding for Tox the skype replacement

Project Description

PyTox

Python binding for Project Tox.

PyTox provides a Pythonic binding, i.e Object-oriented instead of C style, raise exception instead of returning error code. A simple example is as follows:

class EchoBot(Tox):
    def loop(self):
        while True:
            self.do()
            time.sleep(0.03)

    def on_friend_request(self, pk, message):
        print 'Friend request from %s: %s' % (pk, message)
        self.add_friend_norequest(pk)
        print 'Accepted.'

    def on_friend_message(self, friendId, message):
        name = self.get_name(friendId)
        print '%s: %s' % (name, message)
        print 'EchoBot: %s' % message
        self.send_message(friendId, message)

As you can see callbacks are mapped into class method instead of using it the the c ways. For more details please refer to examples/echo.py.

Getting started

To get started, a Makefile is provided to run PyTox inside a docker container:

  • make test: This will launch tests in a container.
  • make run: This will launch an interactive container with PyTox installed.
  • make echobot: This will launch the example echobot in a container.

Examples

  • echo.py: A working echo bot that wait for friend requests, and than start echoing anything that friend send.

Documentation

Full API documentation can be read here.

Todo

  • Complete API binding (use toos/apicomplete.py to check)
  • Unittest for ToxAV

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Release History

Release History

This version
History Node

0.0.23

History Node

0.0.22

History Node

0.0.21

History Node

0.0.20

History Node

0.0.17

History Node

0.0.16

History Node

0.0.15

History Node

0.0.13

History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PyTox-0.0.23.tar.gz (35.5 kB) Copy SHA256 Checksum SHA256 Source Dec 14, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting