Project description

Python Synapse Client

CI

Branch

Build Status

Travis

develop

Travis

master

AppVeyor

develop

AppVeyor

master

A Python client for Sage Bionetworks'Synapse, a collaborative compute space that allows scientists to share and analyze data together. The Python client can be used as a library for development of software that communicates with Synapse or as a command-line utility.

Python 2 Support

The sun is setting on Python 2. Many major open source Python packages are moving to require Python 3.

The Synapse engineering team will step down Python 2.7 support to only bug fixes, and require Python 3 on new feature releases. Starting with Synapse Python client version 2.0 (will be released in Q1 2019), Synapse Python client will require Python 3.

The dependencies on pandas and pysftp are optional. Synapse Tables integrate
with Pandas. The library pysftp is required for users of
SFTP file storage. Both libraries require native code
to be compiled or installed separately from prebuilt binaries.

Install from source

Install release candidate branch

For validation, validators would install a release candidate branch to verify that a bug has been fix or a new feature/ an improvement works as expected. To prevent overwriting your working environment, using virtualenv to create an isolated test environment is a good idea.

It is much more convenient to use an API key, which can be generated and cached locally by doing the following once:

syn.login('my_username', 'my_password', rememberMe=True)

Then, in subsequent interactions, specifying username and password is optional and only needed to login as a different user. Calling login with no arguments uses cached credentials when they are available.

syn.login('my_username')

As a short-cut, creating the Synapse object and logging in can be done in one step:

import synapseclient
syn = synapseclient.login()

Caching credentials can also be done from the command line client:

synapse login -u my_username -p my_password --rememberMe

Synapse Utilities (synapseutils)

The purpose of synapseutils is to create a space filled with convenience functions that includes traversing through large projects, copying entities, recursively downloading files and many more.