Skip to main content

Cumulio Python SDK for the Core API

Project description

#Cumulio-Python-SDK

Python Package

You will need Python Version >= 3.6

pip install cumulio

Development Install

You can install cumulio this way if you want to modify the source code. You're going to need Poetry: please refer to the Poetry installation documentation in order to install it.

git clone https://github.com/cumulio/cumulio-sdk-python && cd cumulio-sdk-python
poetry install

Usage and Examples

Create a Cumul.io dataset:

from cumulio.cumulio import Cumulio

key = "Your Cumul.io key"
token = "Your Cumul.io token"

client = Cumulio(key, token)
dataset = client.create("securable", {"type": "dataset", "name" : {"en":"Example with python sdk"}})
client.update("securable", dataset[" "], {"description":{"en":"This is an example description"}})

Optionally for people working with VPC, you can also define a api_host while creating the client. If not it will default to "https://api.cumul.io"

E.g.:

client = Cumulio(key, token, "Your API host")

Update description of dataset:

client.update("securable", dataset["id"], {"description":{"en":"Joost edited"}})

Create a column in the dataset:

burrito_column = client.create('column', { "type": 'hierarchy', "format": '',"informat": 'hierarchy', "order": 0,"name": {"nl": 'Type burrito'}})
client.associate("securable", dataset["id"], "Columns", burrito_column["id"])

Add Values to the column:

client.create("data", dataset["id"], {"securable_id": dataset["id"],"type": "append", "data": [["sweet"], ["sour"]]})

Replace Values in the column:

client.create("data", {"securable_id": dataset["id"],"type": "replace", "data": [["bitter"], ["salty"]]})

Documentation

The API documentation (available services and methods) can be found at https://developer.cumul.io

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cumulio-0.2.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

cumulio-0.2.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page