Metadata-Version: 2.1
Name: ambra-sdk
Version: 3.20.6.0.post1
Summary: Ambrahealth python SDK
Home-page: https://github.com/dicomgrid/sdk-python
License: Apache-2.0
Keywords: ambrahealth,ambra
Author: Ambrahealth AI team
Author-email: python-sdk@ambrahealth.com
Maintainer: Alexander Kapustin
Maintainer-email: akapustin@ambrahealth.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: aiohttp (>=3.6.2,<4.0.0)
Requires-Dist: pydicom (>=2.0.0,<3.0.0)
Requires-Dist: python-box (>=5.1.1,<6.0.0)
Requires-Dist: requests (>=2.24.0,<3.0.0)
Project-URL: Documentation, https://dicomgrid.github.io/sdk-python/index.html
Project-URL: Repository, https://github.com/dicomgrid/sdk-python
Description-Content-Type: text/markdown

# Ambra-SDK

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![PyPI version](https://badge.fury.io/py/ambra-sdk.svg)](https://badge.fury.io/py/ambra-sdk)



---

Welcome to ambra-sdk library for intract with ambrahealth service and storage api. 


## Quickstart

```bash
pip install ambra-sdk
```

## Running

```python
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

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

