Rackspace Cloud Files implementation of Datastore.
From PyPI (using pip):
pip install datastore.cloudfiles
From PyPI (using setuptools):
easy_install datastore.aws
From source:
git clone https://github.com/boilerroomtv/datastore.cloudfiles
cd datastore.cloudfiles
python setup.py install
>>> import datastore.cloudfiles
>>> import pyrax
>>>
>>> pyrax.set_setting('identity_type', 'rackspace')
>>> pyrax.set_default_region(RACKSPACE_REGION)
>>> pyrax.set_credentials(RACKSPACE_USERNAME, RACKSPACE_API_KEY)
>>> container = pyrax.cloudfiles.create_container(self.container_name)
>>> ds = datastore.cloudfiles.RackspaceCloudFilesDatastore(self.container)
>>>
>>> hello = datastore.Key('hello')
>>> ds.put(hello, 'world')
>>> ds.contains(hello)
True
>>> ds.get(hello)
'world'
>>> ds.delete(hello)
>>> ds.get(hello)
None
Original code in datastore.cloudfiles
is licensed under the Mozilla Public License 2.0.