Commits

cweidenkeller committed d2d2abd

Added Static web and Object versioning

  • Participants
  • Parent commits f627643

Comments (0)

Files changed (45)

cloudfiles/connection.py

                             useragent=self.user_agent, timeout=self.timeout)
             else:
                 raise TypeError("Incorrect or invalid arguments supplied")
-
         self._authenticate()
-
     def _authenticate(self):
         """
         Authenticate and setup this instance with the values returned.
 
     def get_info(self):
         """
-        Return tuple for number of containers and total bytes in the account
+        Return tuple for number of containers, total bytes in the account and account metadata
 
         >>> connection.get_info()
         (5, 2309749)
 
         @rtype: tuple
-        @return: a tuple containing the number of containers and total bytes
-                 used by the account
+        @return: a tuple containing the number of containers, total bytes
+                 used by the account and a dictionary containing account metadata
         """
         response = self.make_request('HEAD')
         count = size = None
+        metadata = {}
         for hdr in response.getheaders():
             if hdr[0].lower() == 'x-account-container-count':
                 try:
                     size = int(hdr[1])
                 except ValueError:
                     size = 0
+            if hdr[0].lower().startswith('x-account-meta-'):
+                metadata[hdr[0].lower()[15:]] = hdr[1]
         buff = response.read()
         if (response.status < 200) or (response.status > 299):
             raise ResponseError(response.status, response.reason)
-        return (count, size)
+        return (count, size, metadata)
+
+    def update_account_metadata(self, metadata):
+        """
+        Update account metadata
+        >>> metadata = {'x-account-meta-foo' : 'bar'}
+        >>> connection.update_account_metadata(metadata)
+
+        @param metadata: Dictionary of metadata
+        @type metdada: dict
+        """
+        response = self.make_request('POST', hdrs=metadata)
+        response.read()
+        if (response.status < 200) or (response.status > 299):
+           raise ResponseError(response.status, response.reason)
 
     def _check_container_name(self, container_name):
         if not container_name or \
 
         response = self.make_request('HEAD', [container_name])
         count = size = None
+        metadata = {}
         for hdr in response.getheaders():
             if hdr[0].lower() == 'x-container-object-count':
                 try:
                     size = int(hdr[1])
                 except ValueError:
                     size = 0
+            if hdr[0].lower().startswith('x-container-meta-'):
+                metadata[hdr[0].lower()[17:]] = hdr[1]
         buff = response.read()
         if response.status == 404:
             raise NoSuchContainer(container_name)
         if (response.status < 200) or (response.status > 299):
             raise ResponseError(response.status, response.reason)
-        return Container(self, container_name, count, size)
+        return Container(self, container_name, count, size, metadata)
 
     def list_public_containers(self):
         """

cloudfiles/container.py

     name = property(fget=lambda self: self._name, fset=__set_name,
         doc="the name of the container (read-only)")
 
-    def __init__(self, connection=None, name=None, count=None, size=None):
+    def __init__(self, connection=None, name=None, count=None, size=None, metadata=None):
         """
         Containers will rarely if ever need to be instantiated directly by the
         user.
         self.conn = connection
         self.object_count = count
         self.size_used = size
+        self.metadata = metadata
         self.cdn_uri = None
         self.cdn_ssl_uri = None
         self.cdn_streaming_uri = None
         self.cdn_ttl = None
         self.cdn_log_retention = None
-
+        if self.metadata == None:
+            self.metadata = {}
         if connection.cdn_enabled:
             self._fetch_cdn_data()
 
     @requires_name(InvalidContainerName)
+    def update_metadata(self, metadata):
+        """
+        Update Container Metadata
+        
+        >>> metadata = {'x-container-meta-foo' : 'bar'}
+        >>> container.update_metadata(metadata)
+        
+        @param metadata: A dictionary containing metadata.
+        @type metadata: dict
+        """
+        response = self.conn.make_request('POST', [self.name])
+        response.read()
+        if (response.status < 200) or (response.status > 299):
+            raise ResponseError(response.status, response.reason)
+    
+    def enable_static_web(self, index=None, listings=None, error=None, listings_css=None):
+        """
+        Enable static web for this Container
+
+        >>> container.enable_static_web('index.html', 'error.html', True, 'style.css')
+
+        @param index: The name of the index landing page
+        @type index : str
+        @param listings: A boolean value to enable listing.
+        @type error: bool
+        @param listings_css: The file to be used when applying CSS to the listing.
+        @type listings_css: str
+        @param error: The suffix to be used for 404 and 401 error pages.
+        @type error: str
+
+        """
+        metadata = {'X-Container-Meta-Web-Index' : '',
+                    'X-Container-Meta-Web-Listings' : '',
+                    'X-Container-Meta-Web-Error' : '',
+                    'X-Container-Meta-Web-Listings-CSS' : ''}
+        if index is not None:
+            metadata['X-Container-Meta-Web-Index'] = index
+        if listings is not None:
+            metadata['X-Container-Meta-Web-Listings'] = str(listings)
+        if error is not None:
+            metadata['X-Container-Meta-Web-Error'] = error
+        if listings_css is not None:
+            metadata['X-Container-Meta-Web-Listings-CSS'] = listings_css
+        self.update_metadata(metadata)
+
+    def disable_static_web(self):
+        """
+        Disable static web for this Container
+
+        >>> container.disable_static_web()
+        """
+        self.enable_static_web()
+
+    def enable_object_versioning(self, container_name):
+        """
+        Enable object versioning on this container
+        
+        >>> container.enable_object_versioning('container_i_want_versions_to_go_to')
+        
+        @param container_url: The container where versions will be stored
+        @type container_name: str
+        """
+        self.update_metadata({'X-Versions-Location' : container_name})
+
+    def disable_object_versioning(self):
+        """
+        Disable object versioning on this container
+
+        >>> container.disable_object_versioning()
+        """
+        self.update_metadata({'X-Versions-Location' : ''})
+
+    @requires_name(InvalidContainerName)
     def _fetch_cdn_data(self):
         """
         Fetch the object's CDN data from the CDN service

docs/api-objects.txt

 cloudfiles.connection.Connection.list_containers_info	cloudfiles.connection.Connection-class.html#list_containers_info
 cloudfiles.connection.Connection.list_public_containers	cloudfiles.connection.Connection-class.html#list_public_containers
 cloudfiles.connection.Connection.__getitem__	cloudfiles.connection.Connection-class.html#__getitem__
+cloudfiles.connection.Connection.update_account_metadata	cloudfiles.connection.Connection-class.html#update_account_metadata
 cloudfiles.connection.Connection._set_storage_url	cloudfiles.connection.Connection-class.html#_set_storage_url
 cloudfiles.connection.Connection.get_container	cloudfiles.connection.Connection-class.html#get_container
 cloudfiles.connection.Connection.create_container	cloudfiles.connection.Connection-class.html#create_container
 cloudfiles.connection.ConnectionPool.put	cloudfiles.connection.ConnectionPool-class.html#put
 cloudfiles.connection.ConnectionPool.__init__	cloudfiles.connection.ConnectionPool-class.html#__init__
 cloudfiles.container.Container	cloudfiles.container.Container-class.html
+cloudfiles.container.Container.enable_static_web	cloudfiles.container.Container-class.html#enable_static_web
 cloudfiles.container.Container.__set_name	cloudfiles.container.Container-class.html#__set_name
 cloudfiles.container.Container.delete_object	cloudfiles.container.Container-class.html#delete_object
 cloudfiles.container.Container.list_objects	cloudfiles.container.Container-class.html#list_objects
 cloudfiles.container.Container.__init__	cloudfiles.container.Container-class.html#__init__
 cloudfiles.container.Container.size_used	cloudfiles.container.Container-class.html#size_used
 cloudfiles.container.Container.object_count	cloudfiles.container.Container-class.html#object_count
+cloudfiles.container.Container.disable_object_versioning	cloudfiles.container.Container-class.html#disable_object_versioning
+cloudfiles.container.Container.update_metadata	cloudfiles.container.Container-class.html#update_metadata
 cloudfiles.container.Container.cdn_ttl	cloudfiles.container.Container-class.html#cdn_ttl
 cloudfiles.container.Container.public_ssl_uri	cloudfiles.container.Container-class.html#public_ssl_uri
 cloudfiles.container.Container.__getitem__	cloudfiles.container.Container-class.html#__getitem__
 cloudfiles.container.Container.public_uri	cloudfiles.container.Container-class.html#public_uri
 cloudfiles.container.Container.list_objects_info	cloudfiles.container.Container-class.html#list_objects_info
 cloudfiles.container.Container.make_private	cloudfiles.container.Container-class.html#make_private
+cloudfiles.container.Container.enable_object_versioning	cloudfiles.container.Container-class.html#enable_object_versioning
 cloudfiles.container.Container.log_retention	cloudfiles.container.Container-class.html#log_retention
 cloudfiles.container.Container.is_public	cloudfiles.container.Container-class.html#is_public
 cloudfiles.container.Container.public_streaming_uri	cloudfiles.container.Container-class.html#public_streaming_uri
+cloudfiles.container.Container.disable_static_web	cloudfiles.container.Container-class.html#disable_static_web
 cloudfiles.container.Container.name	cloudfiles.container.Container-class.html#name
 cloudfiles.container.Container.make_public	cloudfiles.container.Container-class.html#make_public
 cloudfiles.container.Container.get_objects	cloudfiles.container.Container-class.html#get_objects

docs/class-tree.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Thu Mar 15 15:18:54 2012
+    Generated by Epydoc 3.0.1 on Fri Jun  1 13:14:10 2012
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/cloudfiles-module.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Thu Mar 15 15:18:54 2012
+    Generated by Epydoc 3.0.1 on Fri Jun  1 13:14:11 2012
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/cloudfiles-pysrc.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Thu Mar 15 15:18:56 2012
+    Generated by Epydoc 3.0.1 on Fri Jun  1 13:14:22 2012
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/cloudfiles.connection-module.html

 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Thu Mar 15 15:18:54 2012
+    Generated by Epydoc 3.0.1 on Fri Jun  1 13:14:12 2012
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/cloudfiles.connection-pysrc.html

 <a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">                            <tt class="py-name">useragent</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user_agent</tt><tt class="py-op">,</tt> <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
 <a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
 <a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"Incorrect or invalid arguments supplied"</tt><tt class="py-op">)</tt> </tt>
