Keboola Connection Storage API client
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Build Status

Python client for the Keboola Storage API

Client for using Keboola Connection Storage API. This API client provides client methods to get data from KBC and store data in KBC. The endpoints for working with buckets, tables and workspaces are covered.


$ pip3 install git+


$ git clone && cd sapi-python-client
$ python install

Client Class Usage

from kbcstorage.client import Client

client = Client('', 'your-token')

# get table data into local file
client.tables.export_to_file(table_id='in.c-demo.some-table', path_name='/data/')

# save data
client.tables.create(name='some-table-2', bucket_id='in.c-demo', file_path='/data/some-table')

# list buckets

# list bucket tables

# get table info

Endpoint Classes Usage

from kbcstorage.tables import Tables
from kbcstorage.buckets import Buckets

tables = Tables('', 'your-token')

# get table data into local file
tables.export_to_file(table_id='in.c-demo.some-table', path_name='/data/')

# save data
tables.create(name='some-table-2', bucket_id='in.c-demo', file_path='/data/some-table')

# list buckets
buckets = Buckets('', 'your-token')

# list bucket tables

# get table info

Docker image

Docker image with pre-installed library is also available, run it via:

docker run -i -t


$ git clone && cd sapi-python-client
$ python test


$ docker-compose run --rm -e KBC_TEST_TOKEN -e KBC_TEST_API_URL sapi-python-client -m unittest discover

Contribution Guide

The client is far from supporting the entire API, all contributions are very welcome. New API endpoints should be implemeneted in their own class extending Endpoint. Naming conventions should follow existing naming conventions or those of the API. If the method contains some processing of the request or response, consult the corresponing PHP implementation for reference. New code should be covered by tests.

Note that if you submit a PR from your own forked repository, the automated functional tests will fail. This is limitation of Travis. Either run the tests locally (set KBC_TEST_TOKEN (your token to test project) and KBC_TEST_API_URL ( variables) or ask for access. In case, you need a project for local testing, feel free to ask for one.

The recommended workflow for making a pull request is:

git clone
git checkout master
git pull
git checkout -b my-new-feature
# work on branch my-new-feature
git push origin my-new-feature:my-new-feature

This will create a new branch which can be used to make a pull request for your new feature.