<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Muhammad Abubakar Yaro on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Abubakar Yaro on Medium]]></description>
        <link>https://medium.com/@muhdayaro?source=rss-137c27b88716------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*8S1iKG7reCKKGJtABbS10Q.jpeg</url>
            <title>Stories by Muhammad Abubakar Yaro on Medium</title>
            <link>https://medium.com/@muhdayaro?source=rss-137c27b88716------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:42:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muhdayaro/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[#100DaysOfCode (Python) – Days 42, 43 & 44: Web Development – Mastering HTML & CSS]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-days-42-43-44-web-development-mastering-html-css-b42855e7c7ca?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/b42855e7c7ca</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 13:28:04 GMT</pubDate>
            <atom:updated>2026-10-11T13:28:04.678Z</atom:updated>
            <content:encoded><![CDATA[<p>As I progressed through Angela Yu’s 100 Days of Python course, Days 42, 43, and 44 introduced me to the fundamentals of web development. After spending several days working with Python, it was exciting to explore the technologies responsible for structuring and styling the websites we interact with every day.</p><p>These lessons covered HTML, CSS, and intermediate CSS concepts, helping me understand how a simple webpage can evolve into a well-structured, visually appealing, and responsive interface.</p><p>Day 42 – Intermediate HTML</p><p>On this day I’ve work work with HTML boiler plate, and learn how HTML pages start with a standard structure. I’ve also learned how html offers semantic elements that help organize content and improve accessibility.</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;meta name=&quot;description&quot; content=&quot;A portfolio showcasing my projects and programming journey.&quot;&gt;<br>    &lt;title&gt;Developer Portfolio&lt;/title&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>    &lt;header&gt;<br>        &lt;nav aria-label=&quot;Main navigation&quot;&gt;<br>            &lt;a href=&quot;#&quot; class=&quot;logo&quot;&gt;DevPortfolio&lt;/a&gt;<br><br>            &lt;ul&gt;<br>                &lt;li&gt;&lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#projects&quot;&gt;Projects&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br>            &lt;/ul&gt;<br>        &lt;/nav&gt;<br>    &lt;/header&gt;<br><br>    &lt;main&gt;<br>        &lt;section id=&quot;about&quot;&gt;<br>            &lt;h1&gt;Hi, I&#39;m a Python Developer&lt;/h1&gt;<br>            &lt;p&gt;<br>                I enjoy building applications, exploring data,<br>                and learning new technologies.<br>            &lt;/p&gt;<br>        &lt;/section&gt;<br><br>        &lt;section id=&quot;projects&quot;&gt;<br>            &lt;h2&gt;Featured Projects&lt;/h2&gt;<br><br>            &lt;article&gt;<br>                &lt;h3&gt;Data Analysis Project&lt;/h3&gt;<br>                &lt;p&gt;Exploring datasets using Python, Pandas, and Matplotlib.&lt;/p&gt;<br>            &lt;/article&gt;<br>        &lt;/section&gt;<br>    &lt;/main&gt;<br><br>    &lt;footer id=&quot;contact&quot;&gt;<br>        &lt;p&gt;&amp;copy; 2026 Developer Portfolio&lt;/p&gt;<br>    &lt;/footer&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Elements such as &lt;header&gt;, &lt;nav&gt;, &lt;main&gt;, &lt;section&gt;, &lt;article&gt;, and &lt;footer&gt; communicate the purpose of different parts of a webpage. Compared with using &lt;div&gt; elements for everything, semantic HTML makes a document easier to understand, maintain, and navigate with assistive technologies.</p><p>I also explored the importance of metadata, hyperlinks, and organizing content into meaningful sections.</p><p>Day 43 – CSS</p><p>HTML defines what appears on a webpage, but CSS determines how those elements look and how they are arranged.</p><p>One concept that helped me understand styling was the CSS box model. Every element can be understood as a box consisting of content, padding, borders, and margins.</p><pre>* {<br>    box-sizing: border-box;<br>}<br><br>body {<br>    margin: 0;<br>    font-family: Arial, sans-serif;<br>    background-color: #f4f7fb;<br>    color: #1f2937;<br>    line-height: 1.6;<br>}<br><br>header {<br>    background-color: #111827;<br>    padding: 20px 8%;<br>}<br><br>nav {<br>    display: flex;<br>    justify-content: space-between;<br>    align-items: center;<br>}<br><br>.logo {<br>    color: #ffffff;<br>    font-size: 1.5rem;<br>    font-weight: bold;<br>    text-decoration: none;<br>}<br><br>nav ul {<br>    display: flex;<br>    gap: 24px;<br>    list-style: none;<br>    margin: 0;<br>    padding: 0;<br>}<br><br>nav ul a {<br>    color: #d1d5db;<br>    text-decoration: none;<br>    transition: color 0.3s ease;<br>}<br><br>nav ul a:hover {<br>    color: #38bdf8;<br>}<br><br>section {<br>    padding: 60px 8%;<br>}<br><br>h1, h2, h3 {<br>    line-height: 1.2;<br>}<br><br>article {<br>    background-color: #ffffff;<br>    padding: 24px;<br>    border: 1px solid #e5e7eb;<br>    border-radius: 12px;<br>    margin-top: 20px;<br>}</pre><p>Several concepts come together in this example:</p><p>•	Box sizing: box-sizing: border-box makes an element’s declared width include its padding and border.</p><p>•	Flexbox: display: flex helps arrange navigation items in a row.</p><p>•	Spacing: Padding and margins control the space inside and around elements.</p><p>•	Pseudo-classes: :hover changes a link’s appearance when a user points to it.</p><p>•	Transitions: transition makes changes in properties such as colour appear smoother.</p><p>This was a reminder that CSS is more than choosing colours and fonts. It is also about controlling layout, creating visual hierarchy, and improving the overall user experience.</p><p>Day 44 – Intermediate CSS</p><p>A website should work well on different screen sizes, from desktop monitors to mobile phones.</p><p>This is where responsive design becomes important. CSS media queries allow us to apply different styles depending on the viewport’s dimensions.</p><p>For example, we can adapt the navigation and project cards for smaller screens.</p><pre>/* Project layout */<br>#projects {<br>    display: grid;<br>    grid-template-columns: repeat(2, minmax(0, 1fr));<br>    gap: 24px;<br>}<br><br>#projects h2 {<br>    grid-column: 1 / -1;<br>}<br><br>#projects article {<br>    margin-top: 0;<br>}<br><br>/* Tablet and mobile screens */<br>@media (max-width: 768px) {<br>    header {<br>        padding: 16px 5%;<br>    }<br><br>    nav {<br>        flex-direction: column;<br>        gap: 16px;<br>    }<br><br>    nav ul {<br>        flex-wrap: wrap;<br>        justify-content: center;<br>        gap: 16px;<br>    }<br><br>    section {<br>        padding: 40px 5%;<br>    }<br><br>    #projects {<br>        grid-template-columns: 1fr;<br>    }<br>}</pre><p>Here, CSS Grid creates a two-column project layout on wider screens, while the media query changes it to a single column on smaller screens.</p><p>I also learned how positioning, specificity, inheritance, and selector combinations influence the way styles are applied. Understanding these concepts makes it easier to debug conflicting rules and create more predictable layouts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b42855e7c7ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) — Day 41 Web Development — Introduction to HTML]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-41-web-development-introduction-to-html-db7ff07a4927?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/db7ff07a4927</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 00:15:49 GMT</pubDate>
            <atom:updated>2026-08-14T00:15:49.024Z</atom:updated>
            <content:encoded><![CDATA[<p>on learned about html how it works its meaning and download required libraries for web development.</p><pre>#Tells the browser im  using HTML5.<br>&lt;!DOCTYPE html&gt;<br><br>#root element<br>&lt;html&gt;<br><br>#contains metadata.<br>&lt;head&gt;<br><br>#appears on the browser tab.<br>    &lt;title&gt;My First Website&lt;/title&gt;<br>&lt;/head&gt;<br><br>#everything visible on the webpage.<br>&lt;body&gt;<br><br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><p>html heading element</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br><br>&lt;head&gt;<br>    &lt;title&gt;Heading Practice&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br><br>&lt;h1&gt;This is Heading 1&lt;/h1&gt;<br><br>&lt;h2&gt;This is Heading 2&lt;/h2&gt;<br><br>&lt;h3&gt;This is Heading 3&lt;/h3&gt;<br><br>&lt;h4&gt;This is Heading 4&lt;/h4&gt;<br><br>&lt;h5&gt;This is Heading 5&lt;/h5&gt;<br><br>&lt;h6&gt;This is Heading 6&lt;/h6&gt;<br><br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><p>html paragraph</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br><br>&lt;head&gt;<br>    &lt;title&gt;Paragraph Example&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br><br>&lt;h1&gt;About Me&lt;/h1&gt;<br><br>&lt;p&gt;<br>Hi, I&#39;m Muhammad.<br>I&#39;m learning Web Development.<br>&lt;/p&gt;<br><br>&lt;p&gt;<br>This is my second paragraph.<br>&lt;/p&gt;<br><br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><p>self closing tags</p><pre>#link break<br>&lt;br /&gt;<br><br><br>#horizantal<br>&lt;hr /&gt;</pre><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br><br>&lt;head&gt;<br>    &lt;title&gt;Self Closing Tags&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br><br>&lt;h1&gt;My Resume&lt;/h1&gt;<br><br>&lt;hr /&gt;<br><br>&lt;p&gt;I love Python.&lt;/p&gt;<br><br>&lt;br /&gt;<br><br>&lt;p&gt;I also enjoy HTML.&lt;/p&gt;<br><br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><p>project — movie ranking</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br><br>&lt;head&gt;<br>    &lt;title&gt;Movie Ranking Project&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br><br>&lt;h1&gt;The Best Movies According to Muhammad&lt;/h1&gt;<br><br>&lt;h2&gt;My Top 3 Movies of All Time&lt;/h2&gt;<br><br>&lt;hr /&gt;<br><br>&lt;h3&gt;Interstellar&lt;/h3&gt;<br><br>&lt;p&gt;<br>A masterpiece of science fiction with amazing visuals,<br>emotional storytelling, and incredible music.<br>&lt;/p&gt;<br><br>&lt;h3&gt;Inception&lt;/h3&gt;<br><br>&lt;p&gt;<br>A brilliant movie that explores dreams within dreams.<br>It keeps you thinking from beginning to end.<br>&lt;/p&gt;<br><br>&lt;h3&gt;The Dark Knight&lt;/h3&gt;<br><br>&lt;p&gt;<br>One of the greatest superhero films ever made.<br>Heath Ledger&#39;s Joker performance is unforgettable.<br>&lt;/p&gt;<br><br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db7ff07a4927" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) — Day 40 Flight Club Project]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-40-flight-club-project-eb913cdae03f?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb913cdae03f</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 00:15:42 GMT</pubDate>
            <atom:updated>2026-08-14T00:15:42.267Z</atom:updated>
            <content:encoded><![CDATA[<p>on this day i enhanced the flight deal finder project by transforming it into a flight club application. instead of sending flight deal notifications only to myself, i learned how to build a system where users can subscribe to receive email alerts whenever cheap flights become available. this involved creating a shareable signup form linked to google sheets, retrieving customer information through the sheety API, handling destinations without direct flights, and sending personalized email notifications using Python’s SMTP library. By the end of the project, I had built an automated flight notification service capable of informing multiple users about travel deals.</p><p>main.py</p><pre>import requests_cache<br>from pprint import pprint<br>from datetime import datetime, timedelta<br>from data_manager import DataManager<br>from flight_search import FlightSearch<br>from flight_data import find_cheapest_flight<br>from notification_manager import NotificationManager<br><br><br># ==================== Conserve requests and preserve your free plan ====================<br>requests_cache.install_cache(<br>    &quot;flight_cache&quot;,<br>    urls_expire_after={<br>        &quot;*.sheety.co*&quot;: requests_cache.DO_NOT_CACHE,<br>        &quot;*&quot;: 3600,<br>    }<br>)<br># ==================== Setup ====================<br>data_manager = DataManager()<br>sheet_data = data_manager.get_destination_data()<br># pprint(sheet_data)<br>flight_search = FlightSearch()<br># Create an instance of the NotificationManager<br>notification_manager = NotificationManager()<br><br># ==================== Set the Dates and Origin Airport ====================<br>tomorrow = datetime.now() + timedelta(days=1)<br>six_month_from_today = datetime.now() + timedelta(days=(6 * 30))<br>ORIGIN_CITY_IATA = &quot;LHR&quot;  # London Heathrow<br><br># ==================== Find Cheap Flights ====================<br><br>for destination in sheet_data:<br>    pprint(f&quot;Getting flights for {destination[&#39;city&#39;]}...&quot;)<br>    flights = flight_search.check_flights(<br>        ORIGIN_CITY_IATA,<br>        destination[&quot;iataCode&quot;],<br>        from_time=tomorrow,<br>        to_time=six_month_from_today<br>    )<br>    cheapest_flight = find_cheapest_flight(flights, return_date=six_month_from_today.strftime(&quot;%Y-%m-%d&quot;))<br>    pprint(f&quot;{destination[&#39;city&#39;]}: GBP {cheapest_flight.price}&quot;)<br><br>    if cheapest_flight.price != &quot;N/A&quot; and cheapest_flight.price &lt; destination[&quot;lowestPrice&quot;]:<br>        pprint(f&quot;Lower price flight found to {destination[&#39;city&#39;]}!&quot;)<br>        data_manager.update_lowest_price(destination[&quot;id&quot;], cheapest_flight.price)<br>        # notification_manager.send_sms(<br>        #     message_body=f&quot;Low price alert! Only GBP {cheapest_flight.price} to fly &quot;<br>        #                  f&quot;from {cheapest_flight.origin_airport} to {cheapest_flight.destination_airport}, &quot;<br>        #                  f&quot;on {cheapest_flight.out_date} until {cheapest_flight.return_date}.&quot;<br>        # )<br>        # SMS not working? Try whatsapp instead.<br>        notification_manager.send_whatsapp(<br>            message_body=f&quot;Low price alert! Only GBP {cheapest_flight.price} to fly &quot;<br>                         f&quot;from {cheapest_flight.origin_airport} to {cheapest_flight.destination_airport}, &quot;<br>                         f&quot;on {cheapest_flight.out_date} until {cheapest_flight.return_date}.&quot;<br>        )</pre><p>manager.py</p><pre>import os<br>import requests<br>from requests.auth import HTTPBasicAuth<br>from dotenv import load_dotenv<br><br># Load environment variables from .env file<br>load_dotenv()<br><br>SHEETY_PRICES_ENDPOINT = os.environ[&quot;SHEETY_PRICES_ENDPOINT&quot;]<br><br>class DataManager:<br><br>    def __init__(self):<br>        self._user = os.environ[&quot;SHEETY_USERNAME&quot;]<br>        self._password = os.environ[&quot;SHEETY_PASSWORD&quot;]<br>        self._authorization = HTTPBasicAuth(self._user, self._password)<br>        self.destination_data = {}<br><br>    def get_destination_data(self):<br>        response = requests.get(url=SHEETY_PRICES_ENDPOINT, auth=self._authorization)<br>        data = response.json()<br>        self.destination_data = data[&quot;prices&quot;]<br>        return self.destination_data<br><br>    # ==================== Updated the price in the spreadsheet ====================<br><br>    def update_lowest_price(self, row_id, new_price):<br>        new_data = {<br>            &quot;price&quot;: {<br>                &quot;lowestPrice&quot;: new_price<br>            }<br>        }<br>        requests.put(<br>            url=f&quot;{SHEETY_PRICES_ENDPOINT}/{row_id}&quot;,<br>            json=new_data,<br>            auth=self._authorization<br>        )</pre><p>flightdata.py</p><pre>class FlightData:<br><br>    def __init__(self, price, origin_airport, destination_airport, out_date, return_date):<br>        self.price = price<br>        self.origin_airport = origin_airport<br>        self.destination_airport = destination_airport<br>        self.out_date = out_date<br>        self.return_date = return_date<br><br>def find_cheapest_flight(data, return_date):<br>    # Handle empty data if no flight data is returned<br>    if data is None or (not data.get(&quot;best_flights&quot;) and not data.get(&quot;other_flights&quot;)):<br>        print(&quot;No flight data&quot;)<br>        return FlightData(&quot;N/A&quot;, &quot;N/A&quot;, &quot;N/A&quot;, &quot;N/A&quot;, &quot;N/A&quot;)<br><br>    # Combine best_flights and other_flights into one list<br>    all_flights = data.get(&quot;best_flights&quot;, []) + data.get(&quot;other_flights&quot;, [])<br><br>    # Data from the first flight in the list<br>    first_flight = all_flights[0]<br>    lowest_price = first_flight[&quot;price&quot;]<br>    origin = first_flight[&quot;flights&quot;][0][&quot;departure_airport&quot;][&quot;id&quot;]<br>    destination = first_flight[&quot;flights&quot;][-1][&quot;arrival_airport&quot;][&quot;id&quot;]<br>    out_date = first_flight[&quot;flightsJ&quot;][0][&quot;departure_airport&quot;][&quot;time&quot;].split(&quot; &quot;)[0]<br><br>    # Initialize FlightData with the first flight for comparison<br>    cheapest_flight = FlightData(lowest_price, origin, destination, out_date, return_date)<br><br>    for flight in all_flights:<br>        # Exception handling - json has data but flight is missing &#39;price&#39;. Skip.<br>        try:<br>            price = flight[&quot;price&quot;]<br>        except KeyError:<br>            print(&quot;--- No price available for flight. ---&quot;)<br>            continue<br>        if price &lt; lowest_price:<br>            lowest_price = price<br>            origin = flight[&quot;flights&quot;][0][&quot;departure_airport&quot;][&quot;id&quot;]<br>            destination = flight[&quot;flights&quot;][-1][&quot;arrival_airport&quot;][&quot;id&quot;]<br>            out_date = flight[&quot;flights&quot;][0][&quot;departure_airport&quot;][&quot;time&quot;].split(&quot; &quot;)[0]<br>            cheapest_flight = FlightData(lowest_price, origin, destination, out_date, return_date)<br>            print(f&quot;Lowest price to {destination} is GBP {lowest_price}&quot;)<br><br>    return cheapest_flight</pre><p>flight search.py</p><pre>import os<br>import requests<br>from dotenv import load_dotenv<br><br># Load environment variables from .env file<br>load_dotenv()<br><br>SERPAPI_ENDPOINT = &quot;https://serpapi.com/search&quot;<br><br><br>class FlightSearch:<br><br>    def __init__(self):<br>        self._api_key = os.environ[&quot;SERPAPI_API_KEY&quot;]<br><br>    def check_flights(self, origin_city_code, destination_city_code, from_time, to_time):<br>        query = {<br>            &quot;engine&quot;: &quot;google_flights&quot;,<br>            &quot;departure_id&quot;: origin_city_code,<br>            &quot;arrival_id&quot;: destination_city_code,<br>            &quot;outbound_date&quot;: from_time.strftime(&quot;%Y-%m-%d&quot;),<br>            &quot;return_date&quot;: to_time.strftime(&quot;%Y-%m-%d&quot;),<br>            &quot;type&quot;: &quot;1&quot;,<br>            &quot;adults&quot;: &quot;1&quot;,<br>            &quot;currency&quot;: &quot;GBP&quot;,<br>            &quot;api_key&quot;: self._api_key,<br>        }<br><br>        response = requests.get(url=SERPAPI_ENDPOINT, params=query)<br><br>        if response.status_code != 200:<br>            print(f&quot;check_flights() response code: {response.status_code}&quot;)<br>            return None<br><br>        data = response.json()<br>        if &quot;error&quot; in data:<br>            print(f&quot;API error: {data[&#39;error&#39;]}&quot;)<br>            return None<br>        return data</pre><p>notification.py</p><pre>import os<br>from twilio.rest import Client<br><br># Using a .env file to retrieve the phone numbers and tokens.<br><br>class NotificationManager:<br><br>    def __init__(self):<br>        self.client = Client(os.environ[&#39;TWILIO_SID&#39;], os.environ[&quot;TWILIO_AUTH_TOKEN&quot;])<br><br>    def send_sms(self, message_body):<br>        message = self.client.messages.create(<br>            from_=os.environ[&quot;TWILIO_VIRTUAL_NUMBER&quot;],<br>            body=message_body,<br>            to=os.environ[&quot;TWILIO_VERIFIED_NUMBER&quot;]<br>        )<br>        # Prints if successfully sent.<br>        print(message.sid)<br><br>    # Is SMS not working for you or prefer whatsapp? Connect to the WhatsApp Sandbox!<br>    # https://console.twilio.com/us1/develop/sms/try-it-out/whatsapp-learn<br>    def send_whatsapp(self, message_body):<br>        message = self.client.messages.create(<br>            from_=f&#39;whatsapp:{os.environ[&quot;TWILIO_WHATSAPP_NUMBER&quot;]}&#39;,<br>            body=message_body,<br>            to=f&#39;whatsapp:{os.environ[&quot;TWILIO_VERIFIED_NUMBER&quot;]}&#39;<br>        )<br>        print(message.sid)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb913cdae03f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) Day 39 — Building a Flight Deal Finder with APIs, Google Sheets, and SMS…]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-39-building-a-flight-deal-finder-with-apis-google-sheets-and-sms-a7f5667c3ec9?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7f5667c3ec9</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Sun, 02 Aug 2026 15:46:18 GMT</pubDate>
            <atom:updated>2026-08-02T15:46:18.455Z</atom:updated>
            <content:encoded><![CDATA[<h3>#100DaysOfCode(Python) Day 39 — <strong>Building a Flight Deal Finder with APIs, Google Sheets, and SMS Notifications</strong></h3><p>I began building a Flight Deal Finder application that automatically searches for affordable flights and notifies users whenever it discovers a great deal. This project combines multiple REST APIs to create a real-world travel application. I learned how to retrieve airport and destination data from Google Sheets using the Sheety API, search for flight prices through a flight search API, process the returned flight information to identify the cheapest options, and send SMS notifications using the Twilio API. Throughout this project, I also gained more experience working with JSON data, API authentication, HTTP requests, and object-oriented programming to build a practical automation tool.</p><pre>import os<br>from dotenv import load_dotenv<br><br>load_dotenv()<br><br>SERPAPI_API_KEY = os.getenv(&quot;SERPAPI_API_KEY&quot;)<br>SHEETY_ENDPOINT = os.getenv(&quot;SHETTY_ENDPOINT&quot;)<br><br>print(&quot;SerpAPI Key:&quot;, SERPAPI_API_KEY)<br>print(&quot;Sheety Endpoint:&quot;, SHEETY_ENDPOINT)</pre><p>step 3</p><pre>import os<br>import requests<br>from requests.auth import HTTPBasicAuth<br>from dotenv import load_dotenv<br><br># Load environment variables from .env file<br>load_dotenv()<br><br>SHEETY_PRICES_ENDPOINT = &quot;https://api.sheety.co/your_endpoint/prices&quot;<br><br><br>class DataManager:<br><br>    def __init__(self):<br>        self._user = os.environ[&quot;SHEETY_USERNAME&quot;]<br>        self._password = os.environ[&quot;SHEETY_PASSWORD&quot;]<br>        self._authorization = HTTPBasicAuth(self._user, self._password)<br>        self.destination_data = {}<br><br>    def get_destination_data(self):<br>        # 2. Use the Sheety API to GET all the data in that sheet and print it out.<br>        response = requests.get(url=SHEETY_PRICES_ENDPOINT, auth=self._authorization)<br>        data = response.json()<br>        self.destination_data = data[&quot;prices&quot;]<br>        # print(data)<br>        return self.destination_data</pre><p>flight search</p><pre>import os<br>import requests<br>from dotenv import load_dotenv<br><br># Load environment variables from .env file<br>load_dotenv()<br><br>SERPAPI_ENDPOINT = &quot;https://serpapi.com/search&quot;<br><br><br>class FlightSearch:<br><br>    def __init__(self):<br>        self._api_key = os.environ[&quot;SERPAPI_API_KEY&quot;]<br><br>    def check_flights(self, origin_city_code, destination_city_code, from_time, to_time):<br>        query = {<br>            &quot;engine&quot;: &quot;google_flights&quot;,<br>            &quot;departure_id&quot;: origin_city_code,<br>            &quot;arrival_id&quot;: destination_city_code,<br>            &quot;outbound_date&quot;: from_time.strftime(&quot;%Y-%m-%d&quot;),<br>            &quot;return_date&quot;: to_time.strftime(&quot;%Y-%m-%d&quot;),<br>            &quot;type&quot;: &quot;1&quot;,<br>            &quot;adults&quot;: &quot;1&quot;,<br>            &quot;currency&quot;: &quot;GBP&quot;,<br>            &quot;api_key&quot;: self._api_key,<br>        }<br><br>        response = requests.get(url=SERPAPI_ENDPOINT, params=query)<br><br>        if response.status_code != 200:<br>            print(f&quot;check_flights() response code: {response.status_code}&quot;)<br>            return None<br><br>        data = response.json()<br>        if &quot;error&quot; in data:<br>            print(f&quot;API error: {data[&#39;error&#39;]}&quot;)<br>            return None<br>        return data</pre><p>main</p><pre>import requests_cache<br>from pprint import pprint<br>from datetime import datetime, timedelta<br>from data_manager import DataManager<br>from flight_search import FlightSearch<br><br># ==================== Conserve requests and preserve your free plan ====================<br># Here we are not caching anything ending in *.sheety.co<br># everything else is cached for 1 hour (3600 seconds). <br># feel free to experiment! <br>requests_cache.install_cache(<br>    &quot;flight_cache&quot;,<br>    urls_expire_after={<br>        &quot;*.sheety.co*&quot;: requests_cache.DO_NOT_CACHE,<br>        &quot;*&quot;: 3600,<br>    }<br>)<br><br># ==================== Talk to Sheety ====================<br><br>data_manager = DataManager()<br>sheet_data = data_manager.get_destination_data()<br>pprint(sheet_data)<br><br># ==================== Set the Dates ====================<br><br>tomorrow = datetime.now() + timedelta(days=1)<br>six_month_from_today = datetime.now() + timedelta(days=(6 * 30))<br><br># ==================== Do a Flight Search ====================<br><br>flight_search = FlightSearch()<br><br>flights = flight_search.check_flights(<br>    origin_city_code=&quot;LHR&quot;,<br>    destination_city_code=&quot;CDG&quot;,<br>    from_time=tomorrow,<br>    to_time=six_month_from_today<br>)<br><br>pprint(flights)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7f5667c3ec9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DayOfCode(Python) Day 38 — Building an Exercise Tracker with Nutritionix API & Google Sheets.]]></title>
            <link>https://medium.com/@muhdayaro/100dayofcode-python-day-38-building-an-exercise-tracker-with-nutritionix-api-google-sheets-a8eba57e9dd3?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8eba57e9dd3</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 13:40:59 GMT</pubDate>
            <atom:updated>2026-08-01T13:40:59.301Z</atom:updated>
            <content:encoded><![CDATA[<p>on this day the first step is to setup google sheet with sheety, after retrieving exercise information from from the nutritionix api, the next step is to store that data permanently. instead of using a database, well use google sheets as our data storage sollution. to allow our python application to communicate with google sheet, well use the sheety api.</p><p>sheety converts a google spreadsheet into a rest api, allowing us to perform get, post, put, and delete requests just like any other web service. this means our exercise tracker can automatically save everyw workout without into a spreadsheet without manually entering the data.</p><p>after creating a google spreedsheet, i connect the spreedsheet to the sheety then save the end point.</p><pre># load enviroment variable<br><br>import os <br>from dotenv import <br><br>load_dotenv load_dotenv() <br><br>SHEETY_ENDPOINT = os.getenv(&quot;SHEETY_ENDPOINT&quot;) <br><br>print(SHEETY_ENDPOINT)</pre><pre>#test the connection<br><br>import os <br>import requests <br>from dotenv import load_dotenv <br><br>load_dotenv() <br><br>SHEETY_ENDPOINT = os.getenv(&quot;SHEETY_ENDPOINT&quot;) <br><br>response = requests.get(url=SHEETY_ENDPOINT) <br><br>response.raise_for_status() <br><br>sheet_data = response.json() <br><br>print(sheet_data)</pre><p>then saving data into google sheets</p><pre># import required libraries<br><br>import os <br>import requests <br>from datetime import datetime <br>from dotenv import load_dotenv</pre><pre>#load enviroment variable<br><br>load_dotenv() <br><br>APP_ID = os.getenv(&quot;APP_ID&quot;) <br>API_KEY = os.getenv(&quot;API_KEY&quot;) <br>SHEETY_ENDPOINT = os.getenv(&quot;SHEETY_ENDPOINT&quot;)<br><br>#define the nutrix endppoint<br>NUTRITIONIX_ENDPOINT = &quot;https://trackapi.nutritionix.com/v2/natural/exercise&quot;<br><br>#create authentication header<br>nutritionix_headers = {<br>    &quot;x-app-id&quot;: APP_ID,<br>    &quot;x-app-key&quot;: API_KEY,<br>}<br><br>#get the users workout<br>query = input(&quot;Tell me which exercises you did: &quot;)<br><br>#send request to nutritionix<br>exercise_parameters = { <br>    &quot;query&quot;: query, <br>    &quot;gender&quot;: &quot;male&quot;, <br>    &quot;weight_kg&quot;: 70, &quot;&quot;<br>    &quot;height_cm&quot;: 175, <br>    &quot;age&quot;: 24, <br>}<br><br>response = requests.post( <br>    url=NUTRITIONIX_ENDPOINT, <br>    json=exercise_parameters, <br>    headers=nutritionix_headers <br>) <br><br>response.raise_for_status() <br>exercise_data = response.json()<br><br>#get todays day and time<br>today = datetime.now() <br><br>date = today.strftime(&quot;%d/%m/%Y&quot;) <br>time = today.strftime(&quot;%H:%M:%S&quot;)<br><br>#create the sheety payload<br><br>sheet_inputs = { <br>    &quot;workout&quot;: { <br>        &quot;date&quot;: date, <br>        &quot;time&quot;: time, <br>        &quot;exercise&quot;: exercise[&quot;name&quot;].title(),<br>        &quot;duration&quot;: exercise[&quot;duration_min&quot;], <br>        &quot;calories&quot;: exercise[&quot;nf_calories&quot;],<br><br>     } <br>}<br><br>#save the workout to google sheet<br>response = requests.post( <br>    url=SHEETY_ENDPOINT, <br>    json=sheet_inputs <br><br>    ) <br>print(response.text)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8eba57e9dd3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) — Day 37 Building a Habit Tracker with HTTP Requests and the Pixela API]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-36-building-a-habit-tracker-with-http-requests-and-the-pixela-api-9dd97db38ddb?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dd97db38ddb</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Wed, 29 Jul 2026 17:01:01 GMT</pubDate>
            <atom:updated>2026-07-29T17:02:20.157Z</atom:updated>
            <content:encoded><![CDATA[<p>I explored the different types of HTTP requests used when interacting with REST APIs. While previous projects mainly focused on GET requests to retrieve data, today I learned how to create, update, and delete data using POST, PUT, and DELETE requests. To put these concepts into practice, I built a Habit Tracker using the Pixela API, where I created a user account, generated a graph, recorded my daily progress, automatically inserted the current date using Python’s strftime() method, and learned how to edit or remove entries. This project provided hands-on experience with API authentication, HTTP headers, and CRUD (Create, Read, Update, Delete) operations — essential skills for working with modern web services.</p><pre>import requests <br>PIXELA_ENDPOINT = &quot;https://pixe.la/v1/users&quot; <br><br>user_params = { <br>    &quot;token&quot;: &quot;&quot;, <br>    &quot;username&quot;: &quot;&quot;, <br>    &quot;agreeTermsOfService&quot;: &quot;yes&quot;, <br>    &quot;notMinor&quot;: &quot;yes&quot;, <br>    } <br>response = requests.post( <br>    url=PIXELA_ENDPOINT, <br>    json=user_params <br>    ) <br>print(response.text)</pre><p>Advanced Authentication Using HTTP Headers</p><p>HTTP headers are additional pieces of information sent along with an HTTP request. They provide metadata such as content type, authorization credentials, accepted formats, and more. Many modern REST APIs — including GitHub, Stripe, OpenAI, and Pixela — use headers to securely authenticate users without exposing sensitive information in the request body or URL.</p><pre>import requests <br><br>USERNAME = &quot;&quot; <br>TOKEN = &quot;&quot; <br>GRAPH_ENDPOINT = f&quot;https://pixe.la/v1/users/{USERNAME}/graphs&quot;<br><br>headers = { <br>    &quot;X-USER-TOKEN&quot;: TOKEN <br><br>} <br><br>graph_config = { <br>    &quot;id&quot;: &quot;graph1&quot;, <br>    &quot;name&quot;: &quot;Coding Graph&quot;, <br>    &quot;unit&quot;: &quot;hours&quot;, <br>    &quot;type&quot;: &quot;float&quot;, <br>    &quot;color&quot;: &quot;shibafu&quot; <br><br>} <br><br>response = requests.post( <br>    url=GRAPH_ENDPOINT, <br>    json=graph_config, <br>    headers=headers <br><br>) <br><br>print(response.text)</pre><p>Add a Pixel to the Habit Tracker Using a POST Request</p><p>After creating our Pixela account and graph, the next step is to start tracking our daily progress. In Pixela, each daily record is represented by a pixel. Every time you complete your habit — for example, studying, exercising, reading, or coding — you add a new pixel to your graph.</p><pre>import requests <br>from datetime import datetime <br><br>USERNAME = &quot;&quot; <br>TOKEN = &quot;&quot; <br>GRAPH_ID = &quot;&quot; <br><br>PIXEL_ENDPOINT = ( <br>    f&quot;https://pixe.la/v1/users/{USERNAME}/graphs/{GRAPH_ID}&quot; <br>) <br><br>headers = { <br>    &quot;X-USER-TOKEN&quot;: TOKEN <br><br>} <br><br>today = datetime.now() <br><br>pixel_data = { <br>    &quot;date&quot;: today.strftime(&quot;%Y%m%d&quot;), <br>    &quot;quantity&quot;: &quot;5&quot; <br><br>} <br><br>response = requests.post(<br>     url=PIXEL_ENDPOINT, <br>     json=pixel_data, <br>     headers=headers <br><br>) <br><br>print(response.text)</pre><p>Autofilling Today’s Date Using strftime()</p><pre>import requests <br>from datetime import datetime <br><br>USERNAME = &quot;&quot; <br>TOKEN = &quot;&quot; <br>GRAPH_ID = &quot;graph1&quot; <br><br>PIXEL_ENDPOINT = ( <br>    f&quot;https://pixe.la/v1/users/{USERNAME}/graphs/{GRAPH_ID}&quot;<br>) <br><br>headers = { <br>    &quot;X-USER-TOKEN&quot;: TOKEN <br>} <br><br>pixel_data = {<br>     &quot;date&quot;: datetime.now().strftime(&quot;%Y%m%d&quot;), <br>     &quot;quantity&quot;: &quot;5&quot; <br><br>} <br><br>response = requests.post( <br>    url=PIXEL_ENDPOINT, <br>    json=pixel_data, <br>    headers=headers <br>) <br><br>print(response.text)</pre><p>How to Use HTTP PUT and DELETE Requests</p><p>in the previous lessons, i learned how to create a Pixela account, create a graph, and add daily habit records using HTTP POST requests. However, real-world applications often require modifying or removing existing data. This is where the PUT and DELETE HTTP methods become essential.</p><p>exaxmple:</p><pre>import requests <br>from datetime import datetime <br><br>USERNAME = &quot;yourusername&quot; <br>TOKEN = &quot;YOUR_TOKEN&quot; <br>GRAPH_ID = &quot;graph1&quot; <br><br>headers = { <br>    &quot;X-USER-TOKEN&quot;: TOKEN <br><br>} <br><br>date = datetime.now().strftime(&quot;%Y%m%d&quot;) <br><br>PIXEL_ENDPOINT = ( <br>    f&quot;https://pixe.la/v1/users/{USERNAME}/graphs/{GRAPH_ID}/{date}&quot;<br><br><br>) <br>response = requests.delete( <br>    url=PIXEL_ENDPOINT, headers=headers <br><br>)<br><br><br>print(response.text)</pre><p>on this day,i expanded my understanding of REST APIs by working with all the major HTTP methods. i created a Pixela account, authenticated requests using HTTP headers, built a habit graph, added daily pixels, automated date generation with strftime(), and learned how to update and delete existing records. These skills are fundamental for interacting with modern web services and provide a strong foundation for building applications that communicate with APIs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dd97db38ddb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) — Day 36 Stock Trading Alert Project]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-36-stock-trading-alert-project-00b8dded2ea3?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/00b8dded2ea3</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 13:30:54 GMT</pubDate>
            <atom:updated>2026-07-26T13:30:54.587Z</atom:updated>
            <content:encoded><![CDATA[<p>After completing the Rain Alert project, i move on to a more advanced real-world application. Instead of checking the weather, yi build a program that monitors stock prices and sends me important news whenever a stock experiences a significant price change.</p><p>Example:</p><p>If Testlas stock rises significantly:</p><p>TSLA 🔺6%</p><p>Tesla launches new AI model.</p><p>Tesla stock surges after earnings report.</p><p>Analysts raise Tesla price target.</p><p>If the stock falls:</p><p>TSLA 🔻7%</p><p>Tesla shares fall after market sell-off.</p><p>Investors react to quarterly results.</p><p>Electric vehicle demand slows.</p><p>Create a requirements.txt file.</p><p>requests</p><p>python-dotenv, twilio</p><p>Install all dependencies.</p><p>pip install -r requirements.txt</p><p><strong>Alpha Vantage API</strong></p><p>I use the Alpha vantage API to retrieve stock market prices.</p><p><a href="https://www.alphavantage.co/query">https://www.alphavantage.co/query</a></p><pre>import requests<br><br>STOCK = &quot;TSLA&quot;<br>API_KEY = &quot;&quot;<br><br>STOCK_ENDPOINT = &quot;https://www.alphavantage.co/query&quot;<br><br>params = {<br>    &quot;function&quot;: &quot;TIME_SERIES_DAILY&quot;,<br>    &quot;symbol&quot;: STOCK,<br>    &quot;apikey&quot;: API_KEY,<br>}<br><br>response = requests.get(STOCK_ENDPOINT, params=params)<br>response.raise_for_status()<br><br>data = response.json()[&quot;Time Series (Daily)&quot;]<br><br># Convert to list of daily records<br>data_list = [value for (key, value) in data.items()]<br><br>yesterday_close = float(data_list[0][&quot;4. close&quot;])<br>day_before_close = float(data_list[1][&quot;4. close&quot;])<br><br>print(&quot;Yesterday:&quot;, yesterday_close)<br>print(&quot;Day Before:&quot;, day_before_close)</pre><p><strong>News API</strong></p><p>Used to retrieve the latest news articles related to a company.</p><p><strong>Twilio API</strong></p><p>Used to send the stock alert directly to my phone via SMS or WhatsApp.</p><p><strong>Solution &amp; Walkthrough for Getting Trivia Questions</strong></p><pre>import requests<br><br>TRIVIA_API = &quot;https://opentdb.com/api.php&quot;<br><br>#create paremeters<br>parameters = {<br>    &quot;amount&quot;: 10,<br>    &quot;type&quot;: &quot;boolean&quot;,<br>}<br><br>#send the request<br>response = requests.get(<br>    url=TRIVIA_API,<br>    params=parameters<br>)<br><br>response.raise_for_status()<br><br>#convert the response to JSON<br>data = response.json()<br><br>#extract the questions<br>question_data = data[&quot;results&quot;]<br><br>#print all questions<br>for question in question_data:<br>    print(question[&quot;question&quot;])</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00b8dded2ea3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) — Day 35 Intermediate + Keys, Authentication & Enviroment Variables]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-35-intermediate-keys-authentication-enviroment-variables-a6ba182eb21d?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6ba182eb21d</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 13:47:02 GMT</pubDate>
            <atom:updated>2026-07-25T13:47:02.430Z</atom:updated>
            <content:encoded><![CDATA[<p>On this day i learred what is API Authentication, how API wroks, how to send authentication API request and why we need to authenticate ourselves</p><pre>import requests<br><br>API_KEY = &quot;3d963377a57efe98f0e91427c6ea1b7a&quot;<br>MY_LAT = 10.569395<br>MY_LONG = 7.43735<br><br>parameters = {<br>    &quot;lat&quot;: MY_LAT,<br>    &quot;lon&quot;: MY_LONG,<br>    &quot;appid&quot;: API_KEY,<br>    &quot;cnt&quot;: 4,<br>}<br><br>response = requests.get(<br>    &quot;https://api.openweathermap.org/data/2.5/forecast&quot;,<br>    params=parameters<br>)<br>response.raise_for_status()<br><br>weather_data = response.json()<br><br>will_rain = False<br><br>for hour_data in weather_data[&quot;list&quot;]:<br>    condition_code = hour_data[&quot;weather&quot;][0][&quot;id&quot;]<br><br>    if int(condition_code) &lt; 700:<br>        will_rain = True<br><br>if will_rain:<br>    print(&quot;Bring an umbrella ☔&quot;)<br>else:<br>    print(&quot;No rain expected.&quot;)</pre><p><strong>Using API Keys to Authenticate and Get the Weather from OpenWeatherMap</strong></p><p>In the previous lesson i learned what is API’s are and and why authentication is reqwuires. In this lesson i opoend an open whethe account use an API key to retrieve wheather forecast data from OpenWheatherApp, which will be the foundation of my raim alert project</p><pre>import requests<br><br>API_KEY = &quot;3d963377a57efe98f0e91427c6ea1b7a&quot;<br><br>OWM_ENDPOINT = &quot;https://api.openweathermap.org/data/2.5/forecast&quot;<br><br>MY_LAT = 10.569395<br>MY_LONG = 7.43735<br><br>weather_params = {<br>    &quot;lat&quot;: MY_LAT,<br>    &quot;lon&quot;: MY_LONG,<br>    &quot;appid&quot;: API_KEY,<br>}<br><br>response = requests.get(<br>    url=OWM_ENDPOINT,<br>    params=weather_params<br>)<br><br>response.raise_for_status()<br><br>weather_data = response.json()<br><br>print(weather_data)<br><br>print(&quot;-&quot; * 50)<br><br>print(weather_data[&quot;list&quot;][0])<br><br>print(&quot;-&quot; * 50)<br><br>print(weather_data[&quot;list&quot;][0][&quot;weather&quot;][0][&quot;main&quot;])<br><br>print(weather_data[&quot;list&quot;][0][&quot;weather&quot;][0][&quot;id&quot;])</pre><p><strong>Check if It Will Rain in the Next 12 Hours</strong></p><p>In the previous lesson i successfully connected the openwhethermap API, authenticate the API key and retrieve whether forecast data. in this lesson i build core logic of the Rain alert project by checking the whether forecast for the next 12 hours and determing whether you should carry an umbrella.</p><pre>import requests<br><br>API_KEY = &quot;3d963377a57efe98f0e91427c6ea1b7a&quot;<br><br>OWM_ENDPOINT = &quot;https://api.openweathermap.org/data/2.5/forecast&quot;<br><br>MY_LAT = 10.569395<br>MY_LONG = 7.43735<br><br>weather_params = {<br>    &quot;lat&quot;: MY_LAT,<br>    &quot;lon&quot;: MY_LONG,<br>    &quot;appid&quot;: API_KEY,<br>    &quot;cnt&quot;: 4,<br>}<br><br>response = requests.get(<br>    url=OWM_ENDPOINT,<br>    params=weather_params<br>)<br><br>response.raise_for_status()<br><br>weather_data = response.json()<br><br>will_rain = False<br><br>for hour_data in weather_data[&quot;list&quot;]:<br>    condition_code = hour_data[&quot;weather&quot;][0][&quot;id&quot;]<br><br>    print(f&quot;Weather ID: {condition_code}&quot;)<br><br>    if condition_code &lt; 700:<br>        will_rain = True<br><br>if will_rain:<br>    print(&quot;Bring an Umbrella ☔&quot;)<br>else:<br>    print(&quot;No rain expected today.&quot;)</pre><p>Instead of printing only the weather ID, print the description.</p><pre>for hour_data in weather_data[&quot;list&quot;]:<br>    description = hour_data[&quot;weather&quot;][0][&quot;description&quot;]<br>    print(description)</pre><p>The API also returns a forecast timestamp.</p><pre>for hour_data in weather_data[&quot;list&quot;]:<br>    print(hour_data[&quot;dt_txt&quot;])<br>    print(hour_data[&quot;weather&quot;][0][&quot;main&quot;])</pre><p><strong>Sending SMS via the Twilio API</strong></p><p>Now ive compeleted the project thatll print to bring umbrella if theres rain, in this project ill send myself SMS message automatically whenever rain is expected Using Twilio API</p><pre>from twilio.rest import Client<br><br>ACCOUNT_SID = &quot;&quot;<br><br>AUTH_TOKEN = &quot;&quot;<br><br>client = Client(<br>    ACCOUNT_SID,<br>    AUTH_TOKEN<br>)<br><br>message = client.messages.create(<br>    body=&quot;Hello from Python!&quot;,<br>    from_=&quot;+15005550006&quot;,<br>    to=&quot;+2348012345678&quot;<br>)<br><br>print(message.sid)</pre><p><strong>Integrate with the Rain Alert Project</strong></p><pre>import requests<br>from twilio.rest import Client<br><br>API_KEY = &quot;&quot;<br><br>ACCOUNT_SID = &quot;&quot;<br><br>AUTH_TOKEN = &quot;&quot;<br><br>MY_LAT = 10.5105<br><br>MY_LONG = 7.4165<br><br>OWM_ENDPOINT = &quot;https://api.openweathermap.org/data/2.5/forecast&quot;<br><br>weather_params = {<br>    &quot;lat&quot;: MY_LAT,<br>    &quot;lon&quot;: MY_LONG,<br>    &quot;appid&quot;: API_KEY,<br>    &quot;cnt&quot;: 4,<br>}<br><br>response = requests.get(<br>    url=OWM_ENDPOINT,<br>    params=weather_params<br>)<br><br>response.raise_for_status()<br><br>weather_data = response.json()<br><br>will_rain = False<br><br>for hour_data in weather_data[&quot;list&quot;]:<br><br>    condition_code = hour_data[&quot;weather&quot;][0][&quot;id&quot;]<br><br>    if condition_code &lt; 700:<br>        will_rain = True<br><br>if will_rain:<br><br>    client = Client(<br>        ACCOUNT_SID,<br>        AUTH_TOKEN<br>    )<br><br>    message = client.messages.create(<br>        body=&quot;☔ It is going to rain today.\nRemember to bring an umbrella!&quot;,<br>        from_=&quot;+15005550006&quot;,<br>        to=&quot;+2348012345678&quot;<br>    )<br><br>    print(message.status)<br>else:<br>    print(&quot;No rain expected today.&quot;)</pre><p>Improving the message</p><pre>description = weather_data[&quot;list&quot;][0][&quot;weather&quot;][0][&quot;description&quot;]</pre><pre>message = client.messages.create(<br>    body=f&quot;☔ Rain Alert!\nForecast: {description}\nDon&#39;t forget your umbrella!&quot;,<br>    from_=&quot;+1&quot;,<br>    to=&quot;+2349034022866&quot;<br>)</pre><p><strong>Can’t Use SMS? Try WhatsApp Instead</strong></p><p>In the previous lesson, i learned how to send an SMS notification using the Twilio API whenever rain is expected. However, in some countries or on Twilio trial accounts, sending SMS messages may not be available or may incur costs.</p><p>Twilio also provides a WhatsApp Sandbox, allowing to send WhatsApp messages through its API. In this lesson, i modify the Rain Alert project to send a WhatsApp notification instead of an SMS.</p><pre>import requests<br>from twilio.rest import Client<br><br>API_KEY = &quot;YOUR_OPENWEATHER_API_KEY&quot;<br><br>ACCOUNT_SID = &quot;&quot;<br><br>AUTH_TOKEN = &quot;&quot;<br><br>OWM_ENDPOINT = &quot;https://api.openweathermap.org/data/2.5/forecast&quot;<br><br>MY_LAT = 10.5105<br>MY_LONG = 7.4165<br><br>weather_params = {<br>    &quot;lat&quot;: MY_LAT,<br>    &quot;lon&quot;: MY_LONG,<br>    &quot;appid&quot;: API_KEY,<br>    &quot;cnt&quot;: 4,<br>}<br><br>response = requests.get(<br>    url=OWM_ENDPOINT,<br>    params=weather_params<br>)<br><br>response.raise_for_status()<br><br>weather_data = response.json()<br><br>will_rain = False<br><br>for hour_data in weather_data[&quot;list&quot;]:<br><br>    condition_code = hour_data[&quot;weather&quot;][0][&quot;id&quot;]<br><br>    if condition_code &lt; 700:<br>        will_rain = True<br><br>if will_rain:<br><br>    client = Client(<br>        ACCOUNT_SID,<br>        AUTH_TOKEN<br>    )<br><br>    message = client.messages.create(<br><br>        body=&quot;☔ Rain Alert!\nBring an umbrella today.&quot;,<br><br>        from_=&quot;whatsapp:&quot;,<br><br>        to=&quot;whatsapp:&quot;<br><br>    )<br><br>    print(message.status)<br><br>else:<br><br>    print(&quot;No rain expected today.&quot;)</pre><p><strong>Use PythonAnywhere to Automate the Python Script</strong></p><p>In the previous lessons, i built a Rain Alert application that checks the weather forecast and sends an SMS or WhatsApp notification if rain is expected. However, the script only runs when you execute it manually.</p><p>In this lesson, i’ll deploy the project to PythonAnywhere, a cloud platform that allows Python programs to run online. By scheduling script, the Rain Alert application can check the weather automatically every day — even when the computer is turned off.</p><p>I also use github command to automate the rain alert python project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6ba182eb21d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) — Day 34 Creating a GUI Quiz App]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-34-creating-a-gui-quiz-app-74fcf8494837?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/74fcf8494837</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 08:08:08 GMT</pubDate>
            <atom:updated>2026-07-25T08:08:08.347Z</atom:updated>
            <content:encoded><![CDATA[<p>On this day i learned how to build a fully interactive quiz application using python, tkinter, and the open trivia database API. Throughout the project, I explored how to fetch live trivia questions from an external API, process JSON data, clean HTML entities for proper display, and apply object-oriented programming principles to design a class-based graphical user interface. I also implemented answer validation, real-time score tracking, and visual feedback for user responses, bringing together API integration, GUI development, and Python classes to create a polished desktop application.</p><p>The data:</p><pre><br>question_data = [<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;medium&quot;,<br>        &quot;question&quot;: &quot;The HTML5 standard was published in 2014.&quot;,<br>        &quot;correct_answer&quot;: &quot;True&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;False&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;medium&quot;,<br>        &quot;question&quot;: &quot;The first computer bug was formed by faulty wires.&quot;,<br>        &quot;correct_answer&quot;: &quot;False&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;True&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;medium&quot;,<br>        &quot;question&quot;: &quot;FLAC stands for &#39;Free Lossless Audio Condenser&#39;.&quot;,<br>        &quot;correct_answer&quot;: &quot;False&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;True&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;medium&quot;,<br>        &quot;question&quot;: &quot;All program codes have to be compiled into an executable file in order to be run. This file can then be executed on any machine.&quot;,<br>        &quot;correct_answer&quot;: &quot;False&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;True&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;easy&quot;,<br>        &quot;question&quot;: &quot;Linus Torvalds created Linux and Git.&quot;,<br>        &quot;correct_answer&quot;: &quot;True&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;False&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;easy&quot;,<br>        &quot;question&quot;: &quot;The programming language &#39;Python&#39; is based off a modified version of &#39;JavaScript&#39;&quot;,<br>        &quot;correct_answer&quot;: &quot;False&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;True&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;medium&quot;,<br>        &quot;question&quot;: &quot;AMD created the first consumer 64-bit processor.&quot;,<br>        &quot;correct_answer&quot;: &quot;True&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;False&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;easy&quot;,<br>        &quot;question&quot;: &quot;&#39;HTML&#39; stands for Hypertext Markup Language.&quot;,<br>        &quot;correct_answer&quot;: &quot;True&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;False&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;easy&quot;,<br>        &quot;question&quot;: &quot;In most programming languages, the operator ++ is equivalent to the statement &#39;+= 1&#39;.&quot;,<br>        &quot;correct_answer&quot;: &quot;True&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;False&quot;<br>        ]<br>    },<br>    {<br>        &quot;category&quot;: &quot;Science: Computers&quot;,<br>        &quot;type&quot;: &quot;boolean&quot;,<br>        &quot;difficulty&quot;: &quot;hard&quot;,<br>        &quot;question&quot;: &quot;The IBM PC used an Intel 8008 microprocessor clocked at 4.77 MHz and 8 kilobytes of memory.&quot;,<br>        &quot;correct_answer&quot;: &quot;False&quot;,<br>        &quot;incorrect_answers&quot;: [<br>            &quot;True&quot;<br>        ]<br>    }<br>]<br><br><br></pre><pre>from question_model import Question<br>from data import question_data<br>from quiz_brain import QuizBrain<br><br>question_bank = []<br>for question in question_data:<br>    question_text = question[&quot;question&quot;]<br>    question_answer = question[&quot;correct_answer&quot;]<br>    new_question = Question(question_text, question_answer)<br>    question_bank.append(new_question)<br><br><br>quiz = QuizBrain(question_bank)<br><br>while quiz.still_has_questions():<br>    quiz.next_question()<br><br>print(&quot;You&#39;ve completed the quiz&quot;)<br>print(f&quot;Your final score was: {quiz.score}/{quiz.question_number}&quot;)</pre><p><strong>Question Module</strong></p><pre>class Question:<br><br>    def __init__(self, q_text, q_answer):<br>        self.text = q_text<br>        self.answer = q_answer</pre><p>Quiz Brain</p><pre>class QuizBrain:<br><br>    def __init__(self, q_list):<br>        self.question_number = 0<br>        self.score = 0<br>        self.question_list = q_list<br>        self.current_question = None<br><br>    def still_has_questions(self):<br>        return self.question_number &lt; len(self.question_list)<br><br>    def next_question(self):<br>        self.current_question = self.question_list[self.question_number]<br>        self.question_number += 1<br>        user_answer = input(f&quot;Q.{self.question_number}: {self.current_question.text} (True/False): &quot;)<br>        self.check_answer(user_answer)<br><br>    def check_answer(self, user_answer):<br>        correct_answer = self.current_question.answer<br>        if user_answer.lower() == correct_answer.lower():<br>            self.score += 1<br>            print(&quot;You got it right!&quot;)<br>        else:<br>            print(&quot;That&#39;s wrong.&quot;)<br><br>        print(f&quot;Your current score is: {self.score}/{self.question_number}&quot;)<br>        print(&quot;\n&quot;)</pre><p>User Interface:</p><pre>THEME_COLOR = &quot;#375362&quot;<br><br></pre><p>Final review</p><p>Day 34 brings back many concept that i’ve learned throughout the course into a polished application, the quiez fetches real time trivia data from am online API, cleans data for display and present it through a well structured tinker interface built using oop. I also learned to organize code into reusable classes apply python hints to improve readability and maintainability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74fcf8494837" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#100DaysOfCode(Python) Day 33 API Endpoints API Parameters.]]></title>
            <link>https://medium.com/@muhdayaro/100daysofcode-python-day-33-api-endpoints-api-parameters-2c2acffc4e3e?source=rss-137c27b88716------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c2acffc4e3e</guid>
            <dc:creator><![CDATA[Muhammad Abubakar Yaro]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 08:38:03 GMT</pubDate>
            <atom:updated>2026-07-22T08:38:03.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Today marked one of the most exciting milestones in the course — I finally stepped into the world of Application Programming Interfaces (APIs). APIs are the backbone of modern software, allowing different applications to communicate and exchange data seamlessly.</p><p>An API (Application Programming Interface) acts as a bridge between two software systems. Instead of building everything from scratch, developers can request data or services from another application through predefined endpoints.</p><p>Some everyday examples include:</p><p>Weather applications</p><p>Google Maps</p><p>Payment gateways</p><p>Social media integrations</p><p>AI services like ChatGPT</p><p>Understanding APIs opens the door to building applications that interact with real-world data.</p><p>API Endpoints and Making Requests</p><p>I learned how to make HTTP requests using Python’s requests library.</p><p>The main concepts included:</p><p>Sending GET requests</p><p>Understanding API endpoints</p><p>Reading server responses</p><p>Parsing returned data</p><p><strong>Example:</strong></p><pre>import requests<br><br>response = requests.get(url=&quot;http://api.open-notify.org/iss-now.json&quot;)<br>response.raise_for_status()<br><br>data = response.json()<br>print(data)</pre><p><strong>HTTP Status Code:</strong></p><p>server always responds with a status code indicating whether a request succeeded or failed.</p><p>Some common codes are:</p><p>200 — Success</p><p>201 — Resource created</p><p>301 — Redirect</p><p>400 — Bad Request</p><p>401 — Unauthorized</p><p>403 — Forbidden</p><p>404 — Not Found</p><p>500 — Internal Server Error</p><p>Rather than assuming every request succeeds, it’s important to check the response before using the returned data.</p><p><strong>Exception Handling:</strong></p><p>I also learned how to handle API errors more safely.</p><p>Instead of writing lots of conditional statements, Python provides:</p><p>response.raise_for_status()</p><p>This raises an exception automatically if the request wasn’t successful, making debugging much easier.</p><p><strong>Working with JSON</strong></p><p>Most APIs return data in JSON (JavaScript Object Notation).</p><pre>import requests<br><br>response = requests.get(url=&quot;http://api.open-notify.org/iss-now.json&quot;)<br>response.raise_for_status()<br><br>data = response.json()<br><br>longitude = data[&quot;iss_position&quot;][&quot;longitude&quot;]<br>latitude = data[&quot;iss_position&quot;][&quot;latitude&quot;]<br><br>print(longitude)<br>print(latitude)</pre><p>Understanding API Parameters</p><p>Another important lesson introduced API parameters.</p><p>Instead of receiving the same information every time, parameters allow us to customize requests.</p><pre>import requests<br><br>MY_LAT = -51.5774<br>MY_LONG = -19.1046<br><br>parameters = {<br>    &quot;lat&quot;: MY_LAT,<br>    &quot;lng&quot;: MY_LONG,<br>    &quot;formatted&quot;: 0,<br>}<br><br>response = requests.get(<br>    &quot;https://api.sunrise-sunset.org/json&quot;,<br>    params=parameters,<br>)<br>response.raise_for_status()<br><br>data = response.json()<br><br>sunrise = data[&quot;results&quot;][&quot;sunrise&quot;]<br>sunset = data[&quot;results&quot;][&quot;sunset&quot;]<br><br>print(sunrise)<br>print(sunset)</pre><p><strong>Kanye Quotes APP:</strong></p><p>The application:</p><p>Sends an API request</p><p>Receives a random quote</p><p>Parses the JSON response</p><p>Displays the quote inside a Tkinter GUI</p><p>Updates the quote each time a button is clicked</p><p>This project demonstrated how easily external APIs can power interactive applications.</p><pre>import requests<br><br>response = requests.get(&quot;https://api.kanye.rest&quot;)<br>response.raise_for_status()<br><br>quote = response.json()[&quot;quote&quot;]<br><br>print(quote)</pre><p><strong>Updating the Tinker Canvas</strong></p><pre>def get_quote():<br>    response = requests.get(&quot;https://api.kanye.rest&quot;)<br>    response.raise_for_status()<br><br>    quote = response.json()[&quot;quote&quot;]<br>    canvas.itemconfig(quote_text, text=quote)</pre><p><strong>ISS Location Checker</strong></p><pre>from datetime import datetime<br><br>MY_LAT = -51.5774<br>MY_LONG = -19.1046<br><br>response = requests.get(url=&quot;http://api.open-notify.org/iss-now.json&quot;)<br>response.raise_for_status()<br>data =response.json()<br><br>iss_latitude = float(data[&quot;iss_position&quot;][&quot;latitude&quot;])<br>iss_longitude = float(data[&quot;iss_position&quot;][&quot;longitude&quot;])<br><br><br># Position is within +5 or -5 degrees and iss position<br><br>parameters = {<br>    &quot;lat&quot;: MY_LAT,<br>    &quot;lng&quot;: MY_LONG,<br>    &quot;formatted&quot;: 0,<br>}<br><br>time_now = datetime.now()<br><br></pre><pre>response = requests.get(&quot;https://api.sunrise-sunset.org/json&quot;, params=parameters)<br>response.raise_for_status()<br><br>data = response.json()<br><br>sunrise = int(data[&quot;results&quot;][&quot;sunrise&quot;].split(&quot;T&quot;)[1].split(&quot;:&quot;)[0])<br>sunset = int(data[&quot;results&quot;][&quot;sunset&quot;].split(&quot;T&quot;)[1].split(&quot;:&quot;)[0])<br><br>print(sunrise)<br>print(sunset)<br><br>time_now = datetime.now().hour<br>print(time_now)<br><br>if time_now &gt;= sunset or time_now &lt;= sunrise:<br>    print(&quot;It&#39;s dark&quot;)</pre><p>By end of day 33 I gained a solid understanding of Application Programming Interfaces (APIs) and how Python applications communicate with web services over the internet. I learned that an API acts as a bridge between applications, allowing programs to request and exchange data using HTTP methods such as GET. I explored API endpoints, made requests using the requests library, interpreted HTTP status codes, handled errors with raise_for_status(), and parsed JSON responses into Python dictionaries for further processing. I built a Kanye Quotes App that fetches a random quote from the Kanye REST API and updates a Tkinter GUI dynamically, demonstrating how APIs can power interactive applications with live data. I also learned how to send query parameters in API requests by retrieving sunrise and sunset times from the Sunrise-Sunset API based on geographical coordinates. Finally, I completed the ISS Overhead Notifier project, which integrated multiple concepts by checking the real-time position of the International Space Station using the Open Notify API, determining whether it was nighttime at my location, and automatically sending an email notification when the ISS was overhead. This project strengthened my understanding of API integration, JSON data handling, HTTP communication, automation, SMTP email services, datetime manipulation, conditional logic, loops, and combining multiple external services to build a practical real-world Python application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c2acffc4e3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>