1. Introduction

This document explains how to use the Python client for AMPS. Use this document to learn how to install, configure and develop applications using the AMPS Python Client API.


Before reading this book, it is important to have a good understanding of the following topics:

  • Developing in Python. To be successful using this guide, you will need to possess a working knowledge of the Python language. Visit http://www.python.org for resources on learning Python.
  • AMPS concepts. Before reading this book, you will need to understand the basic concepts of AMPS, such as topics, subscriptions, messages, and SOW. Consult the AMPS Users’ Guide to learn more about these topics before proceeding.
  • An installed python interpreter. The AMPS Python Client currently supports python version 2.6 or greater, including python 3.
  • Python setuptools. This is included with many Python distributions. If it is not already installed on your system, you must add setuptools to your installation. See http://pythonhosted.org/setuptools/ for information on setuptools.

60East also provides precompiled .egg files for both Linux and Windows. These files target specific versions of Python, as indicated in the filenames.

If you are running on a different system, or using a different version of Python, you will also need:

  • Python distutils. Most Python installations contain this package by default.
  • C++ compiler. To build the client, you will need a C++ compiler as described in Python Support section. This is only necessary for initial installation. You do not need a C++ compiler to run the client.

You will need an installed and running AMPS server to use the product as well. You can write and compile programs that use AMPS without a running server, but you will get the most out of this guide by running the programs against a working server.

Python Support

This section describes the features supported by the Python client at runtime, as well as the requirements for building and installing the Python client.


The AMPS Python client supports Python 2.6 or later 2.X versions as well as Python 3.X.

The features supported on your processor and operating system depend on the features supported by the underlying C++ client, as shown in the following table:

  Linux x64 Windows x64 Solaris SPARC
Incredible performance X X X
Publish and subscribe X X X
State of the World (SOW) queries X X X
Topic and content filtering X X X
Atomic SOW query and subscribe X X X
Transaction log replay X X X
Historical SOW query X X X
Beautiful documentation X X X
HA: automatic failover X X  
HA: durable publish and subscribe X X  

Table 1.1: C++ client supported features


To install or build the Python client, follow the instructions in Chapter 2.

To build the AMPS Python client, you need to have a compatible version of Python, as well as Python distutils installed. You also need a supported C++ compiler for your operating system:

  • Linux: gcc 4.8 or later (recommended), 4.6, or 4.4
  • Windows: Visual Studio versions under current mainstream support
  • Solaris: Oracle Solaris Studio 12.3

Notice that for a distribution of Python to be compatible, it must be a supported version built with a supported compiler for your operating system.