File tree Expand file tree Collapse file tree 3 files changed +67
-2
lines changed Expand file tree Collapse file tree 3 files changed +67
-2
lines changed Original file line number Diff line number Diff line change
1
+ MAKE = make
2
+ PYTHON = python
3
+ SETUP = $(PYTHON ) ./setup.py
4
+
5
+ .PHONY : clean cleandocs coverage dist docs opendocs unit-coverage upload help
6
+
7
+ help :
8
+ @echo " Usage: \` make <target>' where <target> is one or more of"
9
+ @echo " clean delete intermediate work product and start fresh"
10
+ @echo " cleandocs delete cached HTML documentation and start fresh"
11
+ @echo " coverage report overall test coverage"
12
+ @echo " docs build HTML documentation using Sphinx (incremental)"
13
+ @echo " opendocs open local HTML documentation in browser"
14
+ @echo " dist generate source and wheel distribution into dist/"
15
+ @echo " unit-coverage report unit test coverage"
16
+ @echo " upload upload distribution to PyPI"
17
+
18
+ clean :
19
+ find . -type f -name \* .pyc -exec rm {} \;
20
+ find . -type f -name .DS_Store -exec rm {} \;
21
+ rm -rf dist .coverage
22
+
23
+ cleandocs :
24
+ $(MAKE ) -C docs clean
25
+
26
+ coverage :
27
+ pytest --cov-report term-missing --cov=src --cov=tests
28
+
29
+ dist :
30
+ rm -rf dist/
31
+ $(SETUP ) sdist bdist_wheel
32
+
33
+ docs :
34
+ $(MAKE ) -C docs html
35
+
36
+ opendocs :
37
+ open docs/_build/html/index.html
38
+
39
+ unit-coverage :
40
+ pytest --cov-report term-missing --cov=src tests/unit
41
+
42
+ upload :
43
+ rm -rf dist/
44
+ $(SETUP ) sdist bdist_wheel
45
+ twine upload dist/*
Original file line number Diff line number Diff line change @@ -9,4 +9,24 @@ The GDC API drives the GDC Data and Submission Portals and provides programmatic
9
9
10
10
## Features implemented
11
11
- Downloading a Single File using GET
12
- - Downloading Multiple Files using POST
12
+ - Downloading Multiple Files using POST
13
+
14
+ ## Usage
15
+
16
+ ### Installation
17
+ ` pip install gdc-api-wrapper `
18
+
19
+ ### Download single file
20
+ ``` python
21
+ from gdcapiwrapper.data import Data
22
+ Data.download(uuid = " uuid-file-you-wanna-download" , path = " /local/path" , name = " filename" )
23
+ ```
24
+ NOTE: ` path ` and ` name ` are optional, by default path is your current directory and if name is
25
+ not provided it will be saved with the UUID as filname.
26
+
27
+ ### Download multiple files
28
+ ``` python
29
+ from gdcapiwrapper.data import Data
30
+ Data.download_multiple(uuid_list = [" UUID1" , " UUID2" , " UUID3" ], path = " /local/path" )
31
+ ```
32
+ NOTE: ` path ` is optional, by default path is your current directory.
Original file line number Diff line number Diff line change 3
3
import os
4
4
import requests
5
5
6
- __version__ = "0.1b "
6
+ __version__ = "0.1 "
7
7
GDC_API_TOKEN = os .environ .get ("GCC_API_TOKEN" , None )
8
8
GDC_API_BASE_URL = os .environ .get ("GDC_API_BASE_URL" , "https://api.gdc.cancer.gov/" )
9
9
You can’t perform that action at this time.
0 commit comments