Coder Social home page Coder Social logo

python-grpc-demo's Introduction

python-grpc-demo's People

Contributors

amitsaha avatar dependabot[bot] avatar tiemma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

python-grpc-demo's Issues

Add REST support

As a web site creator
I want to be able to access the service using raw REST
In order that integrations with the similarity service can be done with no extra software libraries or dependencies

Can't find User and CreateUserResult methods in server.py file

In the server file, UsersService (inherited from users_service.UsersServicer) overrides CreateUser and GetUsers.
However, there are no methods named User and CreateUserResult in the users_types_pb2 file.
a. User and CreateUserResult are objects defined in the users_types.proto file, which are generated in .pyi files after compilation with the tool.
It seems that the methods in users_types_pb2 are not present in the .pyi file.
This is where the tool called mypy-protobuf comes into play to address this issue. mypy-protobuf generates an independent .pyi file that allows the IDE to assist in suggesting what properties this object has.

Solution:

pip install mypy-protobuf

Adding methods for using grpc-tools `--mypy_grpc_out=./gen-py --mypy_out=./gen-py

This is the executed folder:demo1\grpc-services\protos

python -m grpc_tools.protoc --proto_path=. --python_out=./gen-py --grpc_python_out=./gen-py ./users/*.proto --mypy_grpc_out=./gen-py  --mypy_out=./gen-py  

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.