Skip to content

boilerroomtv/datastore.cloudfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datastore.cloudfiles

Rackspace Cloud Files implementation of Datastore.

Install

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

Quickstart

>>> 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

License

Original code in datastore.cloudfiles is licensed under the Mozilla Public License 2.0.

About

Rackspace Cloud Files implementation for Datastore.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages