Basic python rewrite for add-key-pair