Registry / type-stubs / mypy-boto3-kendra-ranking

mypy-boto3-kendra-ranking

JSON →
library1.43.55pypypi✓ verified 22d ago

mypy-boto3-kendra-ranking provides comprehensive type annotations for the `boto3` KendraRanking service. It is part of the `mypy-boto3` project, which generates complete type stubs for all AWS services supported by `boto3` and `aioboto3`. This library enhances code quality and maintainability by enabling static type checking of `boto3` usage in Python projects. The current version is `1.42.3`, generated with `mypy-boto3-builder 8.12.0`, and new versions are released frequently to synchronize with `boto3` updates.

pip install boto3 mypy-boto3-kendra-ranking mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-KENDRA-
M
mypy-boto3-kendra-ranking
type-stubspythonv1.43.55
Install
5.9s avg
Import
557ms
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.55 · 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.574s · 116.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.9s · import 0.540s · 114MB
114MB installed
● package 114MB
Code
Verified usage

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

KendraRankingClient
from mypy_boto3_kendra_ranking.client import KendraRankingClient
Import for type-hinting the boto3 KendraRanking client object.
ListTagsForResourceResponseTypeDef
from mypy_boto3_kendra_ranking.type_defs import ListTagsForResourceResponseTypeDef
Import for type-hinting a specific response structure from the service.

This example demonstrates how to type-hint a `boto3` KendraRanking client and use a typical operation, `list_tags_for_resource`. Run `mypy <your_script_name>.py` to verify type correctness.

import os import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_kendra_ranking.client import KendraRankingClient from mypy_boto3_kendra_ranking.type_defs import ListTagsForResourceResponseTypeDef def get_kendra_ranking_client() -> "KendraRankingClient": # In a real application, credentials would be managed securely. # For quickstart, using default session or explicit credentials from env return boto3.client("kendra-ranking", region_name=os.environ.get("AWS_REGION", "us-east-1"), aws_access_key_id=os.environ.get("AWS_ACCESS_KEY_ID", "TEST_KEY"), aws_secret_access_key=os.environ.get("AWS_SECRET_ACCESS_KEY", "TEST_SECRET")) def list_kendra_ranking_resource_tags(resource_arn: str) -> None: client: KendraRankingClient = get_kendra_ranking_client() try: response: ListTagsForResourceResponseTypeDef = client.list_tags_for_resource( ResourceARN=resource_arn ) print(f"Tags for {resource_arn}:") for tag in response.get("Tags", []): print(f" {tag['Key']}: {tag['Value']}") except client.exceptions.ResourceNotFoundException: print(f"Resource with ARN '{resource_arn}' not found.") except Exception as e: print(f"An error occurred: {e}") if __name__ == "__main__": # Replace with a valid KendraRanking resource ARN if you want to run it against AWS # Example: 'arn:aws:kendra-ranking:us-east-1:123456789012:rank-evaluation/example' # For a quickstart that runs without AWS credentials, a dummy ARN is fine for type checking. dummy_arn = "arn:aws:kendra-ranking:us-east-1:123456789012:rank-evaluation/dummy-evaluation" list_kendra_ranking_resource_tags(dummy_arn) print("\nRun `mypy your_script_name.py` to check types.")
Debug
Known issues
breakingPython 3.8 support has been removed in `mypy-boto3-builder` version 8.12.0 and later. Corresponding `mypy-boto3` packages no longer support Python 3.8.
fix
Upgrade your Python environment to version 3.9 or higher.
affects: mypy-boto3-builder>=8.12.0, mypy-boto3-kendra-ranking>=1.42.0
breakingThe `mypy-boto3` project migrated to PEP 561 compliant packages in builder version 8.12.0. While this primarily affects package structure, it can have implications for custom packaging workflows or specific tooling integrations.
fix
Ensure your packaging and environment setup is compatible with PEP 561-style packages. Most users will not need to take explicit action beyond standard `pip` usage.
affects: mypy-boto3-builder>=8.12.0
gotchaTypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. Some TypeDefs for method arguments were shortened (e.g., `RequestRequestTypeDef` -> `RequestTypeDef`). Users referencing older TypeDef names will encounter type errors.
fix
Consult the generated stub files (e.g., `mypy_boto3_kendra_ranking.type_defs`) or the official documentation for the correct, current TypeDef names.
affects: mypy-boto3-builder>=8.9.0
gotchaService names in AWS can sometimes change or be deprecated (e.g., `sms-voice` was replaced by `pinpoint-sms-voice` in builder 8.11.0). Always verify the exact service name used in `boto3.client()` matches the `mypy-boto3-*` package you install.
fix
Double-check the service name argument for `boto3.client()` and ensure it aligns with the `mypy-boto3-<service-name>` package, especially after `boto3` or `mypy-boto3` updates.
affects: All versions
gotchaFor `mypy` to properly find and utilize these stubs, it must be installed and configured correctly. Forgetting to install `mypy` or running it without proper paths are common issues.
fix
Ensure `mypy` is installed (`pip install mypy`) and run it on your codebase (e.g., `mypy your_script.py`). For complex projects, consider a `pyproject.toml` or `mypy.ini` configuration.
affects: All versions
gotchaStubs can become outdated if `boto3` is updated to a newer version with API changes that are not yet reflected in the corresponding `mypy-boto3-*` package.
fix
Regularly update your `mypy-boto3-*` packages alongside `boto3` to ensure type definitions remain synchronized with the underlying library.
affects: All versions
Upgrade
Version history
1.43.55latest on PyPI · released Jul 23, 2026
Audit
Dependencies
boto3requiredThis library provides type stubs for boto3.
mypyrequiredRequired to perform static type checking using these stubs.
typing-extensionsoptionalAutomatically included by the builder for Python versions older than 3.9 to support advanced type features.
Agent activity
17 hits · last 30 days
node
12
OpenAI (training)
1
Resources
mypy-boto3-kendra-ranking — pip install mypy-boto3-kendra-ranking · libregistry