• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

Sample Python Application


Simple Python Application

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


See license specifics and DISCLAIMER

0 Comments


Add new comment