Skip to content

Instantly share code, notes, and snippets.

@jdwfly
Created November 30, 2012 00:04
Show Gist options
  • Save jdwfly/4172792 to your computer and use it in GitHub Desktop.
Save jdwfly/4172792 to your computer and use it in GitHub Desktop.
Using Rackspace Cloudfiles API to get CDN urls
#!/usr/bin/python
import cloudfiles
cloud_username = "your_username"
cloud_api = "your_cloud_api_key"
cloud_container = "your_container"
conn = cloudfiles.get_connection(cloud_username, cloud_api)
sessions = conn.get_container(cloud_container)
objects = sessions.get_objects()
for storage_object in objects:
print storage_object.public_uri()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment