Files
deb-python-autobahn/doc/installation.rst
2014-03-24 19:36:00 +01:00

2.6 KiB

Installation

Requirements

You will need at least one of Twisted or Asyncio as your networking framework.

..note:: Asyncio comes bundled with Python 3.4. For Python 3.3, install it from here. For Twisted, please see here.

Install from Python Package Index

Install from the Python Package Index using Pip:

pip install autobahn

You can also specify install variants

pip install autobahn[twisted,accelerate]

The latter will automatically install Twisted and native acceleration packages when running on CPython.

pip install autobahn[asyncio,accelerate]

The latter will automatically install asyncio backports when required and native acceleration packages when running on CPython.

Install from Sources

To install from sources, clone the repo

git clone git@github.com:tavendo/AutobahnPython.git

checkout a tagged release

cd AutobahnPython
git checkout v0.8.5

and install

cd autobahn
python setup.py install

You can also use Pip for the last step, which allows to specify install variants

pip install -e .[twisted]

has the following install variants:

  1. twisted: Install Twisted as a dependency
  2. asyncio: Install asyncio backports when required
  3. accelerate: Install native acceleration packages on CPython
  4. compress: Install packages for non-standard WebSocket compression methods
  5. serialization: Install packages for additional WAMP serialization formats (currently [MsgPack](http://msgpack.org/))

Performance

is portable, well tuned code. You can further accelerate performance by

  • Running under PyPy or
  • on CPython, install the native accelerators wsaccel and ujson (you can use the install variant acceleration for that)

Depending on Autobahn

To require as a dependency of your package, include the following in your setup.py:

install_requires = ["autobahn>=0.7.2"]

You can also depend on an install variant which automatically installs respective packages:

install_requires = ["autobahn[twisted,accelerate]>=0.7.2"]

Check the installation

In the Python interpreter, to check the installation do:

>>> from autobahn import __version__ >>> print __version__ 0.8.5