Skip to main content

Ionburst Python SDK

The Ionburst SDK for Python is available now on PyPI (pip).

Repository#

The source code for the Ionburst Python SDK is available here.

PyPi#

ionburst-sdk-python

Python Configuration#

Further configuration for the Ionburst SDK can be specified in a config.json file.

"Ionburst": {
"Profile": "example_profile",
"IonburstUri": "https://api.example.ionburst.cloud/",
"TraceCredentialsFile": "OFF"
}
  • Profile specifies the configuration to use from the Ionburst credentials file.
  • IonburstUri specifies the Ionburst API endpoint to use.
  • TraceCredentialsFile is a debug setting that can be used to trace how the SDK picks up credentials. This should not be set to ON in production.

Usage#

Creating a Client#

An Ionburst client can be created by passing an Ionburst API URI directly. Doing so will override any configured value:

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

If the value is defined in configuration then the client creation does not require parameters:

from Ionburst import Ionburst
ionburst = Ionburst()

Classifications#

A list of available Ionburst classifications can be retrieved like so:

data = ionburst.getClassifications()

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 Deferred Request#

result = ionburst.checkDeferred(token)

Fetch Data (Deferred)#

result = ionburst.fetch(token)