{"id":3656,"library":"mypy-boto3-omics","title":"mypy-boto3-omics","description":"mypy-boto3-omics provides type annotations for the AWS boto3 Omics service, enhancing developer experience with static type checking, improved IDE autocompletion, and early error detection for Python code. It is currently at version 1.42.78 and is frequently updated to align with boto3 releases, as it's generated by the mypy-boto3-builder project.","status":"active","version":"1.42.78","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","types","type-stubs","omics","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-omics","lang":"bash","label":"Install specific service stubs"},{"cmd":"pip install 'boto3-stubs[omics]' --force-reinstall","lang":"bash","label":"Install as part of boto3-stubs (recommended)"}],"dependencies":[{"reason":"Runtime dependency for the AWS SDK functions that these stubs type-check. Must be installed separately.","package":"boto3","optional":false},{"reason":"Required for static type checking; this package provides the type definitions for mypy to consume.","package":"mypy","optional":false}],"imports":[{"symbol":"OmicsClient","correct":"from mypy_boto3_omics import OmicsClient"},{"note":"Use `TYPE_CHECKING` to avoid runtime dependency on mypy-boto3-omics if only needed for static analysis.","symbol":"OmicsClient","correct":"if TYPE_CHECKING:\n    from mypy_boto3_omics import OmicsClient"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\n# Recommended: Use TYPE_CHECKING guard to avoid runtime dependency on type stubs\nif TYPE_CHECKING:\n    from mypy_boto3_omics import OmicsClient\n    from mypy_boto3_omics.type_defs import ListReferencesResponseTypeDef\n\ndef list_omics_references() -> None:\n    # Initialize the Omics client with type hints\n    omics_client: OmicsClient = boto3.client(\"omics\")\n\n    print(\"Listing Omics references...\")\n    try:\n        response: ListReferencesResponseTypeDef = omics_client.list_references(referenceStoreId=\"some-store-id\") # Replace with a valid store ID\n        for ref in response.get(\"references\", []):\n            print(f\"  - Reference: {ref.get('name')}, Status: {ref.get('status')}\")\n    except omics_client.exceptions.ResourceNotFoundException:\n        print(\"Error: Reference store not found. Please provide a valid referenceStoreId.\")\n    except Exception as e:\n        print(f\"An unexpected error occurred: {e}\")\n\nif __name__ == \"__main__\":\n    # Ensure boto3 is installed (pip install boto3) and AWS credentials are configured\n    # For this example, 'some-store-id' needs to be a valid Omics Reference Store ID\n    # in your AWS account and region with appropriate permissions.\n    list_omics_references()","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-omics` to add type hints to your `boto3` Omics client. It includes importing the `OmicsClient` type, initializing a type-hinted client, and making a sample API call. Remember to replace placeholder values like 'some-store-id' with actual values from your AWS environment. The `TYPE_CHECKING` guard ensures the stub package is only a development dependency."},"warnings":[{"fix":"Upgrade Python to 3.9 or newer.","message":"Support for Python 3.8 was removed starting with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade their Python version to use recent versions of `mypy-boto3-omics`.","severity":"breaking","affected_versions":">=8.12.0 (builder version)"},{"fix":"Update explicit `TypeDef` references in your code to match the new generated names. Refer to the specific service's documentation or the `mypy_boto3_omics.type_defs` module for the correct names.","message":"TypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. Some generated TypeDef names might have become shorter or had postfixes moved, potentially breaking code that explicitly referenced the old generated names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`).","severity":"breaking","affected_versions":">=8.9.0 (builder version)"},{"fix":"Ensure `boto3` is installed in your environment: `pip install boto3`.","message":"This package provides *only* type stubs. You must install `boto3` separately (e.g., `pip install boto3`) for your code to run. Without `boto3`, you will encounter runtime `ModuleNotFoundError` or similar issues.","severity":"gotcha","affected_versions":"All"},{"fix":"Wrap type imports like `from mypy_boto3_omics import OmicsClient` inside `if TYPE_CHECKING:` blocks. When not type checking, define a dummy `object` type for these symbols.","message":"For optimal performance and to avoid unnecessary runtime dependencies, it is recommended to wrap type stub imports within an `if TYPE_CHECKING:` block. This makes `mypy-boto3-omics` purely a development dependency.","severity":"gotcha","affected_versions":"All"},{"fix":"Use `boto3-stubs-lite` or configure PyCharm to use external type checkers like `mypy` or `pyright`.","message":"When using PyCharm, performance issues with `Literal` overloads have been reported (issue PY-40997). If you experience slowness, consider using `boto3-stubs-lite` (e.g., `pip install 'boto3-stubs-lite[omics]'`) or disabling PyCharm's internal type checker in favor of `mypy` or `pyright`.","severity":"gotcha","affected_versions":"All, specifically with PyCharm"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}