Skip to content

hasanisaeed/django-grpc-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django gRPC authentication service


STEP 1: Install packages

pip install -r requirements.txt

STEP 2: Make migrations and migrate

python manage.py makemigrations
python manage.py migrate

STEP 3: Generate proto files

python manage.py generateproto --model account.models.User  --file proto/user/user.proto
python manage.py generateproto --model account.models.Book  --file proto/book/book.proto

STEP 4: Generate gRPC code

python -m grpc_tools.protoc -I ./  --python_out=./ --grpc_python_out=./ ./proto/auth.proto
python -m grpc_tools.protoc -I ./  --python_out=./ --grpc_python_out=./ ./proto/user.proto
python -m grpc_tools.protoc -I ./  --python_out=./ --grpc_python_out=./ ./proto/book.proto

STEP 5: Run server

python manage.py grpcrunserver

About

Djagno grpc authentication service with jwt auth

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages