Skip to content

Instantly share code, notes, and snippets.

View GabrielSGoncalves's full-sized avatar
🏀
Data Engineer @ Perform-Billtrust

GabrielSGoncalves GabrielSGoncalves

🏀
Data Engineer @ Perform-Billtrust
View GitHub Profile
@GabrielSGoncalves
GabrielSGoncalves / read_private_file_from_gdrive.py
Last active September 21, 2023 16:06
Read private files from a Google Drive
from typing import Union, Dict
from io import BytesIO, StringIO
import json
import pandas as pd
import requests
from pydrive2.auth import GoogleAuth
from pydrive2.drive import GoogleDrive
def read_private_file_from_gdrive(
file_url: str, file_format: str, google_auth: GoogleAuth, **kwargs