Generated gRPC python files for interacting with Alvenir Services
Project description
Alvenir GRPC Contracts
This package provides methods for interacting with the alvenir gRPC api.
To see more about gRPC look here: https://grpc.io/
Package on pypi: https://pypi.org/project/alvenir-grpc-contracts/
Installation
pip install alvenir-grpc-contracts
Usage example
import grpc
from pathlib import Path
from alvenir_grpc_contracts.summary.v1 import summary_pb2_grpc
from alvenir_grpc_contracts.types.v1 import ping_pb2
# Endpoint needs to be provided by alvenir
ENDPOINT = "<grpc_endpoint>:443"
# Required if server uses tls
ROOT_CERT = Path("<path to alvenir ca.crt>").read_bytes()
# If server does not use tls, replace credentials and with statement with:
# with grpc.insecure_channel(ENDPOINT) as channel:
credentials = grpc.ssl_channel_credentials(root_certificates=ROOT_CERT)
with grpc.secure_channel(ENDPOINT, credentials=credentials) as channel:
stub = summary_pb2_grpc.SummaryServiceStub(channel)
response: ping_pb2.PingResponse = stub.Ping(
ping_pb2.PingRequest(wait_time=1)
)
print(response.requests_received_utc, response.response_sent_utc)
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
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 alvenir_grpc_contracts-0.0.2.tar.gz.
File metadata
- Download URL: alvenir_grpc_contracts-0.0.2.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03ac69363c3f32b8f8a21ec40649d4c035bb8f6e391efc0f896b96e02079c8ec
|
|
| MD5 |
831e161424bb512c107c6566a35931d6
|
|
| BLAKE2b-256 |
5a508b6f1f10a9ee23c2576c0ea4762ae6a9f15001a65515d1cc06013a3d708b
|
File details
Details for the file alvenir_grpc_contracts-0.0.2-py3-none-any.whl.
File metadata
- Download URL: alvenir_grpc_contracts-0.0.2-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b5310793c509bf5d4a492d38353602e2a9ae1d51ef6d334e1d500806706d344
|
|
| MD5 |
5be89be4a4502adf0e945be8d039af5d
|
|
| BLAKE2b-256 |
d8530d67ec461cce874fff583318b1f8e574a5308fdafe1819e4a36f8e1e94c9
|