<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Elijah Jeremiah L. Barba</title>
    <description>The latest articles on DEV Community by Elijah Jeremiah L. Barba (@ejbarba).</description>
    <link>https://dev.to/ejbarba</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F242461%2F55f88329-6a62-4687-8646-377fbc743c0c.jpg</url>
      <title>DEV Community: Elijah Jeremiah L. Barba</title>
      <link>https://dev.to/ejbarba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ejbarba"/>
    <language>en</language>
    <item>
      <title>What is HTTP?</title>
      <dc:creator>Elijah Jeremiah L. Barba</dc:creator>
      <pubDate>Thu, 29 Feb 2024 00:00:00 +0000</pubDate>
      <link>https://dev.to/ejbarba/what-is-http-2ip7</link>
      <guid>https://dev.to/ejbarba/what-is-http-2ip7</guid>
      <description>&lt;p&gt;HTTP (Hypertext Transfer Protocol) is the unsung hero of the internet. It's the invisible thread that weaves together our digital experiences, allowing us to access websites, retrieve resources, and communicate with servers. In this article, we'll embark on a journey through HTTP's evolution, explore its latest iteration (HTTP/3), and understand why it matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Understanding HTTP Basics&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What Is HTTP?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;HTTP is the language spoken by web browsers and servers. When you click a link, submit a form, or load a webpage, HTTP is at work behind the scenes. Here are some key points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Client-Server Communication&lt;/strong&gt;: HTTP facilitates communication between clients (usually browsers) and servers. Clients request resources (like HTML pages, images, or videos), and servers respond with the requested data.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Extensibility&lt;/strong&gt;: Over time, HTTP has evolved, adding features and becoming more versatile.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;TCP (or TLS) Connections&lt;/strong&gt;: HTTP rides on top of TCP (Transmission Control Protocol) or TLS-encrypted TCP connections.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Beyond HTML&lt;/strong&gt;: While its roots lie in fetching hypertext documents (HTML), HTTP now handles various resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. HTTP/3: The Next Frontier&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why HTTP/3?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;HTTP/3 is the latest iteration, building upon the success of HTTP/2. Let's dive into its key features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;QUIC Transport Protocol&lt;/strong&gt;: HTTP/3 rides on QUIC (Quick UDP Internet Connections), a protocol developed by Google. Unlike TCP, which relies on ordered, reliable delivery, QUIC operates over UDP (User Datagram Protocol), providing faster connections.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Encryption&lt;/strong&gt;: HTTP/3 ensures end-to-end encryption using TLS 1.3. Security is no longer optional; it's baked into the protocol.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Zero Round-Trip Time Resumption&lt;/strong&gt;: Imagine resuming a conversation without the usual pleasantries. HTTP/3 allows instant resumption of prior connections, reducing latency.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Multiplexing&lt;/strong&gt;: Native multiplexing enables concurrent data streams. No more waiting for one resource to finish before fetching another.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;No Head-of-Line Blocking&lt;/strong&gt;: In HTTP/2, if one resource is delayed, others in the queue are stuck. HTTP/3 eliminates this bottleneck.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. HTTP/3 Adoption and Impact&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;HTTP/3 as an IETF Standard&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  The Internet Engineering Task Force (IETF) has officially standardized HTTP/3. This endorsement solidifies its role in shaping the web's future.&lt;/li&gt;
&lt;li&gt;  The IETF is a global community of experts who define internet standards.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Websites Supporting HTTP/3&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  Around &lt;strong&gt;8% of the top 10 million websites&lt;/strong&gt; have already embraced HTTP/3.&lt;/li&gt;
&lt;li&gt;  These websites recognize its benefits: faster loading times, improved security, and better performance.&lt;/li&gt;
&lt;li&gt;  Chrome and Firefox browsers offer non-default support for HTTP/3.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Should Developers Care?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Performance Boost&lt;/strong&gt;: HTTP/3 slashes latency, thanks to zero round-trip time and multiplexing.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Security&lt;/strong&gt;: TLS 1.3 encryption ensures data privacy.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Reliability&lt;/strong&gt;: No more head-of-line blocking.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Conclusion: A Faster, Safer Web&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;HTTP/3 isn't just a buzzword; it's the future. As developers, let's adopt it, optimize our websites, and contribute to a seamless online experience. The web awaits---faster, safer, and more efficient! 🚀🌐&lt;/p&gt;

