PythonSDK + Django and Signing Trasactions

Hello - I’m building an application on Django using the Python SDK and I’m looking for a good source code or tutorial on how to get a transaction signed by the user.

I’ve been able to create ASAs without any issues using the SDK, but something eludes me still.

As it stands, most tutorials on the Algo Dev docs have the mnemonic phrase hard-coded, this is obviously not ideal in any production app.

My question: What is the best approach to create an ASA & have the user sign the transaction in the View?

You have three solutions currently:

Hello Fabrice,

Thank you for the input! Is there a native Python solution using the SDK? The links sent appear to be JavaScript, which I’m not opposed to if that’s the only 3 solutions available.

I was reading through the docs and saw the KMD option, Is there sufficient documentation for that?

If you want the user to store the keys, the solution (i.e., non-custodial) needs to be client side and use Javascript.

If you want to store the keys for the users, then it really depends on the security model you are considering. Amongst many other questions, you may need to consider what happens if your server gets compromised. If it stores a kmd token, the adversary may just steal all the Algos of all the users.
See also Could I implement an ASA with it's own custom wallet? - #2 by fabrice