Registry / type-stubs / mypy-boto3-kendra

mypy-boto3-kendra

JSON →
library1.43.23pypypi✓ verified 23d ago

mypy-boto3-kendra provides static type annotations for the `boto3` AWS Kendra service client, enabling tools like MyPy to perform comprehensive static analysis on code interacting with AWS Kendra. It is a generated stub package, part of the larger `mypy-boto3` project which produces type stubs for all `boto3` services. The library is actively maintained and frequently updated, usually in sync with new `boto3` and `botocore` releases, currently at version 1.42.3.

pip install mypy-boto3-kendra boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-KENDRA
M
mypy-boto3-kendra
type-stubspythonv1.43.23
Install
3.9s avg
Import
663ms
Disk
51MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.23 · 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.682s · 52.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.9s · import 0.644s · 53MB
51MB installed
● package 51MB
Code
Verified usage

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

KendraClient
from mypy_boto3_kendra.client import KendraClient
ListIndicesOutputTypeDef
from mypy_boto3_kendra.type_defs import ListIndicesOutputTypeDef
from mypy_boto3_kendra.type_defs import ListIndicesOutput
KendraServiceName
from mypy_boto3_kendra import KendraServiceName
Useful for explicit type annotations or passing service names.

This quickstart demonstrates how to use `mypy-boto3-kendra` with `boto3` to get type-checked interactions with the AWS Kendra service. It initializes a Kendra client and lists available indices, leveraging the `KendraClient` and `ListIndicesOutputTypeDef` type hints for static analysis.

import boto3 from mypy_boto3_kendra.client import KendraClient from mypy_boto3_kendra.type_defs import IndexConfigurationSummaryTypeDef, ListIndicesOutputTypeDef from typing import List import os def list_kendra_indices() -> List[IndexConfigurationSummaryTypeDef]: """Lists Kendra indices and returns their summaries.""" # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) # For explicit credential provision (if not using implicit chain): # client: KendraClient = boto3.client( # "kendra", # aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''), # aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''), # region_name=os.environ.get('AWS_REGION', 'us-east-1') # ) client: KendraClient = boto3.client("kendra") # Using type hints for the response response: ListIndicesOutputTypeDef = client.list_indices() indices: List[IndexConfigurationSummaryTypeDef] = response.get('IndexConfigurationSummaryItems', []) if indices: print(f"Found Kendra indices: {[i['Name'] for i in indices]}") else: print("No Kendra indices found.") return indices if __name__ == "__main__": list_kendra_indices()
Debug
Known issues
breakingPython 3.8 is no longer supported. `mypy-boto3-builder` version 8.12.0 and subsequent versions (which generate `mypy-boto3-kendra` 1.42.3) removed Python 3.8 support.
fix
Upgrade your Python environment to 3.9 or higher. For Python 3.8, use an older version of `mypy-boto3-kendra` if available, though this is not recommended due to security and feature updates.
affects: mypy-boto3-kendra >= 1.42.0 (generated by mypy-boto3-builder >= 8.12.0)
breakingTypeDefs for packed method arguments now use shorter names, and conflicting TypeDef `Extra` postfixes have moved. This is a breaking change for code that explicitly references generated `TypeDef` classes by their full names.
fix
Review your code for direct imports and usage of `mypy_boto3_kendra.type_defs` and adjust the `TypeDef` names according to the new naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` might become `CreateDistributionRequestTypeDef`).
affects: mypy-boto3-kendra >= 1.39.0 (generated by mypy-boto3-builder >= 8.9.0)
gotchaThe `mypy-boto3-kendra` package provides only type stubs. You still need `boto3` installed at runtime to execute your code. This package enables type checking for `boto3` calls, not the `boto3` functionality itself.
fix
Always install `boto3` alongside `mypy-boto3-kendra` (e.g., `pip install boto3 mypy-boto3-kendra`).
affects: All versions
gotchaSince `mypy-boto3` migrated to PEP 561, the generated packages are now proper stub packages. While generally an improvement, if you had a complex custom setup around older non-PEP 561 compliant versions or were relying on specific internal structures, it might require minor adjustments to your build or type-checking configuration.
fix
Verify that your type checker (e.g., MyPy) correctly identifies and uses the `py.typed` marker files in the installed `mypy-boto3-kendra` package. No specific code change is typically needed, but be aware of potential environment or configuration impacts.
affects: mypy-boto3-kendra >= 1.42.0 (generated by mypy-boto3-builder >= 8.12.0)
Upgrade
Version history
1.43.23latest on PyPI · released Jun 4, 2026
Audit
Dependencies
boto3requiredRuntime dependency for interacting with AWS services; this library provides type stubs for it.
typing-extensionsrequiredRequired for type hints like `NotRequired` on Python versions older than 3.11.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources