Skip to main content

Ambra-SDK

License PyPI version


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

Metadata

Release files for ambra-sdk 3.22.4.0.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ambra-sdk 3.22.4.0.post1
File Size Uploaded
ambra-sdk-3.22.4.0.post1.tar.gz 233.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ambra-sdk 3.22.4.0.post1
File Interpreter ABI Platform
ambra_sdk-3.22.4.0.post1-py3-none-any.whl Python 3 none any Details

Total release size: 546.7 kB

Release files / ambra-sdk-3.22.4.0.post1.tar.gz

Download URL ambra-sdk-3.22.4.0.post1.tar.gz
Size 233.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b7bc7aeb2346b113cc135fe175373ca169674c394dbb4eea409a6a56138de534
BLAKE2b-256 checksum
How to use checksums
5553cc2546f696e1df1fc13826123609fc419a2d1af52eb1685f9b05660e172d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.6.8 Linux/3.10.0-1062.12.1.el7.x86_64

Release files / ambra_sdk-3.22.4.0.post1-py3-none-any.whl

Download URL ambra_sdk-3.22.4.0.post1-py3-none-any.whl
Size 312.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e96a7155f8352745ebe3f1aed4fabf5ed0da3284b9d7375fd8d1d72fe493aec0
BLAKE2b-256 checksum
How to use checksums
f7d6d18657dcc29fb2daeaaa80059e9870c61fc8f8f25d9c434a622eda2292a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.6.8 Linux/3.10.0-1062.12.1.el7.x86_64
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page