Skip to content

dagshub

Bankn8II©$A edited this page Sep 17, 2024 · 2 revisions

image

DagsHub Storage Bucket

How to interact with the bucket

`from dagshub import get_repo_bucket_client

Get a boto3.client object

s3 = get_repo_bucket_client("barionleg/ci_temp")

Upload file

s3.upload_file( Bucket="ci_temp", # name of the repo Filename="local.csv", # local path of file to upload Key="remote.csv", # remote path where to upload the file )

Download file

s3.download_file( Bucket="ci_temp", # name of the repo Key="remote.csv", # remote path from where to download the file Filename="local.csv", # local path where to download the file )`