What is the type of session? #390
Unanswered
Karthik777
asked this question in
Q&A
Replies: 1 comment
-
The type for session is good old dictionary. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Please let me know if this is not a FastHTML question.
I'm writing a fasthtml app to showcase it's potential to my company execs. python type hinting is a must for us. I've been trying to understand the type to use for session. I can see it's a dict. But, if I type hint it. it doesn't work. it's either empty (inside before for the first call) or returns a 400.
I've tried tuple, Mapping and MutableMapping.
This works:
This does not: I get a 400.
some screenshots:


without type hinting
with type hinting
Beta Was this translation helpful? Give feedback.
All reactions