&lt;p&gt;For an even deeper dive, check out these resources:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="https://code-maze.com/http-series-part-1/"&gt;HTTP in Depth&lt;/a&gt;&lt;/strong&gt;: A comprehensive guide that delves into the intricacies of HTTP.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="https://www.cloudflare.com/learning/ddos/glossary/hypertext-transfer-protocol-http/"&gt;Hypertext Transfer Protocol (HTTP)&lt;/a&gt;&lt;/strong&gt;: Learn about the fundamentals of HTTP and its role in web communication.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="https://www.cloudflare.com/learning/ssl/what-is-https/"&gt;How HTTPS Works&lt;/a&gt;&lt;/strong&gt;: Explore the mechanics of secure communication over the web.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview"&gt;Mozilla Developer Network: HTTP Overview&lt;/a&gt;&lt;/strong&gt;: Dive into the Mozilla Developer Network's detailed overview of HTTP.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="https://code-maze.com/http-series-part-1/"&gt;HTTP/3 Core Concepts (Part 1)&lt;/a&gt;&lt;/strong&gt;: Understand the core concepts behind HTTP/3.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="https://code-maze.com/http-series-part-1/"&gt;HTTP/3 Is Now a Standard: Why Use It and How to Get Started&lt;/a&gt;&lt;/strong&gt;: Discover why adopting HTTP/3 is essential and learn how to implement it.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;a href="https://ebassguitar.com/yt087-3-concepts-to-play-a-2-5-1-walking-bass-series/"&gt;YouTube Video: HTTP/3 Explained&lt;/a&gt;&lt;/strong&gt;: A visual explanation of HTTP/3.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>roadmap</category>
      <category>frontend</category>
      <category>programming</category>
    </item>
    <item>
      <title>How Does the Internet Work?</title>
      <dc:creator>Elijah Jeremiah L. Barba</dc:creator>
      <pubDate>Wed, 28 Feb 2024 05:45:43 +0000</pubDate>
      <link>https://dev.to/ejbarba/how-does-the-internet-work-3l3a</link>
      <guid>https://dev.to/ejbarba/how-does-the-internet-work-3l3a</guid>
      <description>&lt;h2&gt;
  
  
  1. What is the Internet?
&lt;/h2&gt;

&lt;p&gt;The Internet is a vast, interconnected network of computers, servers, and devices spanning the globe. It enables seamless communication, data exchange, and access to information. Imagine it as a massive web of highways connecting cities (computers) worldwide.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Networks: Think of a network as a social circle where people exchange information. Similarly, computers form networks, and the Internet is essentially a collection of interconnected networks. The term “Internet” itself comes from “interconnected networks.”&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Distributed Networking
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Unlike a centralized system, the Internet is distributed. There’s no single control center; instead, it relies on countless machines working together. Any computer or hardware that follows the correct networking protocols can be part of the Internet. This decentralized nature makes it resilient—even if parts go down, the rest keeps functioning.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Packets and Protocols
&lt;/h2&gt;

&lt;p&gt;Two fundamental concepts drive the Internet:&lt;/p&gt;

