How can dApps sign transactions?

Hello,
I have a basic question that looks simple but a little confused about it: what is the best convention to allow dApps to sign users transactions ? There is a couple of solutions like AlgoSigner or Pera Connect that are based on receiving unsigned transaction, sign it, and then return signed transaction, this is so easy if we use JS as main SDK for building transactions, but how about other SDKs like Python or Golang, how can we sign transactions built with those SDK by JS signers ? or is there other solutions to do so ?
Thank you in advance.

Many dApps use:

Thank you @PatrickB for sharing this link, it looks a good solution, however it is also in React(JS) so the dApp should have and build transactions in React which is not my case

The upcoming version in GitHub - TxnLab/use-wallet-js: TypeScript library for integrating Algorand wallets into decentralized applications (which will become v3 in use-wallet) may be what you want as it’s pure ts/js w/ the frameworks separate.