Closed danielgafni closed 2 months ago
Hello! This is already implemented.
You can find a TypedDict generated for **kwargs
in documentation: https://youtype.github.io/boto3_stubs_docs/mypy_boto3_ecs/client/#run_task
As you see, you can do
from mypy_boto3_esc.type_defs import RunTaskRequestRequestTypeDef
kwargs: RunTaskRequestRequestTypeDef = {
"taskDefinition": "my_task",
}
ecs_client.run_task(**kwargs)
You can find documentation for RunTaskRequestRequestTypeDef
here: RunTaskRequestRequestTypeDef
Let me know if this helps. And feel free to share your ideas regarding this feature to make it easier to use.
Oh, I missed it. Thanks!
Describe your idea It would be great if this project also generated
TypedDict
s for function arguments.Why it's useful: library authors often want to allow the end users to pass arbitrary
**kwargs
toboto3
clients. It's possible to annotate**kwargs
withTypedDict
s, for example:These
TypedDict
s could be reused in the client stubs. Example:Code sample
Additional context IRL: example: https://github.com/dagster-io/dagster/pull/23568