Common Patterns
Here are a few common patterns and use cases for Shade that we have curated that you may find useful. Please check out Get Started with the Shade Python SDK before continuing with these patterns
Get All Workspaces for Your User
shade = Shade(remote_url=REMOTE_URL, api_key=API_KEY)
workspaces = shade.workspace.get_workspaces()Get All Drives of a Workspace
workspace = shade.workspace.get_workspace_by_domain(WORKSPACE_DOMAIN)
drives = shade.drive.get_drives(workspace)List Files and Folders by Path
assets = shade.asset.listdir_files(
drive=drive, path=Path('/'), page=0, limit=100
)
folders = shade.asset.listdir_folders(
drive=drive.get('id'),
path=Path('/'),
page=0,
limit=100, # Returns the path of the folder
)
print('folders', folders)
Sharing a Folder
Sharing a File
For more information on roles check out Workspace and Drive Permissions
Getting a Download URL for an Asset
Searching
More patterns can be found in our examples here
Last updated

