Code Monkey home page Code Monkey logo

talos-linux-api's Introduction

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-----

talos-linux-api's People

Contributors

stereobutter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

talos-linux-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.