bluechi


Namebluechi JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/eclipse-bluechi/bluechi/
SummaryPython bindings for BlueChi's D-Bus API
upload_time2025-07-28 15:25:08
maintainerNone
docs_urlNone
authorBlueChi developers
requires_python>=3.9
licenseNone
keywords bluechi python d-bus systemd
VCS
bugtrack_url
requirements black flake8 isort
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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`:

```sh
# 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:

```python
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:

```python
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)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eclipse-bluechi/bluechi/",
    "name": "bluechi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "bluechi, python, D-Bus, systemd",
    "author": "BlueChi developers",
    "author_email": "BlueChi developers <bluechi-dev@eclipse.org>",
    "download_url": null,
    "platform": null,
    "description": "# BlueChi Python bindings\n\nThe BlueChi Python bindings provides a Python module to interact with the D-Bus API of BlueChi. It consists of the\nfollowing subpackages:\n\n- `api`: auto-generated code based the BlueChi D-BUS API description\n- `ext`: custom written code to simplify common tasks\n\n## Installation\n\nUsing `pip3`:\n\n```sh\n# from PyPi\npip3 install bluechi\n# or from cloned git repo\npip3 install --force dist/bluechi-<version>-py3-none-any.whl\n```\n\n## Examples\n\nListing all connected nodes and their current state:\n\n```python\nfrom bluechi.api import Controller\n\nfor node in Controller().list_nodes():\n    # node[name, obj_path, status]\n    print(f\"Node: {node[0]}, State: {node[3]}\")\n```\n\nStarting and stopping of a systemd unit on a specific node using the `Unit` class from the `ext` subpackage to\nimplicitly wait for the job to finish:\n\n```python\nfrom bluechi.ext import Unit\n\nhu = Unit(\"my-node-name\")\n\nresult = hu.start_unit(\"chronyd.service\")\nprint(result)\n\nresult = hu.stop_unit(\"chronyd.service\")\nprint(result)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python bindings for BlueChi's D-Bus API",
    "version": "1.1.0",
    "project_urls": {
        "Documentation": "https://bluechi.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/eclipse-bluechi/bluechi/",
        "Issues": "https://github.com/eclipse-bluechi/bluechi/issues",
        "Repository": "https://github.com/eclipse-bluechi/bluechi/"
    },
    "split_keywords": [
        "bluechi",
        " python",
        " d-bus",
        " systemd"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0a309316709a7266c47cf5f8199fb8274b52c67f22f92b55ae5284b2490dafdc",
                "md5": "706b8085a1d98e685d30c36cd48611b7",
                "sha256": "afdbfe796e7e928850100ed6d90bc4a39e7454954b38b07362b4f1c89137a614"
            },
            "downloads": -1,
            "filename": "bluechi-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "706b8085a1d98e685d30c36cd48611b7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 20307,
            "upload_time": "2025-07-28T15:25:08",
            "upload_time_iso_8601": "2025-07-28T15:25:08.038545Z",
            "url": "https://files.pythonhosted.org/packages/0a/30/9316709a7266c47cf5f8199fb8274b52c67f22f92b55ae5284b2490dafdc/bluechi-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-28 15:25:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eclipse-bluechi",
    "github_project": "bluechi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "24.3.0"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    "==",
                    "6.0.0"
                ]
            ]
        },
        {
            "name": "isort",
            "specs": [
                [
                    "==",
                    "5.13.2"
                ]
            ]
        }
    ],
    "lcname": "bluechi"
}
        
Elapsed time: 0.40874s