Registry / type-stubs / mypy-boto3-codeguru-reviewer

mypy-boto3-codeguru-reviewer

JSON →
library1.43.0pypypi✓ verified 23d ago

mypy-boto3-codeguru-reviewer provides type annotations for the boto3 AWS SDK, specifically for the CodeGuru Reviewer service. It enhances static type checking with tools like mypy, improves IDE autocomplete, and helps catch potential bugs at development time. The library is currently at version 1.42.3 and is actively maintained with frequent updates following boto3 releases.

pip install boto3 mypy mypy-boto3-codeguru-reviewer
INSTALL
IMPORT
SIG · MYPY-BOTO3-CODEGUR
M
mypy-boto3-codeguru-reviewer
type-stubspythonv1.43.0
Install
6.0s avg
Import
600ms
Disk
114MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.632s · 116.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.0s · import 0.568s · 114MB
114MB installed
● package 114MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CodeGuruReviewerClient
from mypy_boto3_codeguru_reviewer.client import CodeGuruReviewerClient
Use this for type-hinting the boto3 CodeGuru Reviewer client instance.
ListRepositoryAssociationsResponseTypeDef
from mypy_boto3_codeguru_reviewer.type_defs import ListRepositoryAssociationsResponseTypeDef
Import specific TypeDefs for precise type-hinting of API call responses. Other TypeDefs are available for various service operations.
CodeGuruReviewerServiceName
from mypy_boto3_codeguru_reviewer.literals import CodeGuruReviewerServiceName
Useful when using overloads for boto3.client directly, though explicit client imports are often preferred.

This quickstart demonstrates how to initialize a type-hinted CodeGuruReviewer client and call a basic operation, `list_repository_associations`, with its response also fully type-hinted. Ensure `boto3` and `mypy` are installed alongside this stub package. For actual execution, valid AWS credentials and region must be configured.

import boto3 from mypy_boto3_codeguru_reviewer.client import CodeGuruReviewerClient from mypy_boto3_codeguru_reviewer.type_defs import ListRepositoryAssociationsResponseTypeDef import os def get_reviewer_client() -> CodeGuruReviewerClient: """Returns a type-hinted CodeGuruReviewer client.""" # Ensure AWS_REGION is set in environment or configure it explicitly return boto3.client("codeguru-reviewer", region_name=os.environ.get("AWS_REGION", "us-east-1")) def list_reviewer_associations() -> ListRepositoryAssociationsResponseTypeDef: """Lists CodeGuru Reviewer repository associations with type hints.""" client: CodeGuruReviewerClient = get_reviewer_client() response: ListRepositoryAssociationsResponseTypeDef = client.list_repository_associations() print("CodeGuru Reviewer Repository Associations:") for association in response.get("RepositoryAssociationSummaries", []): print(f"- {association.get('Name')} (State: {association.get('State')})") return response if __name__ == "__main__": # Set dummy environment variables if not already set, for demonstration purposes. # In a real scenario, use proper AWS credential configuration. if not os.environ.get("AWS_ACCESS_KEY_ID"): os.environ["AWS_ACCESS_KEY_ID"] = "TEST_KEY" if not os.environ.get("AWS_SECRET_ACCESS_KEY"): os.environ["AWS_SECRET_ACCESS_KEY"] = "TEST_SECRET" if not os.environ.get("AWS_REGION"): os.environ["AWS_REGION"] = "us-east-1" try: list_reviewer_associations() except Exception as e: # Boto3 client operations will fail if credentials are not valid, # but mypy type checking will still work. print(f"An error occurred during runtime: {e}") print("Please ensure your AWS credentials and region are configured correctly for actual execution.")
Debug
Known issues
breakingPython 3.8 support was removed starting with `mypy-boto3-builder` version 8.12.0. `mypy-boto3-codeguru-reviewer` versions aligning with this builder version (1.42.3 and newer) will only support Python 3.9 and higher. Users on Python 3.8 must upgrade their Python environment.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0 (equivalent mypy-boto3-codeguru-reviewer versions >=1.42.3)
breakingTypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. This can lead to shorter names for method argument TypeDefs (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) and postfix changes for conflicting names. Existing type hints in your code that reference older TypeDef names may break.
fix
Update your TypeDef import paths and names to align with the new conventions by checking the generated `type_defs.pyi` for the service or the `mypy-boto3` documentation.
affects: mypy-boto3-builder >=8.9.0
gotchaThis library is a PEP 561-compliant stub-only package. It provides type information for `boto3`, but `boto3` itself must still be installed separately for the code to run. For `mypy` to properly find and utilize these type stubs, `mypy-boto3-codeguru-reviewer` (or the overarching `boto3-stubs` package) must be installed in the Python environment where `mypy` is executed.
fix
Ensure both `boto3` and `mypy-boto3-codeguru-reviewer` are installed in your project's environment. Run `mypy` from an environment where these packages are accessible.
affects: All versions
gotchaWhile `mypy-boto3-stubs` (the umbrella package) can offer some auto-discovery for `boto3.client` calls, for the most robust type checking, consistent autocomplete in IDEs, and clear code, it is generally recommended to explicitly type-hint your `boto3` client objects using imports like `from mypy_boto3_codeguru_reviewer.client import CodeGuruReviewerClient`.
fix
Always add explicit type annotations for `boto3` clients and resources, such as `client: CodeGuruReviewerClient = boto3.client("codeguru-reviewer")`.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK functionality that this library adds type hints for.
mypyrequiredStatic type checker that utilizes these annotations.
Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
1
Resources