From Connection to Objects
#!/usr/bin/env python
#Import the CloudFiles Python API ensure this is located in your lib directory for Python.
import cloudfiles
#Lets Connect to CloudFiles.
conn = cloudfiles.get_connection('UserNameGoesHere','APIKeyGoesHere')
#Creating a Container Object.
cont = conn.create_container('PleasePutAContainerNameHere')
#Now for the Object.
obj = cont.create_object('PleaseEnterAnObjectNameHere')
#Finally for some data.
obj.write('LetsWriteSomeData!')
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

0 Comments
Add new comment