-<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"> </tt>
-<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"> </tt>
-<a name="Connection._authenticate"></a><div id="Connection._authenticate-def"><a name="L88"></a><tt class="py-lineno"> 88</tt> <a class="py-toggle" href="#" id="Connection._authenticate-toggle" onclick="return toggle('Connection._authenticate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#_authenticate">_authenticate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection._authenticate-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection._authenticate-expanded"><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line"><tt class="py-docstring">        Authenticate and setup this instance with the values returned.</tt> </tt>
-<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_url</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">        <tt class="py-name">url</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_set_storage_url</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
-<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt> <tt class="py-op">=</tt> <tt class="py-name">parse_url</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
-<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"> </tt>
-<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">version_info</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;=</tt> <tt class="py-number">2</tt> <tt class="py-keyword">and</tt> <tt class="py-name">version_info</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">6</tt><tt class="py-op">:</tt> </tt>
-<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">THTTPSConnection</tt> <tt class="py-keyword">or</tt> \ </tt>
-<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                                                              <tt class="py-name">THTTPConnection</tt> </tt>
-<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
-<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">HTTPSConnection</tt> <tt class="py-keyword">or</tt> \ </tt>
-<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">                                                              <tt class="py-name">HTTPConnection</tt> </tt>
-<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">http_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_url</tt><tt class="py-op">:</tt> </tt>
-<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"> </tt>
-<a name="Connection._set_storage_url"></a><div id="Connection._set_storage_url-def"><a name="L106"></a><tt class="py-lineno">106</tt> <a class="py-toggle" href="#" id="Connection._set_storage_url-toggle" onclick="return toggle('Connection._set_storage_url');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#_set_storage_url">_set_storage_url</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection._set_storage_url-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection._set_storage_url-expanded"><a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicenet</tt><tt class="py-op">:</tt> </tt>
-<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"https://snet-%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">url</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"https://"</tt><tt class="py-op">,</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
-<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">url</tt> </tt>
-</div><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"> </tt>
-<a name="Connection.cdn_connect"></a><div id="Connection.cdn_connect-def"><a name="L111"></a><tt class="py-lineno">111</tt> <a class="py-toggle" href="#" id="Connection.cdn_connect-toggle" onclick="return toggle('Connection.cdn_connect');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#cdn_connect">cdn_connect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.cdn_connect-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.cdn_connect-expanded"><a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"><tt class="py-docstring">        Setup the http connection instance for the CDN service.</tt> </tt>
-<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">,</tt> <tt class="py-name">cdn_uri</tt><tt class="py-op">,</tt> <tt class="py-name">is_ssl</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">parse_url</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_url</tt><tt class="py-op">)</tt> </tt>
-<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt><tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">,</tt> <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
-<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_enabled</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
-</div><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"> </tt>
-<a name="Connection.http_connect"></a><div id="Connection.http_connect-def"><a name="L119"></a><tt class="py-lineno">119</tt> <a class="py-toggle" href="#" id="Connection.http_connect-toggle" onclick="return toggle('Connection.http_connect');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#http_connect">http_connect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.http_connect-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.http_connect-expanded"><a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line"><tt class="py-docstring">        Setup the http connection instance.</tt> </tt>
-<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">,</tt> <tt class="py-name">is_ssl</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt> </tt>
-<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-16', 'connection', 'link-11');">connection</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt><tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">=</tt><tt class="py-name">port</tt><tt class="py-op">,</tt> \ </tt>
-<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                                              <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
-<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-17', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">set_debuglevel</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">debuglevel</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line"> </tt>
-<a name="Connection.cdn_request"></a><div id="Connection.cdn_request-def"><a name="L128"></a><tt class="py-lineno">128</tt> <a class="py-toggle" href="#" id="Connection.cdn_request-toggle" onclick="return toggle('Connection.cdn_request');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#cdn_request">cdn_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">method</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">hdrs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.cdn_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.cdn_request-expanded"><a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"><tt class="py-docstring">        Given a method (i.e. GET, PUT, POST, etc), a path, data, header and</tt> </tt>
-<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"><tt class="py-docstring">        metadata dicts, performs an http request against the CDN service.</tt> </tt>
-<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_enabled</tt><tt class="py-op">:</tt> </tt>
-<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-18" class="py-name"><a title="cloudfiles.errors.CDNNotEnabled" class="py-name" href="#" onclick="return doclink('link-18', 'CDNNotEnabled', 'link-8');">CDNNotEnabled</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line"> </tt>
-<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s'</tt> <tt class="py-op">%</tt> \ </tt>
-<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">                 <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unicode_quote</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">path</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">        <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
-<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">                   <tt class="py-string">'User-Agent'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user_agent</tt><tt class="py-op">,</tt> </tt>
-<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">                   <tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt><tt class="py-op">}</tt> </tt>
-<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">)</tt> </tt>
-<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"> </tt>
-<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">            <tt class="py-docstring">'''Re-connect and re-try a failed request once'''</tt> </tt>
-<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
-<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"> </tt>
-<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
-<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">,</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">HTTPException</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">401</tt><tt class="py-op">:</tt> </tt>
-<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt> </tt>
-<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"> </tt>
-<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt> </tt>
-</div><a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"> </tt>
-<a name="Connection.make_request"></a><div id="Connection.make_request-def"><a name="L162"></a><tt class="py-lineno">162</tt> <a class="py-toggle" href="#" id="Connection.make_request-toggle" onclick="return toggle('Connection.make_request');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#make_request">make_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">method</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">hdrs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">parms</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.make_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.make_request-expanded"><a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"><tt class="py-docstring">        Given a method (i.e. GET, PUT, POST, etc), a path, data, header and</tt> </tt>
-<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line"><tt class="py-docstring">        metadata dicts, and an optional dictionary of query parameters,</tt> </tt>
-<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"><tt class="py-docstring">        performs an http request.</tt> </tt>
-<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s'</tt> <tt class="py-op">%</tt> \ </tt>
-<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">                 <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unicode_quote</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">path</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"> </tt>
-<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">parms</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">parms</tt><tt class="py-op">:</tt> </tt>
-<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s?%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line"> </tt>
-<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">        <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
-<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                   <tt class="py-string">'User-Agent'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user_agent</tt><tt class="py-op">,</tt> </tt>
-<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">                   <tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt><tt class="py-op">}</tt> </tt>
-<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">        <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">headers</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">)</tt> </tt>
-<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"> </tt>
-<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">            <tt class="py-docstring">'''Re-connect and re-try a failed request once'''</tt> </tt>
-<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">http_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-19', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
-<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-20', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line"> </tt>
-<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-21', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
-<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-22', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">,</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">HTTPException</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">401</tt><tt class="py-op">:</tt> </tt>
-<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt> </tt>
-<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"> </tt>
-<a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt> </tt>
-</div><a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line"> </tt>
-<a name="Connection.get_info"></a><div id="Connection.get_info-def"><a name="L197"></a><tt class="py-lineno">197</tt> <a class="py-toggle" href="#" id="Connection.get_info-toggle" onclick="return toggle('Connection.get_info');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#get_info">get_info</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.get_info-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.get_info-expanded"><a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-docstring">        Return tuple for number of containers and total bytes in the account</tt> </tt>
-<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.get_info()</tt> </tt>
-<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"><tt class="py-docstring">        (5, 2309749)</tt> </tt>
-<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: tuple</tt> </tt>
-<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a tuple containing the number of containers and total bytes</tt> </tt>
-<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line"><tt class="py-docstring">                 used by the account</tt> </tt>
-<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'HEAD'</tt><tt class="py-op">)</tt> </tt>
-<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt id="link-23" class="py-name" targets="Method cloudfiles.container.ContainerResults.count()=cloudfiles.container.ContainerResults-class.html#count,Method cloudfiles.storage_object.ObjectResults.count()=cloudfiles.storage_object.ObjectResults-class.html#count"><a title="cloudfiles.container.ContainerResults.count
+<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+</div><a name="Connection._authenticate"></a><div id="Connection._authenticate-def"><a name="L86"></a><tt class="py-lineno"> 86</tt> <a class="py-toggle" href="#" id="Connection._authenticate-toggle" onclick="return toggle('Connection._authenticate');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#_authenticate">_authenticate</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection._authenticate-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection._authenticate-expanded"><a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"><tt class="py-docstring">        Authenticate and setup this instance with the values returned.</tt> </tt>
+<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_url</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">auth</tt><tt class="py-op">.</tt><tt class="py-name">authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">        <tt class="py-name">url</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_set_storage_url</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
+<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt> <tt class="py-op">=</tt> <tt class="py-name">parse_url</tt><tt class="py-op">(</tt><tt class="py-name">url</tt><tt class="py-op">)</tt> </tt>
+<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"> </tt>
+<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">version_info</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;=</tt> <tt class="py-number">2</tt> <tt class="py-keyword">and</tt> <tt class="py-name">version_info</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">6</tt><tt class="py-op">:</tt> </tt>
+<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">THTTPSConnection</tt> <tt class="py-keyword">or</tt> \ </tt>
+<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                                                              <tt class="py-name">THTTPConnection</tt> </tt>
+<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
+<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt><tt class="py-op">[</tt><tt class="py-number">3</tt><tt class="py-op">]</tt> <tt class="py-keyword">and</tt> <tt class="py-name">HTTPSConnection</tt> <tt class="py-keyword">or</tt> \ </tt>
+<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                                                              <tt class="py-name">HTTPConnection</tt> </tt>
+<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">http_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_url</tt><tt class="py-op">:</tt> </tt>
+<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"> </tt>
+<a name="Connection._set_storage_url"></a><div id="Connection._set_storage_url-def"><a name="L104"></a><tt class="py-lineno">104</tt> <a class="py-toggle" href="#" id="Connection._set_storage_url-toggle" onclick="return toggle('Connection._set_storage_url');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#_set_storage_url">_set_storage_url</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">url</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection._set_storage_url-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection._set_storage_url-expanded"><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">servicenet</tt><tt class="py-op">:</tt> </tt>
+<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-string">"https://snet-%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">url</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">"https://"</tt><tt class="py-op">,</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt> </tt>
+<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">url</tt> </tt>
+</div><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
+<a name="Connection.cdn_connect"></a><div id="Connection.cdn_connect-def"><a name="L109"></a><tt class="py-lineno">109</tt> <a class="py-toggle" href="#" id="Connection.cdn_connect-toggle" onclick="return toggle('Connection.cdn_connect');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#cdn_connect">cdn_connect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.cdn_connect-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.cdn_connect-expanded"><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line"><tt class="py-docstring">        Setup the http connection instance for the CDN service.</tt> </tt>
+<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">,</tt> <tt class="py-name">cdn_uri</tt><tt class="py-op">,</tt> <tt class="py-name">is_ssl</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">parse_url</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_url</tt><tt class="py-op">)</tt> </tt>
+<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt><tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">,</tt> <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
+<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_enabled</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
+</div><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line"> </tt>
+<a name="Connection.http_connect"></a><div id="Connection.http_connect-def"><a name="L117"></a><tt class="py-lineno">117</tt> <a class="py-toggle" href="#" id="Connection.http_connect-toggle" onclick="return toggle('Connection.http_connect');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#http_connect">http_connect</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.http_connect-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.http_connect-expanded"><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">        Setup the http connection instance.</tt> </tt>
+<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">        <tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">,</tt> <tt class="py-name">is_ssl</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connection_args</tt> </tt>
+<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-16', 'connection', 'link-11');">connection</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">conn_class</tt><tt class="py-op">(</tt><tt class="py-name">host</tt><tt class="py-op">,</tt> <tt class="py-name">port</tt><tt class="py-op">=</tt><tt class="py-name">port</tt><tt class="py-op">,</tt> \ </tt>
+<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">                                              <tt class="py-name">timeout</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">timeout</tt><tt class="py-op">)</tt> </tt>
+<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-17', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">set_debuglevel</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">debuglevel</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"> </tt>
+<a name="Connection.cdn_request"></a><div id="Connection.cdn_request-def"><a name="L126"></a><tt class="py-lineno">126</tt> <a class="py-toggle" href="#" id="Connection.cdn_request-toggle" onclick="return toggle('Connection.cdn_request');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#cdn_request">cdn_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">method</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">hdrs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.cdn_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.cdn_request-expanded"><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-docstring">        Given a method (i.e. GET, PUT, POST, etc), a path, data, header and</tt> </tt>
+<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"><tt class="py-docstring">        metadata dicts, performs an http request against the CDN service.</tt> </tt>
+<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_enabled</tt><tt class="py-op">:</tt> </tt>
+<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-18" class="py-name"><a title="cloudfiles.errors.CDNNotEnabled" class="py-name" href="#" onclick="return doclink('link-18', 'CDNNotEnabled', 'link-8');">CDNNotEnabled</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line"> </tt>
+<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s'</tt> <tt class="py-op">%</tt> \ </tt>
+<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">                 <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unicode_quote</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">path</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">        <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
+<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">                   <tt class="py-string">'User-Agent'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user_agent</tt><tt class="py-op">,</tt> </tt>
+<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">                   <tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt><tt class="py-op">}</tt> </tt>
+<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">)</tt> </tt>
+<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"> </tt>
+<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">            <tt class="py-docstring">'''Re-connect and re-try a failed request once'''</tt> </tt>
+<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
+<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line"> </tt>
+<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
+<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_connection</tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">,</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">HTTPException</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">401</tt><tt class="py-op">:</tt> </tt>
+<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt> </tt>
+<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line"> </tt>
+<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt> </tt>
+</div><a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"> </tt>
+<a name="Connection.make_request"></a><div id="Connection.make_request-def"><a name="L160"></a><tt class="py-lineno">160</tt> <a class="py-toggle" href="#" id="Connection.make_request-toggle" onclick="return toggle('Connection.make_request');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#make_request">make_request</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">method</tt><tt class="py-op">,</tt> <tt class="py-param">path</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-param">data</tt><tt class="py-op">=</tt><tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-param">hdrs</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">parms</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.make_request-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.make_request-expanded"><a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-docstring">        Given a method (i.e. GET, PUT, POST, etc), a path, data, header and</tt> </tt>
+<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line"><tt class="py-docstring">        metadata dicts, and an optional dictionary of query parameters,</tt> </tt>
+<a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line"><tt class="py-docstring">        performs an http request.</tt> </tt>
+<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">        <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'/%s/%s'</tt> <tt class="py-op">%</tt> \ </tt>
+<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">                 <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">.</tt><tt class="py-name">rstrip</tt><tt class="py-op">(</tt><tt class="py-string">'/'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">'/'</tt><tt class="py-op">.</tt><tt class="py-name">join</tt><tt class="py-op">(</tt><tt class="py-op">[</tt><tt class="py-name">unicode_quote</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">path</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line"> </tt>
+<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">parms</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">parms</tt><tt class="py-op">:</tt> </tt>
+<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">            <tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s?%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">urlencode</tt><tt class="py-op">(</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line"> </tt>
+<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">        <tt class="py-name">headers</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'Content-Length'</tt><tt class="py-op">:</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> </tt>
+<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">                   <tt class="py-string">'User-Agent'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">user_agent</tt><tt class="py-op">,</tt> </tt>
+<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">                   <tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt><tt class="py-op">}</tt> </tt>
+<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">        <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">headers</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">hdrs</tt><tt class="py-op">)</tt> </tt>
+<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line"> </tt>
+<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">        <tt class="py-keyword">def</tt> <tt class="py-def-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line">            <tt class="py-docstring">'''Re-connect and re-try a failed request once'''</tt> </tt>
+<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">http_connect</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-19', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
+<a name="L181"></a><tt class="py-lineno">181</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-20', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line"> </tt>
+<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-21', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">request</tt><tt class="py-op">(</tt><tt class="py-name">method</tt><tt class="py-op">,</tt> <tt class="py-name">path</tt><tt class="py-op">,</tt> <tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">headers</tt><tt class="py-op">)</tt> </tt>
+<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="cloudfiles.connection" class="py-name" href="#" onclick="return doclink('link-22', 'connection', 'link-11');">connection</a></tt><tt class="py-op">.</tt><tt class="py-name">getresponse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt class="py-name">socket</tt><tt class="py-op">.</tt><tt class="py-name">error</tt><tt class="py-op">,</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-name">HTTPException</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">401</tt><tt class="py-op">:</tt> </tt>
+<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_authenticate</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">            <tt class="py-name">headers</tt><tt class="py-op">[</tt><tt class="py-string">'X-Auth-Token'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">token</tt> </tt>
+<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">retry_request</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"> </tt>
+<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt> </tt>
+</div><a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line"> </tt>
+<a name="Connection.get_info"></a><div id="Connection.get_info-def"><a name="L195"></a><tt class="py-lineno">195</tt> <a class="py-toggle" href="#" id="Connection.get_info-toggle" onclick="return toggle('Connection.get_info');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#get_info">get_info</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.get_info-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.get_info-expanded"><a name="L196"></a><tt class="py-lineno">196</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line"><tt class="py-docstring">        Return tuple for number of containers, total bytes in the account and account metadata</tt> </tt>
+<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.get_info()</tt> </tt>
+<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line"><tt class="py-docstring">        (5, 2309749)</tt> </tt>
+<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: tuple</tt> </tt>
+<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a tuple containing the number of containers, total bytes</tt> </tt>
+<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line"><tt class="py-docstring">                 used by the account and a dictionary containing account metadata</tt> </tt>
+<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'HEAD'</tt><tt class="py-op">)</tt> </tt>
+<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">        <tt id="link-23" class="py-name" targets="Method cloudfiles.container.ContainerResults.count()=cloudfiles.container.ContainerResults-class.html#count,Method cloudfiles.storage_object.ObjectResults.count()=cloudfiles.storage_object.ObjectResults-class.html#count"><a title="cloudfiles.container.ContainerResults.count
 cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-23', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
-<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">hdr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">getheaders</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-account-container-count'</tt><tt class="py-op">:</tt> </tt>
-<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">                    <tt id="link-24" class="py-name"><a title="cloudfiles.container.ContainerResults.count
+<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-name">metadata</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
+<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">hdr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">getheaders</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-account-container-count'</tt><tt class="py-op">:</tt> </tt>
+<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">                    <tt id="link-24" class="py-name"><a title="cloudfiles.container.ContainerResults.count
 cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-24', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
-<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">                    <tt id="link-25" class="py-name"><a title="cloudfiles.container.ContainerResults.count
+<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
+<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">                    <tt id="link-25" class="py-name"><a title="cloudfiles.container.ContainerResults.count
 cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-25', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-account-bytes-used'</tt><tt class="py-op">:</tt> </tt>
-<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
-<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">        <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Method cloudfiles.storage_object.Object.read()=cloudfiles.storage_object.Object-class.html#read"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-26', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-27" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-27', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
-<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-28" class="py-name"><a title="cloudfiles.container.ContainerResults.count
-cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-28', 'count', 'link-23');">count</a></tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line"> </tt>
-<a name="Connection._check_container_name"></a><div id="Connection._check_container_name-def"><a name="L226"></a><tt class="py-lineno">226</tt> <a class="py-toggle" href="#" id="Connection._check_container_name-toggle" onclick="return toggle('Connection._check_container_name');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#_check_container_name">_check_container_name</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection._check_container_name-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection._check_container_name-expanded"><a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">container_name</tt> <tt class="py-keyword">or</tt> \ </tt>
-<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">                <tt class="py-string">'/'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">container_name</tt> <tt class="py-keyword">or</tt> \ </tt>
-<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">                <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">consts</tt><tt class="py-op">.</tt><tt class="py-name">container_name_limit</tt><tt class="py-op">:</tt> </tt>
-<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-29" class="py-name"><a title="cloudfiles.errors.InvalidContainerName" class="py-name" href="#" onclick="return doclink('link-29', 'InvalidContainerName', 'link-7');">InvalidContainerName</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"> </tt>
-<a name="Connection.create_container"></a><div id="Connection.create_container-def"><a name="L232"></a><tt class="py-lineno">232</tt> <a class="py-toggle" href="#" id="Connection.create_container-toggle" onclick="return toggle('Connection.create_container');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#create_container">create_container</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">,</tt> <tt class="py-param">error_on_existing</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.create_container-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.create_container-expanded"><a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"><tt class="py-docstring">        Given a container name, returns a L{Container} item, creating a new</tt> </tt>
-<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"><tt class="py-docstring">        Container if one does not already exist.</tt> </tt>
-<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.create_container('new_container')</tt> </tt>
-<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;cloudfiles.container.Container object at 0xb77d628c&gt;</tt> </tt>
-<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"><tt class="py-docstring">        @param container_name: name of the container to create</tt> </tt>
-<a name="L241"></a><tt class="py-lineno">241</tt>  <tt class="py-line"><tt class="py-docstring">        @type container_name: str</tt> </tt>
-<a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line"><tt class="py-docstring">        @param error_on_existing: raise ContainerExists if container already</tt> </tt>
-<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line"><tt class="py-docstring">        exists</tt> </tt>
-<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line"><tt class="py-docstring">        @type error_on_existing: bool</tt> </tt>
-<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Container}</tt> </tt>
-<a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an object representing the newly created container</tt> </tt>
-<a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_check_container_name</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line"> </tt>
-<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'PUT'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">        <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-30', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-31" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-31', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
-<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">error_on_existing</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">202</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-32" class="py-name"><a title="cloudfiles.errors.ContainerExists" class="py-name" href="#" onclick="return doclink('link-32', 'ContainerExists', 'link-9');">ContainerExists</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-33" class="py-name"><a title="cloudfiles.container.Container" class="py-name" href="#" onclick="return doclink('link-33', 'Container', 'link-1');">Container</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"> </tt>
-<a name="Connection.delete_container"></a><div id="Connection.delete_container-def"><a name="L258"></a><tt class="py-lineno">258</tt> <a class="py-toggle" href="#" id="Connection.delete_container-toggle" onclick="return toggle('Connection.delete_container');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#delete_container">delete_container</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.delete_container-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.delete_container-expanded"><a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line"><tt class="py-docstring">        Given a container name, delete it.</tt> </tt>
-<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.delete_container('old_container')</tt> </tt>
-<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"><tt class="py-docstring">        @param container_name: name of the container to delete</tt> </tt>
-<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line"><tt class="py-docstring">        @type container_name: str</tt> </tt>
-<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name"><a title="cloudfiles.container.Container" class="py-name" href="#" onclick="return doclink('link-34', 'Container', 'link-1');">Container</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">            <tt class="py-name">container_name</tt> <tt class="py-op">=</tt> <tt class="py-name">container_name</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Variable cloudfiles.container.Container.name=cloudfiles.container.Container-class.html#name"><a title="cloudfiles.container.Container.name" class="py-name" href="#" onclick="return doclink('link-35', 'name', 'link-35');">name</a></tt> </tt>
-<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_check_container_name</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line"> </tt>
-<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-36', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L273"></a><tt class="py-lineno">273</tt>  <tt class="py-line"> </tt>
-<a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">409</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-37" class="py-name"><a title="cloudfiles.errors.ContainerNotEmpty" class="py-name" href="#" onclick="return doclink('link-37', 'ContainerNotEmpty', 'link-6');">ContainerNotEmpty</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">404</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-38" class="py-name"><a title="cloudfiles.errors.NoSuchContainer" class="py-name" href="#" onclick="return doclink('link-38', 'NoSuchContainer', 'link-5');">NoSuchContainer</a></tt> </tt>
-<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-39" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-39', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
-<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line"> </tt>
-<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_enabled</tt><tt class="py-op">:</tt> </tt>
-<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_request</tt><tt class="py-op">(</tt><tt class="py-string">'POST'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
-<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">                                <tt class="py-name">hdrs</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'X-CDN-Enabled'</tt><tt class="py-op">:</tt> <tt class="py-string">'False'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line"> </tt>
-<a name="Connection.get_all_containers"></a><div id="Connection.get_all_containers-def"><a name="L285"></a><tt class="py-lineno">285</tt> <a class="py-toggle" href="#" id="Connection.get_all_containers-toggle" onclick="return toggle('Connection.get_all_containers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#get_all_containers">get_all_containers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">limit</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">marker</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">parms</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.get_all_containers-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.get_all_containers-expanded"><a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a Container item result set.</tt> </tt>
-<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.get_all_containers()</tt> </tt>
-<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line"><tt class="py-docstring">        ContainerResults: 4 containers</tt> </tt>
-<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print ', '.join([container.name for container in</tt> </tt>
-<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line"><tt class="py-docstring">                             connection.get_all_containers()])</tt> </tt>
-<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line"><tt class="py-docstring">        new_container, old_container, pictures, music</tt> </tt>
-<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{ContainerResults}</tt> </tt>
-<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an iterable set of objects representing all containers on the</tt> </tt>
-<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line"><tt class="py-docstring">                 account</tt> </tt>
-<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line"><tt class="py-docstring">        @param limit: number of results to return, up to 10,000</tt> </tt>
-<a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line"><tt class="py-docstring">        @type limit: int</tt> </tt>
-<a name="L300"></a><tt class="py-lineno">300</tt>  <tt class="py-line"><tt class="py-docstring">        @param marker: return only results whose name is greater than "marker"</tt> </tt>
-<a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line"><tt class="py-docstring">        @type marker: str</tt> </tt>
-<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">limit</tt><tt class="py-op">:</tt> </tt>
-<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'limit'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">limit</tt> </tt>
-<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">marker</tt><tt class="py-op">:</tt> </tt>
-<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'marker'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">marker</tt> </tt>
-<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-40" class="py-name"><a title="cloudfiles.container.ContainerResults" class="py-name" href="#" onclick="return doclink('link-40', 'ContainerResults', 'link-2');">ContainerResults</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Method cloudfiles.connection.Connection.list_containers_info()=cloudfiles.connection.Connection-class.html#list_containers_info"><a title="cloudfiles.connection.Connection.list_containers_info" class="py-name" href="#" onclick="return doclink('link-41', 'list_containers_info', 'link-41');">list_containers_info</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line"> </tt>
-<a name="Connection.get_container"></a><div id="Connection.get_container-def"><a name="L309"></a><tt class="py-lineno">309</tt> <a class="py-toggle" href="#" id="Connection.get_container-toggle" onclick="return toggle('Connection.get_container');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#get_container">get_container</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.get_container-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.get_container-expanded"><a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line"><tt class="py-docstring">        Return a single Container item for the given Container.</tt> </tt>
-<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.get_container('old_container')</tt> </tt>
-<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;cloudfiles.container.Container object at 0xb77d628c&gt;</tt> </tt>
-<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container = connection.get_container('old_container')</tt> </tt>
-<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container.size_used</tt> </tt>
-<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line"><tt class="py-docstring">        23074</tt> </tt>
-<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line"><tt class="py-docstring">        @param container_name: name of the container to create</tt> </tt>
-<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line"><tt class="py-docstring">        @type container_name: str</tt> </tt>
-<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Container}</tt> </tt>
-<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an object representing the container</tt> </tt>
-<a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L324"></a><tt class="py-lineno">324</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_check_container_name</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-<a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line"> </tt>
-<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'HEAD'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line">        <tt id="link-42" class="py-name"><a title="cloudfiles.container.ContainerResults.count
-cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-42', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
-<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">hdr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">getheaders</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-container-object-count'</tt><tt class="py-op">:</tt> </tt>
-<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line">                    <tt id="link-43" class="py-name"><a title="cloudfiles.container.ContainerResults.count
-cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-43', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
-<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line">                    <tt id="link-44" class="py-name"><a title="cloudfiles.container.ContainerResults.count
-cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-44', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-container-bytes-used'</tt><tt class="py-op">:</tt> </tt>
-<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
-<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
-<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">        <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-45', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">404</tt><tt class="py-op">:</tt> </tt>
-<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-46" class="py-name"><a title="cloudfiles.errors.NoSuchContainer" class="py-name" href="#" onclick="return doclink('link-46', 'NoSuchContainer', 'link-5');">NoSuchContainer</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
-<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-47" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-47', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
-<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-48" class="py-name"><a title="cloudfiles.container.Container" class="py-name" href="#" onclick="return doclink('link-48', 'Container', 'link-1');">Container</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">container_name</tt><tt class="py-op">,</tt> <tt id="link-49" class="py-name"><a title="cloudfiles.container.ContainerResults.count
-cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-49', 'count', 'link-23');">count</a></tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line"> </tt>
-<a name="Connection.list_public_containers"></a><div id="Connection.list_public_containers-def"><a name="L346"></a><tt class="py-lineno">346</tt> <a class="py-toggle" href="#" id="Connection.list_public_containers-toggle" onclick="return toggle('Connection.list_public_containers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#list_public_containers">list_public_containers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.list_public_containers-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.list_public_containers-expanded"><a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a list of containers that have been published to the CDN.</tt> </tt>
-<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.list_public_containers()</tt> </tt>
-<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line"><tt class="py-docstring">        ['container1', 'container2', 'container3']</tt> </tt>
-<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: list(str)</tt> </tt>
-<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a list of all CDN-enabled container names as strings</tt> </tt>
-<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_request</tt><tt class="py-op">(</tt><tt class="py-string">'GET'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
-<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">            <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-50', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-51" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-51', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
-<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-52', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line"> </tt>
-<a name="Connection.list_containers_info"></a><div id="Connection.list_containers_info-def"><a name="L362"></a><tt class="py-lineno">362</tt> <a class="py-toggle" href="#" id="Connection.list_containers_info-toggle" onclick="return toggle('Connection.list_containers_info');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#list_containers_info">list_containers_info</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">limit</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">marker</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">parms</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.list_containers_info-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.list_containers_info-expanded"><a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L364"></a><tt class="py-lineno">364</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a list of Containers, including object count and size.</tt> </tt>
-<a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.list_containers_info()</tt> </tt>
-<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line"><tt class="py-docstring">        [{u'count': 510, u'bytes': 2081717, u'name': u'new_container'},</tt> </tt>
-<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 12, u'bytes': 23074, u'name': u'old_container'},</tt> </tt>
-<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 0, u'bytes': 0, u'name': u'container1'},</tt> </tt>
-<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 0, u'bytes': 0, u'name': u'container2'},</tt> </tt>
-<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 0, u'bytes': 0, u'name': u'container3'},</tt> </tt>
-<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 3, u'bytes': 2306, u'name': u'test'}]</tt> </tt>
-<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: list({"name":"...", "count":..., "bytes":...})</tt> </tt>
-<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a list of all container info as dictionaries with the</tt> </tt>
-<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line"><tt class="py-docstring">                 keys "name", "count", and "bytes"</tt> </tt>
-<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line"><tt class="py-docstring">        @param limit: number of results to return, up to 10,000</tt> </tt>
-<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line"><tt class="py-docstring">        @type limit: int</tt> </tt>
-<a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line"><tt class="py-docstring">        @param marker: return only results whose name is greater than "marker"</tt> </tt>
-<a name="L380"></a><tt class="py-lineno">380</tt>  <tt class="py-line"><tt class="py-docstring">        @type marker: str</tt> </tt>
-<a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">limit</tt><tt class="py-op">:</tt> </tt>
-<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'limit'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">limit</tt> </tt>
-<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">marker</tt><tt class="py-op">:</tt> </tt>
-<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'marker'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">marker</tt> </tt>
-<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line">        <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'format'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'json'</tt> </tt>
-<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'GET'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">parms</tt><tt class="py-op">=</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt> </tt>
-<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line">            <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-53', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-54" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-54', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
-<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">json_loads</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-55', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line"> </tt>
-<a name="Connection.list_containers"></a><div id="Connection.list_containers-def"><a name="L393"></a><tt class="py-lineno">393</tt> <a class="py-toggle" href="#" id="Connection.list_containers-toggle" onclick="return toggle('Connection.list_containers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#list_containers">list_containers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">limit</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">marker</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">parms</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.list_containers-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.list_containers-expanded"><a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a list of Containers.</tt> </tt>
-<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.list_containers()</tt> </tt>
-<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line"><tt class="py-docstring">        ['new_container',</tt> </tt>
-<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line"><tt class="py-docstring">         'old_container',</tt> </tt>
-<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line"><tt class="py-docstring">         'container1',</tt> </tt>
-<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line"><tt class="py-docstring">         'container2',</tt> </tt>
-<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line"><tt class="py-docstring">         'container3',</tt> </tt>
-<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line"><tt class="py-docstring">         'test']</tt> </tt>
-<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: list(str)</tt> </tt>
-<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a list of all containers names as strings</tt> </tt>
-<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line"><tt class="py-docstring">        @param limit: number of results to return, up to 10,000</tt> </tt>
-<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line"><tt class="py-docstring">        @type limit: int</tt> </tt>
-<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line"><tt class="py-docstring">        @param marker: return only results whose name is greater than "marker"</tt> </tt>
-<a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line"><tt class="py-docstring">        @type marker: str</tt> </tt>
-<a name="L411"></a><tt class="py-lineno">411</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">limit</tt><tt class="py-op">:</tt> </tt>
-<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'limit'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">limit</tt> </tt>
-<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">marker</tt><tt class="py-op">:</tt> </tt>
-<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'marker'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">marker</tt> </tt>
-<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'GET'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">parms</tt><tt class="py-op">=</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt> </tt>
-<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line">            <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-56', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-57" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-57', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
-<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-58', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line"> </tt>
-<a name="Connection.__getitem__"></a><div id="Connection.__getitem__-def"><a name="L422"></a><tt class="py-lineno">422</tt> <a class="py-toggle" href="#" id="Connection.__getitem__-toggle" onclick="return toggle('Connection.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="Connection.__getitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.__getitem__-expanded"><a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line"><tt class="py-docstring">        Container objects can be grabbed from a connection using index</tt> </tt>
-<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line"><tt class="py-docstring">        syntax.</tt> </tt>
-<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container = conn['old_container']</tt> </tt>
-<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container.size_used</tt> </tt>
-<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line"><tt class="py-docstring">        23074</tt> </tt>
-<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Container}</tt> </tt>
-<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an object representing the container</tt> </tt>
-<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name" targets="Method cloudfiles.connection.Connection.get_container()=cloudfiles.connection.Connection-class.html#get_container"><a title="cloudfiles.connection.Connection.get_container" class="py-name" href="#" onclick="return doclink('link-59', 'get_container', 'link-59');">get_container</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
-</div></div><a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line"> </tt>
-<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line"> </tt>
-<a name="ConnectionPool"></a><div id="ConnectionPool-def"><a name="L437"></a><tt class="py-lineno">437</tt> <a class="py-toggle" href="#" id="ConnectionPool-toggle" onclick="return toggle('ConnectionPool');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html">ConnectionPool</a><tt class="py-op">(</tt><tt class="py-base-class">Queue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="ConnectionPool-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ConnectionPool-expanded"><a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
-<a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line"><tt class="py-docstring">    A thread-safe connection pool object.</tt> </tt>
-<a name="L440"></a><tt class="py-lineno">440</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line"><tt class="py-docstring">    This component isn't required when using the cloudfiles library, but it may</tt> </tt>
-<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line"><tt class="py-docstring">    be useful when building threaded applications.</tt> </tt>
-<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
-<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line"> </tt>
-<a name="ConnectionPool.__init__"></a><div id="ConnectionPool.__init__-def"><a name="L445"></a><tt class="py-lineno">445</tt> <a class="py-toggle" href="#" id="ConnectionPool.__init__-toggle" onclick="return toggle('ConnectionPool.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">username</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">api_key</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="ConnectionPool.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectionPool.__init__-expanded"><a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line">        <tt class="py-name">poolsize</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-string">'poolsize'</tt><tt class="py-op">,</tt> <tt class="py-number">10</tt><tt class="py-op">)</tt> </tt>
-<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connargs</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'username'</tt><tt class="py-op">:</tt> <tt class="py-name">username</tt><tt class="py-op">,</tt> <tt class="py-string">'api_key'</tt><tt class="py-op">:</tt> <tt class="py-name">api_key</tt><tt class="py-op">}</tt> </tt>
-<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connargs</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
-<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line">        <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name" targets="Method cloudfiles.connection.Connection.__init__()=cloudfiles.connection.Connection-class.html#__init__,Method cloudfiles.connection.ConnectionPool.__init__()=cloudfiles.connection.ConnectionPool-class.html#__init__,Method cloudfiles.container.Container.__init__()=cloudfiles.container.Container-class.html#__init__,Method cloudfiles.container.ContainerResults.__init__()=cloudfiles.container.ContainerResults-class.html#__init__,Method cloudfiles.errors.ContainerNotEmpty.__init__()=cloudfiles.errors.ContainerNotEmpty-class.html#__init__,Method cloudfiles.errors.ResponseError.__init__()=cloudfiles.errors.ResponseError-class.html#__init__,Method cloudfiles.storage_object.Object.__init__()=cloudfiles.storage_object.Object-class.html#__init__,Method cloudfiles.storage_object.ObjectResults.__init__()=cloudfiles.storage_object.ObjectResults-class.html#__init__"><a title="cloudfiles.connection.Connection.__init__
+<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-account-bytes-used'</tt><tt class="py-op">:</tt> </tt>
+<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
+<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">'x-account-meta-'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">                <tt class="py-name">metadata</tt><tt class="py-op">[</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">15</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
+<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">        <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Method cloudfiles.storage_object.Object.read()=cloudfiles.storage_object.Object-class.html#read"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-26', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-27" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-27', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt id="link-28" class="py-name"><a title="cloudfiles.container.ContainerResults.count
+cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-28', 'count', 'link-23');">count</a></tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">,</tt> <tt class="py-name">metadata</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line"> </tt>
+<a name="Connection.update_account_metadata"></a><div id="Connection.update_account_metadata-def"><a name="L227"></a><tt class="py-lineno">227</tt> <a class="py-toggle" href="#" id="Connection.update_account_metadata-toggle" onclick="return toggle('Connection.update_account_metadata');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#update_account_metadata">update_account_metadata</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">metadata</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.update_account_metadata-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.update_account_metadata-expanded"><a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line"><tt class="py-docstring">        Update account metadata</tt> </tt>
+<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; metadata = {'x-account-meta-foo' : 'bar'}</tt> </tt>
+<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.update_account_metadata(metadata)</tt> </tt>
+<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line"><tt class="py-docstring">        @param metadata: Dictionary of metadata</tt> </tt>
+<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line"><tt class="py-docstring">        @type metdada: dict</tt> </tt>
+<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'POST'</tt><tt class="py-op">,</tt> <tt class="py-name">hdrs</tt><tt class="py-op">=</tt><tt class="py-name">metadata</tt><tt class="py-op">)</tt> </tt>
+<a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-29', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L238"></a><tt class="py-lineno">238</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">           <tt class="py-keyword">raise</tt> <tt id="link-30" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-30', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"> </tt>
+<a name="Connection._check_container_name"></a><div id="Connection._check_container_name-def"><a name="L241"></a><tt class="py-lineno">241</tt> <a class="py-toggle" href="#" id="Connection._check_container_name-toggle" onclick="return toggle('Connection._check_container_name');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#_check_container_name">_check_container_name</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection._check_container_name-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection._check_container_name-expanded"><a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">container_name</tt> <tt class="py-keyword">or</tt> \ </tt>
+<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">                <tt class="py-string">'/'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">container_name</tt> <tt class="py-keyword">or</tt> \ </tt>
+<a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line">                <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-name">consts</tt><tt class="py-op">.</tt><tt class="py-name">container_name_limit</tt><tt class="py-op">:</tt> </tt>
+<a name="L245"></a><tt class="py-lineno">245</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-31" class="py-name"><a title="cloudfiles.errors.InvalidContainerName" class="py-name" href="#" onclick="return doclink('link-31', 'InvalidContainerName', 'link-7');">InvalidContainerName</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line"> </tt>
+<a name="Connection.create_container"></a><div id="Connection.create_container-def"><a name="L247"></a><tt class="py-lineno">247</tt> <a class="py-toggle" href="#" id="Connection.create_container-toggle" onclick="return toggle('Connection.create_container');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#create_container">create_container</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">,</tt> <tt class="py-param">error_on_existing</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.create_container-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.create_container-expanded"><a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L249"></a><tt class="py-lineno">249</tt>  <tt class="py-line"><tt class="py-docstring">        Given a container name, returns a L{Container} item, creating a new</tt> </tt>
+<a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line"><tt class="py-docstring">        Container if one does not already exist.</tt> </tt>
+<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.create_container('new_container')</tt> </tt>
+<a name="L253"></a><tt class="py-lineno">253</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;cloudfiles.container.Container object at 0xb77d628c&gt;</tt> </tt>
+<a name="L254"></a><tt class="py-lineno">254</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L255"></a><tt class="py-lineno">255</tt>  <tt class="py-line"><tt class="py-docstring">        @param container_name: name of the container to create</tt> </tt>
+<a name="L256"></a><tt class="py-lineno">256</tt>  <tt class="py-line"><tt class="py-docstring">        @type container_name: str</tt> </tt>
+<a name="L257"></a><tt class="py-lineno">257</tt>  <tt class="py-line"><tt class="py-docstring">        @param error_on_existing: raise ContainerExists if container already</tt> </tt>
+<a name="L258"></a><tt class="py-lineno">258</tt>  <tt class="py-line"><tt class="py-docstring">        exists</tt> </tt>
+<a name="L259"></a><tt class="py-lineno">259</tt>  <tt class="py-line"><tt class="py-docstring">        @type error_on_existing: bool</tt> </tt>
+<a name="L260"></a><tt class="py-lineno">260</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Container}</tt> </tt>
+<a name="L261"></a><tt class="py-lineno">261</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an object representing the newly created container</tt> </tt>
+<a name="L262"></a><tt class="py-lineno">262</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L263"></a><tt class="py-lineno">263</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_check_container_name</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+<a name="L264"></a><tt class="py-lineno">264</tt>  <tt class="py-line"> </tt>
+<a name="L265"></a><tt class="py-lineno">265</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'PUT'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L266"></a><tt class="py-lineno">266</tt>  <tt class="py-line">        <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-32', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L267"></a><tt class="py-lineno">267</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L268"></a><tt class="py-lineno">268</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-33" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-33', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+<a name="L269"></a><tt class="py-lineno">269</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">error_on_existing</tt> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">202</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L270"></a><tt class="py-lineno">270</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-34" class="py-name"><a title="cloudfiles.errors.ContainerExists" class="py-name" href="#" onclick="return doclink('link-34', 'ContainerExists', 'link-9');">ContainerExists</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+<a name="L271"></a><tt class="py-lineno">271</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-35" class="py-name"><a title="cloudfiles.container.Container" class="py-name" href="#" onclick="return doclink('link-35', 'Container', 'link-1');">Container</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L272"></a><tt class="py-lineno">272</tt>  <tt class="py-line"> </tt>
+<a name="Connection.delete_container"></a><div id="Connection.delete_container-def"><a name="L273"></a><tt class="py-lineno">273</tt> <a class="py-toggle" href="#" id="Connection.delete_container-toggle" onclick="return toggle('Connection.delete_container');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#delete_container">delete_container</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.delete_container-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.delete_container-expanded"><a name="L274"></a><tt class="py-lineno">274</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L275"></a><tt class="py-lineno">275</tt>  <tt class="py-line"><tt class="py-docstring">        Given a container name, delete it.</tt> </tt>
+<a name="L276"></a><tt class="py-lineno">276</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L277"></a><tt class="py-lineno">277</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.delete_container('old_container')</tt> </tt>
+<a name="L278"></a><tt class="py-lineno">278</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L279"></a><tt class="py-lineno">279</tt>  <tt class="py-line"><tt class="py-docstring">        @param container_name: name of the container to delete</tt> </tt>
+<a name="L280"></a><tt class="py-lineno">280</tt>  <tt class="py-line"><tt class="py-docstring">        @type container_name: str</tt> </tt>
+<a name="L281"></a><tt class="py-lineno">281</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L282"></a><tt class="py-lineno">282</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">,</tt> <tt id="link-36" class="py-name"><a title="cloudfiles.container.Container" class="py-name" href="#" onclick="return doclink('link-36', 'Container', 'link-1');">Container</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L283"></a><tt class="py-lineno">283</tt>  <tt class="py-line">            <tt class="py-name">container_name</tt> <tt class="py-op">=</tt> <tt class="py-name">container_name</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Variable cloudfiles.container.Container.name=cloudfiles.container.Container-class.html#name"><a title="cloudfiles.container.Container.name" class="py-name" href="#" onclick="return doclink('link-37', 'name', 'link-37');">name</a></tt> </tt>
+<a name="L284"></a><tt class="py-lineno">284</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_check_container_name</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+<a name="L285"></a><tt class="py-lineno">285</tt>  <tt class="py-line"> </tt>
+<a name="L286"></a><tt class="py-lineno">286</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'DELETE'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L287"></a><tt class="py-lineno">287</tt>  <tt class="py-line">        <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-38', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L288"></a><tt class="py-lineno">288</tt>  <tt class="py-line"> </tt>
+<a name="L289"></a><tt class="py-lineno">289</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">409</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L290"></a><tt class="py-lineno">290</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-39" class="py-name"><a title="cloudfiles.errors.ContainerNotEmpty" class="py-name" href="#" onclick="return doclink('link-39', 'ContainerNotEmpty', 'link-6');">ContainerNotEmpty</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+<a name="L291"></a><tt class="py-lineno">291</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">404</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L292"></a><tt class="py-lineno">292</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-40" class="py-name"><a title="cloudfiles.errors.NoSuchContainer" class="py-name" href="#" onclick="return doclink('link-40', 'NoSuchContainer', 'link-5');">NoSuchContainer</a></tt> </tt>
+<a name="L293"></a><tt class="py-lineno">293</tt>  <tt class="py-line">        <tt class="py-keyword">elif</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L294"></a><tt class="py-lineno">294</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-41" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-41', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+<a name="L295"></a><tt class="py-lineno">295</tt>  <tt class="py-line"> </tt>
+<a name="L296"></a><tt class="py-lineno">296</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_enabled</tt><tt class="py-op">:</tt> </tt>
+<a name="L297"></a><tt class="py-lineno">297</tt>  <tt class="py-line">            <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_request</tt><tt class="py-op">(</tt><tt class="py-string">'POST'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> </tt>
+<a name="L298"></a><tt class="py-lineno">298</tt>  <tt class="py-line">                                <tt class="py-name">hdrs</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'X-CDN-Enabled'</tt><tt class="py-op">:</tt> <tt class="py-string">'False'</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L299"></a><tt class="py-lineno">299</tt>  <tt class="py-line"> </tt>
+<a name="Connection.get_all_containers"></a><div id="Connection.get_all_containers-def"><a name="L300"></a><tt class="py-lineno">300</tt> <a class="py-toggle" href="#" id="Connection.get_all_containers-toggle" onclick="return toggle('Connection.get_all_containers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#get_all_containers">get_all_containers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">limit</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">marker</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">parms</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.get_all_containers-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.get_all_containers-expanded"><a name="L301"></a><tt class="py-lineno">301</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L302"></a><tt class="py-lineno">302</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a Container item result set.</tt> </tt>
+<a name="L303"></a><tt class="py-lineno">303</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L304"></a><tt class="py-lineno">304</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.get_all_containers()</tt> </tt>
+<a name="L305"></a><tt class="py-lineno">305</tt>  <tt class="py-line"><tt class="py-docstring">        ContainerResults: 4 containers</tt> </tt>
+<a name="L306"></a><tt class="py-lineno">306</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; print ', '.join([container.name for container in</tt> </tt>
+<a name="L307"></a><tt class="py-lineno">307</tt>  <tt class="py-line"><tt class="py-docstring">                             connection.get_all_containers()])</tt> </tt>
+<a name="L308"></a><tt class="py-lineno">308</tt>  <tt class="py-line"><tt class="py-docstring">        new_container, old_container, pictures, music</tt> </tt>
+<a name="L309"></a><tt class="py-lineno">309</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L310"></a><tt class="py-lineno">310</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{ContainerResults}</tt> </tt>
+<a name="L311"></a><tt class="py-lineno">311</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an iterable set of objects representing all containers on the</tt> </tt>
+<a name="L312"></a><tt class="py-lineno">312</tt>  <tt class="py-line"><tt class="py-docstring">                 account</tt> </tt>
+<a name="L313"></a><tt class="py-lineno">313</tt>  <tt class="py-line"><tt class="py-docstring">        @param limit: number of results to return, up to 10,000</tt> </tt>
+<a name="L314"></a><tt class="py-lineno">314</tt>  <tt class="py-line"><tt class="py-docstring">        @type limit: int</tt> </tt>
+<a name="L315"></a><tt class="py-lineno">315</tt>  <tt class="py-line"><tt class="py-docstring">        @param marker: return only results whose name is greater than "marker"</tt> </tt>
+<a name="L316"></a><tt class="py-lineno">316</tt>  <tt class="py-line"><tt class="py-docstring">        @type marker: str</tt> </tt>
+<a name="L317"></a><tt class="py-lineno">317</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L318"></a><tt class="py-lineno">318</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">limit</tt><tt class="py-op">:</tt> </tt>
+<a name="L319"></a><tt class="py-lineno">319</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'limit'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">limit</tt> </tt>
+<a name="L320"></a><tt class="py-lineno">320</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">marker</tt><tt class="py-op">:</tt> </tt>
+<a name="L321"></a><tt class="py-lineno">321</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'marker'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">marker</tt> </tt>
+<a name="L322"></a><tt class="py-lineno">322</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-42" class="py-name"><a title="cloudfiles.container.ContainerResults" class="py-name" href="#" onclick="return doclink('link-42', 'ContainerResults', 'link-2');">ContainerResults</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method cloudfiles.connection.Connection.list_containers_info()=cloudfiles.connection.Connection-class.html#list_containers_info"><a title="cloudfiles.connection.Connection.list_containers_info" class="py-name" href="#" onclick="return doclink('link-43', 'list_containers_info', 'link-43');">list_containers_info</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L323"></a><tt class="py-lineno">323</tt>  <tt class="py-line"> </tt>
+<a name="Connection.get_container"></a><div id="Connection.get_container-def"><a name="L324"></a><tt class="py-lineno">324</tt> <a class="py-toggle" href="#" id="Connection.get_container-toggle" onclick="return toggle('Connection.get_container');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#get_container">get_container</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">container_name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.get_container-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.get_container-expanded"><a name="L325"></a><tt class="py-lineno">325</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L326"></a><tt class="py-lineno">326</tt>  <tt class="py-line"><tt class="py-docstring">        Return a single Container item for the given Container.</tt> </tt>
+<a name="L327"></a><tt class="py-lineno">327</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L328"></a><tt class="py-lineno">328</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.get_container('old_container')</tt> </tt>
+<a name="L329"></a><tt class="py-lineno">329</tt>  <tt class="py-line"><tt class="py-docstring">        &lt;cloudfiles.container.Container object at 0xb77d628c&gt;</tt> </tt>
+<a name="L330"></a><tt class="py-lineno">330</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container = connection.get_container('old_container')</tt> </tt>
+<a name="L331"></a><tt class="py-lineno">331</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container.size_used</tt> </tt>
+<a name="L332"></a><tt class="py-lineno">332</tt>  <tt class="py-line"><tt class="py-docstring">        23074</tt> </tt>
+<a name="L333"></a><tt class="py-lineno">333</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L334"></a><tt class="py-lineno">334</tt>  <tt class="py-line"><tt class="py-docstring">        @param container_name: name of the container to create</tt> </tt>
+<a name="L335"></a><tt class="py-lineno">335</tt>  <tt class="py-line"><tt class="py-docstring">        @type container_name: str</tt> </tt>
+<a name="L336"></a><tt class="py-lineno">336</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Container}</tt> </tt>
+<a name="L337"></a><tt class="py-lineno">337</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an object representing the container</tt> </tt>
+<a name="L338"></a><tt class="py-lineno">338</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L339"></a><tt class="py-lineno">339</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_check_container_name</tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+<a name="L340"></a><tt class="py-lineno">340</tt>  <tt class="py-line"> </tt>
+<a name="L341"></a><tt class="py-lineno">341</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'HEAD'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">container_name</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L342"></a><tt class="py-lineno">342</tt>  <tt class="py-line">        <tt id="link-44" class="py-name"><a title="cloudfiles.container.ContainerResults.count
+cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-44', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
+<a name="L343"></a><tt class="py-lineno">343</tt>  <tt class="py-line">        <tt class="py-name">metadata</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
+<a name="L344"></a><tt class="py-lineno">344</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">hdr</tt> <tt class="py-keyword">in</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">getheaders</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L345"></a><tt class="py-lineno">345</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-container-object-count'</tt><tt class="py-op">:</tt> </tt>
+<a name="L346"></a><tt class="py-lineno">346</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L347"></a><tt class="py-lineno">347</tt>  <tt class="py-line">                    <tt id="link-45" class="py-name"><a title="cloudfiles.container.ContainerResults.count
+cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-45', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L348"></a><tt class="py-lineno">348</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
+<a name="L349"></a><tt class="py-lineno">349</tt>  <tt class="py-line">                    <tt id="link-46" class="py-name"><a title="cloudfiles.container.ContainerResults.count
+cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-46', 'count', 'link-23');">count</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L350"></a><tt class="py-lineno">350</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'x-container-bytes-used'</tt><tt class="py-op">:</tt> </tt>
+<a name="L351"></a><tt class="py-lineno">351</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L352"></a><tt class="py-lineno">352</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L353"></a><tt class="py-lineno">353</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
+<a name="L354"></a><tt class="py-lineno">354</tt>  <tt class="py-line">                    <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
+<a name="L355"></a><tt class="py-lineno">355</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">startswith</tt><tt class="py-op">(</tt><tt class="py-string">'x-container-meta-'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L356"></a><tt class="py-lineno">356</tt>  <tt class="py-line">                <tt class="py-name">metadata</tt><tt class="py-op">[</tt><tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">17</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">hdr</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
+<a name="L357"></a><tt class="py-lineno">357</tt>  <tt class="py-line">        <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-47', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L358"></a><tt class="py-lineno">358</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt class="py-number">404</tt><tt class="py-op">:</tt> </tt>
+<a name="L359"></a><tt class="py-lineno">359</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-48" class="py-name"><a title="cloudfiles.errors.NoSuchContainer" class="py-name" href="#" onclick="return doclink('link-48', 'NoSuchContainer', 'link-5');">NoSuchContainer</a></tt><tt class="py-op">(</tt><tt class="py-name">container_name</tt><tt class="py-op">)</tt> </tt>
+<a name="L360"></a><tt class="py-lineno">360</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L361"></a><tt class="py-lineno">361</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-49" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-49', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+<a name="L362"></a><tt class="py-lineno">362</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-50" class="py-name"><a title="cloudfiles.container.Container" class="py-name" href="#" onclick="return doclink('link-50', 'Container', 'link-1');">Container</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">container_name</tt><tt class="py-op">,</tt> <tt id="link-51" class="py-name"><a title="cloudfiles.container.ContainerResults.count
+cloudfiles.storage_object.ObjectResults.count" class="py-name" href="#" onclick="return doclink('link-51', 'count', 'link-23');">count</a></tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">,</tt> <tt class="py-name">metadata</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L363"></a><tt class="py-lineno">363</tt>  <tt class="py-line"> </tt>
+<a name="Connection.list_public_containers"></a><div id="Connection.list_public_containers-def"><a name="L364"></a><tt class="py-lineno">364</tt> <a class="py-toggle" href="#" id="Connection.list_public_containers-toggle" onclick="return toggle('Connection.list_public_containers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#list_public_containers">list_public_containers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.list_public_containers-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.list_public_containers-expanded"><a name="L365"></a><tt class="py-lineno">365</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L366"></a><tt class="py-lineno">366</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a list of containers that have been published to the CDN.</tt> </tt>
+<a name="L367"></a><tt class="py-lineno">367</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L368"></a><tt class="py-lineno">368</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.list_public_containers()</tt> </tt>
+<a name="L369"></a><tt class="py-lineno">369</tt>  <tt class="py-line"><tt class="py-docstring">        ['container1', 'container2', 'container3']</tt> </tt>
+<a name="L370"></a><tt class="py-lineno">370</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L371"></a><tt class="py-lineno">371</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: list(str)</tt> </tt>
+<a name="L372"></a><tt class="py-lineno">372</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a list of all CDN-enabled container names as strings</tt> </tt>
+<a name="L373"></a><tt class="py-lineno">373</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L374"></a><tt class="py-lineno">374</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">cdn_request</tt><tt class="py-op">(</tt><tt class="py-string">'GET'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
+<a name="L375"></a><tt class="py-lineno">375</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L376"></a><tt class="py-lineno">376</tt>  <tt class="py-line">            <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-52', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L377"></a><tt class="py-lineno">377</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-53" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-53', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+<a name="L378"></a><tt class="py-lineno">378</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-54', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L379"></a><tt class="py-lineno">379</tt>  <tt class="py-line"> </tt>
+<a name="Connection.list_containers_info"></a><div id="Connection.list_containers_info-def"><a name="L380"></a><tt class="py-lineno">380</tt> <a class="py-toggle" href="#" id="Connection.list_containers_info-toggle" onclick="return toggle('Connection.list_containers_info');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#list_containers_info">list_containers_info</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">limit</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">marker</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">parms</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.list_containers_info-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.list_containers_info-expanded"><a name="L381"></a><tt class="py-lineno">381</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L382"></a><tt class="py-lineno">382</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a list of Containers, including object count and size.</tt> </tt>
+<a name="L383"></a><tt class="py-lineno">383</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L384"></a><tt class="py-lineno">384</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.list_containers_info()</tt> </tt>
+<a name="L385"></a><tt class="py-lineno">385</tt>  <tt class="py-line"><tt class="py-docstring">        [{u'count': 510, u'bytes': 2081717, u'name': u'new_container'},</tt> </tt>
+<a name="L386"></a><tt class="py-lineno">386</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 12, u'bytes': 23074, u'name': u'old_container'},</tt> </tt>
+<a name="L387"></a><tt class="py-lineno">387</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 0, u'bytes': 0, u'name': u'container1'},</tt> </tt>
+<a name="L388"></a><tt class="py-lineno">388</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 0, u'bytes': 0, u'name': u'container2'},</tt> </tt>
+<a name="L389"></a><tt class="py-lineno">389</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 0, u'bytes': 0, u'name': u'container3'},</tt> </tt>
+<a name="L390"></a><tt class="py-lineno">390</tt>  <tt class="py-line"><tt class="py-docstring">         {u'count': 3, u'bytes': 2306, u'name': u'test'}]</tt> </tt>
+<a name="L391"></a><tt class="py-lineno">391</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L392"></a><tt class="py-lineno">392</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: list({"name":"...", "count":..., "bytes":...})</tt> </tt>
+<a name="L393"></a><tt class="py-lineno">393</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a list of all container info as dictionaries with the</tt> </tt>
+<a name="L394"></a><tt class="py-lineno">394</tt>  <tt class="py-line"><tt class="py-docstring">                 keys "name", "count", and "bytes"</tt> </tt>
+<a name="L395"></a><tt class="py-lineno">395</tt>  <tt class="py-line"><tt class="py-docstring">        @param limit: number of results to return, up to 10,000</tt> </tt>
+<a name="L396"></a><tt class="py-lineno">396</tt>  <tt class="py-line"><tt class="py-docstring">        @type limit: int</tt> </tt>
+<a name="L397"></a><tt class="py-lineno">397</tt>  <tt class="py-line"><tt class="py-docstring">        @param marker: return only results whose name is greater than "marker"</tt> </tt>
+<a name="L398"></a><tt class="py-lineno">398</tt>  <tt class="py-line"><tt class="py-docstring">        @type marker: str</tt> </tt>
+<a name="L399"></a><tt class="py-lineno">399</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L400"></a><tt class="py-lineno">400</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">limit</tt><tt class="py-op">:</tt> </tt>
+<a name="L401"></a><tt class="py-lineno">401</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'limit'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">limit</tt> </tt>
+<a name="L402"></a><tt class="py-lineno">402</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">marker</tt><tt class="py-op">:</tt> </tt>
+<a name="L403"></a><tt class="py-lineno">403</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'marker'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">marker</tt> </tt>
+<a name="L404"></a><tt class="py-lineno">404</tt>  <tt class="py-line">        <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'format'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-string">'json'</tt> </tt>
+<a name="L405"></a><tt class="py-lineno">405</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'GET'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">parms</tt><tt class="py-op">=</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt> </tt>
+<a name="L406"></a><tt class="py-lineno">406</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L407"></a><tt class="py-lineno">407</tt>  <tt class="py-line">            <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-55', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L408"></a><tt class="py-lineno">408</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-56" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-56', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+<a name="L409"></a><tt class="py-lineno">409</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">json_loads</tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-57', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L410"></a><tt class="py-lineno">410</tt>  <tt class="py-line"> </tt>
+<a name="Connection.list_containers"></a><div id="Connection.list_containers-def"><a name="L411"></a><tt class="py-lineno">411</tt> <a class="py-toggle" href="#" id="Connection.list_containers-toggle" onclick="return toggle('Connection.list_containers');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#list_containers">list_containers</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">limit</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">marker</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">parms</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.list_containers-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.list_containers-expanded"><a name="L412"></a><tt class="py-lineno">412</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L413"></a><tt class="py-lineno">413</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a list of Containers.</tt> </tt>
+<a name="L414"></a><tt class="py-lineno">414</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L415"></a><tt class="py-lineno">415</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; connection.list_containers()</tt> </tt>
+<a name="L416"></a><tt class="py-lineno">416</tt>  <tt class="py-line"><tt class="py-docstring">        ['new_container',</tt> </tt>
+<a name="L417"></a><tt class="py-lineno">417</tt>  <tt class="py-line"><tt class="py-docstring">         'old_container',</tt> </tt>
+<a name="L418"></a><tt class="py-lineno">418</tt>  <tt class="py-line"><tt class="py-docstring">         'container1',</tt> </tt>
+<a name="L419"></a><tt class="py-lineno">419</tt>  <tt class="py-line"><tt class="py-docstring">         'container2',</tt> </tt>
+<a name="L420"></a><tt class="py-lineno">420</tt>  <tt class="py-line"><tt class="py-docstring">         'container3',</tt> </tt>
+<a name="L421"></a><tt class="py-lineno">421</tt>  <tt class="py-line"><tt class="py-docstring">         'test']</tt> </tt>
+<a name="L422"></a><tt class="py-lineno">422</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L423"></a><tt class="py-lineno">423</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: list(str)</tt> </tt>
+<a name="L424"></a><tt class="py-lineno">424</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a list of all containers names as strings</tt> </tt>
+<a name="L425"></a><tt class="py-lineno">425</tt>  <tt class="py-line"><tt class="py-docstring">        @param limit: number of results to return, up to 10,000</tt> </tt>
+<a name="L426"></a><tt class="py-lineno">426</tt>  <tt class="py-line"><tt class="py-docstring">        @type limit: int</tt> </tt>
+<a name="L427"></a><tt class="py-lineno">427</tt>  <tt class="py-line"><tt class="py-docstring">        @param marker: return only results whose name is greater than "marker"</tt> </tt>
+<a name="L428"></a><tt class="py-lineno">428</tt>  <tt class="py-line"><tt class="py-docstring">        @type marker: str</tt> </tt>
+<a name="L429"></a><tt class="py-lineno">429</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L430"></a><tt class="py-lineno">430</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">limit</tt><tt class="py-op">:</tt> </tt>
+<a name="L431"></a><tt class="py-lineno">431</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'limit'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">limit</tt> </tt>
+<a name="L432"></a><tt class="py-lineno">432</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">marker</tt><tt class="py-op">:</tt> </tt>
+<a name="L433"></a><tt class="py-lineno">433</tt>  <tt class="py-line">            <tt class="py-name">parms</tt><tt class="py-op">[</tt><tt class="py-string">'marker'</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">marker</tt> </tt>
+<a name="L434"></a><tt class="py-lineno">434</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">make_request</tt><tt class="py-op">(</tt><tt class="py-string">'GET'</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-string">''</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">parms</tt><tt class="py-op">=</tt><tt class="py-name">parms</tt><tt class="py-op">)</tt> </tt>
+<a name="L435"></a><tt class="py-lineno">435</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&lt;</tt> <tt class="py-number">200</tt><tt class="py-op">)</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">299</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+<a name="L436"></a><tt class="py-lineno">436</tt>  <tt class="py-line">            <tt class="py-name">buff</tt> <tt class="py-op">=</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-58', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+<a name="L437"></a><tt class="py-lineno">437</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt id="link-59" class="py-name"><a title="cloudfiles.errors.ResponseError" class="py-name" href="#" onclick="return doclink('link-59', 'ResponseError', 'link-4');">ResponseError</a></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
+<a name="L438"></a><tt class="py-lineno">438</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="cloudfiles.storage_object.Object.read" class="py-name" href="#" onclick="return doclink('link-60', 'read', 'link-26');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">splitlines</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L439"></a><tt class="py-lineno">439</tt>  <tt class="py-line"> </tt>
+<a name="Connection.__getitem__"></a><div id="Connection.__getitem__-def"><a name="L440"></a><tt class="py-lineno">440</tt> <a class="py-toggle" href="#" id="Connection.__getitem__-toggle" onclick="return toggle('Connection.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.Connection-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="Connection.__getitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Connection.__getitem__-expanded"><a name="L441"></a><tt class="py-lineno">441</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L442"></a><tt class="py-lineno">442</tt>  <tt class="py-line"><tt class="py-docstring">        Container objects can be grabbed from a connection using index</tt> </tt>
+<a name="L443"></a><tt class="py-lineno">443</tt>  <tt class="py-line"><tt class="py-docstring">        syntax.</tt> </tt>
+<a name="L444"></a><tt class="py-lineno">444</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L445"></a><tt class="py-lineno">445</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container = conn['old_container']</tt> </tt>
+<a name="L446"></a><tt class="py-lineno">446</tt>  <tt class="py-line"><tt class="py-docstring">        &gt;&gt;&gt; container.size_used</tt> </tt>
+<a name="L447"></a><tt class="py-lineno">447</tt>  <tt class="py-line"><tt class="py-docstring">        23074</tt> </tt>
+<a name="L448"></a><tt class="py-lineno">448</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L449"></a><tt class="py-lineno">449</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Container}</tt> </tt>
+<a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line"><tt class="py-docstring">        @return: an object representing the container</tt> </tt>
+<a name="L451"></a><tt class="py-lineno">451</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Method cloudfiles.connection.Connection.get_container()=cloudfiles.connection.Connection-class.html#get_container"><a title="cloudfiles.connection.Connection.get_container" class="py-name" href="#" onclick="return doclink('link-61', 'get_container', 'link-61');">get_container</a></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
+</div></div><a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"> </tt>
+<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line"> </tt>
+<a name="ConnectionPool"></a><div id="ConnectionPool-def"><a name="L455"></a><tt class="py-lineno">455</tt> <a class="py-toggle" href="#" id="ConnectionPool-toggle" onclick="return toggle('ConnectionPool');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html">ConnectionPool</a><tt class="py-op">(</tt><tt class="py-base-class">Queue</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="ConnectionPool-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ConnectionPool-expanded"><a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
+<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"><tt class="py-docstring">    A thread-safe connection pool object.</tt> </tt>
+<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line"><tt class="py-docstring">    This component isn't required when using the cloudfiles library, but it may</tt> </tt>
+<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line"><tt class="py-docstring">    be useful when building threaded applications.</tt> </tt>
+<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
+<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line"> </tt>
+<a name="ConnectionPool.__init__"></a><div id="ConnectionPool.__init__-def"><a name="L463"></a><tt class="py-lineno">463</tt> <a class="py-toggle" href="#" id="ConnectionPool.__init__-toggle" onclick="return toggle('ConnectionPool.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">username</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">api_key</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kwargs</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="ConnectionPool.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectionPool.__init__-expanded"><a name="L464"></a><tt class="py-lineno">464</tt>  <tt class="py-line">        <tt class="py-name">poolsize</tt> <tt class="py-op">=</tt> <tt class="py-name">kwargs</tt><tt class="py-op">.</tt><tt class="py-name">pop</tt><tt class="py-op">(</tt><tt class="py-string">'poolsize'</tt><tt class="py-op">,</tt> <tt class="py-number">10</tt><tt class="py-op">)</tt> </tt>
+<a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connargs</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'username'</tt><tt class="py-op">:</tt> <tt class="py-name">username</tt><tt class="py-op">,</tt> <tt class="py-string">'api_key'</tt><tt class="py-op">:</tt> <tt class="py-name">api_key</tt><tt class="py-op">}</tt> </tt>
+<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connargs</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">kwargs</tt><tt class="py-op">)</tt> </tt>
+<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line">        <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name" targets="Method cloudfiles.connection.Connection.__init__()=cloudfiles.connection.Connection-class.html#__init__,Method cloudfiles.connection.ConnectionPool.__init__()=cloudfiles.connection.ConnectionPool-class.html#__init__,Method cloudfiles.container.Container.__init__()=cloudfiles.container.Container-class.html#__init__,Method cloudfiles.container.ContainerResults.__init__()=cloudfiles.container.ContainerResults-class.html#__init__,Method cloudfiles.errors.ContainerNotEmpty.__init__()=cloudfiles.errors.ContainerNotEmpty-class.html#__init__,Method cloudfiles.errors.ResponseError.__init__()=cloudfiles.errors.ResponseError-class.html#__init__,Method cloudfiles.storage_object.Object.__init__()=cloudfiles.storage_object.Object-class.html#__init__,Method cloudfiles.storage_object.ObjectResults.__init__()=cloudfiles.storage_object.ObjectResults-class.html#__init__"><a title="cloudfiles.connection.Connection.__init__
 cloudfiles.connection.ConnectionPool.__init__
 cloudfiles.container.Container.__init__
 cloudfiles.container.ContainerResults.__init__
 cloudfiles.errors.ContainerNotEmpty.__init__
 cloudfiles.errors.ResponseError.__init__
 cloudfiles.storage_object.Object.__init__
