Monthly Archives: August 2017

Python SDK for the RBLTracker REST API

Originally Posted on RBLTracker.

We’re extremely excited to announce the release of the office RBLTracker Python SDK. Developers can us this simple wrapper library to integrate all the features of the RBLTracker API into their existing processes.

Installation

The Python SDK can be installed via the Python package manager:

pip install rbltracker

Or if you prefer, you can clone the source code from the official GitHub repository.

API Access Token

To authenticate API requests, you must use the Account SID and Access Token, available from the Account -> API Access section of the RBLTracker Portal.

Example Usage

Using the Python SDK only requires a few lines of code. In this example, we’ll request a list of hosts from our account:

import rbltracker

try:
 client = rbltracker.Client('Your Account SID', 'Your Auth Token')

data = client.hosts.get();

except rbltracker.RBLTrackerException as err:
 print(err)

In this example, we’ll start a manual check process, using the real-time check features of the RBLTracker API:

import rbltracker

try:
 client = rbltracker.Client('Your Account SID', 'Your Auth Token')

data = client.check.start({

"host": "10.10.10.11",
 "callback": "https://your.website.com/callback.php",
 "details": 1
 });

except rbltracker.RBLTrackerException as err:
 print(err)

See our API Reference for a complete list of all the Python SDK features.