{"id":3634,"library":"mypy-boto3-medical-imaging","title":"Type annotations for boto3 HealthImaging","description":"mypy-boto3-medical-imaging provides type annotations for the `boto3` HealthImaging (Medical Imaging) service. It allows static type checkers like MyPy to validate usage of `boto3` clients, resources, and session methods, enhancing code quality and developer experience. The current version is 1.42.81, and new versions are released frequently, typically mirroring `boto3` releases or `mypy-boto3-builder` updates.","status":"active","version":"1.42.81","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","medical-imaging","health-imaging","mypy","types","type-hints","stubs"],"install":[{"cmd":"pip install mypy-boto3-medical-imaging","lang":"bash","label":"Install package"}],"dependencies":[{"reason":"This package provides type stubs for boto3. The `boto3` library itself is required at runtime to use these stubs.","package":"boto3","optional":false},{"reason":"Used for compatibility with older Python versions for advanced typing features. Automatically managed by mypy-boto3-builder.","package":"typing-extensions","optional":true}],"imports":[{"symbol":"HealthImagingClient","correct":"from mypy_boto3_medical_imaging.client import HealthImagingClient"},{"note":"Type definitions for response/request payloads are typically in `type_defs`, not `client` or `service_resource`.","wrong":"from mypy_boto3_medical_imaging.client import CreateImageSetOutputTypeDef","symbol":"CreateImageSetOutputTypeDef","correct":"from mypy_boto3_medical_imaging.type_defs import CreateImageSetOutputTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_medical_imaging.client import HealthImagingClient\nfrom mypy_boto3_medical_imaging.type_defs import ListImageSetsOutputTypeDef\n\n# Ensure you have boto3 installed and configured for AWS access\n# Example for a typed HealthImaging client\nclient: HealthImagingClient = boto3.client(\"health-imaging\")\n\ntry:\n    # List image sets in a data store\n    response: ListImageSetsOutputTypeDef = client.list_image_sets(datastoreId=\"YOUR_DATASTORE_ID\")\n    print(f\"Successfully listed {len(response.get('imageSets', []))} image sets.\")\n    if response.get('imageSets'):\n        print(f\"First image set ID: {response['imageSets'][0]['imageSetId']}\")\nexcept client.exceptions.ResourceNotFoundException:\n    print(\"Data store not found. Please provide a valid datastoreId.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize a type-hinted `boto3` HealthImaging client and perform a basic operation (listing image sets). It highlights importing the specific client type and a response type definition for improved static analysis."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. If you must use Python 3.8, pin `mypy-boto3-medical-imaging` to an older version (e.g., <1.42.81) or use `mypy`'s `--python-version` flag carefully.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. This means `mypy-boto3-medical-imaging` versions built with 8.12.0 or newer (like 1.42.81) no longer support Python 3.8.","severity":"breaking","affected_versions":">=1.42.81"},{"fix":"Ensure your `mypy` version is up-to-date. If you have custom `mypy` plugins or path configurations, you may need to review them. For most users, a simple `pip install -U mypy` should suffice.","message":"As of `mypy-boto3-builder` version 8.12.0, all generated `mypy-boto3-*` packages, including `mypy-boto3-medical-imaging`, migrated to PEP 561 compliance. This changes the internal package structure, which could potentially affect tools or custom `mypy` configurations that relied on the previous layout.","severity":"breaking","affected_versions":">=1.42.81"},{"fix":"Always use the correct `boto3` service name: `boto3.client(\"health-imaging\")`.","message":"The `boto3` service name for Medical Imaging is 'health-imaging', not 'medical-imaging'. Attempting to use `boto3.client(\"medical-imaging\")` will result in a `UnknownServiceError` at runtime.","severity":"gotcha","affected_versions":"All"},{"fix":"Keep `boto3` and `mypy-boto3-medical-imaging` (and other `mypy-boto3-*` stubs) reasonably synchronized. The `mypy-boto3` packages typically list `boto3` as a dependency with a version constraint to help ensure compatibility.","message":"The `mypy-boto3-*` stubs are generated for specific `boto3` versions. Using significantly mismatched versions (e.g., a very old `boto3` with the latest stubs, or vice-versa) can lead to incorrect type-checking warnings or errors, as the API signatures may have changed.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}