Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Common Configuration File

This is a properties Upon client initialization, the client searches for a configuration file in a standard place that is interpreted upon client initialization.  The location should be private for a user.

The format will that of an .ini file (http://en.wikipedia.org/wiki/INI_file).  Although the format is somewhat 'dated', there is a Python parser available:

http://docs.python.org/2/library/configparser.html

and an R parsing algorithm has been suggested:

...

Things to specify in the common config file:

...

.  Specifically, it looks for an INI-formated '~/.synapseConfig' file.  Parsering algorithms are available for both R and Python.  

The following can be specified in the configuration file:

  • Username, password, session token, or API key
  • File cache location (should be private to the user)
  • Endpoints for each of the Synapse services

 

Code Block
languagepowershell
titleExample
firstline1
[authentication]
username = example@user.com
password = samplePassword
apikey = Some+API+key+retrieved+from+either+the+web+portal+or+via+a+REST+GET+call+to+/secretKey==
 
[cache]
location = ~/.synapseCache
 
[endpoints]
repoEndpoint = https://repo-prod.prod.sagebase.org/repo/v1
authEndpoint = https://auth-prod.prod.sagebase.org/auth/v1
fileHandleEndpoint = https://file-prod.prod.sagebase.org/file/v1
portalEndpoint = https://synapse.org/
 

 

Appendix:  Current implementation of the file cache in the R Client:

...