Python interface for data exchange via the RetinAI Discovery API
Project description
Discovery Connect
Getting started
Install the required packages
pip install discovery-connect
Launch the demo script:
$ python upload.py -h
usage: upload.py [-h] -w WORKBOOK_UUID [-f FILE] [-a ACQUISITION_NAME] [-F [FILES ...]] -l LOGIN -p PASSWORD -u URL -k CLIENT_KEY -s CLIENT_SECRET
Upload file(s) to discovery
options:
-h, --help show this help message and exit
-w WORKBOOK_UUID, --workbook_uuid WORKBOOK_UUID
UUID of the target workbook.
-f FILE, --file FILE Path to a single file to be uploaded.
-a ACQUISITION_NAME, --acquisition_name ACQUISITION_NAME
Name for the zip archive for the files.
-F [FILES ...], --files [FILES ...]
List of file names.
-l LOGIN, --login LOGIN
Discovery login
-p PASSWORD, --password PASSWORD
Discovery password
-u URL, --url URL Discovery URL
-k CLIENT_KEY, --client_key CLIENT_KEY
Discovery client API key
-s CLIENT_SECRET, --client_secret CLIENT_SECRET
Discovery client API secret
Testing
To access the Discovery API, you will need:
- valid Discovery service account credentials
- valid API client credentials
When collaborating with Ikerian on a particular project, you will be issued those credentials as part of the project setup. If you have not been issued credentials, please reach out to your contact person.
Below is an example call for Linux / Mac:
URL='https://api.region.discovery.retinai.com' \
CLIENT_ID='12345678-1234-1234-1234-1234567890ab' \
CLIENT_SECRET='1234567890' \
USER='upload-service@example.com' \
PASS='abcdefghij' \
WORKBOOK_UUID='12345678-1234-1234-1234-1234567890ab' \
ACQUISITION_NAME='test-acquisition' \
python upload.py -u $URL -k $CLIENT_ID -s $CLIENT_SECRET -l $USER -p $PASS -w $WORKBOOK_UUID -a $ACQUISITION_NAME \
-F 00000001.dcm 00000002.dcm 00000003.dcm 00000004.dcm
Below is an example call for Windows:
set URL='https://api.region.discovery.retinai.com'
set CLIENT_ID='12345678-1234-1234-1234-1234567890ab'
set CLIENT_SECRET='1234567890'
set USER='upload-service@example.com'
set PASS='abcdefghij'
set WORKBOOK_UUID='12345678-1234-1234-1234-1234567890ab'
set ACQUISITION_NAME='test-acquisition'
py upload.py -u %URL% -k %CLIENT_ID% -s %CLIENT_SECRET% -l %USER% -p %PASS% ^
-w %WORKBOOK_UUID% -a %ACQUISITION_NAME% ^
-F 00000001.dcm 00000002.dcm 00000003.dcm 00000004.dcm
License
Copyright 2024 Ikerian AG
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file discovery_connect-0.0.5.tar.gz.
File metadata
- Download URL: discovery_connect-0.0.5.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ec6416ccd828d19f53777f9d8cba9fd3ca223eb6552d8d76ffddb4a15918815
|
|
| MD5 |
03c1c0ab4737794ee137328112c96bb3
|
|
| BLAKE2b-256 |
00b318eec805e7a9676ef81ade09a0a316449dde540670e46d2b723ab2131702
|
File details
Details for the file discovery_connect-0.0.5-py3-none-any.whl.
File metadata
- Download URL: discovery_connect-0.0.5-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d1240157dfe1d49b9158f3822fab43dcc0377f2ce486fd680a4026a14832274
|
|
| MD5 |
8ce54f93550e66efc8ecd16cb00249cd
|
|
| BLAKE2b-256 |
f323e45dd7ee3d469498c2d3985766ea18e9f5074884448e8a9932b7a473d6ad
|