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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99219752445c7ab58c738794608b687866fe323f6e0b871667b06a36a1313588 |
|
MD5 | ed8beb3624dd765ecc77f3424baba6dd |
|
BLAKE2b-256 | 71a8cd1a08aca16f16bb99d0ef0e183c8e603ab4713672c343ec226fdf8f7911 |
Close
Hashes for python_genomespaceclient-0.1.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e79deaa4a38566d1a783e39a6a3e181cc266e8c90df6822ed6ed5f361f2d07 |
|
MD5 | 8bbcfcdd548f14ac16395afdfc17a31f |
|
BLAKE2b-256 | ace19baadab9789c774c5a12ea946846905a87c09743d0e52e7fcebcbe068ee4 |