Python SDK: Account object from mnemonic

The JS SDK has a mnemonicToSecretKey function that returns an Account from a specific mnemo.
But I can’t find a similar function in the python SDK.

How I can create an Account object from a mnemonic ?

Thanks.

There is no “account” object in the Python SDK to my knowledge.

But you can convert a mnemonic to a secret/private key:
https://py-algorand-sdk.readthedocs.io/en/latest/algosdk/mnemonic.html#algosdk.mnemonic.to_private_key

algosdk.mnemonic.to_private_key

and convert a private key to an address:
https://py-algorand-sdk.readthedocs.io/en/latest/algosdk/account.html#algosdk.account.address_from_private_key

algosdk.mnemonic.to_private_key

1 Like