Python bindings and commandline client to the GenomeSpace API
Project description
This is a python client for the GenomeSpace API. There’s a Python API (the genomespaceclient module), and a command-line script (genomespace).
Installation
Install the latest release from PyPi:
pip install python-genomespaceclient
Commandline usage example
# copy local file to remote location
genomespace -u <username> -p <password> cp /tmp/local_file.txt https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt
# list remote files
genomespace -u <username> -p <password> ls https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/
# move remote file to new location
genomespace -u <username> -p <password> mv https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt
# download remote file, with verbose output
genomespace -vvv -u <username> -p <password> mv https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt /tmp/new_local_file.txt
# delete remote file
genomespace -u <username> -p <password> rm https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt
Python usage example
from genomespaceclient import GenomeSpaceClient
client = GenomeSpaceClient(username="<username>", password="<password>")
client.copy("/tmp/local_file.txt", "https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt")
client.list("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/")
client.move("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt", "https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
client.copy("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt", "/tmp/new_local_file.txt")
client.delete("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
Documentation
Documentation can be found at https://python-genomespaceclient.readthedocs.org.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python-genomespaceclient-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12ba2e7d7324e893a386726f0332a754b9a82a1fe4905f34cad29379e83c2386 |
|
MD5 | 86f23253158a6e0f0e851083411a055d |
|
BLAKE2b-256 | 9506017cb861eb6aa142ddbc841ca619a66efaf3a4f90e8accb548436bdc0563 |
Close
Hashes for python_genomespaceclient-0.1.6-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72bd88c611588f0ca2721fcc19a4e37d5865aab00be5a6c8b2edc5e1458f152c |
|
MD5 | 3defa0031576815f16b4fd696f9c0b1b |
|
BLAKE2b-256 | d856baed60bb60bd3e8b474af4c8ba73b88aed29ceea9f27032555acb414da1d |