Hot on the heel of last weeks announcement of support for our new cloud API in the Fog Ruby cloud library – some news for Pythonistas! We now also have a Brightbox driver for Libcloud – the Python (and now Java) client library for interacting with multiple cloud computing APIs.
The driver is available right now via our fork of libcloud on Github and will hopefully be merged into the official codebase soon.
Here’s a quick example using the Python shell…
libcloud-brightbox:trunk$ python Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from libcloud.drivers.brightbox import BrightboxNodeDriver >>> from libcloud.types import NodeState >>> driver = BrightboxNodeDriver('my_client_id', 'my_client_secret') >>> len(driver.list_nodes()) 3 >>> size = driver.list_sizes() >>> image = driver.list_images() >>> node = driver.create_node(name='Libcloud test server', size=size, image=image) >>> node.id 'srv-0dj5y' >>> len(driver.list_nodes()) 4
If you’ve not already done so, request a free cloud beta account and have a go yourself :)