skip to navigation
skip to content

python-tutum 0.6.5

Python Library for Tutum

Latest Version: 0.21.2

Python library for Tutum’s API. Full documentation available at

Installing the library

In order to install the Tutum Python library, you can use pip install:

pip install python-tutum

It will install a Python module called tutum which you can use to interface with the API.


In order to be able to make requests to the API, you should first obtain an ApiKey for your account. For this, log into Tutum, click on the menu on the upper right corner of the screen, and select Get Api Key

You can use your ApiKey with the Python library in any of the following ways (will be used in this order):

  • Manually set it in your Python initialization code:
import tutum
tutum.user = "username"
tutum.apikey = "apikey"
  • Store it in a configuration file in ~/.tutum:
user = "username"
apikey = "apikey"
  • Set the environment variables TUTUM_USER and TUTUM_APIKEY:
export TUTUM_USER=username
export TUTUM_APIKEY=apikey


Errors in the HTTP API will be returned with status codes in the 4xx and 5xx ranges.

The Python library will detect this status codes and raise TutumApiError exceptions with the error message, which should be handled by the calling application accordingly.

Quick examples


>>> import tutum
>>> tutum.Application.list()
[<tutum.api.application.Application object at 0x10701ca90>, <tutum.api.application.Application object at 0x10701ca91>]
>>> tutum.Application.fetch("fee900c6-97da-46b3-a21c-e2b50ed07015")
<tutum.api.application.Application object at 0x106c45c10>
>>> app = tutum.Application.create(image="tutum/hello-world", name="my-new-app", target_num_containers=2)
>>> app.target_num_containers = 3
>>> app.stop()
>>> app.start()
>>> app.delete()


>>> import tutum
>>> tutum.Container.list()
[<tutum.api.container.Container object at 0x10701ca90>, <tutum.api.container.Container object at 0x10701ca91>]
>>> tutum.Container.fetch("7d6696b7-fbaf-471d-8e6b-ce7052586c24")
<tutum.api.container.Container object at 0x10701ca90>
>>> container.web_public_dns = ""
>>> container.stop()
>>> container.start()
>>> container.logs
"2014-03-24 23:58:08,973 CRIT Supervisor running as root (no user in config file) [...]"
>>> container.delete()
File Type Py Version Uploaded on Size
python-tutum-0.6.5.tar.gz (md5) Source 2014-04-08 5KB
  • Author: Tutum, Inc.
  • Home Page:
  • Keywords: tutum docker
  • License: Apache v2
  • Provides tutum
  • Package Index Owner: fermayo, bernardopericacho, tifayuki
  • Package Index Maintainer: bernardopericacho, tifayuki
  • DOAP record: python-tutum-0.6.5.xml