(self, container: Optional[str] = None)
Given the name of a container, return its contents.

        :param str container: The name of the desired container, defaults to
            :attr:`~SwiftStorage.default_container`
        :return: A list of objects in the container if it exists
        :rtype: List[Dict[str, str]]

        Example:

        >>> plugin.get_container("bandersnatch")
        [{
            'bytes': 1101, 'last_modified': '2020-02-27T19:10:17.922970',
            'hash': 'a76b4c69bfcf82313bbdc0393b04438a',
            'name': 'packages/pyyaml/PyYAML-5.3/LICENSE',
            'content_type': 'application/octet-stream'
         }, {
            'bytes': 1779, 'last_modified': '2020-02-27T19:10:17.845520',
            'hash': 'c60081e1ad65830b098a7f21a8a8c90e',
            'name': 'packages/pyyaml/PyYAML-5.3/PKG-INFO',
            'content_type': 'application/octet-stream'
         }, {
            'bytes': 1548, 'last_modified': '2020-02-27T19:10:17.730490',
            'hash': '9a8bdf19e93d4b007598b5eb97b461eb',
            'name': 'packages/pyyaml/PyYAML-5.3/README',
            'content_type': 'application/octet-stream'
         }, ...
        ]
Given the name of a container, return its contents.
Given the name of a container return its contents .
def get_container(self, container: Optional[str] = None) -> List[Dict[str, str]]:
        """
        Given the name of a container, return its contents.

        :param str container: The name of the desired container, defaults to
            :attr:`~SwiftStorage.default_container`
        :return: A list of objects in the container if it exists
        :rtype: List[Dict[str, str]]

        Example:

        >>> plugin.get_container("bandersnatch")
        [{
            'bytes': 1101, 'last_modified': '2020-02-27T19:10:17.922970',
            'hash': 'a76b4c69bfcf82313bbdc0393b04438a',
            'name': 'packages/pyyaml/PyYAML-5.3/LICENSE',
            'content_type': 'application/octet-stream'
         }, {
            'bytes': 1779, 'last_modified': '2020-02-27T19:10:17.845520',
            'hash': 'c60081e1ad65830b098a7f21a8a8c90e',
            'name': 'packages/pyyaml/PyYAML-5.3/PKG-INFO',
            'content_type': 'application/octet-stream'
         }, {
            'bytes': 1548, 'last_modified': '2020-02-27T19:10:17.730490',
            'hash': '9a8bdf19e93d4b007598b5eb97b461eb',
            'name': 'packages/pyyaml/PyYAML-5.3/README',
            'content_type': 'application/octet-stream'
         }, ...
        ]
        """
        if not container:
            container = self.default_container
        with self.connection() as conn:
            return conn.get_container(container)
def get_container ( self , container : Optional [ str ] = None ) -> List [ Dict [ str , str ] ] : if not container : container = self . default_container with self . connection ( ) as conn : return conn . get_container ( container )