[{"data":1,"prerenderedAt":2081},["ShallowReactive",2],{"doc-\u002Fexamples\u002Fpython-weather-api-example":3},{"id":4,"title":5,"body":6,"description":2074,"extension":2075,"meta":2076,"navigation":69,"path":2077,"seo":2078,"stem":2079,"__hash__":2080},"content\u002Fexamples\u002Fpython-weather-api-example.md","Python Weather API Example",{"type":7,"value":8,"toc":2037},"minimark",[9,13,17,20,36,41,298,305,308,320,324,327,344,348,351,368,376,380,385,388,406,409,429,432,451,455,458,638,643,654,660,664,681,684,688,747,750,753,768,776,807,810,817,821,840,850,862,866,923,926,940,944,947,950,958,962,968,971,1095,1098,1117,1120,1148,1151,1166,1173,1177,1180,1635,1638,1658,1662,1665,1684,1687,1715,1732,1736,1739,1743,1763,1766,1770,1789,1792,1796,1817,1820,1827,1850,1853,1857,1860,1863,1896,1899,1902,1939,1943,1947,1950,1953,1960,1965,1968,1979,1986,1989,1996,1999,2002,2006,2033],[10,11,5],"h1",{"id":12},"python-weather-api-example",[14,15,16],"p",{},"This beginner-friendly example shows how to request weather data from an API, read the JSON response, and print a few useful values.",[14,18,19],{},"The goal here is to build a simple real-world Python example. You do not need to fully understand HTTP yet. You only need to see the basic pattern:",[21,22,23,27,30,33],"ol",{},[24,25,26],"li",{},"Send a request",[24,28,29],{},"Get data back",[24,31,32],{},"Read the JSON",[24,34,35],{},"Print the values you want",[37,38,40],"h2",{"id":39},"quick-example","Quick example",[42,43,48],"pre",{"className":44,"code":45,"language":46,"meta":47,"style":47},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","import requests\n\nurl = \"https:\u002F\u002Fapi.open-meteo.com\u002Fv1\u002Fforecast\"\nparams = {\n    \"latitude\": 40.7128,\n    \"longitude\": -74.0060,\n    \"current_weather\": True\n}\n\nresponse = requests.get(url, params=params)\ndata = response.json()\n\nprint(data[\"current_weather\"][\"temperature\"])\nprint(data[\"current_weather\"][\"windspeed\"])\n","python","",[49,50,51,64,71,92,104,126,146,162,168,173,212,231,236,270],"code",{"__ignoreMap":47},[52,53,56,60],"span",{"class":54,"line":55},"line",1,[52,57,59],{"class":58},"sVHd0","import",[52,61,63],{"class":62},"su5hD"," requests\n",[52,65,67],{"class":54,"line":66},2,[52,68,70],{"emptyLinePlaceholder":69},true,"\n",[52,72,74,77,81,85,89],{"class":54,"line":73},3,[52,75,76],{"class":62},"url ",[52,78,80],{"class":79},"smGrS","=",[52,82,84],{"class":83},"sjJ54"," \"",[52,86,88],{"class":87},"s_sjI","https:\u002F\u002Fapi.open-meteo.com\u002Fv1\u002Fforecast",[52,90,91],{"class":83},"\"\n",[52,93,95,98,100],{"class":54,"line":94},4,[52,96,97],{"class":62},"params ",[52,99,80],{"class":79},[52,101,103],{"class":102},"sP7_E"," {\n",[52,105,107,110,113,116,119,123],{"class":54,"line":106},5,[52,108,109],{"class":83},"    \"",[52,111,112],{"class":87},"latitude",[52,114,115],{"class":83},"\"",[52,117,118],{"class":102},":",[52,120,122],{"class":121},"srdBf"," 40.7128",[52,124,125],{"class":102},",\n",[52,127,129,131,134,136,138,141,144],{"class":54,"line":128},6,[52,130,109],{"class":83},[52,132,133],{"class":87},"longitude",[52,135,115],{"class":83},[52,137,118],{"class":102},[52,139,140],{"class":79}," -",[52,142,143],{"class":121},"74.0060",[52,145,125],{"class":102},[52,147,149,151,154,156,158],{"class":54,"line":148},7,[52,150,109],{"class":83},[52,152,153],{"class":87},"current_weather",[52,155,115],{"class":83},[52,157,118],{"class":102},[52,159,161],{"class":160},"s39Yj"," True\n",[52,163,165],{"class":54,"line":164},8,[52,166,167],{"class":102},"}\n",[52,169,171],{"class":54,"line":170},9,[52,172,70],{"emptyLinePlaceholder":69},[52,174,176,179,181,184,187,191,194,197,200,204,206,209],{"class":54,"line":175},10,[52,177,178],{"class":62},"response ",[52,180,80],{"class":79},[52,182,183],{"class":62}," requests",[52,185,186],{"class":102},".",[52,188,190],{"class":189},"slqww","get",[52,192,193],{"class":102},"(",[52,195,196],{"class":189},"url",[52,198,199],{"class":102},",",[52,201,203],{"class":202},"s99_P"," params",[52,205,80],{"class":79},[52,207,208],{"class":189},"params",[52,210,211],{"class":102},")\n",[52,213,215,218,220,223,225,228],{"class":54,"line":214},11,[52,216,217],{"class":62},"data ",[52,219,80],{"class":79},[52,221,222],{"class":62}," response",[52,224,186],{"class":102},[52,226,227],{"class":189},"json",[52,229,230],{"class":102},"()\n",[52,232,234],{"class":54,"line":233},12,[52,235,70],{"emptyLinePlaceholder":69},[52,237,239,243,245,248,251,253,255,257,260,262,265,267],{"class":54,"line":238},13,[52,240,242],{"class":241},"sptTA","print",[52,244,193],{"class":102},[52,246,247],{"class":189},"data",[52,249,250],{"class":102},"[",[52,252,115],{"class":83},[52,254,153],{"class":87},[52,256,115],{"class":83},[52,258,259],{"class":102},"][",[52,261,115],{"class":83},[52,263,264],{"class":87},"temperature",[52,266,115],{"class":83},[52,268,269],{"class":102},"])\n",[52,271,273,275,277,279,281,283,285,287,289,291,294,296],{"class":54,"line":272},14,[52,274,242],{"class":241},[52,276,193],{"class":102},[52,278,247],{"class":189},[52,280,250],{"class":102},[52,282,115],{"class":83},[52,284,153],{"class":87},[52,286,115],{"class":83},[52,288,259],{"class":102},[52,290,115],{"class":83},[52,292,293],{"class":87},"windspeed",[52,295,115],{"class":83},[52,297,269],{"class":102},[14,299,300,301,304],{},"This uses the free Open-Meteo API and the ",[49,302,303],{},"requests"," package.",[14,306,307],{},"It keeps the example small:",[309,310,311,314,317],"ul",{},[24,312,313],{},"Make a GET request",[24,315,316],{},"Parse JSON",[24,318,319],{},"Print values",[37,321,323],{"id":322},"what-this-example-does","What this example does",[14,325,326],{},"This example:",[309,328,329,332,335,338,341],{},[24,330,331],{},"Makes a GET request to a weather API",[24,333,334],{},"Sends location data as query parameters",[24,336,337],{},"Gets JSON data back from the API",[24,339,340],{},"Reads a few fields from the response",[24,342,343],{},"Prints the current weather values",[37,345,347],{"id":346},"what-you-need-before-running-it","What you need before running it",[14,349,350],{},"Before you run the code, make sure you have:",[309,352,353,356,362,365],{},[24,354,355],{},"Python installed",[24,357,358,359,361],{},"The ",[49,360,303],{}," package installed with pip",[24,363,364],{},"An internet connection",[24,366,367],{},"Basic understanding of dictionaries and function calls",[14,369,370,371,186],{},"If you are new to API requests, see ",[372,373,375],"a",{"href":374},"\u002Fhow-to\u002Fhow-to-make-an-api-request-in-python\u002F","how to make an API request in Python",[37,377,379],{"id":378},"install-requests","Install requests",[14,381,358,382,384],{},[49,383,303],{}," package is not built into Python, so you need to install it first.",[14,386,387],{},"Run:",[42,389,393],{"className":390,"code":391,"language":392,"meta":47,"style":47},"language-bash shiki shiki-themes material-theme-lighter github-light github-dark","pip install requests\n","bash",[49,394,395],{"__ignoreMap":47},[52,396,397,401,404],{"class":54,"line":55},[52,398,400],{"class":399},"sbgvK","pip",[52,402,403],{"class":87}," install",[52,405,63],{"class":87},[14,407,408],{},"If that does not work, try:",[42,410,412],{"className":390,"code":411,"language":392,"meta":47,"style":47},"python -m pip install requests\n",[49,413,414],{"__ignoreMap":47},[52,415,416,418,422,425,427],{"class":54,"line":55},[52,417,46],{"class":399},[52,419,421],{"class":420},"stzsN"," -m",[52,423,424],{"class":87}," pip",[52,426,403],{"class":87},[52,428,63],{"class":87},[14,430,431],{},"You can also check that it is installed with:",[42,433,435],{"className":390,"code":434,"language":392,"meta":47,"style":47},"python -c \"import requests; print(requests.__version__)\"\n",[49,436,437],{"__ignoreMap":47},[52,438,439,441,444,446,449],{"class":54,"line":55},[52,440,46],{"class":399},[52,442,443],{"class":420}," -c",[52,445,84],{"class":83},[52,447,448],{"class":87},"import requests; print(requests.__version__)",[52,450,91],{"class":83},[37,452,454],{"id":453},"how-the-code-works-step-by-step","How the code works step by step",[14,456,457],{},"Here is the same example again:",[42,459,460],{"className":44,"code":45,"language":46,"meta":47,"style":47},[49,461,462,468,472,484,492,506,522,534,538,542,568,582,586,612],{"__ignoreMap":47},[52,463,464,466],{"class":54,"line":55},[52,465,59],{"class":58},[52,467,63],{"class":62},[52,469,470],{"class":54,"line":66},[52,471,70],{"emptyLinePlaceholder":69},[52,473,474,476,478,480,482],{"class":54,"line":73},[52,475,76],{"class":62},[52,477,80],{"class":79},[52,479,84],{"class":83},[52,481,88],{"class":87},[52,483,91],{"class":83},[52,485,486,488,490],{"class":54,"line":94},[52,487,97],{"class":62},[52,489,80],{"class":79},[52,491,103],{"class":102},[52,493,494,496,498,500,502,504],{"class":54,"line":106},[52,495,109],{"class":83},[52,497,112],{"class":87},[52,499,115],{"class":83},[52,501,118],{"class":102},[52,503,122],{"class":121},[52,505,125],{"class":102},[52,507,508,510,512,514,516,518,520],{"class":54,"line":128},[52,509,109],{"class":83},[52,511,133],{"class":87},[52,513,115],{"class":83},[52,515,118],{"class":102},[52,517,140],{"class":79},[52,519,143],{"class":121},[52,521,125],{"class":102},[52,523,524,526,528,530,532],{"class":54,"line":148},[52,525,109],{"class":83},[52,527,153],{"class":87},[52,529,115],{"class":83},[52,531,118],{"class":102},[52,533,161],{"class":160},[52,535,536],{"class":54,"line":164},[52,537,167],{"class":102},[52,539,540],{"class":54,"line":170},[52,541,70],{"emptyLinePlaceholder":69},[52,543,544,546,548,550,552,554,556,558,560,562,564,566],{"class":54,"line":175},[52,545,178],{"class":62},[52,547,80],{"class":79},[52,549,183],{"class":62},[52,551,186],{"class":102},[52,553,190],{"class":189},[52,555,193],{"class":102},[52,557,196],{"class":189},[52,559,199],{"class":102},[52,561,203],{"class":202},[52,563,80],{"class":79},[52,565,208],{"class":189},[52,567,211],{"class":102},[52,569,570,572,574,576,578,580],{"class":54,"line":214},[52,571,217],{"class":62},[52,573,80],{"class":79},[52,575,222],{"class":62},[52,577,186],{"class":102},[52,579,227],{"class":189},[52,581,230],{"class":102},[52,583,584],{"class":54,"line":233},[52,585,70],{"emptyLinePlaceholder":69},[52,587,588,590,592,594,596,598,600,602,604,606,608,610],{"class":54,"line":238},[52,589,242],{"class":241},[52,591,193],{"class":102},[52,593,247],{"class":189},[52,595,250],{"class":102},[52,597,115],{"class":83},[52,599,153],{"class":87},[52,601,115],{"class":83},[52,603,259],{"class":102},[52,605,115],{"class":83},[52,607,264],{"class":87},[52,609,115],{"class":83},[52,611,269],{"class":102},[52,613,614,616,618,620,622,624,626,628,630,632,634,636],{"class":54,"line":272},[52,615,242],{"class":241},[52,617,193],{"class":102},[52,619,247],{"class":189},[52,621,250],{"class":102},[52,623,115],{"class":83},[52,625,153],{"class":87},[52,627,115],{"class":83},[52,629,259],{"class":102},[52,631,115],{"class":83},[52,633,293],{"class":87},[52,635,115],{"class":83},[52,637,269],{"class":102},[639,640,642],"h3",{"id":641},"_1-import-requests","1. Import requests",[42,644,646],{"className":44,"code":645,"language":46,"meta":47,"style":47},"import requests\n",[49,647,648],{"__ignoreMap":47},[52,649,650,652],{"class":54,"line":55},[52,651,59],{"class":58},[52,653,63],{"class":62},[14,655,656,657,659],{},"This gives you access to the ",[49,658,303],{}," package so you can send HTTP requests.",[639,661,663],{"id":662},"_2-set-the-api-url","2. Set the API URL",[42,665,667],{"className":44,"code":666,"language":46,"meta":47,"style":47},"url = \"https:\u002F\u002Fapi.open-meteo.com\u002Fv1\u002Fforecast\"\n",[49,668,669],{"__ignoreMap":47},[52,670,671,673,675,677,679],{"class":54,"line":55},[52,672,76],{"class":62},[52,674,80],{"class":79},[52,676,84],{"class":83},[52,678,88],{"class":87},[52,680,91],{"class":83},[14,682,683],{},"This is the API endpoint you are calling.",[639,685,687],{"id":686},"_3-create-a-params-dictionary","3. Create a params dictionary",[42,689,691],{"className":44,"code":690,"language":46,"meta":47,"style":47},"params = {\n    \"latitude\": 40.7128,\n    \"longitude\": -74.0060,\n    \"current_weather\": True\n}\n",[49,692,693,701,715,731,743],{"__ignoreMap":47},[52,694,695,697,699],{"class":54,"line":55},[52,696,97],{"class":62},[52,698,80],{"class":79},[52,700,103],{"class":102},[52,702,703,705,707,709,711,713],{"class":54,"line":66},[52,704,109],{"class":83},[52,706,112],{"class":87},[52,708,115],{"class":83},[52,710,118],{"class":102},[52,712,122],{"class":121},[52,714,125],{"class":102},[52,716,717,719,721,723,725,727,729],{"class":54,"line":73},[52,718,109],{"class":83},[52,720,133],{"class":87},[52,722,115],{"class":83},[52,724,118],{"class":102},[52,726,140],{"class":79},[52,728,143],{"class":121},[52,730,125],{"class":102},[52,732,733,735,737,739,741],{"class":54,"line":94},[52,734,109],{"class":83},[52,736,153],{"class":87},[52,738,115],{"class":83},[52,740,118],{"class":102},[52,742,161],{"class":160},[52,744,745],{"class":54,"line":106},[52,746,167],{"class":102},[14,748,749],{},"This dictionary holds the query parameters sent with the request.",[14,751,752],{},"In this example:",[309,754,755,763],{},[24,756,757,759,760,762],{},[49,758,112],{}," and ",[49,761,133],{}," choose the location",[24,764,765,767],{},[49,766,153],{}," asks for current weather data",[639,769,771,772,775],{"id":770},"_4-call-requestsget-with-the-url-and-params","4. Call ",[49,773,774],{},"requests.get()"," with the URL and params",[42,777,779],{"className":44,"code":778,"language":46,"meta":47,"style":47},"response = requests.get(url, params=params)\n",[49,780,781],{"__ignoreMap":47},[52,782,783,785,787,789,791,793,795,797,799,801,803,805],{"class":54,"line":55},[52,784,178],{"class":62},[52,786,80],{"class":79},[52,788,183],{"class":62},[52,790,186],{"class":102},[52,792,190],{"class":189},[52,794,193],{"class":102},[52,796,196],{"class":189},[52,798,199],{"class":102},[52,800,203],{"class":202},[52,802,80],{"class":79},[52,804,208],{"class":189},[52,806,211],{"class":102},[14,808,809],{},"This sends a GET request to the API.",[14,811,812,813,816],{},"If you print ",[49,814,815],{},"response.url",", you can see the full URL with the parameters added to it.",[639,818,820],{"id":819},"_5-convert-the-response-to-python-data","5. Convert the response to Python data",[42,822,824],{"className":44,"code":823,"language":46,"meta":47,"style":47},"data = response.json()\n",[49,825,826],{"__ignoreMap":47},[52,827,828,830,832,834,836,838],{"class":54,"line":55},[52,829,217],{"class":62},[52,831,80],{"class":79},[52,833,222],{"class":62},[52,835,186],{"class":102},[52,837,227],{"class":189},[52,839,230],{"class":102},[14,841,842,843,846,849],{},"The API sends JSON text back.",[844,845],"br",{},[49,847,848],{},"response.json()"," converts that JSON into normal Python data, usually dictionaries and lists.",[14,851,852,853,857,858,186],{},"If you want a deeper explanation, read ",[372,854,856],{"href":855},"\u002Fhow-to\u002Fhow-to-parse-json-in-python\u002F","how to parse JSON in Python"," or ",[372,859,861],{"href":860},"\u002Fstandard-library\u002Fpython-json-module-overview\u002F","Python JSON module overview",[639,863,865],{"id":864},"_6-access-nested-dictionary-values","6. Access nested dictionary values",[42,867,869],{"className":44,"code":868,"language":46,"meta":47,"style":47},"print(data[\"current_weather\"][\"temperature\"])\nprint(data[\"current_weather\"][\"windspeed\"])\n",[49,870,871,897],{"__ignoreMap":47},[52,872,873,875,877,879,881,883,885,887,889,891,893,895],{"class":54,"line":55},[52,874,242],{"class":241},[52,876,193],{"class":102},[52,878,247],{"class":189},[52,880,250],{"class":102},[52,882,115],{"class":83},[52,884,153],{"class":87},[52,886,115],{"class":83},[52,888,259],{"class":102},[52,890,115],{"class":83},[52,892,264],{"class":87},[52,894,115],{"class":83},[52,896,269],{"class":102},[52,898,899,901,903,905,907,909,911,913,915,917,919,921],{"class":54,"line":66},[52,900,242],{"class":241},[52,902,193],{"class":102},[52,904,247],{"class":189},[52,906,250],{"class":102},[52,908,115],{"class":83},[52,910,153],{"class":87},[52,912,115],{"class":83},[52,914,259],{"class":102},[52,916,115],{"class":83},[52,918,293],{"class":87},[52,920,115],{"class":83},[52,922,269],{"class":102},[14,924,925],{},"The response contains a top-level dictionary.",[14,927,928,929,931,932,934,935,759,937,939],{},"Inside it, ",[49,930,153],{}," is another dictionary.",[844,933],{},"\nInside that dictionary, ",[49,936,264],{},[49,938,293],{}," are keys.",[639,941,943],{"id":942},"_7-print-the-result","7. Print the result",[14,945,946],{},"The program prints the values returned by the API.",[14,948,949],{},"Your output will vary depending on the real weather, but it may look something like this:",[42,951,956],{"className":952,"code":954,"language":955,"meta":47},[953],"language-text","22.4\n13.1\n","text",[49,957,954],{"__ignoreMap":47},[37,959,961],{"id":960},"understanding-the-json-response","Understanding the JSON response",[14,963,964,965,967],{},"The API returns JSON text. After you call ",[49,966,848],{},", you get Python data you can work with.",[14,969,970],{},"A simplified response might look like this:",[42,972,974],{"className":44,"code":973,"language":46,"meta":47,"style":47},"{\n    \"latitude\": 40.71,\n    \"longitude\": -74.01,\n    \"current_weather\": {\n        \"temperature\": 22.4,\n        \"windspeed\": 13.1,\n        \"winddirection\": 240,\n        \"weathercode\": 3\n    }\n}\n",[49,975,976,981,996,1013,1025,1041,1056,1072,1086,1091],{"__ignoreMap":47},[52,977,978],{"class":54,"line":55},[52,979,980],{"class":102},"{\n",[52,982,983,985,987,989,991,994],{"class":54,"line":66},[52,984,109],{"class":83},[52,986,112],{"class":87},[52,988,115],{"class":83},[52,990,118],{"class":102},[52,992,993],{"class":121}," 40.71",[52,995,125],{"class":102},[52,997,998,1000,1002,1004,1006,1008,1011],{"class":54,"line":73},[52,999,109],{"class":83},[52,1001,133],{"class":87},[52,1003,115],{"class":83},[52,1005,118],{"class":102},[52,1007,140],{"class":79},[52,1009,1010],{"class":121},"74.01",[52,1012,125],{"class":102},[52,1014,1015,1017,1019,1021,1023],{"class":54,"line":94},[52,1016,109],{"class":83},[52,1018,153],{"class":87},[52,1020,115],{"class":83},[52,1022,118],{"class":102},[52,1024,103],{"class":102},[52,1026,1027,1030,1032,1034,1036,1039],{"class":54,"line":106},[52,1028,1029],{"class":83},"        \"",[52,1031,264],{"class":87},[52,1033,115],{"class":83},[52,1035,118],{"class":102},[52,1037,1038],{"class":121}," 22.4",[52,1040,125],{"class":102},[52,1042,1043,1045,1047,1049,1051,1054],{"class":54,"line":128},[52,1044,1029],{"class":83},[52,1046,293],{"class":87},[52,1048,115],{"class":83},[52,1050,118],{"class":102},[52,1052,1053],{"class":121}," 13.1",[52,1055,125],{"class":102},[52,1057,1058,1060,1063,1065,1067,1070],{"class":54,"line":148},[52,1059,1029],{"class":83},[52,1061,1062],{"class":87},"winddirection",[52,1064,115],{"class":83},[52,1066,118],{"class":102},[52,1068,1069],{"class":121}," 240",[52,1071,125],{"class":102},[52,1073,1074,1076,1079,1081,1083],{"class":54,"line":164},[52,1075,1029],{"class":83},[52,1077,1078],{"class":87},"weathercode",[52,1080,115],{"class":83},[52,1082,118],{"class":102},[52,1084,1085],{"class":121}," 3\n",[52,1087,1088],{"class":54,"line":170},[52,1089,1090],{"class":102},"    }\n",[52,1092,1093],{"class":54,"line":175},[52,1094,167],{"class":102},[14,1096,1097],{},"Important parts:",[309,1099,1100,1103,1108],{},[24,1101,1102],{},"The whole response is a dictionary",[24,1104,1105,1107],{},[49,1106,153],{}," is a dictionary inside the response",[24,1109,1110,759,1112,1114,1115],{},[49,1111,264],{},[49,1113,293],{}," are keys inside ",[49,1116,153],{},[14,1118,1119],{},"So this line:",[42,1121,1123],{"className":44,"code":1122,"language":46,"meta":47,"style":47},"data[\"current_weather\"][\"temperature\"]\n",[49,1124,1125],{"__ignoreMap":47},[52,1126,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145],{"class":54,"line":55},[52,1128,247],{"class":62},[52,1130,250],{"class":102},[52,1132,115],{"class":83},[52,1134,153],{"class":87},[52,1136,115],{"class":83},[52,1138,259],{"class":102},[52,1140,115],{"class":83},[52,1142,264],{"class":87},[52,1144,115],{"class":83},[52,1146,1147],{"class":102},"]\n",[14,1149,1150],{},"means:",[309,1152,1153,1159],{},[24,1154,1155,1156],{},"get the value for ",[49,1157,1158],{},"\"current_weather\"",[24,1160,1161,1162,1165],{},"then get the value for ",[49,1163,1164],{},"\"temperature\""," inside it",[14,1167,1168,1169,186],{},"If you want more practice reading API data, see ",[372,1170,1172],{"href":1171},"\u002Fhow-to\u002Fhow-to-handle-api-responses-in-python\u002F","how to handle API responses in Python",[37,1174,1176],{"id":1175},"simple-improvements-to-the-example","Simple improvements to the example",[14,1178,1179],{},"Here is a slightly better version that prints labels, rounds values, and checks the status code first:",[42,1181,1183],{"className":44,"code":1182,"language":46,"meta":47,"style":47},"import requests\n\ncity_name = \"New York\"\nurl = \"https:\u002F\u002Fapi.open-meteo.com\u002Fv1\u002Fforecast\"\nparams = {\n    \"latitude\": 40.7128,\n    \"longitude\": -74.0060,\n    \"current_weather\": True\n}\n\nresponse = requests.get(url, params=params)\n\nif response.status_code == 200:\n    data = response.json()\n    current_weather = data.get(\"current_weather\", {})\n\n    temperature = current_weather.get(\"temperature\")\n    windspeed = current_weather.get(\"windspeed\")\n\n    if temperature is not None and windspeed is not None:\n        print(f\"Weather for {city_name}\")\n        print(f\"Temperature: {round(temperature, 1)}°C\")\n        print(f\"Wind Speed: {round(windspeed, 1)} km\u002Fh\")\n    else:\n        print(\"Weather data is missing expected values.\")\nelse:\n    print(\"Request failed.\")\n    print(\"Status code:\", response.status_code)\n",[49,1184,1185,1191,1195,1209,1221,1229,1243,1259,1271,1275,1279,1305,1309,1331,1346,1374,1379,1404,1428,1433,1465,1493,1529,1562,1570,1586,1594,1611],{"__ignoreMap":47},[52,1186,1187,1189],{"class":54,"line":55},[52,1188,59],{"class":58},[52,1190,63],{"class":62},[52,1192,1193],{"class":54,"line":66},[52,1194,70],{"emptyLinePlaceholder":69},[52,1196,1197,1200,1202,1204,1207],{"class":54,"line":73},[52,1198,1199],{"class":62},"city_name ",[52,1201,80],{"class":79},[52,1203,84],{"class":83},[52,1205,1206],{"class":87},"New York",[52,1208,91],{"class":83},[52,1210,1211,1213,1215,1217,1219],{"class":54,"line":94},[52,1212,76],{"class":62},[52,1214,80],{"class":79},[52,1216,84],{"class":83},[52,1218,88],{"class":87},[52,1220,91],{"class":83},[52,1222,1223,1225,1227],{"class":54,"line":106},[52,1224,97],{"class":62},[52,1226,80],{"class":79},[52,1228,103],{"class":102},[52,1230,1231,1233,1235,1237,1239,1241],{"class":54,"line":128},[52,1232,109],{"class":83},[52,1234,112],{"class":87},[52,1236,115],{"class":83},[52,1238,118],{"class":102},[52,1240,122],{"class":121},[52,1242,125],{"class":102},[52,1244,1245,1247,1249,1251,1253,1255,1257],{"class":54,"line":148},[52,1246,109],{"class":83},[52,1248,133],{"class":87},[52,1250,115],{"class":83},[52,1252,118],{"class":102},[52,1254,140],{"class":79},[52,1256,143],{"class":121},[52,1258,125],{"class":102},[52,1260,1261,1263,1265,1267,1269],{"class":54,"line":164},[52,1262,109],{"class":83},[52,1264,153],{"class":87},[52,1266,115],{"class":83},[52,1268,118],{"class":102},[52,1270,161],{"class":160},[52,1272,1273],{"class":54,"line":170},[52,1274,167],{"class":102},[52,1276,1277],{"class":54,"line":175},[52,1278,70],{"emptyLinePlaceholder":69},[52,1280,1281,1283,1285,1287,1289,1291,1293,1295,1297,1299,1301,1303],{"class":54,"line":214},[52,1282,178],{"class":62},[52,1284,80],{"class":79},[52,1286,183],{"class":62},[52,1288,186],{"class":102},[52,1290,190],{"class":189},[52,1292,193],{"class":102},[52,1294,196],{"class":189},[52,1296,199],{"class":102},[52,1298,203],{"class":202},[52,1300,80],{"class":79},[52,1302,208],{"class":189},[52,1304,211],{"class":102},[52,1306,1307],{"class":54,"line":233},[52,1308,70],{"emptyLinePlaceholder":69},[52,1310,1311,1314,1316,1318,1322,1325,1328],{"class":54,"line":238},[52,1312,1313],{"class":58},"if",[52,1315,222],{"class":62},[52,1317,186],{"class":102},[52,1319,1321],{"class":1320},"skxfh","status_code",[52,1323,1324],{"class":79}," ==",[52,1326,1327],{"class":121}," 200",[52,1329,1330],{"class":102},":\n",[52,1332,1333,1336,1338,1340,1342,1344],{"class":54,"line":272},[52,1334,1335],{"class":62},"    data ",[52,1337,80],{"class":79},[52,1339,222],{"class":62},[52,1341,186],{"class":102},[52,1343,227],{"class":189},[52,1345,230],{"class":102},[52,1347,1349,1352,1354,1357,1359,1361,1363,1365,1367,1369,1371],{"class":54,"line":1348},15,[52,1350,1351],{"class":62},"    current_weather ",[52,1353,80],{"class":79},[52,1355,1356],{"class":62}," data",[52,1358,186],{"class":102},[52,1360,190],{"class":189},[52,1362,193],{"class":102},[52,1364,115],{"class":83},[52,1366,153],{"class":87},[52,1368,115],{"class":83},[52,1370,199],{"class":102},[52,1372,1373],{"class":102}," {})\n",[52,1375,1377],{"class":54,"line":1376},16,[52,1378,70],{"emptyLinePlaceholder":69},[52,1380,1382,1385,1387,1390,1392,1394,1396,1398,1400,1402],{"class":54,"line":1381},17,[52,1383,1384],{"class":62},"    temperature ",[52,1386,80],{"class":79},[52,1388,1389],{"class":62}," current_weather",[52,1391,186],{"class":102},[52,1393,190],{"class":189},[52,1395,193],{"class":102},[52,1397,115],{"class":83},[52,1399,264],{"class":87},[52,1401,115],{"class":83},[52,1403,211],{"class":102},[52,1405,1407,1410,1412,1414,1416,1418,1420,1422,1424,1426],{"class":54,"line":1406},18,[52,1408,1409],{"class":62},"    windspeed ",[52,1411,80],{"class":79},[52,1413,1389],{"class":62},[52,1415,186],{"class":102},[52,1417,190],{"class":189},[52,1419,193],{"class":102},[52,1421,115],{"class":83},[52,1423,293],{"class":87},[52,1425,115],{"class":83},[52,1427,211],{"class":102},[52,1429,1431],{"class":54,"line":1430},19,[52,1432,70],{"emptyLinePlaceholder":69},[52,1434,1436,1439,1442,1445,1448,1451,1454,1457,1459,1461,1463],{"class":54,"line":1435},20,[52,1437,1438],{"class":58},"    if",[52,1440,1441],{"class":62}," temperature ",[52,1443,1444],{"class":79},"is",[52,1446,1447],{"class":79}," not",[52,1449,1450],{"class":160}," None",[52,1452,1453],{"class":79}," and",[52,1455,1456],{"class":62}," windspeed ",[52,1458,1444],{"class":79},[52,1460,1447],{"class":79},[52,1462,1450],{"class":160},[52,1464,1330],{"class":102},[52,1466,1468,1471,1473,1477,1480,1483,1486,1489,1491],{"class":54,"line":1467},21,[52,1469,1470],{"class":241},"        print",[52,1472,193],{"class":102},[52,1474,1476],{"class":1475},"sbsja","f",[52,1478,1479],{"class":87},"\"Weather for ",[52,1481,1482],{"class":121},"{",[52,1484,1485],{"class":189},"city_name",[52,1487,1488],{"class":121},"}",[52,1490,115],{"class":87},[52,1492,211],{"class":102},[52,1494,1496,1498,1500,1502,1505,1507,1510,1512,1514,1516,1519,1522,1524,1527],{"class":54,"line":1495},22,[52,1497,1470],{"class":241},[52,1499,193],{"class":102},[52,1501,1476],{"class":1475},[52,1503,1504],{"class":87},"\"Temperature: ",[52,1506,1482],{"class":121},[52,1508,1509],{"class":241},"round",[52,1511,193],{"class":102},[52,1513,264],{"class":189},[52,1515,199],{"class":102},[52,1517,1518],{"class":121}," 1",[52,1520,1521],{"class":102},")",[52,1523,1488],{"class":121},[52,1525,1526],{"class":87},"°C\"",[52,1528,211],{"class":102},[52,1530,1532,1534,1536,1538,1541,1543,1545,1547,1549,1551,1553,1555,1557,1560],{"class":54,"line":1531},23,[52,1533,1470],{"class":241},[52,1535,193],{"class":102},[52,1537,1476],{"class":1475},[52,1539,1540],{"class":87},"\"Wind Speed: ",[52,1542,1482],{"class":121},[52,1544,1509],{"class":241},[52,1546,193],{"class":102},[52,1548,293],{"class":189},[52,1550,199],{"class":102},[52,1552,1518],{"class":121},[52,1554,1521],{"class":102},[52,1556,1488],{"class":121},[52,1558,1559],{"class":87}," km\u002Fh\"",[52,1561,211],{"class":102},[52,1563,1565,1568],{"class":54,"line":1564},24,[52,1566,1567],{"class":58},"    else",[52,1569,1330],{"class":102},[52,1571,1573,1575,1577,1579,1582,1584],{"class":54,"line":1572},25,[52,1574,1470],{"class":241},[52,1576,193],{"class":102},[52,1578,115],{"class":83},[52,1580,1581],{"class":87},"Weather data is missing expected values.",[52,1583,115],{"class":83},[52,1585,211],{"class":102},[52,1587,1589,1592],{"class":54,"line":1588},26,[52,1590,1591],{"class":58},"else",[52,1593,1330],{"class":102},[52,1595,1597,1600,1602,1604,1607,1609],{"class":54,"line":1596},27,[52,1598,1599],{"class":241},"    print",[52,1601,193],{"class":102},[52,1603,115],{"class":83},[52,1605,1606],{"class":87},"Request failed.",[52,1608,115],{"class":83},[52,1610,211],{"class":102},[52,1612,1614,1616,1618,1620,1623,1625,1627,1629,1631,1633],{"class":54,"line":1613},28,[52,1615,1599],{"class":241},[52,1617,193],{"class":102},[52,1619,115],{"class":83},[52,1621,1622],{"class":87},"Status code:",[52,1624,115],{"class":83},[52,1626,199],{"class":102},[52,1628,222],{"class":189},[52,1630,186],{"class":102},[52,1632,1321],{"class":1320},[52,1634,211],{"class":102},[14,1636,1637],{},"This version improves the original example by:",[309,1639,1640,1643,1646,1649,1652],{},[24,1641,1642],{},"Storing the city name separately for display",[24,1644,1645],{},"Printing clear labels",[24,1647,1648],{},"Rounding values before printing",[24,1650,1651],{},"Checking the status code before using the response",[24,1653,1654,1655],{},"Handling missing keys more safely with ",[49,1656,1657],{},".get()",[37,1659,1661],{"id":1660},"common-problems-when-this-example-fails","Common problems when this example fails",[14,1663,1664],{},"Some common causes are:",[309,1666,1667,1672,1675,1678,1681],{},[24,1668,1669,1671],{},[49,1670,303],{}," is not installed",[24,1673,1674],{},"There is no internet connection",[24,1676,1677],{},"You used the wrong key name when reading the JSON",[24,1679,1680],{},"You switched to an API that requires an API key",[24,1682,1683],{},"You assumed every weather API uses the same JSON structure",[14,1685,1686],{},"You may also run into these specific errors:",[309,1688,1689,1697,1703,1709,1712],{},[24,1690,1691,1694,1695,1671],{},[49,1692,1693],{},"ModuleNotFoundError"," because ",[49,1696,303],{},[24,1698,1699,1702],{},[49,1700,1701],{},"KeyError"," because the expected JSON key is missing",[24,1704,1705,1708],{},[49,1706,1707],{},"TypeError"," from treating a list like a dictionary",[24,1710,1711],{},"Connection-related request failure due to network issues",[24,1713,1714],{},"An authentication error when using an API that needs a key",[14,1716,1717,1718,186,1722,1724,1725,1727,1728,186],{},"If you see a missing-key problem, read ",[372,1719,1721],{"href":1720},"\u002Ferrors\u002Fkeyerror-in-python-causes-and-fixes\u002F","KeyError in Python: causes and fixes",[844,1723],{},"\nIf Python cannot import ",[49,1726,303],{},", see ",[372,1729,1731],{"href":1730},"\u002Ferrors\u002Fmodulenotfounderror-no-module-named-x-fix\u002F","ModuleNotFoundError: no module named X fix",[37,1733,1735],{"id":1734},"beginner-debugging-steps","Beginner debugging steps",[14,1737,1738],{},"If the example does not work, try these steps.",[639,1740,1742],{"id":1741},"print-the-status-code","Print the status code",[42,1744,1746],{"className":44,"code":1745,"language":46,"meta":47,"style":47},"print(response.status_code)\n",[49,1747,1748],{"__ignoreMap":47},[52,1749,1750,1752,1754,1757,1759,1761],{"class":54,"line":55},[52,1751,242],{"class":241},[52,1753,193],{"class":102},[52,1755,1756],{"class":189},"response",[52,1758,186],{"class":102},[52,1760,1321],{"class":1320},[52,1762,211],{"class":102},[14,1764,1765],{},"This tells you whether the request succeeded.",[639,1767,1769],{"id":1768},"print-the-raw-response-text","Print the raw response text",[42,1771,1773],{"className":44,"code":1772,"language":46,"meta":47,"style":47},"print(response.text)\n",[49,1774,1775],{"__ignoreMap":47},[52,1776,1777,1779,1781,1783,1785,1787],{"class":54,"line":55},[52,1778,242],{"class":241},[52,1780,193],{"class":102},[52,1782,1756],{"class":189},[52,1784,186],{"class":102},[52,1786,955],{"class":1320},[52,1788,211],{"class":102},[14,1790,1791],{},"This helps you inspect the exact data returned by the API.",[639,1793,1795],{"id":1794},"print-the-top-level-keys","Print the top-level keys",[42,1797,1799],{"className":44,"code":1798,"language":46,"meta":47,"style":47},"print(data.keys())\n",[49,1800,1801],{"__ignoreMap":47},[52,1802,1803,1805,1807,1809,1811,1814],{"class":54,"line":55},[52,1804,242],{"class":241},[52,1806,193],{"class":102},[52,1808,247],{"class":189},[52,1810,186],{"class":102},[52,1812,1813],{"class":189},"keys",[52,1815,1816],{"class":102},"())\n",[14,1818,1819],{},"This shows which keys exist at the top level of the response.",[639,1821,1823,1824,1826],{"id":1822},"print-the-current_weather-section","Print the ",[49,1825,153],{}," section",[42,1828,1830],{"className":44,"code":1829,"language":46,"meta":47,"style":47},"print(data[\"current_weather\"])\n",[49,1831,1832],{"__ignoreMap":47},[52,1833,1834,1836,1838,1840,1842,1844,1846,1848],{"class":54,"line":55},[52,1835,242],{"class":241},[52,1837,193],{"class":102},[52,1839,247],{"class":189},[52,1841,250],{"class":102},[52,1843,115],{"class":83},[52,1845,153],{"class":87},[52,1847,115],{"class":83},[52,1849,269],{"class":102},[14,1851,1852],{},"Only do this if that key exists.",[639,1854,1856],{"id":1855},"compare-your-key-names-with-the-real-response","Compare your key names with the real response",[14,1858,1859],{},"A very common beginner mistake is using a key name that does not exactly match the API response.",[14,1861,1862],{},"For example, this will fail if the key is not present:",[42,1864,1866],{"className":44,"code":1865,"language":46,"meta":47,"style":47},"print(data[\"weather\"][\"temp\"])\n",[49,1867,1868],{"__ignoreMap":47},[52,1869,1870,1872,1874,1876,1878,1880,1883,1885,1887,1889,1892,1894],{"class":54,"line":55},[52,1871,242],{"class":241},[52,1873,193],{"class":102},[52,1875,247],{"class":189},[52,1877,250],{"class":102},[52,1879,115],{"class":83},[52,1881,1882],{"class":87},"weather",[52,1884,115],{"class":83},[52,1886,259],{"class":102},[52,1888,115],{"class":83},[52,1890,1891],{"class":87},"temp",[52,1893,115],{"class":83},[52,1895,269],{"class":102},[14,1897,1898],{},"Always compare your code with the actual JSON returned by the API.",[14,1900,1901],{},"Useful install and check commands:",[42,1903,1905],{"className":390,"code":1904,"language":392,"meta":47,"style":47},"pip install requests\npython -m pip install requests\npython -c \"import requests; print(requests.__version__)\"\n",[49,1906,1907,1915,1927],{"__ignoreMap":47},[52,1908,1909,1911,1913],{"class":54,"line":55},[52,1910,400],{"class":399},[52,1912,403],{"class":87},[52,1914,63],{"class":87},[52,1916,1917,1919,1921,1923,1925],{"class":54,"line":66},[52,1918,46],{"class":399},[52,1920,421],{"class":420},[52,1922,424],{"class":87},[52,1924,403],{"class":87},[52,1926,63],{"class":87},[52,1928,1929,1931,1933,1935,1937],{"class":54,"line":73},[52,1930,46],{"class":399},[52,1932,443],{"class":420},[52,1934,84],{"class":83},[52,1936,448],{"class":87},[52,1938,91],{"class":83},[37,1940,1942],{"id":1941},"faq","FAQ",[639,1944,1946],{"id":1945},"do-i-need-an-api-key-for-this-example","Do I need an API key for this example?",[14,1948,1949],{},"No. The Open-Meteo version shown here does not require an API key.",[14,1951,1952],{},"Some other weather APIs do require one.",[639,1954,1956,1957,1959],{"id":1955},"why-use-requestsget-instead-of-opening-a-url-manually","Why use ",[49,1958,774],{}," instead of opening a URL manually?",[14,1961,1962,1964],{},[49,1963,774],{}," is easier for beginners.",[14,1966,1967],{},"It makes it simple to:",[309,1969,1970,1973,1976],{},[24,1971,1972],{},"send query parameters",[24,1974,1975],{},"read the response",[24,1977,1978],{},"work with JSON data",[639,1980,1982,1983,1985],{"id":1981},"what-type-of-data-does-responsejson-return","What type of data does ",[49,1984,848],{}," return?",[14,1987,1988],{},"Usually Python dictionaries and lists, depending on the JSON structure.",[639,1990,1992,1993,1995],{"id":1991},"why-does-my-code-raise-keyerror","Why does my code raise ",[49,1994,1701],{},"?",[14,1997,1998],{},"The key name in your code may not match the real API response.",[14,2000,2001],{},"Print the response and inspect the keys before trying to read nested values.",[37,2003,2005],{"id":2004},"see-also","See also",[309,2007,2008,2013,2018,2023,2029],{},[24,2009,2010],{},[372,2011,2012],{"href":374},"How to make an API request in Python",[24,2014,2015],{},[372,2016,2017],{"href":1171},"How to handle API responses in Python",[24,2019,2020],{},[372,2021,2022],{"href":855},"How to parse JSON in Python",[24,2024,2025],{},[372,2026,2028],{"href":2027},"\u002Fexamples\u002Fpython-api-request-example-get-request\u002F","Python API request example: GET request",[24,2030,2031],{},[372,2032,1721],{"href":1720},[2034,2035,2036],"style",{},"html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s39Yj, html code.shiki .s39Yj{--shiki-light:#39ADB5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .stzsN, html code.shiki .stzsN{--shiki-light:#91B859;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":47,"searchDepth":66,"depth":66,"links":2038},[2039,2040,2041,2042,2043,2053,2054,2055,2056,2064,2073],{"id":39,"depth":66,"text":40},{"id":322,"depth":66,"text":323},{"id":346,"depth":66,"text":347},{"id":378,"depth":66,"text":379},{"id":453,"depth":66,"text":454,"children":2044},[2045,2046,2047,2048,2050,2051,2052],{"id":641,"depth":73,"text":642},{"id":662,"depth":73,"text":663},{"id":686,"depth":73,"text":687},{"id":770,"depth":73,"text":2049},"4. Call requests.get() with the URL and params",{"id":819,"depth":73,"text":820},{"id":864,"depth":73,"text":865},{"id":942,"depth":73,"text":943},{"id":960,"depth":66,"text":961},{"id":1175,"depth":66,"text":1176},{"id":1660,"depth":66,"text":1661},{"id":1734,"depth":66,"text":1735,"children":2057},[2058,2059,2060,2061,2063],{"id":1741,"depth":73,"text":1742},{"id":1768,"depth":73,"text":1769},{"id":1794,"depth":73,"text":1795},{"id":1822,"depth":73,"text":2062},"Print the current_weather section",{"id":1855,"depth":73,"text":1856},{"id":1941,"depth":66,"text":1942,"children":2065},[2066,2067,2069,2071],{"id":1945,"depth":73,"text":1946},{"id":1955,"depth":73,"text":2068},"Why use requests.get() instead of opening a URL manually?",{"id":1981,"depth":73,"text":2070},"What type of data does response.json() return?",{"id":1991,"depth":73,"text":2072},"Why does my code raise KeyError?",{"id":2004,"depth":66,"text":2005},"Master python weather api example in our comprehensive Python beginner guide.","md",{},"\u002Fexamples\u002Fpython-weather-api-example",{"title":5,"description":2074},"examples\u002Fpython-weather-api-example","7eBGsyv6NuGDaw9g8nGi8sb8M17KEbtuPicWgN14bK4",1777585478092]