Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

shankarj67/GRPC-Hackathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-GRPC-Chatbot

Creating a Chatbot using python prtobuf and grpc

Protobuf is used to serialize a message while sending data over network, this file is using GRPC to send data from client to server.

Installation

Windows, OS X & Linux::

Install requirements ($ pip3 install -r requirements.txt)
Note: In case if installation doesn't work check protobuf installation for your Operating system.

Usage example

This can be used to send the serialized data over network which is faster as compared to other serialization.

Code example:

Navigate to my_work folder and run this code to create bindings

python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. chatbot.proto

Now open two shell and run the below code in two different shell

python client.py
python server.py

Output example:

Enter your message: good afternoon # Client Request


good afternoon, how you doing # Server Response

Meta

Shankar Jha – @Skhk634[email protected]

Distributed under the mit license. See LICENSE for more information.

https://github.com/shankarj67/GRPC-Hackathon

Contributing

  1. Fork it (https://github.com/shankarj67/GRPC-Hackathon)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

About

This File was Created at Fosscafe Hackathon meetup

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages