Skip to main content

Generate D-Bus

gen_dbus is a Clean Architecture Python generator tool for creating production-grade D-Bus IPC projects in C11, C++20, and Python 3.12+.

Developed in python code.

The README is used to introduce the modules and provide instructions on how to install the modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

gen_dbus python checker gen_dbus package checker gen_dbus interface checker gen_dbus isp checker gen_dbus srp checker GitHub issues open GitHub contributors

Table of Contents

🚀 Installation

Used next development environment

debian linux os

gen_dbus python3 build

Currently there are four ways to install package:

  • Install process based on using pip mechanism
  • Install process based on build mechanism
  • Install process based on setup.py mechanism
  • Install process based on docker mechanism
Install using pip

gen_dbus is located at pypi.org.

You can install by using pip:

pip3 install gen-dbus
Install using build

Navigate to release page download and extract release archive.

To install gen_dbus type the following:

tar xvzf gen_dbus-x.y.z.tar.gz
cd gen_dbus-x.y.z/
python3 -m pip install --upgrade setuptools pip build
pip3 install -r requirements.txt
python3 -m build --no-isolation --wheel
pip3 install ./dist/gen_dbus-*-py3-none-any.whl
Install using py setup

Navigate to release page download and extract release archive.

To install gen_dbus locate and run setup.py with arguments:

tar xvzf gen_dbus-x.y.z.tar.gz
cd gen_dbus-x.y.z/
pip3 install -r requirements.txt
python3 setup.py install_lib
python3 setup.py install_data
python3 setup.py install_egg_info
Install using docker

You can use Dockerfile to create image/container.

📦 Dependencies

gen_dbus requires next modules and libraries:

📁 Tool structure

gen_dbus is based on Clean / Hexagonal Architecture and SOLID principles:

Click to expand tool structure
    gen_dbus/
         ├── core/
         │   ├── __init__.py
         │   ├── model/
         │   │   ├── bus_type.py
         │   │   ├── dbus_role.py
         │   │   ├── __init__.py
         │   │   ├── project_setup.py
         │   │   └── project_type.py
         │   └── service/
         │       ├── engine.py
         │       ├── __init__.py
         │       ├── iservice.py
         │       └── isubprocessor.py
         ├── engine.py
         ├── infrastructure/
         │   ├── cli/
         │   │   ├── engine.py
         │   │   ├── icli.py
         │   │   ├── __init__.py
         │   │   └── setup/
         │   │       ├── bundle.py
         │   │       ├── dep_validator.py
         │   │       ├── dependencies.py
         │   │       ├── factory.py
         │   │       ├── __init__.py
         │   │       ├── keys.py
         │   │       ├── opt_validator.py
         │   │       ├── options.py
         │   │       ├── registry.py
         │   │       └── validator.py
         │   ├── command/
         │   │   ├── bundle.py
         │   │   ├── definition.py
         │   │   ├── executor.py
         │   │   ├── idefinition.py
         │   │   ├── iexecutor.py
         │   │   └── __init__.py
         │   ├── config/
         │   │   ├── gen_dbus.cfg
         │   │   ├── gen_dbus.logo
         │   │   ├── scheme.json
         │   │   └── templates.tgz
         │   ├── __init__.py
         │   ├── ischeme_builder.py
         │   ├── scheme_builder.py
         │   └── subprocessor.py
         ├── __init__.py
         ├── py.typed
         └── setup/
             ├── bundle.py
             ├── dep_validator.py
             ├── dependencies.py
             ├── factory.py
             ├── __init__.py
             ├── keys.py
             ├── opt_validator.py
             ├── options.py
             ├── registry.py
             └── validator.py

     10 directories, 50 files

✨ Features

  • Generates production-ready, wire-compatible D-Bus IPC projects across 3 stacks (--type):
    • posix_c: C11 (libdbus-1 vtable service + proxy client + CMake/Make).
    • posix_cxx: C++20 (RAII wrappers over libdbus-1 + CMake/Make).
    • posix_py: Python 3.12+ (Clean Architecture + SOLID async dbus-fast server & client).
  • Complete D-Bus Object Model out of the box: Method Calls (Ping, SetStatus), Signals (StatusChanged), Properties (Status, CallCount, PropertiesChanged), and Introspection XML (org.freedesktop.DBus.Introspectable).
  • Flexible endpoint role filtering (--role {both,client,server}) and bus selection (--bus {session,system}).
  • Strict SOLID & Hexagonal Architecture with structural Protocol interfaces, 10.00/10 pylint score, and 100% unit test coverage.

📊 Code coverage

