Description
Python package that will allow you to treat the Synapse repository as a local directory.
To use this package you need to be a Synapse Certified User. To get certified you have to go to your Account Settings, click Get Certified, and pass the quiz you will be prompted with.
Install with pip
$ python3 -m pip install synapi --user
Install from source
$ python3 setup.py install --user
Run unit tests
$ python3 tests/test_synapi.py
This script will prompt you for your Synapse credentials and the ID of a Synapse project where the tests will be executed.
Exemplary code snippet
#!/usr/bin/env python3
import synapi
# Login into Synapse
sess = synapi.SynapseSession('username', 'password', 'project_id')
# Upload a file or folder
sess.upload('local/path', 'remote/path')
# Download a file or folder
sess.download('remote/path', 'local/path')
# Make a directory
sess.mkdir('remote/path')
# Check whether a file/folder exists
sess.file_exists('remote/path')
sess.dir_exists('remote/path')
# Copy file or directory
sess.cp('remote/path1', 'remote/path2')
# Move file or directory
sess.mv('remote/path1', 'remote/path2')
# Remove file or directory
sess.rm('remote/path')
# List a project or directory in Synapse
files = sess.ls('remote/path')
# Get the Synapse ID of a file or folder
synapse_id = sess.get_id('remote/path')
All methods have a parent_id parameter, if you do not specify one, the parent ID used is the project ID passed in the constuctor.
Metadata
Release files for synapi 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| synapi-0.0.2.tar.gz | 6.8 kB | Without provenance | Details for synapi-0.0.2.tar.gz |
Release files / synapi-0.0.2.tar.gz
| Download URL | synapi-0.0.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfb370e8c2a7f888fde93ae2778f2b29526e86f0ea7c799610d8c07d0b5300fe
|
|
BLAKE2b-256 checksum How to use checksums |
43bf2c5cd83fc1fdfec09abe957a38191e165ba9d1ffd009fef78aa9877021a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.4.2 requests/2.27.1 setuptools/62.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.10
|
Security for synapi 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.