{"id":3348,"library":"mypy-boto3-codecatalyst","title":"mypy-boto3-codecatalyst Type Stubs","description":"mypy-boto3-codecatalyst provides comprehensive type annotations for the AWS CodeCatalyst service within the `boto3` library. It enables static type checking with tools like MyPy, Pyright, and enhances IDE features like auto-completion and error detection for `boto3.client('codecatalyst')`. The library is actively maintained and generated with `mypy-boto3-builder`, following a frequent release cadence to align with `boto3` updates.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","type-stubs","codecatalyst","typing","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-codecatalyst boto3","lang":"bash","label":"Install standalone stubs with boto3"},{"cmd":"pip install 'boto3-stubs[codecatalyst]'","lang":"bash","label":"Recommended: Install via boto3-stubs with extras"}],"dependencies":[{"reason":"Provides the core AWS SDK functionality for which these are type stubs. Required for runtime operations.","package":"boto3"}],"imports":[{"note":"The type annotation for the client comes from the mypy-boto3 stubs, not directly from the boto3 client module itself.","wrong":"from boto3.client import CodeCatalystClient","symbol":"CodeCatalystClient","correct":"from mypy_boto3_codecatalyst import CodeCatalystClient"},{"note":"Type definitions for API call responses are available in the `type_defs` submodule.","symbol":"ListDevEnvironmentsResponseTypeDef","correct":"from mypy_boto3_codecatalyst.type_defs import ListDevEnvironmentsResponseTypeDef"}],"quickstart":{"code":"import boto3\nfrom boto3.session import Session\nfrom mypy_boto3_codecatalyst import CodeCatalystClient\nimport os\n\n# Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials)\n# For a runnable example, we'll simulate an empty config if not set\n\n# Explicitly set up a session for clarity, though boto3.client() uses a default session\nsession = Session(\n    aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),\n    aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET'),\n    region_name=os.environ.get('AWS_REGION', 'us-east-1')\n)\n\n# Get a typed CodeCatalyst client\nclient: CodeCatalystClient = session.client(\"codecatalyst\")\n\n# Now, the 'client' object is fully type-checked by MyPy and provides IDE auto-completion\n# For example, calling a method with incorrect arguments will be flagged.\n# try:\n#    response = client.list_dev_environments(InvalidArg=True) # This would be a type error\n# except Exception as e:\n#    print(f\"Expected error: {e}\")\n\nresponse = client.list_dev_environments()\nprint(f\"Successfully called list_dev_environments. Found {len(response.get('items', []))} dev environments.\")\n\n# Access type-safe response data\n# if response['items']:\n#     first_env_name = response['items'][0]['devEnvironmentName']","lang":"python","description":"This quickstart demonstrates how to obtain a type-annotated `CodeCatalystClient` using `mypy-boto3-codecatalyst`. This enables full type checking and IDE assistance for all CodeCatalyst service operations."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or a later version.","message":"Support for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 (and consequently for packages built with it). Projects using this library must upgrade to Python 3.9 or newer.","severity":"breaking","affected_versions":">=8.12.0 (builder), >=1.42.0 (stubs)"},{"fix":"Review and update TypeDef imports and usage in your codebase to reflect the new naming conventions. Consult the `mypy-boto3-builder` release notes for exact changes if upgrading from older versions.","message":"TypeDef names for method arguments and conflicting TypeDefs were renamed in `mypy-boto3-builder` version 8.9.0. Specifically, `RequestRequestTypeDef` was shortened to `RequestTypeDef` and `ExtraRequestTypeDef` was changed to `RequestExtraTypeDef`.","severity":"breaking","affected_versions":">=8.9.0 (builder)"},{"fix":"Ensure `boto3` is installed alongside `mypy-boto3-codecatalyst` using `pip install boto3 mypy-boto3-codecatalyst`.","message":"This package provides type stubs only; `boto3` itself must be installed separately for the code to run. The type stubs are compile-time dependencies, while `boto3` is a runtime dependency.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Prefer `pip install 'boto3-stubs[codecatalyst]'` over `pip install mypy-boto3-codecatalyst` for optimal type checking integration within a `boto3` environment.","message":"While direct installation of `mypy-boto3-codecatalyst` works, the recommended approach for `boto3` users is to install `boto3-stubs` with the service extra (e.g., `pip install 'boto3-stubs[codecatalyst]'`). This method often provides better overall type inference and compatibility across services by leveraging `boto3-stubs`'s session overloads.","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"}