Skip to main content

Utilities for using Synapse.

Project description

Synapse Power Tools

Utilities for using Synapse.

Dependencies

  • Python3.10+
  • A Synapse account with a username/password. Authentication through a 3rd party (.e.g., Google) will not work, you must have a Synapse user/pass for the API to authenticate.

Install

pip install syntools

Configuration

Environment Variables

No configuration is necessary if using environment variables or the default synapse config file. For user/pass, set:

SYNAPSE_USERNAME=
SYNAPSE_PASSWORD=

For auth token, set:

SYNAPSE_AUTH_TOKEN=

For Synapse Config file, have a valid config file in: ~/.synapseConfig Or, have the environment variable set: SYNAPSE_CONFIG_FILE=

Command Line Arguments

options:
  -u USERNAME, --username USERNAME
                        Synapse username.
  -p PASSWORD, --password PASSWORD
                        Synapse password.
  --auth-token AUTH_TOKEN
                        Synapse auth token.
  --synapse-config SYNAPSE_CONFIG
                        Path to Synapse configuration file.

Usage

usage: syntools [-h] [--version] {download,find-id,copy,move,list} ...

Synapse Power Tools

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

Commands:
  {download,find-id,copy,move,list}
    download            Download folders and files from Synapse.
    find-id             Find a Synapse ID by a Synapse path (e.g., MyProject/Folder/file.txt).
    copy                Copy Synapse entities from one container to another.
    move                Move Synapse entities from one container to another.
    list                List Synapse entities in one or more containers.

Development Setup

pipenv --python 3.10
pipenv shell
make pip_install
make build
make install_local

See Makefile for all commands.

Testing

  • Create and activate a virtual environment:
  • Rename .env-template to .env and set each of the variables.
  • Run the tests: make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syntools-0.0.6.tar.gz (31.7 kB view hashes)

Uploaded Source

Built Distribution

syntools-0.0.6-py2.py3-none-any.whl (42.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page