Type annotations for aiobotocore DataExchange
This library provides high-quality type annotations for the `aiobotocore` DataExchange service, generated by `mypy-boto3-builder`. It enables static type checking for `aiobotocore` applications, enhancing code reliability and developer experience. The current version is 3.4.0, and it follows a rapid release cadence aligned with updates to `aiobotocore` and the `mypy-boto3-builder`.
Warnings
- breaking Support for Python 3.8 was officially removed for all packages generated by `mypy-boto3-builder`.
- gotcha This package provides only type annotations (stubs) for static analysis. It does not include the runtime `aiobotocore` library. You must install `aiobotocore` separately for your application to function.
- breaking TypeDef argument names for packed methods were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). Code explicitly importing or referencing the old longer names will break.
- gotcha AWS service names used in `session.create_client()` are case-sensitive and can occasionally change or vary from common expectations (e.g., `pinpoint-sms-voice` instead of `sms-voice`).
Install
-
pip install types-aiobotocore-dataexchange
Imports
- DataExchangeClient
from types_aiobotocore_dataexchange.client import DataExchangeClient
- ListDataSetsResponseTypeDef
from types_aiobotocore_dataexchange.type_defs import ListDataSetsResponseTypeDef
- get_session
import aiobotocore.session # then call aiobotocore.session.get_session()
Quickstart
import asyncio
import aiobotocore.session
from types_aiobotocore_dataexchange.client import DataExchangeClient
from types_aiobotocore_dataexchange.type_defs import ListDataSetsResponseTypeDef
async def main():
session = aiobotocore.session.get_session()
# Using 'dataexchange' service name with type annotation
async with session.create_client("dataexchange") as client:
client: DataExchangeClient # Type hint for mypy
print(f"Client type: {type(client)}")
# Example API call with type-hinted response
try:
response: ListDataSetsResponseTypeDef = await client.list_data_sets(
MaxResults=1
)
print("Successfully listed DataExchange data sets.")
if response.get("DataSets"):
print("First Data Set ID:", response["DataSets"][0]["DataSetId"])
else:
print("No data sets found.")
except Exception as e:
print(f"Error listing data sets: {e}")
if __name__ == "__main__":
asyncio.run(main())