MigratoryData Client API for Python
Developer's Guide and Reference Manual
Developer's Guide

This guide includes the following sections:

Overview

This client Application Programming Interface (API) library contains all the necessary operation for connecting to a cluster of MigratoryData servers and publishing real-time messages.

Before reading this manual, it is recommended to read MigratoryData Architecture Guide (PDF, HTML).

Creating Python clients for MigratoryData Server

A typical API usage is as follows:

Step 1 - Include the library

   sys.path.append("../../lib/")
   from migratorydata_client import *

Step 2 - Attach an entitlement token

Use the method MigratoryDataClient.setEntitlementToken() to assign an entitlement token to the client.

Step 3 - Define the cluster of MigratoryData servers where to connect to

Use the API method MigratoryDataClient.setServers() to specify a list of one or more MigratoryData servers to which the client will connect to. In fact, the client will connect to only one of the MigratoryData servers in this list. But, defining two or more MigratoryData servers is recommended in order to achieve load balancing and failover.

Step 4 - Create messages

Use the class MigratoryDataMessage to create messages.

Step 5 - Publish messages

Use the API call MigratoryDataPublisher.publish() to publish messages.

Examples

Examples built with this API are available in the folder examples of this API package; start with the README file which explains how to run them.