Skip to content

turbo73/django-grpc-framework

 
 

Repository files navigation

django-grpc-framework

image

image

image

image

gRPC for Django inspired by djangorestframework.

Documentation

The full documentation is at https://django-grpc-framework.readthedocs.io.

Quickstart

Install django-grpc-framework:

pip install django-grpc-framework

Add it to your `INSTALLED_APPS`:

INSTALLED_APPS = [
    ...
    'grpc_framework',
]

Create your grpc app:

python manage.py grpcstartapp <app_name>

Define your proto in <app_name>/<app_name>.proto.

Add your app to GRPC_APPS: :

GRPC_APPS = [
    '<app_name>',
]

Generate protocol buffer compiler:

python manage.py grpcgenerate

Create your service in <app_name>/service.py.

Start a grpc server with your apps:

python manage.py grpcrunserver

Todo

  • support async
  • more interceptors

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Packages

No packages published

Languages

  • Python 95.7%
  • Makefile 3.1%
  • HTML 1.2%