Changeset View
Changeset View
Standalone View
Standalone View
swh/objstorage/backends/libcloud.py
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | Args: | ||||
| separated with a slash | separated with a slash | ||||
| compression: compression algorithm to use for objects | compression: compression algorithm to use for objects | ||||
| kwargs: extra arguments are passed through to the LibCloud driver | kwargs: extra arguments are passed through to the LibCloud driver | ||||
| """ | """ | ||||
| def __init__( | def __init__( | ||||
| self, | self, | ||||
| container_name: str, | container_name: str, | ||||
| compression: Optional[str] = None, | compression: str = "gzip", | ||||
| path_prefix: Optional[str] = None, | path_prefix: Optional[str] = None, | ||||
| **kwargs, | **kwargs, | ||||
| ): | ): | ||||
| super().__init__(**kwargs) | super().__init__(**kwargs) | ||||
| self.driver = self._get_driver(**kwargs) | self.driver = self._get_driver(**kwargs) | ||||
| self.container_name = container_name | self.container_name = container_name | ||||
| self.container = self.driver.get_container(container_name=container_name) | self.container = self.driver.get_container(container_name=container_name) | ||||
| self.compression = compression | self.compression = compression | ||||
| ▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines | |||||