Skip to main content

REST client for Orthanc DICOM servers

Project description

Orthanc REST client

Build Status

Provides a REST client targeted at Orthanc REST API endpoints.

Based on the excellent apiron library.

Install

pip install orthanc-rest-client

How to use

Import the pre-defined client and pass the server details

from orthanc_rest_client import Orthanc
orthanc = Orthanc('http://localhost:8042')

# Patient endpoints
orthanc.get_patients()
orthanc.get_patient(id)
...and so on

# Study endpoints
orthanc.get_studies()
orthanc.get_study(id)
...and so on

# Series endpoints
orthanc.get_series()
orthanc.get_one_series(id)
...and so on

# Instance endpoints
orthanc.get_instances()
orthanc.get_instance(id)
...and so on

# Get changes
orthanc.get_changes()

# Find objects by query
query = {'Level': 'Patient',
            'Query': {'PatientName': 'Jon*'},
        }
orthanc.find(query)

# Get previous queries
orthanc.get_queries()

There are other preconfigured endpoints.

Authenticated Endpoints

Pass valid auth object:

from requests.auth import HTTPBasicAuth
auth = HTTPBasicAuth('orthanc', 'orthanc')
orthanc = Orthanc('https://test.server.com', auth=auth)

Then call functions normally (the auth object is passed automatically).

For further help:

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

orthanc_rest_client-0.5.4.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

orthanc_rest_client-0.5.4-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file orthanc_rest_client-0.5.4.tar.gz.

File metadata

  • Download URL: orthanc_rest_client-0.5.4.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for orthanc_rest_client-0.5.4.tar.gz
Algorithm Hash digest
SHA256 7d20ee242a792e52ce42f784046df88dac0fd05079989c6e33d54f028c81a492
MD5 1ce8779e76ef425c3a7eb580aec886f2
BLAKE2b-256 39a7cc586cfa676438627c9fbc7bb6e34ee17d9b16ba409a9e0a9430cc962f30

See more details on using hashes here.

File details

Details for the file orthanc_rest_client-0.5.4-py3-none-any.whl.

File metadata

  • Download URL: orthanc_rest_client-0.5.4-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for orthanc_rest_client-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ee3d55906eb29a7dea9a1f59c7903419498ce9559622a18746f78c9c8344c7f4
MD5 2dd0b0c0e5dd7cfbea1a455ad0d08b94
BLAKE2b-256 5fd1919915d8ca294a2cf695771f899fd76c7b78d48e67779e15bb95679cca86

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