omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    How do you manage keys and tokens, seasoned Pythonistas?

    Pythonista
    2
    2
    605
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nami_22
      nami_22 last edited by nami_22

      I thought it was said that saving keys as environment variables was a bad idea? I normally use a.env file and load values from it with dotenv, and I make sure to include it in my gitignore file.

      However, after reading that it is bad practise to maintain keys and sensitive information as environment variables (temporary or otherwise), I'm curious as to what constitutes good security practise.

      https://router-address.uno/

      cvp 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @nami_22 last edited by

        @nami_22 Pythonista provides the keychain module

        The keychain module provides simple access to secure password storage.

        Please note that the keychain is not shared between apps, so you (fortunately) cannot use this to access passwords that are stored in Safari’s keychain, for example.

        keychain.get_password(service, account)
        Get the password for the given service/account that was previously stored in the keychain.

        keychain.set_password(service, account, password)
        Save a password for the given service/account in the keychain.

        keychain.delete_password(service, account)
        Delete the password for the given service/account from the keychain.

        keychain.reset_keychain()
        Delete all data from the keychain.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors