%global _empty_manifest_terminate_build 0
Name:		python-EXCAT-Sync
Version:	0.0.38
Release:	1
Summary:	A package to download images and annotations from the EXACT Server https://github.com/ChristianMarzahl/Exact
License:	MIT License
URL:		https://github.com/ChristianMarzahl/EXACT-Sync
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/a8/99/1d5dbcaca4f30d411ace78a5add6fe676344e48674e73d806fd53caad46a/EXCAT-Sync-0.0.38.tar.gz
BuildArch:	noarch

Requires:	python3-requests
Requires:	python3-tqdm
Requires:	python3-requests-toolbelt
Requires:	python3-pillow
Requires:	python3-locust

%description
# EXACT-Sync

[![PyPI version fury.io](https://badge.fury.io/py/EXCAT-Sync.svg)](https://pypi.python.org/pypi/EXCAT-Sync/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)



Rest API sync with the EXACT Server https://github.com/ChristianMarzahl/Exact

[Browsable-API](https://documenter.getpostman.com/view/11308910/TVYF6xZo)

## Example Notebooks

In the folder examples

## Pip

pip install EXCAT-Sync

## Tests

with a lot of implementation examples
/exact_sync/v1/test


### Basic features:

#### Connect to server

```python
configuration = Configuration()
configuration.username = 'exact'
configuration.password = 'exact'
configuration.host = "http://127.0.0.1:8000"

client = ApiClient(configuration)

image_sets_api = ImageSetsApi(client)
annotations_api = AnnotationsApi(client)
annotation_types_api = AnnotationTypesApi(client)
images_api = ImagesApi(client)
product_api = ProductsApi(client)
team_api = TeamsApi(client)
```


#### Get image set information
```python
image_sets = image_sets_api.list_image_sets(name="cluster_asthma_imageset")
image_sets
```

#### Upload image to image set

```python
image_type = int(Image.ImageSourceTypes.DEFAULT)
image = images_api.create_image(file_path=target_file, image_type=image_type, image_set=image_set.id).results[0]
```

##### Donwload image from image set

```python
images_api.download_image(id=image_id, target_path=image_path, original_image=True)
```

#### Download image annotations 

```python
annotations_api.list_annotations(pagination=False, async_req=True, image=image.id)
```




%package -n python3-EXCAT-Sync
Summary:	A package to download images and annotations from the EXACT Server https://github.com/ChristianMarzahl/Exact
Provides:	python-EXCAT-Sync
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-EXCAT-Sync
# EXACT-Sync

[![PyPI version fury.io](https://badge.fury.io/py/EXCAT-Sync.svg)](https://pypi.python.org/pypi/EXCAT-Sync/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)



Rest API sync with the EXACT Server https://github.com/ChristianMarzahl/Exact

[Browsable-API](https://documenter.getpostman.com/view/11308910/TVYF6xZo)

## Example Notebooks

In the folder examples

## Pip

pip install EXCAT-Sync

## Tests

with a lot of implementation examples
/exact_sync/v1/test


### Basic features:

#### Connect to server

```python
configuration = Configuration()
configuration.username = 'exact'
configuration.password = 'exact'
configuration.host = "http://127.0.0.1:8000"

client = ApiClient(configuration)

image_sets_api = ImageSetsApi(client)
annotations_api = AnnotationsApi(client)
annotation_types_api = AnnotationTypesApi(client)
images_api = ImagesApi(client)
product_api = ProductsApi(client)
team_api = TeamsApi(client)
```


#### Get image set information
```python
image_sets = image_sets_api.list_image_sets(name="cluster_asthma_imageset")
image_sets
```

#### Upload image to image set

```python
image_type = int(Image.ImageSourceTypes.DEFAULT)
image = images_api.create_image(file_path=target_file, image_type=image_type, image_set=image_set.id).results[0]
```

##### Donwload image from image set

```python
images_api.download_image(id=image_id, target_path=image_path, original_image=True)
```

#### Download image annotations 

```python
annotations_api.list_annotations(pagination=False, async_req=True, image=image.id)
```




%package help
Summary:	Development documents and examples for EXCAT-Sync
Provides:	python3-EXCAT-Sync-doc
%description help
# EXACT-Sync

[![PyPI version fury.io](https://badge.fury.io/py/EXCAT-Sync.svg)](https://pypi.python.org/pypi/EXCAT-Sync/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)



Rest API sync with the EXACT Server https://github.com/ChristianMarzahl/Exact

[Browsable-API](https://documenter.getpostman.com/view/11308910/TVYF6xZo)

## Example Notebooks

In the folder examples

## Pip

pip install EXCAT-Sync

## Tests

with a lot of implementation examples
/exact_sync/v1/test


### Basic features:

#### Connect to server

```python
configuration = Configuration()
configuration.username = 'exact'
configuration.password = 'exact'
configuration.host = "http://127.0.0.1:8000"

client = ApiClient(configuration)

image_sets_api = ImageSetsApi(client)
annotations_api = AnnotationsApi(client)
annotation_types_api = AnnotationTypesApi(client)
images_api = ImagesApi(client)
product_api = ProductsApi(client)
team_api = TeamsApi(client)
```


#### Get image set information
```python
image_sets = image_sets_api.list_image_sets(name="cluster_asthma_imageset")
image_sets
```

#### Upload image to image set

```python
image_type = int(Image.ImageSourceTypes.DEFAULT)
image = images_api.create_image(file_path=target_file, image_type=image_type, image_set=image_set.id).results[0]
```

##### Donwload image from image set

```python
images_api.download_image(id=image_id, target_path=image_path, original_image=True)
```

#### Download image annotations 

```python
annotations_api.list_annotations(pagination=False, async_req=True, image=image.id)
```




%prep
%autosetup -n EXCAT-Sync-0.0.38

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-EXCAT-Sync -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Tue May 30 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.38-1
- Package Spec generated