Click to expand code coverage
Name Stmts Miss Cover
gen_dbus/__init__.py 9 0 100%
gen_dbus/core/__init__.py 9 0 100%
gen_dbus/core/model/__init__.py 9 0 100%
gen_dbus/core/model/bus_type.py 16 0 100%
gen_dbus/core/model/dbus_role.py 17 0 100%
gen_dbus/core/model/project_setup.py 19 0 100%
gen_dbus/core/model/project_type.py 17 0 100%
gen_dbus/core/service/__init__.py 9 0 100%
gen_dbus/core/service/engine.py 34 0 100%
gen_dbus/core/service/iservice.py 14 0 100%
gen_dbus/core/service/isubprocessor.py 14 0 100%
gen_dbus/engine.py 57 0 100%
gen_dbus/infrastructure/__init__.py 9 0 100%
gen_dbus/infrastructure/cli/__init__.py 9 0 100%
gen_dbus/infrastructure/cli/engine.py 43 0 100%
gen_dbus/infrastructure/cli/icli.py 16 0 100%
gen_dbus/infrastructure/cli/setup/__init__.py 9 0 100%
gen_dbus/infrastructure/cli/setup/bundle.py 23 0 100%
gen_dbus/infrastructure/cli/setup/dep_validator.py 33 0 100%
gen_dbus/infrastructure/cli/setup/dependencies.py 19 0 100%
gen_dbus/infrastructure/cli/setup/factory.py 29 0 100%
gen_dbus/infrastructure/cli/setup/keys.py 26 0 100%
gen_dbus/infrastructure/cli/setup/opt_validator.py 33 0 100%
gen_dbus/infrastructure/cli/setup/options.py 17 0 100%
gen_dbus/infrastructure/cli/setup/registry.py 24 0 100%
gen_dbus/infrastructure/cli/setup/validator.py 35 0 100%
gen_dbus/infrastructure/command/__init__.py 9 0 100%
gen_dbus/infrastructure/command/bundle.py 19 0 100%
gen_dbus/infrastructure/command/definition.py 35 0 100%
gen_dbus/infrastructure/command/executor.py 34 0 100%
gen_dbus/infrastructure/command/idefinition.py 21 0 100%
gen_dbus/infrastructure/command/iexecutor.py 15 0 100%
gen_dbus/infrastructure/ischeme_builder.py 15 0 100%
gen_dbus/infrastructure/scheme_builder.py 49 0 100%
gen_dbus/infrastructure/subprocessor.py 78 0 100%
gen_dbus/setup/__init__.py 9 0 100%
gen_dbus/setup/bundle.py 25 0 100%
gen_dbus/setup/dep_validator.py 33 0 100%
gen_dbus/setup/dependencies.py 21 0 100%
gen_dbus/setup/factory.py 46 0 100%
gen_dbus/setup/keys.py 27 0 100%
gen_dbus/setup/opt_validator.py 33 0 100%
gen_dbus/setup/options.py 12 0 100%
gen_dbus/setup/registry.py 24 0 100%
gen_dbus/setup/validator.py 38 0 100%
Total 1092 0 100%

🛠 Usage

Install package:

pip3 install gen-dbus

Prepare main entry point by downloading main.py or running from repository root:

python3 main.py create --name telemetry_c --type posix_c --role both --bus session --output ./demo/posix_c
python3 main.py create --name telemetry_cxx --type posix_cxx --role both --bus session --output ./demo/posix_cxx
python3 main.py create --name telemetry_py --type posix_py --role both --bus session --output ./demo/posix_py
python3 main.py create --name sensor_cli --type posix_c --role client --bus system --output ./demo/client_only
python3 main.py create --name sensor_srv --type posix_cxx --role server --bus system --output ./demo/server_only

See templates_guide.md for full details on compiling and running generated D-Bus servers and clients.

📚 Docs

Documentation Status

More documentation and info at:

👥 Contributing

Contributing to gen_dbus

License: GPL v3 License

Copyright (C) 2021 - 2026 by vroncevic.github.io/gen_dbus

gen_dbus is free software; you can redistribute it and/or modify it under the same terms as Python itself, either Python version 3.x or, at your option, any later version of Python 3 you may have available.

Lets help and support PSF.

Python Software Foundation

Donate

Metadata

Release files for gen-dbus 1.1.6

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

Source distribution (sdist)

Source distribution for gen-dbus 1.1.6
File Size Uploaded Provenance Actions
gen_dbus-1.1.6.tar.gz 60.5 kB Without provenance Details for gen_dbus-1.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gen-dbus 1.1.6
File Interpreter ABI Platform Actions
gen_dbus-1.1.6-py3-none-any.whl Python 3 none any Details for gen_dbus-1.1.6-py3-none-any.whl

Total release size: 157.6 kB

Release files / gen_dbus-1.1.6.tar.gz

Download URL gen_dbus-1.1.6.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
110468da1bf063ddd1e9eed7d196e376722cf7bccf2db576aacb3be79e74eccb
BLAKE2b-256 checksum
How to use checksums
2036837528649b660d7deb4266cbf36fe7d4206ae142c3a50442791d1e466e62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.0 CPython/3.12.3

Release files / gen_dbus-1.1.6-py3-none-any.whl

Download URL gen_dbus-1.1.6-py3-none-any.whl
Size 97.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddb5ab1bde9c6921542295f13841137eef87cd51f2e39928ec6b1450d87e7761
BLAKE2b-256 checksum
How to use checksums
9fa344377fae9bcdea47bbd25e2fbfbfb577dfda2636e60fbbb5d7bcc77f8cee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.0 CPython/3.12.3

Security for gen-dbus 1.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files No provenance

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