&lt;p&gt;a. Packets&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When data travels over the Internet, it’s broken into smaller chunks called packets. Each packet contains both data and a header (like assembly instructions). These packets zip around the network, ensuring efficient transmission.&lt;/li&gt;
&lt;li&gt;Imagine sending a long message: Instead of sending it all at once, break it into smaller pieces (packets). Each packet carries a part of the message and includes instructions on how to reassemble it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;b. Protocols&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Networking protocols are the rules governing communication. The most crucial ones are Internet Protocol (IP) and Transport Control Protocol (TCP).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IP handles addressing and routing. It ensures packets reach the right destination by assigning unique IP addresses to devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TCP manages reliable data transfer. It breaks large messages into packets, ensures they arrive in order, and reassembles them at the destination.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. How Data Moves
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Computers, servers, and routers (like traffic controllers) work together. They transmit data via wires, cables, radio waves, and other networking infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All data becomes pulses of light or electricity (bits) and travels at the speed of light. The more bits that flow simultaneously, the faster the Internet operates.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Applications and Services
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Internet isn’t just about data—it powers applications like email, chat, streaming, and websites. When you visit a site, your browser sends requests, and servers respond with data packets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;So next time you browse, stream, or send an email, remember that it’s all thanks to the intricate dance of packets, protocols, and interconnected devices that make up our incredible Internet.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And there you have it! A glimpse into the magic behind the Internet. 🌐✨&lt;/p&gt;

&lt;p&gt;For more in-depth exploration, check out these resources:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.cloudflare.com/learning/network-layer/how-does-the-internet-work/"&gt;How does the Internet work? | Cloudflare&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.hp.com/us-en/shop/tech-takes/how-does-the-internet-work"&gt;How Does the Internet Work (Infographic) | HP® Tech Takes&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:the-internet/xcae6f4a7ff015e7d:introducing-the-internet/v/what-is-the-internet"&gt;What is the Internet? (video) | The Internet | Khan Academy&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.explainthatstuff.com/internet.html"&gt;How the Internet works: A simple introduction - Explain that Stuff&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy exploring! 🚀.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>learning</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Beginner's Guide to Requests and APIs</title>
      <dc:creator>Elijah Jeremiah L. Barba</dc:creator>
      <pubDate>Mon, 16 Dec 2019 09:21:19 +0000</pubDate>
      <link>https://dev.to/ejbarba/beginner-s-guide-to-requests-and-apis-41dk</link>
      <guid>https://dev.to/ejbarba/beginner-s-guide-to-requests-and-apis-41dk</guid>
      <description>&lt;p&gt;The &lt;strong&gt;requests&lt;/strong&gt; module is your portal to the open web.🤯 Basically any API that you have access to, you can pull data from it (Though your mileage may vary). &lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started ✊
&lt;/h2&gt;

&lt;p&gt;Installing requests needs &lt;a href="https://pypi.org/project/pipenv/"&gt;pipenv&lt;/a&gt;, so go ahead and install that first if you don't have it. If you do, simply run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pipenv&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Let's go ahead and pick an API to use.🤔
&lt;/h3&gt;

&lt;p&gt;Here is a great resource to public APIs: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/public-apis"&gt;
        public-apis
      &lt;/a&gt; / &lt;a href="https://github.com/public-apis/public-apis"&gt;
        public-apis
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A collective list of free APIs
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;
    &lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Public APIs&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;i&amp;gt;A collective list of free APIs for use in software and web development&amp;lt;/i&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;

