Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 971 Bytes

Readme.md

File metadata and controls

46 lines (31 loc) · 971 Bytes

Google Docs API Automation

This project demonstrates how to use the Google Docs API to automate reading and writing data in Google Docs Documents using Python.

Setup

Clone the Repository

git clone https://github.com/your-username/Google-Docs-API.git

Navigate to the Project Directory

cd Google-Docs-API

Install Required Libraries

pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client

Set Environment Variable

Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of your service account key:

set GOOGLE_APPLICATION_CREDENTIALS=path\to\your\service-account-file.json

Usage

Read Data from Google Docs

Run the Python script read.py to read data from your Google Docs:

python read.py

Create Google Docs

Run the script to create Docs:

python create_doc.py