Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Commit ad63606

Browse files
committed
Added readme and license terms
1 parent 53b3d04 commit ad63606

File tree

3 files changed

+86
-1
lines changed

3 files changed

+86
-1
lines changed

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 gvlproject
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

-1
This file was deleted.

README.rst

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
Python bindings and commandline client to the GenomeSpace API
2+
=============================================================
3+
4+
.. image:: https://img.shields.io/pypi/v/python-genomespaceclient.svg
5+
:target: https://pypi.python.org/pypi/python-genomespaceclient/
6+
:alt: latest version available on PyPI
7+
8+
.. image:: https://readthedocs.org/projects/python-genomespaceclient/badge/?version=latest
9+
:target: http://python-genomespaceclient.readthedocs.org/en/latest/?badge=latest
10+
:alt: Documentation Status
11+
12+
This is a python client for the GenomeSpace API. There's a Python API (the
13+
``genomespaceclient`` module), and a command-line script (``genomespace``).
14+
15+
16+
Installation
17+
~~~~~~~~~~~~
18+
Install the latest release from PyPi:
19+
20+
.. code-block:: shell
21+
22+
pip install python-genomespaceclient
23+
24+
25+
Commandline usage example
26+
~~~~~~~~~~~~~~~~~~~~~~~~~
27+
28+
.. code-block:: bash
29+
30+
# copy local file to remote location
31+
genomespace -u <username> -p <password> cp /tmp/local_file.txt https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt
32+
33+
# list remote files
34+
genomespace -u <username> -p <password> ls https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/
35+
36+
# move remote file to new location
37+
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
38+
39+
# download remote file, with verbose output
40+
genomespace -vvv -u <username> -p <password> mv https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt /tmp/new_local_file.txt
41+
42+
# delete remote file
43+
genomespace -vvv -u <username> -p <password> mv https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt
44+
45+
46+
Python usage example
47+
~~~~~~~~~~~~~~~~~~~~~~~~~
48+
49+
.. code-block:: python
50+
51+
from genomespaceclient import GenomeSpaceClient
52+
53+
client = GenomeSpaceClient(username="<username>", password="<password>")
54+
client.copy("/tmp/local_file.txt", "https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/hello.txt")
55+
client.list("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/")
56+
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")
57+
client.copy("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt", "/tmp/new_local_file.txt")
58+
client.delete("https://dm.genomespace.org/datamanager/v1.0/file/Home/MyBucket/world.txt")
59+
60+
61+
Documentation
62+
~~~~~~~~~~~~~
63+
Documentation can be found at https://python-genomespaceclient.readthedocs.org.
64+

0 commit comments

Comments
 (0)