업무자동화

나만의 API 서비스 구축 사례 (GCP , Python)

웍투오토(work2auto) 2024. 11. 12. 04:52

Google Cloud Platform (GCP) - App Engine & Cloud Run 장점:

  • Google App Engine을 통해 Python 앱을 쉽게 배포할 수 있음.
  • Cloud Run으로 서버리스 Docker 컨테이너 기반의 Python 앱을 배포할 수 있음.
  • 무료 및 저렴한 플랜 제공.

https://console.cloud.google.com/

 

Google 클라우드 플랫폼

로그인 Google 클라우드 플랫폼으로 이동

accounts.google.com

사전 준비

 

  • Google Cloud Console에서 Google Sheets API를 활성화합니다.
  • 서비스 계정을 생성하고, OAuth 2.0 클라이언트 파일(credentials.json)을 다운로드합니다.
  • 다운로드한 credentials.json 파일을 애플리케이션 폴더에 배치합니다.
pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client Flask

 

 

2단계: Google Sheets API 설정

  1. Google Sheets에서 읽어올 데이터를 가진 스프레드시트를 만듭니다.
  2. 해당 시트의 공유 권한을 서비스 계정 이메일에 읽기 권한으로 부여합니다.
  3. 스프레드시트의 ID를 복사합니다. (예: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit에서 SPREADSHEET_ID 부분)

 

개발문의 환영합니다.

Start an Open Chat on KakaoTalk!
Tap the link to get started.

웍투오토] 웹크롤링 & 업무자동화 개발문의
https://open.kakao.com/o/sF2plaVg