First create an instance of CloudServers with your credentials:
>>> from cloudservers import CloudServers
>>> cloudservers = CloudServers(USERNAME, API_KEY)
Then call methods on the CloudServers object:
Authenticate against the server.
Normally this is called automatically when you first access the API, but you can call this method to force authentication right now.
Returns on success; raises cloudservers.Unauthorized if the credentials are wrong.
For example:
>>> cloudservers.servers.list()
[<Server: buildslave-ubuntu-9.10>]
>>> cloudservers.flavors.list()
[<Flavor: 256 server>,
<Flavor: 512 server>,
<Flavor: 1GB server>,
<Flavor: 2GB server>,
<Flavor: 4GB server>,
<Flavor: 8GB server>,
<Flavor: 15.5GB server>]
>>> fl = cloudservers.flavors.find(ram=512)
>>> cloudservers.servers.create("my-server", flavor=fl)
<Server: my-server>
For more information, see the reference: