{"id":3357,"library":"mypy-boto3-devops-guru","title":"mypy-boto3-devops-guru Type Stubs","description":"mypy-boto3-devops-guru provides type annotations for the AWS boto3 DevOps Guru service, generated with mypy-boto3-builder. It enhances type checking for boto3 clients, resources, and various service-specific data structures. The current version is 1.42.3, and it follows a frequent release cadence, often aligning with new boto3 releases and updates to the mypy-boto3-builder.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","boto3","mypy","type-hints","devops-guru","type-stubs"],"install":[{"cmd":"pip install mypy-boto3-devops-guru","lang":"bash","label":"Install service stubs"},{"cmd":"pip install boto3","lang":"bash","label":"Install runtime dependency (if not already present)"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself is required at runtime.","package":"boto3","optional":false},{"reason":"May be required for older Python versions or specific type features.","package":"typing-extensions","optional":true}],"imports":[{"wrong":"from mypy_boto3_devops_guru import DevOpsGuruClient","symbol":"DevOpsGuruClient","correct":"from mypy_boto3_devops_guru import DevOpsGuruClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_devops_guru import DevOpsGuruClient\nfrom mypy_boto3_devops_guru.type_defs import DescribeAccountHealthResponseTypeDef\n\n# Instantiate the boto3 client, typed with mypy-boto3 stubs\nclient: DevOpsGuruClient = boto3.client(\n    \"devops-guru\", \n    aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),\n    aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''),\n    region_name=os.environ.get('AWS_REGION', 'us-east-1')\n)\n\ntry:\n    # Call a service method\n    response: DescribeAccountHealthResponseTypeDef = client.describe_account_health()\n    print(f\"Account health details: {response}\")\nexcept Exception as e:\n    print(f\"Error describing account health: {e}\")","lang":"python","description":"Demonstrates how to import and use the `DevOpsGuruClient` type stub with a boto3 client, and how to use a specific TypedDict for a response. This allows static type checkers like MyPy to validate client calls and response structures."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or later. If you must use Python 3.8, pin to an older `mypy-boto3-devops-guru` version (e.g., `<1.42.0`) and its corresponding `mypy-boto3-builder` version.","message":"Starting with `mypy-boto3-builder` version 8.12.0 (which generated current stubs), Python 3.8 support was removed for all generated `mypy-boto3-*` packages. Ensure your project uses Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0, mypy-boto3-devops-guru >=1.42.x"},{"fix":"Ensure `pip install boto3` is part of your project's dependency setup.","message":"These packages provide only type stubs. You must install `boto3` (and optionally `botocore`) separately for the runtime functionality. Not installing `boto3` will lead to `ModuleNotFoundError` at runtime, even if type checks pass.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When updating `boto3`, also update all `mypy-boto3-*` stub packages to their latest compatible versions. Generally, `pip install --upgrade boto3 mypy-boto3-devops-guru` is recommended.","message":"Mismatched versions between `boto3` and `mypy-boto3-*` stubs can lead to `mypy` errors or incorrect type hints. The stubs are generated based on specific `boto3` service definitions.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always verify the correct service name in the `boto3` documentation. If a service name changes, update the stub package import path and the client instantiation accordingly.","message":"AWS service names can change over time, or have variations (e.g., `sms-voice` vs. `pinpoint-sms-voice`). This can lead to `ModuleNotFoundError` for the stub package or `botocore.exceptions.ClientError` at runtime if the service name in `boto3.client()` is incorrect.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.42.3':48 'align':57 'annot':15 'aw':18,70 'boto3':3,10,19,27,34,60,68,71 'builder':28,69 'cadenc':55 'check':32 'client':35 'current':45 'data':42 'devop':4,11,20,77 'devops-guru':76 'enhanc':30 'follow':51 'frequent':53 'generat':23 'guru':5,12,21,78 'hint':75 'mypi':2,9,26,67,72 'mypy-boto3-builder':25,66 'mypy-boto3-devops-guru':1,8 'new':59 'often':56 'provid':13 'releas':54,61 'resourc':36 'servic':22,40 'service-specif':39 'specif':41 'structur':43 'stub':7,81 'type':6,14,31,74,80 'type-hint':73 'type-stub':79 'updat':63 'various':38 'version':46","created_at":"2026-04-11T12:37:05.145201+00:00","updated_at":"2026-04-16T16:53:45.908957+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmpw78og2r5/venv/lib/python3.12/site-packages/mypy_boto3_devops_guru/__init__.py\", line 51, in <module>\n    from .client import DevOpsGuruClient\n  File \"/tmp/tmpw78og2r5/venv/lib/python3.12/site-packages/mypy_boto"},"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":"https://pypi.org/project/mypy-boto3-devops-guru/","github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_devops_guru/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-devops-guru/","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-07-03","last_verified":"2026-08-29","next_check":"2026-07-10","install_tag":null}}