Skip to content

Instantly share code, notes, and snippets.

View ronybc's full-sized avatar
🌍

Rony B Chandran ronybc

🌍
View GitHub Profile
@ronybc
ronybc / openweather.py
Last active November 22, 2022 06:58
Flat text view of Openweathermap.org One Call API JSON
#!/usr/bin/python3
# ronybc - 20210217
import requests, json, time
openweather_key = 'get from https://home.openweathermap.org/api_keys'
lat = 8.498
lon = 77.0092
url = f'https://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}&units=metric&appid={openweather_key}'