Ionburst SDK for Python

The Ionburst SDK for Python enables developers to easily integrate with Ionburst Cloud, building in ultra-secure and private object storage to their applications.

Getting Started

Installation

pip3 install ionburst-sdk-python
# OR
pip3 install ionburst-sdk-python --user

Configuration

The Ionburst SDK can get its configuration (ionburst_id, ionburst_key, ionburst_uri) from the following three files.

If ionburst_id and ionburst_key are not specified by environment variable, they are obtained from the credentials file with information from the config.json file.

If ionburst_uri is not specified in Ionburst constructor, it'll first check config.json, and then the credentials file.

Environment Variables

IONBURST_ID=IB******************
IONBURST_KEY=eW91aGF2ZXRvb211Y2h0aW1lb255b3VyaGFuZHMh

config.json file

{
  "Ionburst": {
    "Profile": "example",
    "IonburstUri": "https://api.example.ionburst.cloud/",
    "TraceCredentialsFile": "OFF"
  }
}

Credentials file

[example]
ionburst_id=IB******************
ionburst_key=eW91aGF2ZXRvb211Y2h0aW1lb255b3VyaGFuZHMh
ionburst_uri=https://api.example.ionburst.cloud/

Usage

Initialise

from Ionburst import Ionburst
ionburst = Ionburst()

or

from Ionburst import Ionburst
ionburst = Ionburst("https://api.example.ionburst.cloud/")

Upload Data

result = ionburst.put({
  id: '...',
  data: '...',
  classstr: '...' // Not Required
})

Download Data

result = ionburst.get(id)

Delete Data

result = ionburst.delete(id)

Upload Data Deferred

token = ionburst.startDeferredAction({
  action: 'PUT',
  id: '...',
  data: '...',
  classstr: '...'  // Not Required
})

Download Data Deferred

token = ionburst.startDeferredAction({
  action: 'GET',
  id: '...'
})

Check Data Deferred

result = ionburst.checkDeferred(token)

Fetch Data Deferred

result = ionburst.fetch(token)

Get Classifcations

data = ionburst.getClassifications()

GitHub

https://github.com/ionburstcloud/ionburst-sdk-python