Skip to main content

BlueChi Python bindings

The BlueChi Python bindings provides a Python module to interact with the D-Bus API of BlueChi. It consists of the following subpackages:

  • api: auto-generated code based the BlueChi D-BUS API description
  • ext: custom written code to simplify common tasks

Installation

Using pip3:

# from PyPi
pip3 install bluechi
# or from cloned git repo
pip3 install --force dist/bluechi-<version>-py3-none-any.whl

Examples

Listing all connected nodes and their current state:

from bluechi.api import Controller

for node in Controller().list_nodes():
    # node[name, obj_path, status]
    print(f"Node: {node[0]}, State: {node[3]}")

Starting and stopping of a systemd unit on a specific node using the Unit class from the ext subpackage to implicitly wait for the job to finish:

from bluechi.ext import Unit

hu = Unit("my-node-name")

result = hu.start_unit("chronyd.service")
print(result)

result = hu.stop_unit("chronyd.service")
print(result)

Metadata

Release files for bluechi 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for bluechi 1.2.1
File Interpreter ABI Platform
bluechi-1.2.1-py3-none-any.whl Python 3 none any Details

Release files / bluechi-1.2.1-py3-none-any.whl

Download URL bluechi-1.2.1-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
746d606b54790ed0a9d3bf07bb00bf8795bbcb75818e3dd06c94232583bd4b39
BLAKE2b-256 checksum
How to use checksums
9eb3c5d3fd67bdacb2ab52eb9e32db6d2fbd62b1f4afcca7f51e35b68fe6e613
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

1.2.1 This release

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page