FastAPI & React - 2 - FastAPI User JWT Authentication

preview_player
Показать описание
In this series we'll be creating a Leads Manager using FastAPI (Python) and ReactJS in the Frontend.
In this video we'll be creating endpoints for user authentication using JWT.

The finished code can be found here:

#FastAPI #ReactJS #FullStack
Рекомендации по теме
Комментарии
Автор

👽 Join the Discord Server (link in the description)

iamrithmic
Автор

I got an error saying "Internal Server Error" Code 500 when I ran the code like how u did in the video 11:00, anyone knows how to solve it?

jessicam
Автор

Thanks for sharing. Please describe why do you use underscores for all imports - does it help with circullar imports? In the next videos please consider reviewing sections about unit-testing, how to maintain database with sqlalchemy - how to rename, delete existing fields and make migrations.

oriontvv
Автор

hey,

async def create_lead(
lead: _schemas.LeadCreate,
user: _schemas.User = _fastapi.Depends(_services.get_current_user),
db: _orm.Session = _fastapi.Depends(_services.get_db),
):

can db: Session = Depends(get_db) come here automatically like in flask? why do we have to write those things each time? thanks

tomasambrulaitis
Автор

Why are you importing everything like `import x as _x`? I believe this is encapsulation so that these libraries can only be called under certain contexts but I don't recall the specifics

jacobmoore
Автор

Great video, but had a question about using async functions. Since sqlalchemy (Specifically the form.Session.query method) is not asynchronous, couldn't calling it within an async function cause issues when using a db with latency as this will block the thread used for other async calls? Please correct me if I'm wrong. Thanks!

coconutattackardvark
Автор

I'm trying to follow you step by step here but when I try to POST a new user sqlite3 has an operational error "no such table" : users.
I've tried to remedy this myself using lots of fixes for different people on stackoverflow but I just havent got it to work. If you have any ideas, please do let me know.

Thanks!

tanmaysuba
Автор

Bro we need tutorial for :
FastAPI + Postgresql + beautiful soup

Lucifer-wdgh
Автор

love what u're doing, would be glad to talk with u, but eng isn't so good(from ukraine)

MpresSive
Автор

Hi thank you for these videos. Can you please show the theme you are using in your editor.

abdellahabdellah
Автор

Traceback (most recent call last):
File "D:/Simreka/User-Backfront/main.py", line 5, in <module>
import schemas as schema
File "D:\Simreka\User-Backfront\schemas.py", line 6, in <module>
class UserBase(payday_antic, BaseModel):
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
the above error coming in my project

chinmaysimreka
Автор

Hello and thanks for this good tutorial, please I got 404 Not found Error after trying the get user, but every thing before is working well, it created user and token successfully? Any Help?

suzanmustafa
Автор

Boa noite, estou tendo erro de Optional, alguém teve isso? Ele está importado

stapi\dependencies\utils.py", line 268, in get_typed_annotation
annotation = evaluate_forwardref(annotation, globalns, globalns)
File "pydantic\typing.py", line 66, in
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\typing.py", line 694, in _evaluate
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
NameError: name 'Optional' is not defined

juliorufino
visit shbcf.ru