Ambrahealth python SDK
Project description
Ambra-SDK
Welcome to ambra-sdk library for intract with ambrahealth service and storage api.
Quickstart
pip install ambra-sdk
Running
from ambra_sdk.api import Api
from ambra_sdk.models import Study
from ambra_sdk.service.filtering import Filter, FilterCondition
from ambra_sdk.service.sorting import Sorter, SortingOrder
# Usually, URL has a form:
# url = https://ambrahealth_host/api/v3
# username and password - ambrahealth credentials.
api = Api.with_creds(url, username, password)
user_info = api.Session.user().get()
studies = api \
.Study \
.list() \
.filter_by(
Filter(
'phi_namespace',
FilterCondition.equals,
user_info.namespace_id,
),
) \
.only([Study.study_uid, Study.image_count]) \
.sort_by(
Sorter(
'created',
SortingOrder.ascending,
),
) \
.all()
for study in studies:
print(study.study_uid, study.image_count)
License
Ambra-SDK is licensed under the terms of the Apache-2.0 License (see the file LICENSE).
Read the docs
Documentation: https://dicomgrid.github.io/sdk-python/index.html
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
ambra-sdk-3.21.6.0.post1.tar.gz
(215.8 kB
view hashes)
Built Distribution
Close
Hashes for ambra_sdk-3.21.6.0.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f628c5ca29d28ad92f798dedcfa564ebb7a7b311049e0eb6a5a5498aab8e737a |
|
MD5 | 7e7b123aa3ec3a747995fa13708c88b8 |
|
BLAKE2b-256 | 0e913cbff6f1dba68464dbe5a7f2a7a29b063727c71f1cc8ba72da4e9d1977e3 |