Open bionicles opened 2 weeks ago
ah, this might have the necessary info, I will take a look at this and post back here if it works out
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cognito-idp.html
OK, that did work out! I also had inadvertently copied some of the pasta twice. I fixed that and added some dataclasses to clarify the types a bit better. Hopefully this helps someone. Also added links so when we hover over stuff we can jump right into the API reference.
if we clarify the cognitoidp = boto3.client("cognito-idp")
then it could help make sure all the helper function signatures show up. Sorry if I screwed up the "chesterton's fence" rule here somehow
Background story
I want to make a Cognito app with Python.
However, there aren't any type hints for a lot of the examples, so it's pretty confusing about what's expected.
I started to do this (code attached) but need your help to clarify what the types are for these things:
assuming most of these are just str ?
just hopeful someone might see this and already know what these types are. feel free to use the code, all i did was make the class into a dataclass and make the class methods free functions and add type hints where it seemed clear what things would be
What does this example accomplish?
This will help everyone trying to use Cognito from Python clarify how to do so.
Which AWS service(s)?
Cognito
Which AWS SDKs or tools?
Are there existing code examples to leverage?
https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/cognito#code-examples
Do you have any reference code?