Skip to content

Automatic generator for bluez sdbus bindings #10

Open

Description

@Kraken1121

Long story short, I've made an automatic generator for python_sdbus bluez bindings. I uploaded it to https://github.com/Kraken1121/bluez_sdbus_generator and the generated bindings module looks like this: https://github.com/Kraken1121/bluez_sdbus . It parses documentation in the provided bluez repository, extracts declarations and their corresponding documentation paragraphs, double checks the declarations against the declarations in the C files whenever possible (fun fact, this is how I've found a bug in bluez), and generate the interface classes (including original docstrings!). No offense, but I think the generated bindings look a lot better than your own bindings here

I think it works good enough for amateur usage and I think it has a good potential for anyone interested in maintaining a bluez bindings module: maintain the generated bindings module as the sdbus_bluez repository, run the generator against it whenever a new bluez version comes out, and just commit the difference if it looks good.

Unfortunately, I don't think I will be able to continue working on neither the generator nor the bindings. I'm not a bluetooth-related developer and I decided to write the parser just because it looked like an easy (haha) solution for one of my private projects. That project is complete, it works fine, and I don't think I'm interested in developing it any further, so I'm publishing the results of my work in hope you'll find the useful.

Feel free to ask any questions while I'm here

Activity

  1. igo95862 commented on Dec 1, 2025

    @igo95862
    Contributor

    Hello @Kraken1121

    Good work! I had a plans for documentation parser #9 but I don't have a lot of time to work on it.

  2. Kraken1121 commented on Dec 1, 2025

    @Kraken1121
    Author

    I think it's kind of ready and you can use it as is. Although, If you want to keep the async and blocking interfaces as different modules you'll probably need to make some trivial changes to the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions