Python bindings for the Talos Linux gRPC API (v1.6.0)
Project description
talos-linux-api
- Python bindings for the Talos Linux gRPC API
Installation
Multiple API versions can be installed simultaneously and are made available
at runtime under an Implicit Namespace Package named talos_linux_api
.
Currently available API versions:
pip install talos-linux-api-v1.2.0
pip install talos-linux-api-v1.3.0
pip install talos-linux-api-v1.4.0
pip install talos-linux-api-v1.5.0
pip install talos-linux-api-v1.6.0
Usage example
import ssl
from talos_linux_api.v1_6_0.machine import MachineServiceStub
from grpclib.client import Channel
from betterproto.lib.google.protobuf import Empty
ssl_context = ssl.create_default_context()
ssl_context.load_cert_chain('client.crt', 'client.key')
ssl_context.load_verify_locations('ca.crt')
async with Channel(host="example.com", port=50000, ssl=ssl_context) as channel:
machine_service = MachineServiceStub(channel)
response = await machine_service.cpu_info(Empty())
[!NOTE]
openssl
which thessl
module relies upon does not like the format of the private key thattalosctl
generates.-----BEGIN ED25519 PRIVATE KEY----- ... -----END ED25519 PRIVATE KEY-----
To make
openssl
happy you have to fix the header and footer by removing theED25519
part.-----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----
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
File details
Details for the file talos-linux-api-v1.6.0-0.1.0.tar.gz
.
File metadata
- Download URL: talos-linux-api-v1.6.0-0.1.0.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.7.4 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d82833b8d5bf6ca7fbdd1b9767c76f010c56120418ff4b0ad69c9b6583fee2a8 |
|
MD5 | 626666ee3fc2675f5bc78c0172bcd009 |
|
BLAKE2b-256 | c5d5dfb25ee874eecb2f91ce16063a01150cceee8918f06d2d4ca75c4e78563f |
File details
Details for the file talos_linux_api_v1.6.0-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: talos_linux_api_v1.6.0-0.1.0-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.7.4 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1bae357913448d908bc737da589d855a752d14c07652e1b31e0a54f4ad1997 |
|
MD5 | 75a66ca6031c3829a53983470dbd65e7 |
|
BLAKE2b-256 | a04e511a7605a0adb0ad31b8b06e2f9d2ca1e17dfcab25082deb8c3375c3b6b9 |