Overwriting Google Drive API v3 Argparse in Python

后端 未结 2 1980
闹比i
闹比i 2020-12-19 20:22

I\'m trying to use the Google Drive API (v3) with Python to obtain and upload files to my Google Drive account.

I used this guide to setup my authentication: https:

2条回答
  •  攒了一身酷
    2020-12-19 21:10

    Nevermind, I figured it out. hpaulj had it right.

    In the get_credentials() method, right before it called run_flow(), I simply had to add a line saying:

    flags=tools.argparser.parse_args(args=[])
    credentials=tools.run_flow(flow, store, flags)
    

    And at the beginning when I read the command line with my inputs, I simply used parser_known_flags() as hpaulj suggested!

    Thanks, shishy

提交回复
热议问题