A grpc client for Flask.
Project description
A grpc client for Flask.
Usage
init
channel_wrapper = ChannelWrapper(
target="gaea-partner-python-grpc-dev-cuwmnyhgmq-uc.a.run.app:443",
secure=True,
credentials=grpc.ssl_channel_credentials(),
)
channel_wrapper.init_app(app)
health_stub = StubWrapper(health_pb2_grpc.HealthStub, channel_wrapper)
views
@app.route("/grpc")
def grpc_api():
reply = health_stub.Check(health_pb2.HealthCheckRequest())
return f"grpc response: {reply}"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flask-grpc-0.1.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for flask_grpc-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 155708a924cd0b146c2305edd85b6cff4e88993179995537aaec209e2f4384fc |
|
MD5 | 48edf7a087d064db324d7d5ad97f337d |
|
BLAKE2b-256 | 044bd65676fcd63edcc1ae5aee9b244b54e24300cd16d0978889d040d86cd09e |