This repository was archived by the owner on Aug 7, 2023. It is now read-only.
Create Deta Base DB on app start (FastApi) #218
Answered
by
jnsougata
Master-Y0da
asked this question in
Help
-
|
I'm trying to create a users DB in Deta base when app is starting, but can't make it work. I try using event startup: And also tryed with main : Any help would be so much appreciated!. |
Beta Was this translation helpful? Give feedback.
Answered by
jnsougata
May 28, 2022
Replies: 2 comments 6 replies
-
|
what is the error you are getting? how are you making sure it doesn't work? |
Beta Was this translation helpful? Give feedback.
5 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Master-Y0da
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

I guess you don't have to make the table at the startup. you can use
putwhenever you want. it will create the table for the user but there's a chance of overwrting the existing data so I will suggest you to useupdatewithsetinside try except block and check for exception... if the key doesn't exist go withputfor example
keyis my target... I use the following to create or update