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.3.tar.gz (16.5 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.3-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kdai_node_client-0.2.3.tar.gz
  • Upload date:
  • Size: 16.5 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.3.tar.gz
Algorithm Hash digest
SHA256 44e62183a545c7d6b9044047db3fd456a634be66103e33e23cd8eccecd5dc26f
MD5 ead3e4757f41049aa148786487349208
BLAKE2b-256 4c0538890b6f83ca9def122270fa7d7cd061209a5639e2454cf41fa0293e7271

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kdai_node_client-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8495b664fb5b4fd369bd273214afadb63e1632f0de0ac895de027300ee0dd300
MD5 764045c9795de49b1594469758fa432d
BLAKE2b-256 5743aa4b06657563e1829f4f72d3269df2bca0653439a9a7549a4fc3a4852285

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