types-aiobotocore-organizations
raw JSON → 3.5.0 verified Fri May 01 auth: no python
Type annotations for aiobotocore Organizations 3.5.0 service, generated by mypy-boto3-builder. Provides static type checking support for AWS Organizations operations. Version 3.5.0, released March 2025.
pip install types-aiobotocore-organizations Common errors
error ModuleNotFoundError: No module named 'types_aiobotocore_organizations' ↓
cause Package name uses hyphens, but import uses underscores; users often try to import the types package directly instead of relying on aiobotocore's type stubs.
fix
Do not import types_aiobotocore_organizations directly. The types are automatically used by type checkers when the package is installed. Just install it and use aiobotocore normally.
error Cannot find reference 'OrganizationsClient' in '__init__.py' ↓
cause The correct type alias for the client is via aiobotocore's generic client, not a specific class from the types package.
fix
Use from aiobotocore.client import AIOBotocoreClient; type Client = AIOBotocoreClient['organizations']
Warnings
gotcha types-aiobotocore-* packages are version-locked to a specific aiobotocore version. Ensure aiobotocore version matches the types package version exactly (e.g., types-aiobotocore-organizations 3.5.0 requires aiobotocore ~=3.5.0). ↓
fix Check your aiobotocore version and install the matching types package.
deprecated The base builder (mypy-boto3-builder) has dropped Python 3.8 support since v8.12.0. Packages generated after that date require Python >=3.9. ↓
fix Upgrade Python to 3.9+ or pin to an older types package version.
Imports
- OrganizationsClient wrong
from mypy_boto3_organizations import OrganizationsClientcorrectfrom aiobotocore.client import AIOBotocoreClient; type Client = AIOBotocoreClient['organizations']
Quickstart
import asyncio
from aiobotocore.session import AioSession
async def main():
session = AioSession()
async with session.create_client('organizations', region_name='us-east-1') as client:
# Use client with full type hints
response = await client.list_accounts()
print(response)
asyncio.run(main())