Registry / type-stubs / mypy-boto3-codeguruprofiler

mypy-boto3-codeguruprofiler

JSON →
library1.43.0pypypi✓ verified 23d ago

mypy-boto3-codeguruprofiler provides comprehensive type annotations for the `boto3` CodeGuruProfiler service, enhancing code quality and developer experience by enabling static type checking with tools like `mypy` and improving IDE autocompletion. Currently at version 1.42.3, it is part of the `mypy-boto3` ecosystem, which sees frequent updates, typically aligning with `boto3` releases and undergoing major revisions with its `mypy-boto3-builder`.

pip install mypy-boto3-codeguruprofiler boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-CODEGUR
M
mypy-boto3-codeguruprofiler
type-stubspythonv1.43.0
Install
5.9s avg
Import
575ms
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.600s · 116.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.9s · import 0.550s · 114MB
114MB installed
● package 114MB
Code
Verified usage

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

CodeGuruProfilerClient
from mypy_boto3_codeguruprofiler.client import CodeGuruProfilerClient
import boto3; client = boto3.client('codeguruprofiler')
While `boto3.client` works at runtime, `mypy` and IDEs require explicit import of the client type from `mypy-boto3-codeguruprofiler` for full type checking and autocompletion.
ListProfilingGroupsOutputTypeDef
from mypy_boto3_codeguruprofiler.type_defs import ListProfilingGroupsOutputTypeDef
Type definitions for API responses are available in the `type_defs` submodule for more precise type checking of dictionary structures.

Demonstrates how to initialize a `boto3` CodeGuruProfiler client with explicit type hints from `mypy-boto3-codeguruprofiler` and call an API, ensuring static type checking by `mypy`. For `mypy` to work, `boto3` and `mypy` must also be installed.

import boto3 from typing import TYPE_CHECKING import os # Ensure you have AWS credentials configured (e.g., via environment variables or ~/.aws/credentials) # For a runnable example, we use a default session. if TYPE_CHECKING: from mypy_boto3_codeguruprofiler.client import CodeGuruProfilerClient from mypy_boto3_codeguruprofiler.type_defs import ListProfilingGroupsOutputTypeDef # Initialize boto3 client with explicit type annotation # This enables IDE autocompletion and static type checking by mypy. client: "CodeGuruProfilerClient" = boto3.client("codeguruprofiler") try: # Example API call with type-hinted response response: "ListProfilingGroupsOutputTypeDef" = client.list_profiling_groups() print("Successfully listed CodeGuruProfiler profiling groups:") if response.get("profilingGroups"): for group in response["profilingGroups"]: print(f" - Name: {group.get('name')}, Arn: {group.get('arn')}") else: print(" No profiling groups found.") except Exception as e: print(f"An error occurred: {e}") print("Please ensure your AWS credentials are configured and you have permissions to list CodeGuruProfiler profiling groups.")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` 8.12.0 (the generator for these stubs), meaning `mypy-boto3-codeguruprofiler` and other generated packages now require Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >= 8.12.0
breakingStarting from `mypy-boto3-builder` 8.12.0, all packages migrated to PEP 561 compliant distribution. While individual service packages like `mypy-boto3-codeguruprofiler` still work, the recommended installation for multiple services is `pip install 'types-boto3[SERVICE1,SERVICE2]'`.
fix
For new projects or multi-service setups, consider `pip install 'types-boto3[codeguruprofiler]'`.
affects: mypy-boto3-builder >= 8.12.0
breakingIn `mypy-boto3-builder` 8.9.0, TypeDefs for packed method arguments were refactored to use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). Additionally, conflicting `Extra` postfixes were moved to the end (`CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`). This might impact existing code that directly references these specific TypeDef names.
fix
Review and update custom type definitions or explicit TypeDef imports to reflect the new naming conventions if you are using affected services.
affects: mypy-boto3-builder >= 8.9.0
gotchaPyCharm users might experience slow performance and high CPU usage due to Literal overloads (issue PY-40997).
fix
It is recommended to use `boto3-stubs-lite` (if applicable for your service) or to disable PyCharm's type checker and rely on external tools like `mypy` or `pyright`.
affects: All versions with PyCharm
gotchaWhen using `if TYPE_CHECKING:` guards to make type stubs a `dev` dependency, `pylint` might complain about undefined variables in the runtime branch.
fix
To resolve this, set all type-hinted variables to `object` in the `else` branch of the `TYPE_CHECKING` block. Example: `if TYPE_CHECKING: from my_lib import MyClass else: MyClass = object`.
affects: All versions with Pylint and TYPE_CHECKING
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThe AWS SDK for Python, which these type stubs annotate.
mypyrequiredThe primary static type checker that utilizes these stubs for validation.
pythonrequiredRequires Python 3.9 or higher as of mypy-boto3-builder 8.12.0.
Agent activity
24 hits · last 30 days
node
20
OpenAI (training)
1
Resources
mypy-boto3-codeguruprofiler — pip install mypy-boto3-codeguruprofiler · libregistry