(self, registry_config: RegistryConfig, repo_path: Path)
| 13 | |
| 14 | class GCSRegistryStore(RegistryStore): |
| 15 | def __init__(self, registry_config: RegistryConfig, repo_path: Path): |
| 16 | uri = registry_config.path |
| 17 | try: |
| 18 | import google.cloud.storage as storage |
| 19 | except ImportError as e: |
| 20 | from feast.errors import FeastExtrasDependencyImportError |
| 21 | |
| 22 | raise FeastExtrasDependencyImportError("gcp", str(e)) |
| 23 | |
| 24 | self.gcs_client = storage.Client() |
| 25 | self._uri = urlparse(uri) |
| 26 | self._bucket = self._uri.hostname |
| 27 | self._blob = self._uri.path.lstrip("/") |
| 28 | |
| 29 | def get_registry_proto(self): |
| 30 | import google.cloud.storage as storage |
nothing calls this directly
no test coverage detected