&lt;div&gt;
    &lt;sup&gt;Status&lt;/sup&gt;
    &lt;br&gt;
    &lt;a href="https://github.com/public-apis/public-apis#index"&gt;
        &lt;img alt="Number of Categories" src="https://camo.githubusercontent.com/a5a62322b1ef6eb8a0c43970a573ab7f43f57b38de120cbf02bc12d546e5bd82/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470733a2f2f6170692e7075626c6963617069732e6f72672f63617465676f72696573266c6162656c3d4e756d6265722532306f6625323043617465676f726965732671756572793d242e636f756e7426636f6c6f723d696e666f726d6174696f6e616c"&gt;
    &lt;/a&gt;
    &lt;a href="https://github.com/public-apis/public-apis"&gt;
        &lt;img alt="Number of APIs" src="https://camo.githubusercontent.com/8dee6d7919a9f5af924d8a7ab949f12dd88647e19924fb90d0468e7879c05dec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f75726c3d68747470733a2f2f6170692e7075626c6963617069732e6f72672f656e7472696573266c6162656c3d4e756d6265722532306f66253230415049732671756572793d242e636f756e7426636f6c6f723d696e666f726d6174696f6e616c"&gt;
    &lt;/a&gt;
    &lt;br&gt;
    &lt;a href="https://github.com/public-apis/public-apis/actions/workflows/test_of_push_and_pull.yml"&gt;
        &lt;img alt="Tests of push and pull" src="https://github.com/public-apis/public-apis/actions/workflows/test_of_push_and_pull.yml/badge.svg"&gt;
    &lt;/a&gt;
    &lt;a href="https://github.com/public-apis/public-apis/actions/workflows/validate_links.yml"&gt;
        &lt;img alt="Validate links" src="https://github.com/public-apis/public-apis/actions/workflows/validate_links.yml/badge.svg"&gt;
    &lt;/a&gt;
    &lt;a href="https://github.com/public-apis/public-apis/actions/workflows/test_of_validate_package.yml"&gt;
        &lt;img alt="Tests of validate package" src="https://github.com/public-apis/public-apis/actions/workflows/test_of_validate_package.yml/badge.svg"&gt;
    &lt;/a&gt;
&lt;/div&gt;



&lt;div&gt;
    The Project
    &lt;br&gt;
    &lt;a href="https://github.com/public-apis/public-apisCONTRIBUTING.md"&gt;Contributing Guide&lt;/a&gt; •
    &lt;a href="https://github.com/davemachado/public-api"&gt;API for this project&lt;/a&gt; •
    &lt;a href="https://github.com/public-apis/public-apis/issues"&gt;Issues&lt;/a&gt; •
    &lt;a href="https://github.com/public-apis/public-apis/pulls"&gt;Pull Requests&lt;/a&gt; •
    &lt;a href="https://github.com/public-apis/public-apisLICENSE"&gt;License&lt;/a&gt;
&lt;br&gt;
&lt;div&gt;
    Alternative sites for the project (unofficials)
    &lt;br&gt;
    &lt;a href="https://free-apis.github.io" rel="nofollow"&gt;Free APIs&lt;/a&gt; •
    &lt;a href="https://devresourc.es/tools-and-utilities/public-apis" rel="nofollow"&gt;Dev Resources&lt;/a&gt; •
    &lt;a href="https://www.public-apis.ml" rel="nofollow"&gt;Public APIs Site&lt;/a&gt; •
    &lt;a href="https://apihouse.vercel.app" rel="nofollow"&gt;Apihouse&lt;/a&gt; •
    &lt;a href="https://collective-api.vercel.app/" rel="nofollow"&gt;Collective APIs&lt;/a&gt;
&lt;/div&gt;



&lt;br&gt;
&lt;br&gt;

&lt;div&gt;
    &lt;p&gt;
        &lt;a href="https://opencollective.com/public-apis" rel="nofollow"&gt;[ &lt;strong&gt;Become a sponsor&lt;/strong&gt; and support Public APIs and their maintainers ]&lt;/a&gt;
    &lt;/p&gt;
    &lt;p&gt;&lt;strong&gt;Special thanks to:&lt;/strong&gt;&lt;/p&gt;
    &lt;p&gt;
        &lt;a href="https://apilayer.com#gh-light-mode-only" rel="nofollow"&gt;
            &lt;/a&gt;&lt;/p&gt;
