Set GOOGLE_APPLICATION_CREDENTIALS in Python project to use Google API

后端 未结 4 1499
死守一世寂寞
死守一世寂寞 2020-12-23 09:42

I am a programming beginner and thing I\'m trying to learn how to use google API with Python.

I have:

  1. created a project on Google Cloud an
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 09:52

    I know that this post was answered but the following is a cleaner way to specify the GOOGLE_APPLICATION_CREDENTIALS variable.

    client = language.LanguageServiceClient.from_service_account_json("/path/to/file.json")
    

提交回复
热议问题