# 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.

## Prerequisites

Before reading this guide, 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 guide, you will need to understand the basic concepts of AMPS, such as topics, subscriptions, messages and SOW. Consult the AMPS User Guide to learn more about these topics before proceeding.
- An Installed Python Interpreter - The AMPS Python client currently supports Python version 2.7 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 https://pythonhosted.org/an_example_pypi_project/setuptools.html 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 the Python Support section below. 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.

### Runtime

The AMPS Python client supports Python 2.7, 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

### Installation

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.