&lt;div&gt;
                &lt;a rel="noopener noreferrer" href="https://github.com/public-apis/public-apis.github/cs1586-APILayerLogoUpdate2022-LJ_v2-HighRes.png"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5x8Diyfq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/public-apis/public-apis.github/cs1586-APILayerLogoUpdate2022-LJ_v2-HighRes.png" width="250" alt="APILayer Logo"&gt;&lt;/a&gt;
            &lt;/div&gt;
            &lt;div&gt;
                &lt;p&gt;&lt;strong&gt;The fastest way to integrate APIs into any product&lt;/strong&gt;&lt;/p&gt;
            &lt;/div&gt;
            &lt;div&gt;
                &lt;sup&gt;Explore, discover and consume public APIs as simpler programmable building blocks all on one platform for a 10x developer experience.&lt;/sup&gt;
            &lt;/div&gt;
        &lt;a href="https://apilayer.com#gh-dark-mode-only" rel="nofollow"&gt;
            &lt;div&gt;
                &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--14cVDSup--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://raw.githubusercontent.com/public-apis/public-apis/master/.github/assets/sponsors_logo/m3o_logo_white.png" width="250" alt="APILayer Logo"&gt;
            &lt;/div&gt;
            &lt;div&gt;
                &lt;p&gt;&lt;strong&gt;The fastest way to integrate APIs into any product&lt;/strong&gt;&lt;/p&gt;
            &lt;/div&gt;
            &lt;div&gt;
                &lt;sup&gt;Explore, discover and consume public APIs as simpler programmable building blocks all on one platform for a 10x developer experience.&lt;/sup&gt;
            &lt;/div&gt;
        &lt;/a&gt;
&lt;/div&gt;



&lt;br&gt;
&lt;br&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Index&lt;/h2&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#animals"&gt;Animals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#anime"&gt;Anime&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#anti-malware"&gt;Anti-Malware&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#art--design"&gt;Art &amp;amp; Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#authentication--authorization"&gt;Authentication &amp;amp; Authorization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#blockchain"&gt;Blockchain&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#books"&gt;Books&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#business"&gt;Business&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#calendar"&gt;Calendar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#cloud-storage--file-sharing"&gt;Cloud Storage &amp;amp; File Sharing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#continuous-integration"&gt;Continuous Integration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#cryptocurrency"&gt;Cryptocurrency&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/public-apis/public-apis#currency-exchange"&gt;Currency Exchange&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/public-apis/public-apis#data-validation"&gt;Data&lt;/a&gt;…&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/public-apis/public-apis"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;Let's use the &lt;strong&gt;kanye.rest&lt;/strong&gt; API for this quick example: &lt;a href="https://kanye.rest/"&gt;https://kanye.rest/&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  Diving In 🙌
&lt;/h2&gt;

&lt;p&gt;Let's import the all mighty:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And &lt;strong&gt;get&lt;/strong&gt;-ting the data is pretty straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;kanye_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://api.kanye.rest&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Print it in JSON format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kanye_url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="c1"&gt;# gets a random quote
# {'quote': 'Tweeting is legal and also therapeutic'}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is important to read the docs of each API because each API is unique 🧐&lt;/p&gt;

&lt;p&gt;Let's say we want to get a Chuck Norris joke from this API: &lt;br&gt;
From the docs it uses a different URL, so let's go ahead and code that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;chuck_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://api.chucknorris.io/jokes/random&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chuck_url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;... will output something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{'categories': [], 'created_at': '2016-05-01 10:51:41.584544', 'icon_url': 'https://assets.chucknorris.host/img/avatar/chuck-norris.png', 'id': 'DLqW_fuXQnO1LtveTTAWRg', 'updated_at': '2016-05-01 10:51:41.584544', 'url': 'https://api.chucknorris.io/jokes/DLqW_fuXQnO1LtveTTAWRg', 'value': 'Chuck Norris Lost his virginity before his Dad...'}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...not exactly pretty to look at, so let's &lt;em&gt;pretty-print&lt;/em&gt; it:💅&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 👇 Add this import below at the beginning of your file    
# import json
&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chuck_url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now it looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "categories": [
    "science"
  ],
  "created_at": "2016-05-01 10:51:41.584544",
  "icon_url": "https://assets.chucknorris.host/img/avatar/chuck-norris.png",
  "id": "izjeqnjzteeqms8l8xgdhw",
  "updated_at": "2016-05-01 10:51:41.584544",
  "url": "https://api.chucknorris.io/jokes/izjeqnjzteeqms8l8xgdhw",
  "value": "Chuck Norris knows the last digit of pi."
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that's much more readable! 💪💪💪&lt;/p&gt;

