Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pgilad/grpc-python-demo
A minimal client-server gRPC example for finding Levenshtein distance between words
https://github.com/pgilad/grpc-python-demo
demo grpc levenshtein-distance pipenv protobuf python3
Last synced: 24 days ago
JSON representation
A minimal client-server gRPC example for finding Levenshtein distance between words
- Host: GitHub
- URL: https://github.com/pgilad/grpc-python-demo
- Owner: pgilad
- License: mit
- Created: 2019-06-18T15:22:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-05T20:57:45.000Z (over 1 year ago)
- Last Synced: 2024-10-04T19:43:27.170Z (about 1 month ago)
- Topics: demo, grpc, levenshtein-distance, pipenv, protobuf, python3
- Language: Python
- Size: 43 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# grpc-python-demo
> A minimal client-server gRPC example for finding Levenshtein distance between words[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Build Status](https://travis-ci.org/pgilad/grpc-python-demo.svg?branch=master)](https://travis-ci.org/pgilad/grpc-python-demo)This is a minimal playable demo I did in order to learn gRPC. It involves a server with
a single entry RPC for calculating the Levenshtein distance between 2 words.This demo includes a server and a client. The server is long-living (until stopped) and the
client runs several pre-defined RPC calls with different words.[![asciicast](https://asciinema.org/a/l65iY1aDzDgfqXkSscaMaWC6B.svg)](https://asciinema.org/a/l65iY1aDzDgfqXkSscaMaWC6B)
## Requirements
- `python 3.7`
- `pipenv`
- `make`## Install
```bash
$ git clone https://github.com/pgilad/grpc-python-demo.git
$ cd grpc-python-demo# install dependencies
$ pipenv install --dev# generate client stubs
$ make clean build# start server
$ pipenv run python3 server.py# start client
$ pipenv run python3 client.py
```## Development
Run all required tasks:
`$ make clean lint fmt build`
## License
MIT © [Gilad Peleg](https://www.giladpeleg.com)