Skip to main content

EXACT-Sync

PyPI version fury.io MIT license

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

Browsable-API

Example Notebooks

In the folder examples

Pip

pip install EXACT-Sync

Tests

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

Basic features:

Connect to server

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)

Authentication by token:

configuration = Configuration()
configuration.token = 'pat_....<your token here>'
configuration.host = "http://127.0.0.1:8000"

client = ApiClient(configuration)
image_sets_api = ImageSetsApi(client)

Get image set information

image_sets = image_sets_api.list_image_sets(name="cluster_asthma_imageset")
image_sets

Upload image to image set

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
images_api.download_image(id=image_id, target_path=image_path, original_image=True)

Download image annotations

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

Get a snapshot centered on a coordinate

snapshot = images_api.get_snapshot(image_source=image.id, x=1000, y=1000, size_x=512, size_y=512)
snapshot.save('snapshot.png')

Automatic retries on gateway errors

All API objects retry requests that fail with a transient gateway error (HTTP 502, 503 or 504) using exponential backoff (0.5s, 1s, 2s, ... up to 5 attempts). Retrying is enabled by default and works for synchronous and async_req=True calls.

images_api = ImagesApi(client)                 # retries enabled (default)
images_api = ImagesApi(client, retry=False)    # retries disabled
images_api.retry = False                       # or toggle later

# optional tuning, per instance or per class
images_api.retry_max_attempts = 3
images_api.retry_backoff = 1.0
images_api.retry_statuses = (502,)

Note: non-idempotent requests (e.g. create_*) are retried as well, so in rare cases a request that the server already processed could be executed twice.

Metadata

Release files for EXACT-Sync 0.0.41

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

Source distribution (sdist)

Source distribution for EXACT-Sync 0.0.41
File Size Uploaded Provenance
exact_sync-0.0.41.tar.gz 78.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for EXACT-Sync 0.0.41
File Interpreter ABI Platform
exact_sync-0.0.41-py3-none-any.whl Python 3 none any Details

Total release size: 234.8 kB

Release files / exact_sync-0.0.41.tar.gz

Download URL exact_sync-0.0.41.tar.gz
Size 78.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a6c9cad96cd344911c9ae858afe31f70c2e94290fa1c54bec1f4bca31d0428ee
BLAKE2b-256 checksum
How to use checksums
098a5d26e13dff83dd0e31a9dee2092a36b11b6942e04d6c8915b0d1d6e58539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / exact_sync-0.0.41-py3-none-any.whl

Download URL exact_sync-0.0.41-py3-none-any.whl
Size 156.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d5c0eaafe9b0a8b83c082ff75994602e2d62ce7cd54a8962e569de4c2a32dbe
BLAKE2b-256 checksum
How to use checksums
11e8b24c30b22b61332535dcb29f03bc186506071242fefb5fe9042d671dbbe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Security for EXACT-Sync 0.0.41

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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