Skip to content

Django gRPC refers to the use of the gRPC framework within a Django application. gRPC (Google Remote Procedure Call) is a high-performance, open-source framework for building APIs.

Notifications You must be signed in to change notification settings

mbrsagor/djangoGRPC

Repository files navigation

Django gRPC

Django gRPC refers to the use of the gRPC framework within a Django application. gRPC (Google Remote Procedure Call) is a high-performance, open-source framework for building APIs.

Setup:

The following steps will walk you through installation on a Mac. Linux should be similar. It's also possible to develop on a Windows machine, but I have not documented the steps. If you've developed Django apps on Windows, you should have little problem getting up and running.

Dependencies

  • Python 3.12
  • Rest framework
  • django_grpc_framework

Install project locally:

git clone https://github.com/mbrsagor/djangoGRPC.git
cd djangoGRPC
virtualenv venv --python=python3.12
source venv/bin/activate
pip install -r requirements.txt
./manage.py migrate

RUn gRPC server:

python grpc_server.py
create data (post request) curl:
grpcurl -plaintext \
  -d '{ "title": "GRPC new book", "author": "Mbr Sagor", "published_year": 2025 }' \
  localhost:50051 book.BookService/CreateBook

Happy coding 😉

About

Django gRPC refers to the use of the gRPC framework within a Django application. gRPC (Google Remote Procedure Call) is a high-performance, open-source framework for building APIs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages