| Summary: | Add python bindings for kpublictransport | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] KPublicTransport | Reporter: | Max Buchholz <Max.Buchholz> |
| Component: | general | Assignee: | Volker Krause <vkrause> |
| Status: | REPORTED --- | ||
| Severity: | wishlist | CC: | nicolas.fella |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Max Buchholz
2025-02-25 14:25:30 UTC
That has come up before, we could do that indeed. There's multiple ways on how to approach this, just from looking at other examples in KDE: * Using the PySide/Shiboken way used in KDE Frameworks (e.g. https://invent.kde.org/frameworks/kcoreaddons/-/tree/master/python) * "Hand-made" bindings e.g. via Boost.Python as done here: https://invent.kde.org/libraries/kopeninghours/-/tree/master/PyKOpeningHours The former would have the advantage of wider use in KDE and thus easier maintenance, however I don't know whether that will result in "good" bindings here, ie. no unnecessarily exposed Qt types etc. If the goal is to create custom UIs using Python (and Qt) then PySide bindings make sense. For anything else it might make more sense to do a from-scratch implementation instead of dragging Qt into it. I'd see the main value of kpublictransport in the data about providers, not necessarily the implementation to talk to them (In reply to Nicolas Fella from comment #2) > I'd see the main value of kpublictransport in the data about providers, not necessarily the implementation to talk to them The data about providers is already a separate project (https://github.com/public-transport/transport-apis), KPublicTransport only holds a copy of that (there's still some minor differences, but that's bugs rather than features). > (In reply to Nicolas Fella from comment #2)
> > I'd see the main value of kpublictransport in the data about providers, not necessarily the implementation to talk to them
For me it's actually exactly that: Instead of rewriting the logic to talk to different kinds of providers again in python, I would rather prefer to use kpublictransport. Of course if it is harder to maintain the bindings, compared to a separate implementation, this doesn't work out.
|