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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flask-grpc-0.1.1.tar.gz.
File metadata
- Download URL: flask-grpc-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.10 Linux/5.11.0-43-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
776b22a6173521473cc43bb4d2478b480346f0dbec4018792c959b4daf60ed6a
|
|
| MD5 |
d58ddef5090b5887f3f7c9813d282f3f
|
|
| BLAKE2b-256 |
760acce8a050b0ed44dc54cc0bc8f3f9292a1434699b4547e151cc556c7abfe3
|
File details
Details for the file flask_grpc-0.1.1-py3-none-any.whl.
File metadata
- Download URL: flask_grpc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.10 Linux/5.11.0-43-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155708a924cd0b146c2305edd85b6cff4e88993179995537aaec209e2f4384fc
|
|
| MD5 |
48edf7a087d064db324d7d5ad97f337d
|
|
| BLAKE2b-256 |
044bd65676fcd63edcc1ae5aee9b244b54e24300cd16d0978889d040d86cd09e
|