&lt;p&gt;Sources:&lt;br&gt;
🐍 &lt;a href="https://3.python-requests.org/"&gt;https://3.python-requests.org/&lt;/a&gt;&lt;br&gt;
📖 &lt;a href="https://github.com/public-apis/public-apis"&gt;https://github.com/public-apis/public-apis&lt;/a&gt;&lt;br&gt;
🌊 &lt;a href="https://kanye.rest/"&gt;https://kanye.rest/&lt;/a&gt;&lt;br&gt;
🤠 &lt;a href="https://api.chucknorris.io/"&gt;https://api.chucknorris.io/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>requests</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Recursion in Python(A Gentle Introduction)</title>
      <dc:creator>Elijah Jeremiah L. Barba</dc:creator>
      <pubDate>Mon, 16 Dec 2019 06:53:20 +0000</pubDate>
      <link>https://dev.to/ejbarba/python-recursion-4jcd</link>
      <guid>https://dev.to/ejbarba/python-recursion-4jcd</guid>
      <description>&lt;p&gt;The topic of &lt;em&gt;recursion&lt;/em&gt; can be intimidating and daunting at first to newcomers, and one can get frustrated and find difficulties wrapping their heads around this topic. 🤔    &lt;/p&gt;

&lt;h2&gt;
  
  
  MIT OpenCourseWare
&lt;/h2&gt;

&lt;p&gt;Prof. Eric Grimson framed recursion in a straightforward and easy to understand way. He also introduced a simple yet powerful concept that goes with recursion called &lt;em&gt;memoization&lt;/em&gt;. 🤯&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WPSeyjX1-4s"&gt;
&lt;/iframe&gt;
&lt;br&gt;
One can think of &lt;em&gt;memoization&lt;/em&gt; is essentially a list of performed tasks and its values, and if the task at hand is in the list, just get the value; else add the task and value to the list.😀   &lt;/p&gt;

&lt;p&gt;Notes:&lt;br&gt;
Here is a great resource for Python beginners on &lt;em&gt;recursion&lt;/em&gt;: &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/ejbarba" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ogX1lJip--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://media.dev.to/cdn-cgi/image/width%3D150%2Cheight%3D150%2Cfit%3Dcover%2Cgravity%3Dauto%2Cformat%3Dauto/https%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Fuser%252Fprofile_image%252F242461%252F55f88329-6a62-4687-8646-377fbc743c0c.jpg" alt="ejbarba"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/ejbarba/python-recursion-4jcd" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Recursion in Python(A Gentle Introduction)&lt;/h2&gt;
      &lt;h3&gt;Elijah Jeremiah L. Barba ・ Dec 16 '19&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#python&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#resources&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
Jokes aside, after watching the video, you're at least a little confident with &lt;em&gt;recursion&lt;/em&gt;👏👏👏 Happy Coding!

</description>
      <category>python</category>
      <category>resources</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Python Dateutil Module</title>
      <dc:creator>Elijah Jeremiah L. Barba</dc:creator>
      <pubDate>Mon, 09 Dec 2019 06:54:11 +0000</pubDate>
      <link>https://dev.to/ejbarba/python-dateutil-module-4m03</link>
      <guid>https://dev.to/ejbarba/python-dateutil-module-4m03</guid>
      <description>&lt;p&gt;Python has the built-in &lt;code&gt;datetime&lt;/code&gt; module which is used for manipulating dates and times from simple to complex ways. While this may be enough for a number of use cases, the &lt;code&gt;dateutil&lt;/code&gt; module provides powerful extensions to this. Some cool features that we would be exploring are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Computing of &lt;strong&gt;relative deltas&lt;/strong&gt; (next Monday, next week,  last week of the previous month, next five years, etc). 🤔&lt;/li&gt;
&lt;li&gt;Computing of relative deltas between &lt;strong&gt;two&lt;/strong&gt; given dates and/or datetime objects. 🤯 &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt; Getting Started ✊ &lt;/h2&gt; 

