The best way to get this password isn't to extract it, but to use it as a secure option in your script. Modify your job and add an option with the "Secure" input type, then choose the key that you want to pass. There are a few ways to get the content into the script, but I think the easiest is using environment variables. When your script runs it will be given access to that option as an environment variable so you can just call it.
If you name your option securepass the env var will be $RD_OPTION_SECUREPASS.
In Python you can call it like this:
import os
password = os.environ['RD_OPTION_SECUREPASS']