def planet_key_entry(args): if args.type=="quiet": write_planet_json({'key': args.key}) elif args.type==None and args.key==None: try: subprocess.call('planet init',shell=True) except Exception as e: print('Failed to Initialize')
def init(email, password): '''Login using email/password''' response = call_and_wrap(clientv1().login, email, password) write_planet_json({'key': response['api_key']}) click.echo('initialized')