&lt;p&gt;dateutil can be installed from PyPI using pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install python-dateutil
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...or if you're on Python3:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip3 install python-dateutil
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt; Diving In 🙌 &lt;/h2&gt;

&lt;p&gt;Add some time-traveling imports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dateutil.relativedelta&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;calendar&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get the date and time right now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;NOW&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;NOW&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-12-09 11:32:20.295752
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...or just the date:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;today&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TODAY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-12-09
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get next week:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;next_week&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weeks&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;next_week&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-12-16 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...or next month:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;next_month&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;next_month&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2020-01-09 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can even &lt;em&gt;combine&lt;/em&gt; them(next month plus one week):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;next_month_plus_one_week&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;weeks&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;next_month_plus_one_week&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2020-01-16 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;... and even add &lt;em&gt;time&lt;/em&gt;(next month plus one week at 1pm):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;added_time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;weeks&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hour&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;added_time&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2020-01-16 13:00:00
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course we can go &lt;em&gt;backwards&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;last_week&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weeks&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;last_week&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-12-02
&lt;/span&gt;
&lt;span class="n"&gt;last_month&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;last_month&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-11-09
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;... and we can mix things up a bit(one month before one year):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;one_month_before_one_year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;years&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;one_month_before_one_year&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2020-11-09
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;BTW adding one month will never cross the month boundary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;# 2020-02-27
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;# 2020-02-29 (2020 is a leap year! #todayilearned)
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;#2020-03-31
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...this logic also applies for years, even on leap years:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Note that 2020 is a leap year
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;years&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;# 2021-02-28
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;years&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;# 2021-02-28
&lt;/span&gt;
&lt;span class="c1"&gt;# Subtracting 1 year from Feb 29 2020 will print Feb 28 2019
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;years&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-02-28
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also make use of &lt;code&gt;weekdays&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Note that TODAY is a Monday
&lt;/span&gt;&lt;span class="n"&gt;this_TGIF&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weekday&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;FR&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;this_TGIF&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-12-13
&lt;/span&gt;
&lt;span class="c1"&gt;# Tuesday of next week, not tomorrow
&lt;/span&gt;&lt;span class="n"&gt;next_tuesday&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weeks&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;weekday&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;TU&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;next_tuesday&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#2019-12-17
&lt;/span&gt;
&lt;span class="c1"&gt;# Making use of the calendar import
&lt;/span&gt;&lt;span class="n"&gt;next_tuesday_calendar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TODAY&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weeks&lt;/span&gt;&lt;span class="o"&gt;=+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;weekday&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;TUESDAY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;next_tuesday_calendar&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# 2019-12-17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also find a date using &lt;code&gt;yearday&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Get the 237th day of 2020
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;yearday&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;237&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="c1"&gt;# 2020-08-24
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Getting the difference of two dates is pretty straightforward :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Setting the date
# year - month - day - hour - minutes
&lt;/span&gt;&lt;span class="n"&gt;nasa_birthday&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1958&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;age_of_nasa&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;relativedelta&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TODAY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;nasa_birthday&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;age_of_nasa&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# relativedelta(years=+61, months=+4, days=+10)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;... and formatting is also easy-peasy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;It has been {} years, {} months and {} days since the birth of NASA 🚀&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;age_of_nasa&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;years&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="n"&gt;age_of_nasa&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="n"&gt;age_of_nasa&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="p"&gt;,))&lt;/span&gt;
&lt;span class="c1"&gt;#It has been 61 years, 4 months and 10 days since the birth of NASA 🚀
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sources:&lt;br&gt;
🐍 &lt;a href="https://dateutil.readthedocs.io/en/stable/"&gt;https://dateutil.readthedocs.io/en/stable/&lt;/a&gt; &lt;br&gt;
🚀 &lt;a href="https://en.wikipedia.org/wiki/NASA"&gt;https://en.wikipedia.org/wiki/NASA&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>dateutil</category>
      <category>todayilearned</category>
    </item>
  </channel>
</rss>
