{"id":3658,"library":"mypy-boto3-osis","title":"mypy-boto3-osis Type Annotations","description":"Type annotations for the `boto3` OpenSearch Ingestion (OSIS) service (version 1.42.3), generated with `mypy-boto3-builder`. These stubs provide type hints for IDEs and static analyzers like Mypy and Pyright, enhancing the development experience for AWS SDK users by offering autocompletion and early error detection. The library maintains an active release cadence, typically syncing with `boto3` versions.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["type-hints","aws","boto3","mypy","osis","static-analysis","stubs"],"install":[{"cmd":"pip install mypy-boto3-osis","lang":"bash","label":"Standalone installation"},{"cmd":"pip install 'boto3-stubs[osis]'","lang":"bash","label":"Install via boto3-stubs extras"}],"dependencies":[{"reason":"This package provides type stubs for the `boto3` library; `boto3` itself must be installed separately for runtime functionality.","package":"boto3","optional":false}],"imports":[{"symbol":"OSISClient","correct":"from mypy_boto3_osis.client import OSISClient"},{"note":"Type definitions for service responses and requests are located in `type_defs`.","symbol":"ListPipelinesResponseTypeDef","correct":"from mypy_boto3_osis.type_defs import ListPipelinesResponseTypeDef"},{"note":"Literals for service names and other string-based enums improve type checking for arguments.","symbol":"OSISServiceName","correct":"from mypy_boto3_osis.literals import OSISServiceName"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_osis.client import OSISClient\nfrom mypy_boto3_osis.type_defs import ListPipelinesResponseTypeDef\n\n# A boto3 session, typically configured via environment variables or AWS CLI\n# For quickstart, we assume default configuration or minimal environment setup.\n# Ensure AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION are set in env if not using default profile.\n\ndef get_osis_pipelines() -> ListPipelinesResponseTypeDef:\n    # Initialize the boto3 client with type annotations\n    client: OSISClient = boto3.client(\"osis\")\n    \n    # Use a type-hinted client\n    response: ListPipelinesResponseTypeDef = client.list_pipelines()\n    \n    print(f\"Found {len(response.get('Pipelines', []))} OSIS pipelines.\")\n    for pipeline in response.get('Pipelines', []):\n        print(f\"  - {pipeline.get('PipelineName')}\")\n        \n    return response\n\nif __name__ == \"__main__\":\n    try:\n        get_osis_pipelines()\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Ensure 'boto3' is installed and AWS credentials/region are configured.\")\n","lang":"python","description":"This quickstart demonstrates how to initialize a type-hinted `boto3` OpenSearch Ingestion client and call `list_pipelines`. The `OSISClient` and `ListPipelinesResponseTypeDef` provide static type checking and autocompletion for method calls and response structures."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or higher.","message":"Starting with `mypy-boto3-builder` version 8.12.0, Python 3.8 is no longer supported for any generated `mypy-boto3-*` packages. Users must upgrade to Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0 (affecting mypy-boto3-osis 1.42.3 and later)"},{"fix":"Review your code for explicit TypeDef imports and adjust names according to the new conventions or rely on IDE autocompletion for correct names.","message":"In `mypy-boto3-builder` version 8.9.0, there were breaking changes to TypeDef naming conventions. Specifically, TypeDefs for packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). While the specific names may vary per service, this change affects type hints for service-specific request/response structures.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0 (potentially affecting mypy-boto3-osis 1.42.3 and later)"},{"fix":"Ensure `boto3` is installed in your environment: `pip install boto3`.","message":"This package (`mypy-boto3-osis`) provides only type stubs. For the code to run, the actual `boto3` library must be installed separately. The stubs enhance the development experience but do not provide runtime functionality.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your type checkers (e.g., mypy, pyright) and IDEs are updated to their latest versions. If issues persist, verify `sys.path` and `mypy` configuration.","message":"As of `mypy-boto3-builder` 8.12.0, all packages migrated to PEP 561 compliance. This is generally an improvement for type checker discovery but might require tools like `mypy` or IDEs to be updated to their latest versions to correctly find and utilize the stubs, especially in complex project setups.","severity":"gotcha","affected_versions":"mypy-boto3-builder >=8.12.0 (affecting mypy-boto3-osis 1.42.3 and later)"},{"fix":"Always explicitly annotate the return type of `boto3.client()` and similar calls, e.g., `client: OSISClient = boto3.client(\"osis\")`.","message":"While many IDEs (like PyCharm) and `mypy` can often infer types automatically, explicit type annotations for `boto3.client()`, `session.client()`, `client.get_waiter()`, and `client.get_paginator()` calls are highly recommended, especially for VSCode users, to ensure full autocompletion and accurate type hints.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}