Skip to main content

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 the ssl module relies upon does not like the format of the private key that talosctl generates.

-----BEGIN ED25519 PRIVATE KEY-----
              ...
-----END ED25519 PRIVATE KEY-----

To make openssl happy you have to fix the header and footer by removing the ED25519 part.

-----BEGIN PRIVATE KEY-----
              ...
-----END PRIVATE KEY-----

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

talos-linux-api-v1.6.0-0.1.0.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

talos_linux_api_v1.6.0-0.1.0-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file talos-linux-api-v1.6.0-0.1.0.tar.gz.

File metadata

File hashes

Hashes for talos-linux-api-v1.6.0-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d82833b8d5bf6ca7fbdd1b9767c76f010c56120418ff4b0ad69c9b6583fee2a8
MD5 626666ee3fc2675f5bc78c0172bcd009
BLAKE2b-256 c5d5dfb25ee874eecb2f91ce16063a01150cceee8918f06d2d4ca75c4e78563f

See more details on using hashes here.

File details

Details for the file talos_linux_api_v1.6.0-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for talos_linux_api_v1.6.0-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c1bae357913448d908bc737da589d855a752d14c07652e1b31e0a54f4ad1997
MD5 75a66ca6031c3829a53983470dbd65e7
BLAKE2b-256 a04e511a7605a0adb0ad31b8b06e2f9d2ca1e17dfcab25082deb8c3375c3b6b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page