Commit 88952c62 authored by Yannick's avatar Yannick
Browse files

add dask parameters for gcp storage

parent 26e03bd4
Pipeline #40568 passed with stages
in 46 seconds
__version__ = '1.0.1'
__version__ = '1.1.0'
from typing import Optional
from import DaskStorageParameters
from import Tenant
from .blob_storage_gcp import GCloudAioStorage
async def get_dask_storage_parameters(tenant: Tenant, directory: Optional[str] = None) -> DaskStorageParameters:
gcp_store = GCloudAioStorage(service_account_file=tenant.credentials)
token = await gcp_store._get_access_token(tenant.project_id, tenant.bucket_name)
storage_options = {'token': token}
base_directory = f'{tenant.bucket_name}/{directory}' if directory else tenant.bucket_name
return DaskStorageParameters(protocol='gs',
# osdu core lib main python
--extra-index-url \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment