Bill374 / 2000-sail-polars

NMEA2000 message logging and sailing performance analysis
GNU General Public License v3.0
0 stars 0 forks source link

Set up authentication for Google Drive #11

Closed Bill374 closed 3 years ago

Bill374 commented 3 years ago

Create a service account any authentication for Google drive. Capture all the required steps to be documented. Include details of python dependencies

See: https://developers.google.com/identity/protocols/oauth2/service-account#python PyDrive might be similar but there are indications that it is less easy to use for non-interactive service IDs https://pythonhosted.org/PyDrive/index.html Google Auth https://google-auth.readthedocs.io/en/latest/ Google Drive API https://developers.google.com/drive/api/v3/quickstart/python

Bill374 commented 3 years ago

Create a Google Cloud project "RKR Logger". Create a service account "pi-one". Create a public/private key pair. Download the private key and save it to the pi. Where would be a good place to put it? rkr-logger-54e7a45a3091.json

Bill374 commented 3 years ago
$ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json

pi-one@rkr-logger.iam.gserviceaccount.com

Bill374 commented 3 years ago
pip install google-auth
pip install google-api-python-client
Bill374 commented 3 years ago

Set up a Google Drive directory "RKR-Logger" and share it with pi-one@rkr-logger.iam.gserviceaccount.com

Bill374 commented 3 years ago

Decided to go with saving files to USB Drive instead. Will not implement Google drive functionality.