Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generics for TypedDict in QueryOutputTableTypeDef #322

Open
nathanmmiller opened this issue Oct 28, 2024 · 1 comment
Open

Generics for TypedDict in QueryOutputTableTypeDef #322

nathanmmiller opened this issue Oct 28, 2024 · 1 comment
Labels
🚀 enhancement New feature or request

Comments

@nathanmmiller
Copy link

nathanmmiller commented Oct 28, 2024

Describe your idea
QueryOutputTableTypeDef.Items is currently typed as List[Dict[str, TableAttributeValueTypeDef]]. It would be great if one could provide a type as a generic to QueryOutputTableTypeDef, such that Items could be typed as List[] instead.

Code sample

class MyExampleTableEntry(TypedDict):
    id: int
    name: str
    teams: set[str]

result: QueryOutputTableTypeDef[MyExampleTableEntry] = someTable.query(...)

@nathanmmiller nathanmmiller added the 🚀 enhancement New feature or request label Oct 28, 2024
@vemel
Copy link
Collaborator

vemel commented Oct 28, 2024

Hello! Thank you for the feature request.

QueryOutputTableTypeDef is already redefined in builder, so it is not parsed from botocore shapes. So, I can try to add a generic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants