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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33e0e5834caf7586d57a531001107cfdf4bb3647d765358ff81bb0b667f9db5b |
|
MD5 | f5dbb210bd085cad18403cc9f1bc3970 |
|
BLAKE2b-256 | 185667700aefb1c03c6b915e878ff888a2715cfa740dce1ec10ee8959e7264aa |
Close
Hashes for python_genomespaceclient-0.1.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4527b404584626980cce87a840c3d0c0031bccf26e22b615f8e4ae5805349f65 |
|
MD5 | ad59ccf84e67975e6452f09c0aab03eb |
|
BLAKE2b-256 | 4ec4808296e875f4b3ddf39db02cb34484784266c17674f56feab4f30afea081 |