Registry /
type-stubs / types-aiobotocore-athena
Install & Compatibility
Where this runs
tested against v3.7.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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 1.131s · 59.8MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 6.3s · import 1.024s · 62MB
60MB installed
● package 60MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AthenaClient
✓ from types_aiobotocore_athena.client import AthenaClient
BatchGetNamedQueryOutputTypeDef
✓ from types_aiobotocore_athena.type_defs import BatchGetNamedQueryOutputTypeDef
✗ from types_aiobotocore_athena.client import BatchGetNamedQueryOutputTypeDef
Type definitions are located in the `type_defs` module, not `client`.
AuthenticationTypeType
✓ from types_aiobotocore_athena.literals import AuthenticationTypeType
✗ from types_aiobotocore_athena.type_defs import AuthenticationTypeType
Literal types (string enums) are typically found in the `literals` module.
This example demonstrates how to use `types-aiobotocore-athena` with `aiobotocore` to list Athena workgroups. It includes explicit type annotations for the client, allowing IDEs and static analyzers like MyPy to provide intelligent autocompletion and type checking for Athena client methods and their return types. Remember to set up actual AWS credentials for real-world usage.
import asyncio
import os
from aiobotocore.session import get_session
from types_aiobotocore_athena.client import AthenaClient
from types_aiobotocore_athena.type_defs import StartQueryExecutionOutputTypeDef
async def list_athena_workgroups() -> None:
session = get_session()
# For demonstration, using dummy credentials. Replace with actual config or env vars.
aws_access_key_id = os.environ.get('AWS_ACCESS_KEY_ID', 'testing')
aws_secret_access_key = os.environ.get('AWS_SECRET_ACCESS_KEY', 'testing')
aws_session_token = os.environ.get('AWS_SESSION_TOKEN', 'testing')
async with session.create_client(
"athena",
region_name="us-east-1",
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
aws_session_token=aws_session_token
) as client:
client: AthenaClient # Explicit type annotation is optional but recommended
try:
response = await client.list_work_groups()
print("Athena Workgroups:")
for wg in response.get('WorkGroups', []):
print(f" - {wg.get('Name')} (State: {wg.get('State')})")
except client.exceptions.ClientError as e:
print(f"Error listing workgroups: {e}")
async def run_example():
await list_athena_workgroups()
if __name__ == "__main__":
asyncio.run(run_example())
Debug
Known issues
breakingPython 3.8 support was removed from `mypy-boto3-builder` (which generates these stubs) in version 8.12.0. Users on Python 3.8 or older will need to upgrade their Python version to `>=3.9` or use an older stub version.fixUpgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0
breakingType definition (TypeDef) naming conventions changed in `mypy-boto3-builder` 8.9.0. This includes shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving the `Extra` postfix. Code explicitly importing and using these `TypeDefs` may break.fixUpdate `TypeDef` import names in your code to match the new conventions. Consult the specific service's `type_defs.pyi` for the correct names.
affects: mypy-boto3-builder >=8.9.0
gotchaThis package (`types-aiobotocore-athena`) provides *only* type annotations. You must install `aiobotocore` separately for the actual asynchronous AWS SDK functionality at runtime. For static type checking, `mypy` is also required as a development dependency.fixEnsure both `aiobotocore` (runtime) and `mypy` (dev) are installed alongside `types-aiobotocore-athena`.
affects: All
gotchaThe `mypy-boto3` ecosystem migrated to PEP 561-compliant packages in `mypy-boto3-builder` 8.12.0. While this generally improves compatibility, some tools or custom configurations that relied on older stub discovery mechanisms might require adjustments.fixEnsure your type checker (e.g., MyPy) is up-to-date and correctly configured to find PEP 561-style stub packages. Most common setups should work without manual intervention.
affects: mypy-boto3-builder >=8.12.0
gotchaOccasionally, specific AWS services may be renamed or deprecated within the `aiobotocore` ecosystem (e.g., `sms-voice` was replaced by `pinpoint-sms-voice` in `mypy-boto3-builder` 8.11.0). While this specific stub is for Athena, keep an eye on upstream `aiobotocore` changes, as they might eventually affect the service name or availability.fixRefer to official AWS `aiobotocore` documentation for service names and changes. If a service is renamed, update your `session.create_client()` calls and corresponding `types-aiobotocore-*` stub imports.
affects: All
Upgrade
Version history
3.7.0latest on PyPI · released May 10, 2026
Audit
Dependencies
aiobotocorerequiredProvides the actual asynchronous AWS SDK functionality; this package only offers type stubs for it.
mypyoptionalStatic type checker to leverage the provided annotations during development.