Skip to main content

Client library for connecting nodes to the KDAI distributed AI platform

Project description

KDAI Node Client

The official client library for connecting nodes to the KDAI distributed AI platform.

Features

  • Simple node registration and authentication
  • Secure WebSocket-based communication with KDAI hub
  • Task management for AI workloads
  • Resource utilization monitoring
  • Simple CLI interface
  • Robust HTTP/HTTPS handling with improved connectivity

Installation

pip install kdai-node-client

Quick Start

Register a New Node

To register a new node with your KDAI server:

# Register a new node
kdai-node register --server-url https://your-kdai-server.com --name "My AI Node"

This will generate an authentication token for your node and save the configuration.

Start the Node

Once registered, you can start the node:

# Start the node
kdai-node start

The node will connect to the KDAI server, report its system information, and start accepting tasks.

Advanced Usage

Monitor Node Status

Check the status of your node:

kdai-node status

Stop Node

Stop a running node:

kdai-node stop

Programmatic Usage

You can also use the KDAI Node Client as a library in your Python code:

from kdai_node_client import KDAINode

# Create a node instance
node = KDAINode(server_url="https://your-kdai-server.com", node_name="My AI Node")

# Register the node
node.register()

# Start the node
node.start()

# To stop the node
node.stop()

API Reference

Full API documentation is available at https://docs.kdai.io/node-client/

Requirements

  • Python 3.8 or higher
  • Working network connection to KDAI server
  • WebSocket support

Recent Changes

Version 0.1.1 (2025-03-27)

  • Fixed HTTP to HTTPS redirect handling to improve connection reliability
  • Added proper error handling for network connectivity issues
  • See CHANGELOG.md for the full history of changes

License

MIT License

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

kdai_node_client-0.2.1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kdai_node_client-0.2.1-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file kdai_node_client-0.2.1.tar.gz.

File metadata

  • Download URL: kdai_node_client-0.2.1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for kdai_node_client-0.2.1.tar.gz
Algorithm Hash digest
SHA256 92bf13cc86b405c618119a9a68877a308f5e82dbe4257a09138ec970739a275d
MD5 42e707082f397f66c3ae390db051243a
BLAKE2b-256 a3bc073ee50d059ce3b14f6ea653089188ac111852bb3b7a580102f24865f07b

See more details on using hashes here.

File details

Details for the file kdai_node_client-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kdai_node_client-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6c4ba04c53f54151c8863e6f076506e44cf1b4f14dabc372ca21d28c908e7e4
MD5 a8c68f6d6da01e72b8667a668a0de918
BLAKE2b-256 89f4f10102458f3eb9be46b02f870485ca30078b7c3292d891733384cbe77ebd

See more details on using hashes here.

Supported by

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