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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e45b1544b550ba51010393ec85dd8c4cc4dcdd6dd28bdcf2d192c73df5ae0e |
|
MD5 | 9feac4d753f66f9f09277b34aaeb0b21 |
|
BLAKE2b-256 | aeffe040cd27882a0c94b5a3df6dfc80c6be150bbe5a82a24fe36f4fee6d121d |
Close
Hashes for python_genomespaceclient-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 324bb0909656fbe98c895c87aad0c5d7d1811879deb77a2b52b1b6f00dc16577 |
|
MD5 | 03b7c1e75138d35b47d194bde0855f1f |
|
BLAKE2b-256 | ef63501a56fee1721a64270196106e65b79727e989fb8fdeef1d4a73a4e5ad78 |