gRPC-GCP Python
Package for gRPC-GCP Python.
Installation
gRPC-GCP Python is available wherever gRPC is available.
From PyPI
If you are installing locally…
$ pip install grpcio-gcp
Else system wide (on Ubuntu)…
$ sudo pip install grpcio-gcp
Usage
Create a config file (e.g. spanner.grpc.config) defining API configuration, with ChannelPoolConfig and MethodConfig.
channel_pool: {
max_size: 10
max_concurrent_streams_low_watermark: 1
}
method: {
name: "/google.spanner.v1.Spanner/CreateSession"
affinity: {
command: BIND
affinity_key: "name"
}
}
method: {
name: "/google.spanner.v1.Spanner/GetSession"
affinity: {
command: BOUND
affinity_key: "name"
}
}
method: {
name: "/google.spanner.v1.Spanner/DeleteSession"
affinity: {
command: UNBIND
affinity_key: "name"
}
}
Load configuration file to ApiConfig object.
import google.protobuf.text_format
config = grpc_gcp.api_config_from_text_pb(
pkg_resources.resource_string(__name__, 'spanner.grpc.config'))
Create channel pool using grpc_gcp.
import grpc_gcp
import grpc
credentials = grpc.ssl_channel_credentials()
# Add api config key-value pair to options
options = [(grpc_gcp.API_CONFIG_CHANNEL_ARG, config)]
channel_pool = grpc_gcp.secure_channel(target, credentials, options)
The generated channel pool is inherited from the original grpc.Channel, with underlying support for multiple grpc channels.
Metadata
Release files for grpcio-gcp 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grpcio-gcp-0.2.2.tar.gz | 13.4 kB | Without provenance | Details for grpcio-gcp-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grpcio_gcp-0.2.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for grpcio_gcp-0.2.2-py2.py3-none-any.whl |
Total release size: 22.8 kB
Release files / grpcio-gcp-0.2.2.tar.gz
| Download URL | grpcio-gcp-0.2.2.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e292605effc7da39b7a8734c719afb12ec4b5362add3528d8afad3aa3aa9057c
|
|
BLAKE2b-256 checksum How to use checksums |
3ca269a79b928e4a6abb5979945be9382f8aaf4580a7496ad4389371bbc0c9eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.13
|
Release files / grpcio_gcp-0.2.2-py2.py3-none-any.whl
| Download URL | grpcio_gcp-0.2.2-py2.py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1ef8e8531eab11356a3eb4c5b84e79e0d923d6782d19e1b1a45e1cabe4e783d7
|
|
BLAKE2b-256 checksum How to use checksums |
ba831f1095815be0de19102df41e250ebbd7dae97d7d14e22c18da07ed5ed9d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.13
|
Security for grpcio-gcp 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.