AWS SignerDataPlane Type Stubs for boto3
mypy-boto3-signer-data provides static type annotations for the `boto3` AWS SDK's SignerDataPlane service. It enhances developer experience by enabling comprehensive type checking, improved IDE auto-completion, and early error detection for `boto3` code interacting with AWS SignerDataPlane. The current version is 1.42.54, generated with `mypy-boto3-builder` 8.12.0, with active development following `boto3` updates and new AWS service releases.
Warnings
- breaking Support for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0, affecting all generated packages including `mypy-boto3-signer-data`. Projects using Python 3.8 or older will encounter compatibility issues.
- breaking Generated `TypeDef` names may have changed in `mypy-boto3-builder` version 8.9.0. Specifically, packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` to `CreateDistributionRequestExtraTypeDef`).
- gotcha `mypy-boto3-signer-data` provides only type stubs and does not include the actual `boto3` runtime. Your application must have `boto3` installed to function at runtime. The type stubs are solely for static analysis.
- gotcha `mypy-boto3` uses a separate package for each AWS service. If you need type hints for multiple services (e.g., S3 and SignerDataPlane), you must install each corresponding stub package (e.g., `mypy-boto3-s3` and `mypy-boto3-signer-data`).
- gotcha To prevent `mypy-boto3-*` packages from becoming runtime dependencies, it is best practice to wrap all imports of types from these libraries within a `if typing.TYPE_CHECKING:` block. This ensures they are only used during static analysis.
- gotcha For large projects or when using PyCharm, performance issues with Literal overloads in type stubs (issue PY-40997) might lead to high CPU usage or slow IDE performance.
- deprecated Occasionally, specific AWS services may be renamed or deprecated within the `boto3` ecosystem (e.g., `sms-voice` was replaced by `pinpoint-sms-voice` in `mypy-boto3-builder` 8.11.0). While this stub is for `signer-data`, always refer to official AWS `boto3` documentation for service names and changes, as they might eventually affect the stub package name or availability.
Install
-
pip install boto3 mypy-boto3-signer-data
Imports
- SignerDataPlaneClient
from mypy_boto3_signer_data.client import SignerDataPlaneClient
- ListSigningJobsResponseTypeDef
from mypy_boto3_signer_data.type_defs import ListSigningJobsResponseTypeDef
Quickstart
import boto3
from typing import TYPE_CHECKING
import os
if TYPE_CHECKING:
from mypy_boto3_signer_data.client import SignerDataPlaneClient
from mypy_boto3_signer_data.type_defs import ListSigningJobsResponseTypeDef
def list_signer_jobs() -> ListSigningJobsResponseTypeDef:
"""Lists AWS Signer Data Plane signing jobs."""
# Ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials)
# This example uses placeholder region and credentials for demonstration.
# In a real application, boto3 automatically picks up credentials.
region_name = os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')
client: SignerDataPlaneClient = boto3.client("signer-data", region_name=region_name)
response = client.list_signing_jobs(
maxResults=10 # Limit results for example
)
print("Successfully listed Signer Data Plane jobs.")
for job in response.get("jobs", []):
print(f" Job ID: {job.get('jobId')}, Status: {job.get('status')}")
return response
if __name__ == "__main__":
try:
list_signer_jobs()
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure 'boto3' is installed and AWS credentials are configured.")