Home | Trees | Indices | Help |
|
---|
|
Manages the connection to the storage system and serves as a factory for Container instances.
Instance Methods | |||
|
|||
tuple |
|
||
|
|||
Container |
|
||
|
|||
ContainerResults |
|
||
Container |
|
||
list(str) |
|
||
list({"name":"...", "count":..., "bytes":...}) |
|
||
list(str) |
|
||
Container |
|
||
Inherited from |
Properties | |
Inherited from |
Method Details |
Accepts keyword arguments for Mosso username and api key. Optionally, you can omit these keywords and supply an Authentication object using the auth keyword. Setting the argument servicenet to True will make use of Rackspace servicenet network.
|
Return tuple for number of containers, total bytes in the account and account metadata >>> connection.get_info() (5, 2309749)
|
Update account metadata >>> metadata = {'x-account-meta-foo' : 'bar'} >>> connection.update_account_metadata(metadata)
|
Given a container name, returns a Container item, creating a new Container if one does not already exist. >>> connection.create_container('new_container') <cloudfiles.container.Container object at 0xb77d628c>
|
Given a container name, delete it. >>> connection.delete_container('old_container')
|
Returns a Container item result set. >>> connection.get_all_containers() ContainerResults: 4 containers >>> print ', '.join([container.name for container in connection.get_all_containers()]) new_container, old_container, pictures, music
|
Return a single Container item for the given Container. >>> connection.get_container('old_container') <cloudfiles.container.Container object at 0xb77d628c> >>> container = connection.get_container('old_container') >>> container.size_used 23074
|
Returns a list of containers that have been published to the CDN. >>> connection.list_public_containers() ['container1', 'container2', 'container3']
|
Returns a list of Containers, including object count and size. >>> connection.list_containers_info() [{u'count': 510, u'bytes': 2081717, u'name': u'new_container'}, {u'count': 12, u'bytes': 23074, u'name': u'old_container'}, {u'count': 0, u'bytes': 0, u'name': u'container1'}, {u'count': 0, u'bytes': 0, u'name': u'container2'}, {u'count': 0, u'bytes': 0, u'name': u'container3'}, {u'count': 3, u'bytes': 2306, u'name': u'test'}]
|
Returns a list of Containers. >>> connection.list_containers() ['new_container', 'old_container', 'container1', 'container2', 'container3', 'test']
|
Container objects can be grabbed from a connection using index syntax. >>> container = conn['old_container'] >>> container.size_used 23074
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 1 13:14:13 2012 | http://epydoc.sourceforge.net |