Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Workflow/Pythonista samples for saving/retrieving from keychain
# coding: utf-8
import sys
import keychain
import clipboard
import webbrowser
key = sys.argv[1]
value = keychain.get_password("workflow", key)
if value != None:
clipboard.set(value)
else:
clipboard.set("")
webbrowser.open("workflow://")
# coding: utf-8
import sys
import keychain
import webbrowser
key = sys.argv[1]
value = sys.argv[2]
keychain.set_password("workflow",key,value)
webbrowser.open("workflow://")
@dorukgezici

This comment has been minimized.

Copy link

dorukgezici commented May 30, 2017

Good example thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.