(self, request, container_name)
Api call to get a container, given the name of the container.  HTTP
        status code of 200 when such a container exists, 404 if not.
Api call to get a container, given the name of the container.  HTTP
        status code of 200 when such a container exists, 404 if not.
Api call to get a container given the name of the container . HTTP status code of 200 when such a container exists 404 if not .
def get_container(self, request, container_name):
        """
        Api call to get a container, given the name of the container.  HTTP
        status code of 200 when such a container exists, 404 if not.
        """
        if container_name in self.containers:
            container = self.containers[container_name]
            object_count = "{0}".format(container.object_count).encode("utf-8")
            byte_count = "{0}".format(container.byte_count).encode("utf-8")
            request.responseHeaders.setRawHeaders(b"content-type",
                                                  [b"application/json"])
            request.responseHeaders.setRawHeaders(b"x-container-object-count",
                                                  [object_count])
            request.responseHeaders.setRawHeaders(b"x-container-bytes-used",
                                                  [byte_count])
            request.setResponseCode(OK)
            return dumps([
                obj.as_json() for obj in
                self.containers[container_name].objects.values()
            ])
        else:
            return NoResource("No such container")
def get_container ( self , request , container_name ) : if container_name in self . containers : container = self . containers [ container_name ] object_count = "{0}" . format ( container . object_count ) . encode ( "utf-8" ) byte_count = "{0}" . format ( container . byte_count ) . encode ( "utf-8" ) request . responseHeaders . setRawHeaders ( b"content-type" , [ b"application/json" ] ) request . responseHeaders . setRawHeaders ( b"x-container-object-count" , [ object_count ] ) request . responseHeaders . setRawHeaders ( b"x-container-bytes-used" , [ byte_count ] ) request . setResponseCode ( OK ) return dumps ( [ obj . as_json ( ) for obj in self . containers [ container_name ] . objects . values ( ) ] ) else : return NoResource ( "No such container" )