https://github.com/quocanh189/flask_go_grpc
A mini project using GRPC with golang and python (flask)
https://github.com/quocanh189/flask_go_grpc
flask golang grpc python
Last synced: 8 months ago
JSON representation
A mini project using GRPC with golang and python (flask)
- Host: GitHub
- URL: https://github.com/quocanh189/flask_go_grpc
- Owner: QuocAnh189
- Created: 2024-12-25T07:00:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-25T07:51:58.000Z (over 1 year ago)
- Last Synced: 2024-12-25T08:26:03.885Z (over 1 year ago)
- Topics: flask, golang, grpc, python
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FLask_Go_Grpc
===========================================================
# 1. How to run the app (Development Environment)
Go (version 1.23.2) - Python (version 3.8.10)
Require: Check `protoc --version` or install
1. Clone the repo and cd into it
2. Rename or copy `.env.example` file to `.env` (Get AccessKey at `https://api.countrylayer.com`)
3. Download the necessary python libraries in the python directory
4. Install gRPC packages for Python `pip install grpcio grpcio-tools`
5. Download the necessary go libraries in the golang directory
6. Install gRPC packages for Golang `go get -u google.golang.org/grpc`
7. In your terminal run `python -m grpc_tools.protoc -I. --python_out=client --grpc_python_out=client countries proto`
8. In your terminal run `protoc -I . --go_out=. --go-grpc_out=. countries.proto`
## Client-Side(Golang) And Server-Side(Python)
In your terminal `cd golang` at server folder , run `go run client.go` to start client.
In your terminal `cd python` at client folder , run `python server.py` to start grpc server.
## Client-Side(Python) And Server-Side(Golang)
In your terminal `cd python` at client folder , run `python client.py` to start client.
In your terminal `cd golang` at server folder , run `go run server.go` to start grpc server.
### POSTMAN DEMO :
# Client-Side(Golang) And Server-Side(Python)

# Client-Side(Python) And Server-Side(Golang)

## Author Contact
Contact me with any questions!
Email: anquoc18092003@gmail.com
Facebook: https://www.facebook.com/tranphuocanhquoc2003
Thank You so much for your time !!!