Skip to main content

Python Orthanc REST API client

Project description

python-orthanc-api-client

A python client to ease using the Orthanc Rest API.

Functionalities are very limited now ! Backward compat will break a lot in the near future !

Installation:

pip3 install orthanc-api-client

Examples:

from orthanc_api_client import OrthancApiClient

orthanc_a = OrthancApiClient('http://localhost:8042', user='orthanc', pwd='orthanc')
orthanc_b = OrthancApiClient('http://localhost:8043', user='orthanc', pwd='orthanc')

all_patients_ids = orthanc_a.patients.get_all_ids()
all_studies_ids = orthanc_a.studies.get_all_ids()
all_series_ids = orthanc_a.series.get_all_ids()
all_instances_ids = orthanc_a.instances.get_all_ids()

dicom_file = orthanc_a.instances.get_file(orthanc_id=all_instances_ids[0])

instances_ids = orthanc_b.upload(buffer=dicom_file)

orthanc_a.instances.set_metadata(orthanc_id=all_instances_ids[0], 1024, 'my-value')

upload a folder to Orthanc

from orthanc_api_client import OrthancApiClient

o = OrthancApiClient('http://localhost:8042', user='orthanc', pwd='orthanc')
o.upload_folder('/home/o/files', ignore_errors=True)

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

orthanc_api_client-0.1.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

orthanc_api_client-0.1.2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file orthanc_api_client-0.1.2.tar.gz.

File metadata

  • Download URL: orthanc_api_client-0.1.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for orthanc_api_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1bba98615ad942ded545466f81807773c6c77513830bc4bef9fd12f04e07d582
MD5 b6bbed90cbba41706dbea6a644114eef
BLAKE2b-256 7e720e3ffb47baf1ee118b0fe7ace3d4d8fd6fd0358a8afcd2dd24e758d56022

See more details on using hashes here.

File details

Details for the file orthanc_api_client-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: orthanc_api_client-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for orthanc_api_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb6faa44c6d67a79a9b1a7bb2e9fe9c65887a002e955b4d2f6c64a7ec93c6bf4
MD5 2e19d91ee70ae201b56d4997aeaedccc
BLAKE2b-256 93f8f5443ead61a348291cd393f0403898aa2936220d6b83fa00b989ef04641d

See more details on using hashes here.

Supported by

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