Registry / type-stubs / mypy-boto3-inspector-scan

mypy-boto3-inspector-scan

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-inspector-scan provides PEP 561 compatible type annotations for the `boto3` AWS SDK's Inspector Scan service. It helps enable static type checking for `boto3` code with tools like MyPy, catching potential errors before runtime. The current version is 1.42.12, generated by `mypy-boto3-builder 8.12.0`. Releases are frequent, typically mirroring `boto3` and AWS service updates.

pip install mypy-boto3-inspector-scan boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-INSPECT
M
mypy-boto3-inspector-scan
type-stubspythonv1.43.0
Install
3.7s avg
Import
Disk
50MB
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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 51.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.7s · import 0.000s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

InspectorScanClient
from mypy_boto3_inspector_scan.client import InspectorScanClient
This import is for type hinting purposes; the runtime client is obtained via boto3.client('inspector-scan').

Demonstrates how to initialize an `inspector-scan` client with `mypy-boto3` type annotations and make a sample API call. This code requires `boto3` to be installed and AWS credentials configured in the environment or AWS config files.

import boto3 from mypy_boto3_inspector_scan.client import InspectorScanClient import os # Instantiate a boto3 client with type hints from mypy-boto3-inspector-scan # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) # Using os.environ.get for region to make the example safer without hardcoding region = os.environ.get('AWS_REGION', 'us-east-1') try: # The type annotation 'InspectorScanClient' provides static type checking benefits client: InspectorScanClient = boto3.client("inspector-scan", region_name=region) print(f"Successfully created Inspector Scan client in region: {region}") # Example: List scans (requires appropriate IAM permissions, such as 'inspector-scan:ListScans') response = client.list_scans() print("List Scans Response (truncated for brevity):") print(response.get('scans', [])[:1]) # Print first scan if available except Exception as e: print(f"An error occurred: {e}") print("Please ensure 'boto3' is installed and AWS credentials are configured correctly.") print("Also verify your IAM user/role has permissions for 'inspector-scan:ListScans'.")
Debug
Known issues
breakingPython 3.8 support has been removed since `mypy-boto3-builder 8.12.0`. Projects using older Python versions will need to upgrade Python or pin to an older version of `mypy-boto3-*` packages to maintain compatibility.
fix
Upgrade your project's Python version to 3.9+ or constrain `mypy-boto3-inspector-scan` to a version generated by `mypy-boto3-builder < 8.12.0` (e.g., `<1.42.0`).
affects: mypy-boto3-builder >= 8.12.0 (and generated stubs)
breakingTypeDef naming conventions changed in builder version 8.9.0, including shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and postfix relocation for conflicting names. This may break existing explicit type annotations in your codebase.
fix
Review and update any explicit TypeDef imports and usage in your code to match the new naming conventions introduced with `mypy-boto3-builder` version 8.9.0.
affects: mypy-boto3-builder >= 8.9.0 (and generated stubs)
gotchaThese packages provide only type stubs, not the runtime implementation of the AWS SDK. `boto3` (or `aioboto3` for async) must be installed alongside `mypy-boto3-*` packages for your code to execute successfully.
fix
Ensure `pip install boto3` is included in your project's dependencies, in addition to the `mypy-boto3-*` stubs.
affects: All versions
gotchaTo ensure accurate type checking and prevent unexpected `mypy` errors, the version of `mypy-boto3-inspector-scan` should ideally be kept synchronized with the version of `boto3` you are using. Significant version drift can lead to outdated or incorrect type hints.
fix
Regularly update both `boto3` and `mypy-boto3-inspector-scan` to their latest compatible versions. Consider using dependency management tools (e.g., `pip-tools`, `Poetry`) to help synchronize versions.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK client that these stubs type-check.
mypyoptionalStatic type checker required to leverage the provided type annotations.
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources