반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- pywinauto 윈도우
- uipath 입문
- Uipath 설치방법
- selenium
- pywinauto
- 네이버 로그인 영수증 해결
- 날짜 정규식
- 가상환경설치
- Selenium 셀렉터잡기
- 파이썬 환경설정
- 파이썬 가상환경 설치
- 네이버 로그인 하기
- Element is not clickable at point
- 네이버커머스API
- pycdc.exe
- Python
- UiPath
- 파이썬네이버부동산
- 왕초보 파이썬 실행
- 네이버매물크롤링
- 커머스API
- pycdas.exe
- 네이버부동산크롤링
- Uipath 기초
- 파이썬 네이버 로그인
- vscode venv 설치
- venv 설치
- 네이버 로그인 캡챠해결
- 파이썬 가상환경 설치방법
- pywinauto 윈도우제어
Archives
- Today
- Total
콘솔워크
[Python] 구글 드라이브 API로 폴더 만들어보기 본문
반응형
https://uipath.tistory.com/134
[Python] 구글 드라이브 API 연결해보기
https://uipath.tistory.com/133 [Python] 구글 드라이브 API 초기설정 https://console.cloud.google.com/ Google 클라우드 플랫폼 로그인 Google 클라우드 플랫폼으로 이동 accounts.google.com 구글 클라우드..
uipath.tistory.com
위 링크의 설정이 필요합니다.
구글드라이브에 폴더를 생성하는 코드입니다.
from Google import Create_Service
CLIENT_SECRET_FILE = 'client_secret.json' # 초기설정 json파일 이름
API_NAME = 'drive'
API_VERSION = 'v3'
SCOPES = ['https://www.googleapis.com/auth/drive']
service = Create_Service(CLIENT_SECRET_FILE, API_NAME, API_VERSION, SCOPES)
# 폴더 생성 테스트
folders = ['folder1', 'folder2', 'folder3']
for folder in folders:
file_metadata = {
'name': folder,
'mimeType': 'application/vnd.google-apps.folder'
}
service.files().create(body=file_metadata).execute()
코드를 실행하면 드라이브에 폴더가 생성됩니다.
반응형
'프로그래밍 > python' 카테고리의 다른 글
[Python] dictionary 내의 모든 key를 int로 변경 (0) | 2022.06.18 |
---|---|
[selenium] 요소가 존재하지만 클릭 할 수 없는 오류 'Element is not clickable at point' (1) | 2022.06.17 |
python dictionary to json (0) | 2022.06.14 |
pyinstaller 자동업데이트 기능 AWS S3 (Exe) 자동업데이트 (1) | 2022.06.09 |
pyinstaller 자동업데이트 github 연동 (0) | 2022.06.08 |