API

The entrypoint to the library ist the JiffyBox class, which represents a single connection to the service.

Exceptions

exception jiffybox.exceptions.JiffyException

Generic Exception

exception jiffybox.exceptions.JiffyMessageException

Container for error messages from the API

exception jiffybox.exceptions.JiffyAttributeException

Missing attribute when constructing an object

Classes

class jiffybox.api.JiffyBox(api_key, api_url='https://api.jiffybox.de', api_version='v1.0')

Entrypoint to the JiffyBox API. Represents a single account.

Parameters:api_key (string) – API key
box(id)

Get information of a specific box.

Parameters:id (string) – ID of the box
Return type:Box
boxes()

List all boxes in the account.

Warning

As noted in the API docs, this call is fairly expensive and should not be used to monitor status with a high refresh rate.

Return type:List of boxes
create_box(*args, **kwargs)

Create a new box

For parameters see Box.create().

Return type:Box
delete_box(id)

Delete a specific box

Parameters:id (string) – ID of the distribution
Return type:bool
distribution(id)

Get information of a specific distribution.

Parameters:id (string) – ID of the distribution
Return type:Distribution
distributions()

List all available distributions.

Return type:List of distributions
plan(id)

Get information of a specific plan.

Parameters:id (string) – ID of the distribution
Return type:Plan
plans()

List all available plans.

Return type:List of plans
class jiffybox.api.Box(json, api=None, id_=None)

A single JiffyBox

activeProfile

JSON-Field activeProfile

classmethod create(api, name, plan, backupid=None, distribution=None, password=None, use_sshkey=None, metadata=None)

Create a new box.

Parameters:
  • api (JiffyBox) – API object to use
  • name (string) – Display name of the new box
  • plan (Plan or ID of an available plan) – Plan to use
  • backupid (string) – ID to use for backups
  • distribution (Distribution or ID an available distribution) – Distribution to use
  • password (string) – Password for the new box
  • use_sshkey (bool) – Whether to install SSH keys
  • metadata (dict) – additional metadata to attach
Return type:

Box

created

JSON-Field created

delete()
host

JSON-Field host

id

JSON-Field id

ips

JSON-Field ips

isBeingCopied

JSON-Field isBeingCopied

manualBackupRunning

JSON-Field manualBackupRunning

metadata

JSON-Field metadata

name

JSON-Field name

plan

JSON-Field plan

private_ips
public_ips
ready
recoverymodeActive

JSON-Field recoverymodeActive

running

JSON-Field running

runningSince

JSON-Field runningSince

start()
status

JSON-Field status

stop()
wait_for_status(status='READY', max_wait=60, poll_interval=7)
class jiffybox.api.Distribution(json, api=None, id_=None)

A distribution

defaultKernel

JSON-Field defaultKernel

id

JSON-Field id

minDiskSizeMB

JSON-Field minDiskSizeMB

name

JSON-Field name

rootdiskMode

JSON-Field rootdiskMode

class jiffybox.api.Plan(json, api=None, id_=None)

A plan

cpus

JSON-Field cpus

diskSizeInMB

JSON-Field diskSizeInMB

id

JSON-Field id

name

JSON-Field name

priceCap

JSON-Field priceCap

pricePerHour

JSON-Field pricePerHour

pricePerHourFrozen

JSON-Field pricePerHourFrozen

ramInMB

JSON-Field ramInMB