{"id":3676,"library":"mypy-boto3-proton","title":"mypy-boto3-proton Type Stubs","description":"Type annotations for boto3 Proton 1.42.3 service generated with mypy-boto3-builder 8.12.0. This library provides type stubs, not the actual `boto3` implementation, to enable static type checking for AWS Proton operations. It is frequently updated to align with `boto3` and `botocore` releases, often multiple times a month.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","mypy","type-hints","aws","proton","static-analysis"],"install":[{"cmd":"pip install boto3 mypy-boto3-proton","lang":"bash","label":"Install boto3 and mypy-boto3-proton"}],"dependencies":[{"reason":"Runtime dependency for AWS SDK functionality; mypy-boto3-proton provides only type stubs.","package":"boto3","optional":false}],"imports":[{"symbol":"ProtonClient","correct":"from mypy_boto3_proton.client import ProtonClient"},{"note":"Paginators are specific to list operations, e.g., ListComponentsPaginator.","symbol":"Paginator","correct":"from mypy_boto3_proton.paginator import ListComponentsPaginator"},{"note":"Type definitions are available in the `type_defs` module.","symbol":"TypeDefs","correct":"from mypy_boto3_proton.type_defs import CreateEnvironmentInputRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_proton.client import ProtonClient\nfrom mypy_boto3_proton.type_defs import ListEnvironmentsOutputTypeDef\n\n# Ensure boto3 is installed: pip install boto3\n# Ensure stubs are installed: pip install mypy-boto3-proton\n\ndef get_proton_environments(client: ProtonClient) -> ListEnvironmentsOutputTypeDef:\n    \"\"\"Lists Proton environments using a type-hinted client.\"\"\"\n    response = client.list_environments()\n    return response\n\nif __name__ == \"__main__\":\n    # Initialize a boto3 client (region may vary)\n    # Use a region where Proton is available, e.g., 'us-west-2'\n    boto3_client = boto3.client(\"proton\", region_name=\"us-west-2\")\n\n    # Type-hint the boto3 client with mypy-boto3-proton's Client\n    proton_client: ProtonClient = boto3_client\n\n    print(\"Listing Proton environments:\")\n    try:\n        environments_data = get_proton_environments(proton_client)\n        for env in environments_data.get(\"environments\", []):\n            print(f\"  Environment: {env['name']} ({env['arn']}) - {env['provisioning']}\")\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Please ensure you have AWS credentials configured and Proton is available in 'us-west-2'.\")","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` client and apply `mypy-boto3-proton` type hints to enable static analysis for AWS Proton operations, then lists environments."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Support for Python 3.8 was removed with the underlying `mypy-boto3-builder` version 8.12.0. Projects using `mypy-boto3` stubs will now require Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"Verify `mypy` continues to correctly resolve imports. Ensure `mypy-boto3-proton` is installed in a standard location.","message":"The `mypy-boto3-builder` (version 8.12.0) migrated to the PEP 561 package format. While generally seamless, if you have custom `mypy` configurations or non-standard module resolution, this change *could* impact stub discovery.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"Review and update explicit `TypeDef` imports in your codebase according to the new naming conventions.","message":"In `mypy-boto3-builder` version 8.9.0, TypeDef names for packed method arguments were shortened (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`). If you explicitly import these TypeDefs, your code may break upon upgrading.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Ensure `pip install boto3` is part of your project's dependencies.","message":"This package provides only type stubs for `boto3`. The actual `boto3` library must be installed and available at runtime for your code to function.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Regularly update `mypy-boto3-proton` alongside `boto3`. For example, if `boto3` is `1.x.y`, install `mypy-boto3-proton` `1.x.y`.","message":"For optimal type checking, it's crucial to align `mypy-boto3-proton`'s version with your `boto3` version. Mismatched versions can lead to incorrect type hints, missing attributes, or `mypy` errors if service APIs differ.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.42.3':12 '8.12.0':20 'actual':28 'align':45 'analysi':65 'annot':8 'aw':37,61 'boto3':3,10,18,29,47,56 'botocor':49 'builder':19 'check':35 'enabl':32 'frequent':42 'generat':14 'hint':60 'implement':30 'librari':22 'month':55 'multipl':52 'mypi':2,17,57 'mypy-boto3-builder':16 'mypy-boto3-proton':1 'often':51 'oper':39 'proton':4,11,38,62 'provid':23 'releas':50 'servic':13 'static':33,64 'static-analysi':63 'stub':6,25 'time':53 'type':5,7,24,34,59 'type-hint':58 'updat':43","created_at":"2026-04-11T17:39:55.761760+00:00","updated_at":"2026-04-16T17:09:04.868250+00:00","problems":{"verify_error":"error: Failed to parse: `boto3 mypy-boto3-proton`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `m`\nboto3 mypy-boto3-proton\n      ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_proton/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-proton/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-05","install_tag":null}}