skip to navigation
skip to content

smartdc 0.1.9

Joyent SmartDataCenter CloudAPI connector using http-signature authentication via Requests

Package Documentation

Latest Version: 0.2.0

Connect with Joyent’s SmartDataCenter CloudAPI via Python, using secure http-signature signed requests. It enables you to programmatically provision and otherwise control machines within Joyent’s public cloud.

This is a third-party effort.

This module currently supports:

  • Secure connections (via py-http-signature and ssh-agent, when available)
  • Key management
  • Browsing and access of datacenters, datasets (OS distributions/VM bundles), and packages (machine sizes and resources)
  • Machine listing, search, creation, management (start/stop/reboot/resize/delete), snapshotting, metadata, and tags
  • Installing boot scripts on machines

It attempts to provide Pythonic objects (for Data Centers, Machines and Snapshots) and convenience methods only when appropriate, and otherwise deals with string identifiers or dicts as lightweight objects.



  • ssh (used by py-http-signature for its ssh-agent integration)

We assume that json is present because requests now requires py2.6 and up.


pip install smartdc


from smartdc import DataCenter

sdc = DataCenter(location='us-sw-1', key_id='/test/keys/test_key')


sm = sdc.create_machine(name='test', dataset='sdc:sdc:smartosplus:',
      package='Small 1GB')


import urllib2

urllib2.urlopen('http://' + sm.public_ips[0]).headers.dict





A colleague and I wanted something Pythonic to fit into our preferred toolchain, and the easiest approach was to build it myself. Requests made some aspects stupidly easy, which is why I created the dependency for the first version. The colleague wanted integration with ssh-agent, and using ssh was the easiest path to that.


Adam T. Lindsay




0.1.9 (2012-10-02)

  • Bug fix: POSTs including data would get mangled while looking for a correct ssh-agent key (thanks, @thekad)
  • Bug fix: ssh-agent would throw wrong error if it failed to find any keys
  • Set allow-agent to False by default, thanks in part to this less-explored code path

0.1.8 (2012-05-02)

  • Bug fix: double-json encoding on add_key got in way of proper upload
  • Introduce python-versioneer to hopefully make version management more palatable

0.1.7 (2012-05-01)

  • Renamed metadata_dict and tag_dict parameters to metadata and tags
  • POST data as JSON, rather than encoded in URL
  • Added boot_script option on machine creation
  • Process and expose credentials
  • Slight tutorial and other documentation cleanup
  • Local filtering on datasets and packages

0.1.6 (2012-04-30)

  • Fixed release issues (README)
  • Moved long tutorial out of the README
  • Integrated with ssh-agent changes in http_signature
File Type Py Version Uploaded on Size
smartdc-0.1.9.tar.gz (md5) Source 2012-10-02 18KB