Python SDK for the Slamby API Service
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+

(you may need to run pip with root permission: sudo pip install git+

Then import the package:

import slamby_sdk 


Install via Setuptools.

python install --user

(or sudo python install to install the package for all users)

Then import the package:

import slamby_sdk

Getting Started

Please follow the installation procedure and then run the following:

import time
import slamby_sdk
from import ApiException
from pprint import pprint

client = slamby_sdk.ApiClient("http://<api_host>/")
client.set_default_header("Authorization", "Slamby <api_secret>")

Getting DataSet list

dataset_api = slamby_sdk.DataSetApi(client)
data_sets = dataset_api.get_data_sets()

Selecting a DataSet for work

client.set_default_header("X-DataSet", "<my_dataset>");

Get Tag list

tag_api = slamby_sdk.TagApi(client)
tags = tag_api.get_tags()

Creating a new Tag

    tag = slamby_sdk.Tag() = "123" = "New tag"
    tag_api.create_tag(tag = tag)
except ApiException as e:
    print ("Exception when calling TagApi->create_tag: %s\n" % e)

Get a Document

document_api = slamby_sdk.DocumentApi(client)
document = document_api.get_document("123456")

Update a Document

    document["language"] = "hu"
    document_api.update_document(id="123456", document = Document)
except ApiException as e:
    print ("Exception when calling DocumentApi->update_document: %s\n" % e)