openstacksdk/README.rst

582 B

An OpenStack all-in-one SDK

Notes and mockups for a unified OpenStack SDK.

Example:

import io

from openstack import OpenStackClient, KeystoneAuth


client = OpenStackClient(KeystoneAuth('http://localhost:8000/', 'alex', '****'))
image = client.compute.images.list()[0]
server = client.compute.servers.create(image=image)
print server.public_ips[0]

container = client.object_storage.container.create(name='stuff')
container.objects.create(name='a thing', contents=io.BytesIO(b'all the bytes'))