Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discovery_connect-0.0.6.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discovery_connect-0.0.6-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file discovery_connect-0.0.6.tar.gz.

File metadata

  • Download URL: discovery_connect-0.0.6.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.18

File hashes

Hashes for discovery_connect-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9c67bcf75ef5a3437d4919f04442e71ab825b8065cc45779b2cb196db4fd8ce9
MD5 b1a3e29e846edd78331de9686e65d1d7
BLAKE2b-256 44e97070dbeb86a9520b01126b24aceda1427e9134a4dcef7d22da0f4a6edbeb

See more details on using hashes here.

File details

Details for the file discovery_connect-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for discovery_connect-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 eecc545cdc8b209b57e9836b8972f249ec39b884b4cbc14e7a6d9df86cec4390
MD5 803be1a19a3df13e2f6dbffcfce196ac
BLAKE2b-256 5c498030a97bfa9ff9903a937cce22440bab3411e7e40c4ce3ba59b464afd02d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page