Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 671 Bytes

synapse-dl-snippet.md

File metadata and controls

30 lines (20 loc) · 671 Bytes

Code snippets to download data from Synapse

Full instructions for programmatic downloads here.

You need:

  • to register for a username and password on Synapse
  • to install the Python package: pip install synapseclient

syn22164713 is a placeholder for the dataset ID on Synapse.

Python

import synapseclient 
 
syn = synapseclient.Synapse() 
syn.login() 

# Obtain a pointer and download the data 
entity = syn.get(entity='syn22164713' ) 

# Get the path to the local copy of the data file 
filepath = entity.path 

Command line

synapse get syn22164713