Skip to content

Instantly share code, notes, and snippets.

View thoughtgeek's full-sized avatar

Surya thoughtgeek

View GitHub Profile
@thoughtgeek
thoughtgeek / gist:6c5df87003380f50d40c11bc91584dd8
Created June 2, 2025 09:52
Weather API calling and storing to Google Sheets
import requests
import json
from google.oauth2.service_account import Credentials
from googleapiclient.discovery import build
from datetime import datetime
class APIToSheetsWriter:
def __init__(self, credentials_file, spreadsheet_id):
"""
Initialize the Google Sheets API client
weewdf
edfdf
asdfds