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.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for flask_grpc-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 568df41bd9ade0da76570dba7677aed2e5c801ba04c16721a785937afa535413 |
|
MD5 | 7f86c4f185855c4629ed2a52ef65322a |
|
BLAKE2b-256 | 6ef51e9fef913260a68f84aa11fb9d6ea832fd695ce7f6784bb9c71792ed8553 |