NeuroPACS Python SDK
Project description
NeuroPACS Python SDK
Install neuropacs from pip
pip install neuropacs
Usage
import neuropacs
api_key = "your_api_key"
server_url = "https://your_neuropacs_url"
product_id = "PD/MSA/PSP-v1.0"
prediction_format = "XML"
# PRINT CURRENT VERSION
version = neuropacs.PACKAGE_VERSION
#INITIALIZE NEUROPACS SDK
npcs = neuropacs.init(api_key, server_url)
#GENERATE AN AES KEY
aes_key = npcs.generate_aes_key()
#CONNECT TO NEUROPACS
connection_id = npcs.connect(api_key, aes_key)
#CREATE A NEW JOB
order_id = npcs.new_job(connection_id, aes_key)
#UPLOAD AN IMAGE
# --> data must be a valid path <String> or byte array <Bytes>
upload_status = npcs.upload(data, order_id, connection_id, aes_key)
#UPLOAD A DATASET
# --> dataset_path must be a valid path to a dataset <String>
upload_status = npcs.upload_dataset(dataset_path,connection_id, order_id, aes_key)
#START A JOB
# --> Valid product_id options: PD/MSA/PSP-v1.0
job_start_status = npcs.run_job(connection_id, aes_key, product_id, order_id)
#CHECK JOB STATUS
job_status = npcs.check_status(order_id, connection_id, aes_key)
#RETRIEVE JOB RESULTS
# --> Valid prediction_format options: TXT, PDF, XML, JSON, DICOMSR
job_results = npcs.get_results(prediction_format, order_id, connection_id, aes_key)
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
neuropacs-1.3.3.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for neuropacs-1.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7a3aef2ed14c53d8c4c7210bc4416001efc383d87e99bac4556e7897858eaff |
|
MD5 | b1fed33f557aae623656b8fc006fe8f1 |
|
BLAKE2b-256 | 73c9897a209269e75cde2afc093274fd7d850ee812eaf31fcaab62e123544e82 |