Fast API example enhanced #3904
4lexRed
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As I needed to fiddle around with FastAPI and a possible GUI, I ended up with an extended version of the FastAPI example.
It's extended with
Backend: a "fake DB" to store values for user management (a list of dicts)
Backend: endpoints for user handling
Frontend: login function for the users with restricted access
Frontend: after login user management function
patch for the mounting path variable GUI_MOUNT not addressing the redirects properly
It gives a nice overview for beginners of how to manage an integration and how to use the function calls defined in the FastAPI main.py in the frontend.py (see create and remove users)
There is still a few items on the todo-lists (see main.py), but as I do not know when I have time to fiddle around with it again, I post the script in this 90% stage.
Hope this helps someone understanding nicegui and fastapi.
NiceGUI-Test.zip
Beta Was this translation helpful? Give feedback.
All reactions