Ducksboard

class ducksboard.Ducksboard(apikey_or_username, password='')

Create a Ducksboard service.

Variables:
  • apikey_or_username (str) – Your apikey or your username if you want to get or reset your API key.
  • password (str) – Only used with your username to get or reset your API key.

Account

Ducksboard.account(account_id)

Return the resource corresponding to a single account.

Account.delete()

Delete this resource.

Account.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Accounts

Ducksboard.accounts()

Return the resource corresponding to all the accounts.

Accounts.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Accounts.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Dashboard

Ducksboard.dashboard(slug)

Return the resource corresponding to a single dashboard.

Token

Dashboard.token(token)
Token.delete()

Delete this resource.

Token.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Tokens

Dashboard.tokens()
Tokens.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Tokens.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Dashboard.accessed()

Update the access time of a dashboard. The last accessed dashboard is the one that gets displayed by default when accessing the application.

Dashboard.delete()

Delete this resource.

Dashboard.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Dashboard.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.
Dashboard.widgets()

Get a collection of widgets from a dashboard.

Dashboards

Ducksboard.dashboards()

Return the resource corresponding to all the dashboards.

Dashboards.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Dashboards.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Datasource

Ducksboard.data_source(label)

Return the resource corresponding to a datasource. Datasources can only be accesed using the API key

Datasource.delete()

Delete all data for a given data source.

Datasource.last(count=None)

Get the last count values for a given data source, ordered by their timestamp, newest data first. This resource can be used for all data sources.

Variables:count (int) – The amount of data returned. It might be less than the count parameter. The default value for count is 3 and the maximum is 100.
Datasource.push(obj)

Send a value or a list of values. Each value can have a timestamp associated with it. Timestamps should be UNIX timestamps expressed as numbers. If no timestamp is specified, the value is assumed to be timestamped with the current time.

Variables:obj – a Python object representing the value to push to the data source. See http://dev.ducksboard.com/apidoc/push-api/#post-values-label
Datasource.since(seconds=None)

Get the values from up to seconds ago for a given data source, ordered by their timestamp, newest data first. This resource can be used for all data sources.

Variables:seconds (int) – The first value returned might actually be from later than seconds ago. The default value for seconds is 3600 and the maximum is 7776000.
Datasource.timespan(timespan=None, timezone=None)

Get the last value for a series of periods for a given data source. The number of values returned depends on the timespan parameter. If a certain period is empty, meaning that no values from inside of it are found, the value of the previous period is substituted, or null if no previous values were found. See http://dev.ducksboard.com/apidoc/pull-api-http/#get-values-label-timespan-timespan-timespan-timezone-timezone

Variables:
  • timespan (str) – The allowed values for timespan are daily, weekly and monthly, with the default of monthly.
  • timezone (str) – The limits of periods are actually dependent on the timezone parameter, as depending on which timezone you want to see the data in, the last value of each period might be different. The default for timezone is UTC.

Account

Ducksboard.user()

Return the resource corresponding to your user.

Account.delete()

Delete this resource.

Account.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Widget

Ducksboard.widget(widget_id)

Return the resource corresponding to a single widget.

Widget.copy(dashboard_slug)

Copy a widget to another dashboard, specified by a slug. A new widget is created, with the same parameters as the copied one. The position is chosen automatically if not specified.

Variables:dashboard_slug (str) – dashboard slug destination
Widget.delete()

Delete this resource.

Widget.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Widget.update(obj)

Update this resource.

Variables:obj – a Python object representing the updated resource, usually in the same format as returned from get. Refer to the upstream documentation for details.

Widgets

Ducksboard.widgets()

Return the resource corresponding to all the widgets.

Widgets.create(obj)

Create a new resource.

Variables:obj – a Python object representing the resource to be created, usually in the same format as returned from get. Refer to the upstream documentation for details.
Widgets.get()

For single-object resources, fetch the object’s data. For collections, fetch all of the objects.

Widgets.positions(positions)

Update the positions of multiple widgets at once.

Variables:positions (dict) – The object keys are widget IDs. the values should include a row and column field. Both of them default to 1 if not present.