Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hasanisaeed/django-grpc-example
Djagno grpc authentication service with jwt auth
https://github.com/hasanisaeed/django-grpc-example
django django-grpc grpc jwt jwt-authentication
Last synced: 3 months ago
JSON representation
Djagno grpc authentication service with jwt auth
- Host: GitHub
- URL: https://github.com/hasanisaeed/django-grpc-example
- Owner: hasanisaeed
- Created: 2021-11-27T13:22:16.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T02:42:22.000Z (about 1 year ago)
- Last Synced: 2023-12-15T03:53:58.675Z (about 1 year ago)
- Topics: django, django-grpc, grpc, jwt, jwt-authentication
- Language: Python
- Homepage:
- Size: 43.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Django gRPC authentication service
___#### STEP 1: Install packages
```pip install -r requirements.txt```
#### STEP 2: Make migrations and migrate
```python
python manage.py makemigrations
python manage.py migrate
```
#### STEP 3: Generate proto files
```python
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
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
python manage.py grpcrunserver
```