<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Api on Duke Hsu ｜ Learn • Build • Share</title><link>https://www.dukehsu.com/tags/api.html</link><description>Recent content in Api on Duke Hsu ｜ Learn • Build • Share</description><image><title>Duke Hsu ｜ Learn • Build • Share</title><url>https://www.dukehsu.com/images/og-default.jpg</url><link>https://www.dukehsu.com/images/og-default.jpg</link></image><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 27 Sep 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://www.dukehsu.com/tags/api/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Python with the OpenWeather.org AP</title><link>https://www.dukehsu.com/posts/pythonwithapi.html</link><pubDate>Wed, 27 Sep 2023 00:00:00 +0000</pubDate><guid>https://www.dukehsu.com/posts/pythonwithapi.html</guid><description>&lt;h2 id="using-python-with-the-openweathermaporg-api"&gt;Using Python with the OpenWeathermap.org API&lt;/h2&gt;
&lt;p&gt;In these notes, we will explore how to utilize Python with a free weather API (Application Programming Interface) to retrieve the current weather for a specific city.&lt;/p&gt;
&lt;h2 id="what-you-need-to-install-and-obtain"&gt;What You Need to Install and Obtain&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Python and the &amp;lsquo;requests&amp;rsquo; package&lt;/li&gt;
&lt;li&gt;Access to a Weather API&lt;/li&gt;
&lt;li&gt;Basic coding knowledge&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="install-requests-package"&gt;Install requests package&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ python -m pip install requests #install package
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ python -m pip show requests #display requests version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="image-20230927111555155.png" loading="lazy" src="https://www.dukehsu.com/posts/pythonwithapi/images/4088264047.png" title="image-20230927111555155.png"&gt;&lt;/p&gt;</description></item></channel></rss>