Skip to content

Data store

The Daisi platform features a Data store. Currently, it is a public and shared drive. Support for private folders will be added later on.

You can access the Shared Data folder by clicking on your user profile in the upper right corner.


A personal access token is required for shared data access

from pydaisi import SharedDataClient
sd = SharedDataClient() # if DAISI_ACCESS_TOKEN is in environment or .env file
sd = SharedDataClient(access_token="012abc345def67890") # otherwise

# load the root directory
folder = sd.Folder("/")

# create new folder relative to folder
new_folder = folder.create("new_folder")

# upload file
sd.upload_file("/shared data/folder/path", "/local/file/path")
sd.put_object("/shared data/folder/path", <object bytes>, "file name")

# download file
sd.download_file("/shared data/file/path", "/local/path")
obj = sd.download_fileobj("/shared data/file/path")

# list contents
folder = sd.Folder("/shared data/folder/path")
for f in folder.list():

# delete a file
file = sd.File("/shared data/file/path")

# delete a folder 
folder = sd.Folder("/shared data/folder/path")