-cloudfiles.storage_object.ObjectResults.__init__" class="py-name" href="#" onclick="return doclink('link-60', '__init__', 'link-60');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">poolsize</tt><tt class="py-op">)</tt> </tt>
-</div><a name="L450"></a><tt class="py-lineno">450</tt>  <tt class="py-line"> </tt>
-<a name="ConnectionPool.get"></a><div id="ConnectionPool.get-def"><a name="L451"></a><tt class="py-lineno">451</tt> <a class="py-toggle" href="#" id="ConnectionPool.get-toggle" onclick="return toggle('ConnectionPool.get');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html#get">get</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="ConnectionPool.get-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectionPool.get-expanded"><a name="L452"></a><tt class="py-lineno">452</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L453"></a><tt class="py-lineno">453</tt>  <tt class="py-line"><tt class="py-docstring">        Return a cloudfiles connection object.</tt> </tt>
-<a name="L454"></a><tt class="py-lineno">454</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L455"></a><tt class="py-lineno">455</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Connection}</tt> </tt>
-<a name="L456"></a><tt class="py-lineno">456</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a cloudfiles connection object</tt> </tt>
-<a name="L457"></a><tt class="py-lineno">457</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L458"></a><tt class="py-lineno">458</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L459"></a><tt class="py-lineno">459</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">create</tt><tt class="py-op">,</tt> <tt class="py-name">connobj</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name"><a title="cloudfiles.connection.ConnectionPool.get" class="py-name" href="#" onclick="return doclink('link-61', 'get', 'link-12');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">block</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
-<a name="L460"></a><tt class="py-lineno">460</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">Empty</tt><tt class="py-op">:</tt> </tt>
-<a name="L461"></a><tt class="py-lineno">461</tt>  <tt class="py-line">            <tt class="py-name">connobj</tt> <tt class="py-op">=</tt> <tt id="link-62" class="py-name" targets="Class cloudfiles.connection.Connection=cloudfiles.connection.Connection-class.html"><a title="cloudfiles.connection.Connection" class="py-name" href="#" onclick="return doclink('link-62', 'Connection', 'link-62');">Connection</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connargs</tt><tt class="py-op">)</tt> </tt>
-<a name="L462"></a><tt class="py-lineno">462</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">connobj</tt> </tt>
-</div><a name="L463"></a><tt class="py-lineno">463</tt>  <tt class="py-line"> </tt>
-<a name="ConnectionPool.put"></a><div id="ConnectionPool.put-def"><a name="L464"></a><tt class="py-lineno">464</tt> <a class="py-toggle" href="#" id="ConnectionPool.put-toggle" onclick="return toggle('ConnectionPool.put');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html#put">put</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">connobj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
-</div><div id="ConnectionPool.put-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectionPool.put-expanded"><a name="L465"></a><tt class="py-lineno">465</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
-<a name="L466"></a><tt class="py-lineno">466</tt>  <tt class="py-line"><tt class="py-docstring">        Place a cloudfiles connection object back into the pool.</tt> </tt>
-<a name="L467"></a><tt class="py-lineno">467</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
-<a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line"><tt class="py-docstring">        @param connobj: a cloudfiles connection object</tt> </tt>
-<a name="L469"></a><tt class="py-lineno">469</tt>  <tt class="py-line"><tt class="py-docstring">        @type connobj: L{Connection}</tt> </tt>
-<a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
-<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
-<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line">            <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name" targets="Method cloudfiles.connection.ConnectionPool.put()=cloudfiles.connection.ConnectionPool-class.html#put"><a title="cloudfiles.connection.ConnectionPool.put" class="py-name" href="#" onclick="return doclink('link-63', 'put', 'link-63');">put</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">connobj</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">block</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
-<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">Full</tt><tt class="py-op">:</tt> </tt>
-<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">connobj</tt> </tt>
-</div></div><a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line"><tt class="py-comment"># vim:set ai sw=4 ts=4 tw=0 expandtab:</tt> </tt>
-<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line"> </tt><script type="text/javascript">
+cloudfiles.storage_object.ObjectResults.__init__" class="py-name" href="#" onclick="return doclink('link-62', '__init__', 'link-62');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">poolsize</tt><tt class="py-op">)</tt> </tt>
+</div><a name="L468"></a><tt class="py-lineno">468</tt>  <tt class="py-line"> </tt>
+<a name="ConnectionPool.get"></a><div id="ConnectionPool.get-def"><a name="L469"></a><tt class="py-lineno">469</tt> <a class="py-toggle" href="#" id="ConnectionPool.get-toggle" onclick="return toggle('ConnectionPool.get');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html#get">get</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="ConnectionPool.get-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectionPool.get-expanded"><a name="L470"></a><tt class="py-lineno">470</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L471"></a><tt class="py-lineno">471</tt>  <tt class="py-line"><tt class="py-docstring">        Return a cloudfiles connection object.</tt> </tt>
+<a name="L472"></a><tt class="py-lineno">472</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L473"></a><tt class="py-lineno">473</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype: L{Connection}</tt> </tt>
+<a name="L474"></a><tt class="py-lineno">474</tt>  <tt class="py-line"><tt class="py-docstring">        @return: a cloudfiles connection object</tt> </tt>
+<a name="L475"></a><tt class="py-lineno">475</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L476"></a><tt class="py-lineno">476</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L477"></a><tt class="py-lineno">477</tt>  <tt class="py-line">            <tt class="py-op">(</tt><tt class="py-name">create</tt><tt class="py-op">,</tt> <tt class="py-name">connobj</tt><tt class="py-op">)</tt> <tt class="py-op">=</tt> <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="cloudfiles.connection.ConnectionPool.get" class="py-name" href="#" onclick="return doclink('link-63', 'get', 'link-12');">get</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">block</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
+<a name="L478"></a><tt class="py-lineno">478</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">Empty</tt><tt class="py-op">:</tt> </tt>
+<a name="L479"></a><tt class="py-lineno">479</tt>  <tt class="py-line">            <tt class="py-name">connobj</tt> <tt class="py-op">=</tt> <tt id="link-64" class="py-name" targets="Class cloudfiles.connection.Connection=cloudfiles.connection.Connection-class.html"><a title="cloudfiles.connection.Connection" class="py-name" href="#" onclick="return doclink('link-64', 'Connection', 'link-64');">Connection</a></tt><tt class="py-op">(</tt><tt class="py-op">**</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">connargs</tt><tt class="py-op">)</tt> </tt>
+<a name="L480"></a><tt class="py-lineno">480</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">connobj</tt> </tt>
+</div><a name="L481"></a><tt class="py-lineno">481</tt>  <tt class="py-line"> </tt>
+<a name="ConnectionPool.put"></a><div id="ConnectionPool.put-def"><a name="L482"></a><tt class="py-lineno">482</tt> <a class="py-toggle" href="#" id="ConnectionPool.put-toggle" onclick="return toggle('ConnectionPool.put');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="cloudfiles.connection.ConnectionPool-class.html#put">put</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">connobj</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
+</div><div id="ConnectionPool.put-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="ConnectionPool.put-expanded"><a name="L483"></a><tt class="py-lineno">483</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
+<a name="L484"></a><tt class="py-lineno">484</tt>  <tt class="py-line"><tt class="py-docstring">        Place a cloudfiles connection object back into the pool.</tt> </tt>
+<a name="L485"></a><tt class="py-lineno">485</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
+<a name="L486"></a><tt class="py-lineno">486</tt>  <tt class="py-line"><tt class="py-docstring">        @param connobj: a cloudfiles connection object</tt> </tt>
+<a name="L487"></a><tt class="py-lineno">487</tt>  <tt class="py-line"><tt class="py-docstring">        @type connobj: L{Connection}</tt> </tt>
+<a name="L488"></a><tt class="py-lineno">488</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
+<a name="L489"></a><tt class="py-lineno">489</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
+<a name="L490"></a><tt class="py-lineno">490</tt>  <tt class="py-line">            <tt class="py-name">Queue</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name" targets="Method cloudfiles.connection.ConnectionPool.put()=cloudfiles.connection.ConnectionPool-class.html#put"><a title="cloudfiles.connection.ConnectionPool.put" class="py-name" href="#" onclick="return doclink('link-65', 'put', 'link-65');">put</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">time</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">connobj</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">block</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
+<a name="L491"></a><tt class="py-lineno">491</tt>  <tt class="py-line">        <tt class="py-keyword">except</tt> <tt class="py-name">Full</tt><tt class="py-op">:</tt> </tt>
+<a name="L492"></a><tt class="py-lineno">492</tt>  <tt class="py-line">            <tt class="py-keyword">del</tt> <tt class="py-name">connobj</tt> </tt>
+</div></div><a name="L493"></a><tt class="py-lineno">493</tt>  <tt class="py-line"><tt class="py-comment"># vim:set ai sw=4 ts=4 tw=0 expandtab:</tt> </tt>
+<a name="L494"></a><tt class="py-lineno">494</tt>  <tt class="py-line"> </tt><script type="text/javascript">
 <!--
 expandto(location.href);
 // -->
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Thu Mar 15 15:18:56 2012
+    Generated by Epydoc 3.0.1 on Fri Jun  1 13:14:23 2012
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"

docs/cloudfiles.connection.Connection-class.html

 <center>
 <center>  <map id="uml_class_diagram_for_cloudfil" name="uml_class_diagram_for_cloudfil">
 <area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#__init__" title="Accepts keyword arguments for Mosso username and api key." alt="" coords="17,39,421,57"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#get_info" title="Return tuple for number of containers and total bytes in the account" alt="" coords="17,57,421,76"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#create_container" title="Given a container name, returns a Container item, creating a new Container &#160;if one does not already exist." alt="" coords="17,76,421,95"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#delete_container" title="Given a container name, delete it." alt="" coords="17,95,421,113"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#get_all_containers" title="Returns a Container item result set." alt="" coords="17,113,421,132"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#get_container" title="Return a single Container item for the given Container." alt="" coords="17,132,421,151"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#list_public_containers" title="Returns a list of containers that have been published to the CDN." alt="" coords="17,151,421,169"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#list_containers_info" title="Returns a list of Containers, including object count and size." alt="" coords="17,169,421,188"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#list_containers" title="Returns a list of Containers." alt="" coords="17,188,421,207"/>
-<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#__getitem__" title="Container objects can be grabbed from a connection using index syntax." alt="" coords="17,207,421,225"/>
-<area shape="rect" id="node1" href="cloudfiles.connection.Connection-class.html" title="Manages the connection to the storage system and serves as a factory for Container instances." alt="" coords="5,6,432,231"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#get_info" title="Return tuple for number of containers, total bytes in the account and &#160;account metadata" alt="" coords="17,57,421,76"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#update_account_metadata" title="Update account metadata &gt;&gt;&gt; metadata = {&#39;x&#45;account&#45;meta&#45;foo&#39; : &#39;bar&#39;} &gt;&gt;&gt; &#160;connection.update_account_metadata(metadata)" alt="" coords="17,76,421,95"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#create_container" title="Given a container name, returns a Container item, creating a new Container &#160;if one does not already exist." alt="" coords="17,95,421,113"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#delete_container" title="Given a container name, delete it." alt="" coords="17,113,421,132"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#get_all_containers" title="Returns a Container item result set." alt="" coords="17,132,421,151"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#get_container" title="Return a single Container item for the given Container." alt="" coords="17,151,421,169"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#list_public_containers" title="Returns a list of containers that have been published to the CDN." alt="" coords="17,169,421,188"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#list_containers_info" title="Returns a list of Containers, including object count and size." alt="" coords="17,188,421,207"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#list_containers" title="Returns a list of Containers." alt="" coords="17,207,421,225"/>
+<area shape="rect" id="node0" href="cloudfiles.connection.Connection-class.html#__getitem__" title="Container objects can be grabbed from a connection using index syntax." alt="" coords="17,225,421,244"/>
+<area shape="rect" id="node1" href="cloudfiles.connection.Connection-class.html" title="Manages the connection to the storage system and serves as a factory for Container instances." alt="" coords="5,6,432,250"/>
 </map>
   <img src="uml_class_diagram_for_cloudfil.gif" alt='' usemap="#uml_class_diagram_for_cloudfil" ismap="ismap" class="graph-without-title" />
 </center>
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><span class="summary-sig"><a href="cloudfiles.connection.Connection-class.html#get_info" class="summary-sig-name">get_info</a>(<span class="summary-sig-arg">self</span>)</span><br />
-      Return tuple for number of containers and total bytes in the account</td>
+      Return tuple for number of containers, total bytes in the account and
+      account metadata</td>
           <td align="right" valign="top">
             <span class="codelink"><a href="cloudfiles.connection-pysrc.html#Connection.get_info">source&nbsp;code</a></span>
             
   </tr>
 <tr>
     <td width="15%" align="right" valign="top" class="summary">
+      <span class="summary-type">&nbsp;</span>
+    </td><td class="summary">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td><span class="summary-sig"><a href="cloudfiles.connection.Connection-class.html#update_account_metadata" class="summary-sig-name">update_account_metadata</a>(<span class="summary-sig-arg">self</span>,
+        <span class="summary-sig-arg">metadata</span>)</span><br />
+      Update account metadata &gt;&gt;&gt; metadata = {'x-account-meta-foo'
+      : 'bar'} &gt;&gt;&gt; connection.update_account_metadata(metadata)</td>
+          <td align="right" valign="top">
+            <span class="codelink"><a href="cloudfiles.connection-pysrc.html#Connection.update_account_metadata">source&nbsp;code</a></span>
+            
+          </td>
+        </tr>
+      </table>
+      
+    </td>
+  </tr>
+<tr>
+    <td width="15%" align="right" valign="top" class="summary">
       <span class="summary-type"><a href="cloudfiles.container.Container-class.html" 
       class="link">Container</a></span>
     </td><td class="summary">
     </td>
   </tr></table>
   
-  <p>Return tuple for number of containers and total bytes in the 
-  account</p>
+  <p>Return tuple for number of containers, total bytes in the account and 
+  account metadata</p>
 <pre class="py-doctest">
 <span class="py-prompt">&gt;&gt;&gt; </span>connection.get_info()
 <span class="py-output">(5, 2309749)</span></pre>
   <dl class="fields">
     <dt>Returns: tuple</dt>
-        <dd>a tuple containing the number of containers and total bytes used 
-          by the account</dd>
+        <dd>a tuple containing the number of containers, total bytes used by 
+          the account and a dictionary containing account metadata</dd>
+  </dl>
+</td></tr></table>
+</div>
+<a name="update_account_metadata"></a>
+<div>
+<table class="details" border="1" cellpadding="3"
+       cellspacing="0" width="100%" bgcolor="white">
+<tr><td>
+  <table width="100%" cellpadding="0" cellspacing="0" border="0">
+  <tr valign="top"><td>
+  <h3 class="epydoc"><span class="sig"><span class="sig-name">update_account_metadata</span>(<span class="sig-arg">self</span>,
+        <span class="sig-arg">metadata</span>)</span>
+  </h3>
+  </td><td align="right" valign="top"
+    ><span class="codelink"><a href="cloudfiles.connection-pysrc.html#Connection.update_account_metadata">source&nbsp;code</a></span>&nbsp;
+    </td>
+  </tr></table>
+  
+  <p>Update account metadata &gt;&gt;&gt; metadata = {'x-account-meta-foo' 
+  : 'bar'} &gt;&gt;&gt; connection.update_account_metadata(metadata)</p>
+  <dl class="fields">
+    <dt>Parameters:</dt>
+    <dd><ul class="nomargin-top">
+        <li><strong class="pname"><code>metadata</code></strong> - Dictionary of metadata</li>
+        <li><strong class="pname"><code>metdada</code></strong> (dict)</li>
+    </ul></dd>
   </dl>
 </td></tr></table>
 </div>
 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
   <tr>
     <td align="left" class="footer">
-    Generated by Epydoc 3.0.1 on Thu Mar 15 15:18:55 2012
+    Generated by Epydoc 3.0.1 on Fri Jun  1 13:14:13 2012
     </td>
     <td align="right" class="footer">
       <a target="mainFrame" href="http://epydoc.sourceforge.net"