Created
November 30, 2012 00:04
-
-
Save jdwfly/4172792 to your computer and use it in GitHub Desktop.
Using Rackspace Cloudfiles API to get CDN urls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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