<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Real Python</title>
  <link href="https://realpython.com/atom.xml" rel="self"/>
  <link href="https://realpython.com/"/>
  <updated>2026-07-10T12:00:00+00:00</updated>
  <id>https://realpython.com/</id>
  <author>
    <name>Real Python</name>
  </author>

  
    <entry>
      <title>The Real Python Podcast – Episode #302: Constructing and Judging Modern Agentic Workflows</title>
      <id>https://realpython.com/podcasts/rpp/302/</id>
      <link href="https://realpython.com/podcasts/rpp/302/"/>
      <updated>2026-07-10T12:00:00+00:00</updated>
      <summary>How can you improve your LLM agent systems through specification enrichment? What are the advantages of having an LLM act as a judge within an agent system? This week on the show, Senior IEEE Member and Quality Engineer Suneet Malhotra joins us to discuss building and evaluating agentic architecture.</summary>
      <content type="html">
        &lt;p&gt;How can you improve your LLM agent systems through specification enrichment? What are the advantages of having an LLM act as a judge within an agent system? This week on the show, Senior IEEE Member and Quality Engineer Suneet Malhotra joins us to discuss building and evaluating agentic architecture.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Build Enumerations of Constants With Python&#x27;s Enum</title>
      <id>https://realpython.com/quizzes/python-enum/</id>
      <link href="https://realpython.com/quizzes/python-enum/"/>
      <updated>2026-07-09T12:00:00+00:00</updated>
      <summary>Test your understanding of Python&#x27;s Enum class, from grouping related constants to using IntEnum and IntFlag for integer and bitwise behavior.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python-enum/&quot;&gt;Build Enumerations of Constants With Python&amp;rsquo;s Enum&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to create enumerations by subclassing &lt;code&gt;Enum&lt;/code&gt; or using its functional API, how to access and compare members, and how specialized types like &lt;code&gt;IntEnum&lt;/code&gt; and &lt;code&gt;IntFlag&lt;/code&gt; extend enums with integer and bitwise behavior.&lt;/p&gt;
&lt;p&gt;Enums help you group related constants under a single, readable data type, so a solid grasp of them will make your code more organized and robust.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Use GitHub</title>
      <id>https://realpython.com/how-to-use-github/</id>
      <link href="https://realpython.com/how-to-use-github/"/>
      <updated>2026-07-08T14:00:00+00:00</updated>
      <summary>Learn how to use GitHub step by step to create a remote repository, push your local Python project, and collaborate with others using GitHub Issues.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;When you work on a local Python project, tracking your changes with Git is a great way to maintain a history of your code. However, keeping your repository only on your computer leaves your work vulnerable to hardware failures and makes collaboration difficult. By learning how to use GitHub, you can back up your work, share your code with the public, and work alongside other developers.&lt;/p&gt;
&lt;p&gt;By following this guide, you’ll learn how to create a GitHub repository, connect it to your local project, and collaborate with others online.&lt;/p&gt;
&lt;p&gt;Here’s a preview of what a successfully connected and active GitHub repository looks like:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png&quot; width=&quot;1371&quot; height=&quot;903&quot; srcset=&quot;/cdn-cgi/image/width=342,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 342w, /cdn-cgi/image/width=457,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 457w, /cdn-cgi/image/width=685,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 685w, /cdn-cgi/image/width=1371,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 1371w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;GitHub repo pushed&quot; data-asset=&quot;6876&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;GitHub Repository Pushed&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;The screenshot above is your destination. In the rest of this tutorial, you’ll build that result one step at a time, starting from your local project.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/how-to-use-github-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-how-to-use-github-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to follow along as you put a weather CLI app on GitHub and practice core workflows like commits, branches, pull requests, and issues.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “How to Use GitHub” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/how-to-use-github/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #e5c6aa;&quot; alt=&quot;How to Use GitHub&quot; src=&quot;https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/how-to-use-github/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use GitHub&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Practice putting a Python project on GitHub by creating a remote repository, pushing your local code, and collaborating with others.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This guide is designed for developers who already have a basic understanding of the &lt;a href=&quot;/ref/glossary/command-line-interface/&quot; class=&quot;ref-link&quot;&gt;command line&lt;/a&gt; and local &lt;a href=&quot;/ref/best-practices/version-control/&quot; class=&quot;ref-link&quot;&gt;version control&lt;/a&gt;. To follow along with the steps, you’ll need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A GitHub account:&lt;/strong&gt; A free account registered on &lt;a href=&quot;https://github.com/signup&quot;&gt;GitHub&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Git installed:&lt;/strong&gt; The &lt;a href=&quot;/ref/tools/git/&quot; class=&quot;ref-link&quot;&gt;Git&lt;/a&gt; command-line tools installed on your operating system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A local Git repository:&lt;/strong&gt; A folder on your computer that contains some files and has been initialized with &lt;code&gt;git init&lt;/code&gt;. You should also have at least one saved commit in this local repository.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you need help setting up your local environment before moving forward, you can review the &lt;a href=&quot;https://realpython.com/how-to-use-git/&quot;&gt;How to Use Git: A Beginner’s Guide&lt;/a&gt; tutorial to get your local repository ready.&lt;/p&gt;
&lt;p&gt;If you prefer to learn by watching, Real Python’s &lt;a href=&quot;https://realpython.com/courses/python-git-github-intro/&quot;&gt;Introduction to Git and GitHub for Python&lt;/a&gt; video course walks through both tools from the ground up and pairs well with the hands-on steps in this guide.&lt;/p&gt;
&lt;p&gt;To work through the steps that follow, you can set up a sample Python project locally. Open your terminal, create a new folder called &lt;code&gt;weather-data-parser&lt;/code&gt;, and navigate inside it:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;mkdir&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;weather-data-parser
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;weather-data-parser
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Create a new file named &lt;code&gt;weather.py&lt;/code&gt; and paste the Python code below into it. This weather app is adapted from Real Python’s &lt;a href=&quot;https://realpython.com/build-a-python-weather-app-cli/&quot;&gt;Raining Outside? Build a Weather CLI App With Python&lt;/a&gt; tutorial, which provides additional background and a full step-by-step walkthrough of the original project.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card02e9a2&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;
    &lt;button class=&quot;btn w-100&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#collapse02e9a2&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse02e9a2&quot; markdown&gt;&lt;span class=&quot;float-left&quot; markdown&gt;Expand to View the &lt;code&gt;weather.py&lt;/code&gt; Source Code&lt;/span&gt;&lt;span class=&quot;float-right text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-parent=&quot;#collapse_card02e9a2&quot; id=&quot;collapse02e9a2&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;weather.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;argparse&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;json&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;configparser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ConfigParser&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;urllib&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;request&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# =========================&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Styling / Colors&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =========================&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;PADDING&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;RED&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[1;31m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;BLUE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[1;34m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;CYAN&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[1;36m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;GREEN&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[0;32m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;YELLOW&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[33m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;WHITE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[37m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;REVERSE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[;7m&quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;RESET&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\033&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;[0m&quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;change_color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# =========================&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Weather Config&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =========================&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;BASE_WEATHER_API_URL&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;http://api.openweathermap.org/data/2.5/weather&quot;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Weather Condition Codes&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;THUNDERSTORM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;DRIZZLE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;400&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;RAIN&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;600&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;SNOW&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;600&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;700&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ATMOSPHERE&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;700&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;800&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;CLEAR&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;800&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;801&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;CLOUDY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;801&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;900&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;read_user_cli_args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Handles the CLI user interactions.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Returns:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        argparse.Namespace: Populated namespace object&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argparse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ArgumentParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;gets weather and temperature information for a city&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_argument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;city&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nargs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;+&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;enter the city name&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_argument&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;-i&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;--imperial&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;action&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;store_true&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;display the temperature in imperial units&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parser&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parse_args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;build_weather_query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;city_input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imperial&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Builds the URL for an API request to OpenWeather&#x27;s Weather API.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Args:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        city_input (List[str]): Name of a city as collected by argparse&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        imperial (bool): Whether or not to use imperial units for temperature&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Returns:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        str: URL formatted for a call to OpenWeather&#x27;s city name endpoint&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;api_key&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_get_api_key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;city_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;city_input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;url_encoded_city_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;quote_plus&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;city_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;units&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;imperial&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imperial&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;metric&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BASE_WEATHER_API_URL&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;?q=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url_encoded_city_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
        &lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;amp;units=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;units&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;amp;appid=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;api_key&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;_get_api_key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Fetch the API key from your configuration file.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Expects a configuration file named &quot;secrets.ini&quot; with structure:&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;        [openweather]&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        api_key=&amp;lt;YOUR-OPENWEATHER-API-KEY&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;config&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ConfigParser&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;secrets.ini&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;openweather&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;api_key&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get_weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;query_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Makes an API request to a URL and returns the data as a Python object.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Args:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        query_url (str): URL formatted for OpenWeather&#x27;s city name endpoint&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Returns:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        dict: Weather information for a specific city&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;urlopen&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;query_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;HTTPError&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http_error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http_error&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;401&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# 401 - Unauthorized&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Access denied. Check your API key.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http_error&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;404&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# 404 - Not Found&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Can&#x27;t find weather data for this city.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Something went wrong... (&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;http_error&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;code&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;)&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;loads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;JSONDecodeError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Couldn&#x27;t read the server response.&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;display_weather_info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;imperial&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Prints formatted weather information about a city.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Args:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        weather_data (dict): API response from OpenWeather by city name&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        imperial (bool): Whether or not to use imperial units for temperature&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    More information at https://openweathermap.org/current#name&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;city&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;weather&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;weather_description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;weather&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;temperature&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;main&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;][&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;temp&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;change_color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REVERSE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;city&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PADDING&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;change_color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RESET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;weather_symbol&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_select_weather_display_params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;change_color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\t&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;weather_symbol&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\t&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;weather_description&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;capitalize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PADDING&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;end&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;change_color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;RESET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;(&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;temperature&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;°&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;F&#x27;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;imperial&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#x27;C&#x27;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;)&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;_select_weather_display_params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Selects a weather symbol and a display color for a weather state.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Args:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        weather_id (int): Weather condition code from the OpenWeather API&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Returns:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        tuple[str]: Contains a weather symbol and a display color&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;THUNDERSTORM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;💥&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;DRIZZLE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;💧&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CYAN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RAIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;💦&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BLUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SNOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;⛄️&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;WHITE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ATMOSPHERE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;🌀&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BLUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CLEAR&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;🔆&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;YELLOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;weather_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;CLOUDY&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;💨&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;WHITE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# In case the API adds new weather codes&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;🌈&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RESET&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;display_params&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;vm&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;__main__&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;user_args&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;read_user_cli_args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;query_url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;build_weather_query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user_args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;city&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;user_args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;imperial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;weather_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;query_url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;display_weather_info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;weather_data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;user_args&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;imperial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Because this is a Python project, it’s best practice to include a &lt;code&gt;.gitignore&lt;/code&gt; file to avoid accidentally uploading sensitive information like &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; keys or unnecessary files like &lt;code&gt;__pycache__&lt;/code&gt; directories to GitHub. Create a file named &lt;code&gt;.gitignore&lt;/code&gt; and add the following lines:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;config&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Configuration File&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;.gitignore&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;__pycache__/
secrets.ini
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Now initialize the Git repository:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Before making your first commit, it’s often helpful to check what files Git is tracking and what changes will be included. You can do this with the &lt;code&gt;git status&lt;/code&gt; command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;status
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;This command shows the current state of your working directory, including any new or modified files that will be part of the next commit. At this point, you should see your project files, including &lt;code&gt;weather.py&lt;/code&gt; and &lt;code&gt;.gitignore&lt;/code&gt;, listed as untracked files:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;text&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Text&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;Output&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;On branch master

No commits yet

Untracked files:
  (use &quot;git add &amp;lt;file&amp;gt;...&quot; to include in what will be committed)
        .gitignore
        weather.py

nothing added to commit but untracked files present (use &quot;git add&quot; to track)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;You can now stage your files and create the initial commit:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/how-to-use-github/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/how-to-use-github/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: How to Use GitHub</title>
      <id>https://realpython.com/quizzes/how-to-use-github/</id>
      <link href="https://realpython.com/quizzes/how-to-use-github/"/>
      <updated>2026-07-08T12:00:00+00:00</updated>
      <summary>Practice putting a Python project on GitHub by creating a remote repository, pushing your local code, and collaborating with others.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/how-to-use-github/&quot;&gt;How to Use GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit the core workflow for getting a local
project onto GitHub: creating an empty remote repository, connecting it with
&lt;code&gt;git remote add&lt;/code&gt;, pushing your code, and collaborating through pull requests and issues.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Testing MCP Servers With a Python MCP Client</title>
      <id>https://realpython.com/courses/testing-mcp-servers-with-a-python-mcp-client/</id>
      <link href="https://realpython.com/courses/testing-mcp-servers-with-a-python-mcp-client/"/>
      <updated>2026-07-07T14:00:00+00:00</updated>
      <summary>Learn how to build a Python MCP client that tests MCP servers from your terminal. List their tools, prompts, and resources, then call each one.</summary>
      <content type="html">
        &lt;p&gt;Building an MCP client in Python is a great way to test MCP servers directly from your terminal. In this video course, you&amp;rsquo;ll build a minimal MCP client for the command line. It can connect to an MCP server through the standard input/output (stdio) transport, list the server&amp;rsquo;s capabilities, and interact with the server&amp;rsquo;s tools, prompts, and resources directly and deterministically.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can build an &lt;strong&gt;MCP client&lt;/strong&gt; app for the command line using the &lt;strong&gt;MCP Python SDK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can connect a client to an MCP server through the &lt;strong&gt;stdio transport&lt;/strong&gt; and point it at any server from the command line.&lt;/li&gt;
&lt;li&gt;You can list a server&amp;rsquo;s capabilities by calling &lt;code&gt;.list_tools()&lt;/code&gt;, &lt;code&gt;.list_prompts()&lt;/code&gt;, and &lt;code&gt;.list_resources()&lt;/code&gt; on a &lt;code&gt;ClientSession&lt;/code&gt; instance.&lt;/li&gt;
&lt;li&gt;You can call &lt;strong&gt;tools&lt;/strong&gt;, get &lt;strong&gt;prompts&lt;/strong&gt;, and fetch &lt;strong&gt;resources&lt;/strong&gt; from an MCP server through dedicated CLI subcommands.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next, you&amp;rsquo;ll move through setup, client structure, server connection, and capability discovery to test MCP servers from your terminal.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Testing MCP Servers With a Python MCP Client</title>
      <id>https://realpython.com/quizzes/testing-mcp-servers-with-a-python-mcp-client/</id>
      <link href="https://realpython.com/quizzes/testing-mcp-servers-with-a-python-mcp-client/"/>
      <updated>2026-07-07T12:00:00+00:00</updated>
      <summary>Build a command-line MCP client in Python, connect it to servers over stdio, and test their tools, prompts, and resources.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the video course &lt;a href=&quot;https://realpython.com/courses/testing-mcp-servers-with-a-python-mcp-client/&quot;&gt;Testing MCP Servers With a Python MCP Client&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through it, you&amp;rsquo;ll revisit how to build a minimal command-line MCP client, connect it to a server through the stdio transport, and use a CLI to list, call, and inspect a server&amp;rsquo;s tools, prompts, and resources.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python&#x27;s JIT Faces Some Challenges and Other News for July 2026</title>
      <id>https://realpython.com/python-news-july-2026/</id>
      <link href="https://realpython.com/python-news-july-2026/"/>
      <updated>2026-07-06T14:00:00+00:00</updated>
      <summary>Python 3.15 picks up two more betas, the Steering Council puts CPython&#x27;s JIT on a six-month clock, and the PSF confronts its finances.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python’s experimental JIT compiler has been riding along in CPython’s &lt;code&gt;main&lt;/code&gt; branch since Python 3.13. It’s off by default and easy to forget about. In June, the Steering Council decided that the JIT needs a proper standards-track PEP, and it set a six-month clock to make that happen. Otherwise, the JIT gets taken back out of &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The JIT debate wasn’t the only relevant news this month. Python 3.14.6 and 3.13.14 shipped their routine bug fixes, and Python 3.15 picked up two more betas on its way to a fall release. The wider ecosystem kept pace, with security fixes from Django and Starlette, and fresh releases across the data stack from scikit-learn and Polars. Conference season is heating up too, with EuroPython 2026 landing in Kraków in mid-July.&lt;/p&gt;
&lt;p&gt;Time to dig into the &lt;strong&gt;Python news&lt;/strong&gt; from the past month!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/newsletter/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; markdown&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you’ll never miss another Python tutorial, course, or news update.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-releases-and-pep-highlights&quot;&gt;Python Releases and PEP Highlights&lt;a class=&quot;headerlink&quot; href=&quot;#python-releases-and-pep-highlights&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The most notable news this month is a deadline rather than a new feature. The &lt;a href=&quot;/ref/glossary/python-steering-council/&quot; class=&quot;ref-link&quot;&gt;Steering Council&lt;/a&gt; put the &lt;a href=&quot;/ref/glossary/jit-compiler/&quot; class=&quot;ref-link&quot;&gt;JIT compiler&lt;/a&gt; on notice, while the rest of the release news—two maintenance drops and two more 3.15 betas—was quieter by comparison.&lt;/p&gt;
&lt;h3 id=&quot;the-steering-council-puts-the-jit-on-notice&quot;&gt;The Steering Council Puts the JIT on Notice&lt;a class=&quot;headerlink&quot; href=&quot;#the-steering-council-puts-the-jit-on-notice&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;CPython’s JIT compiler arrived in Python 3.13 as an experimental, off-by-default feature, backed only by the informational &lt;a href=&quot;https://peps.python.org/pep-0744/&quot;&gt;PEP 744&lt;/a&gt;. In June, the Steering Council &lt;a href=&quot;https://discuss.python.org/t/an-announcement-from-the-steering-council-regarding-the-jit-project/107638&quot;&gt;announced&lt;/a&gt; that this arrangement has run its course.&lt;/p&gt;
&lt;p&gt;No new JIT functionality can merge into &lt;code&gt;main&lt;/code&gt; until the community approves the project through a standards-track &lt;a href=&quot;/ref/glossary/pep/&quot; class=&quot;ref-link&quot;&gt;PEP&lt;/a&gt;, and that PEP has roughly six months to materialize. If it doesn’t, then the JIT code comes out of &lt;code&gt;main&lt;/code&gt;, and development continues somewhere else.&lt;/p&gt;
&lt;p&gt;The council’s reasoning is less about the code and more about the commitments around it. Its list of missing pieces includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Committed long-term maintainers&lt;/li&gt;
&lt;li&gt;A security review&lt;/li&gt;
&lt;li&gt;Debugging and out-of-process tooling support&lt;/li&gt;
&lt;li&gt;Defined runtime guarantees&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There’s also a process point underneath it all:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;…experiments should not be done on the main branch of CPython without a backing PEP. (&lt;a href=&quot;https://discuss.python.org/t/an-announcement-from-the-steering-council-regarding-the-jit-project/107638&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The forthcoming PEP will need to spell out who maintains the JIT, how it coexists with &lt;a href=&quot;/ref/glossary/cpython/&quot; class=&quot;ref-link&quot;&gt;CPython&lt;/a&gt; features like free threading, profilers, and debuggers, and what counts as success.&lt;/p&gt;
&lt;p&gt;That last question is where the &lt;a href=&quot;https://discuss.python.org/t/community-perspectives-on-the-jit-experiences-expectations-and-concerns/107737&quot;&gt;community discussion&lt;/a&gt; got lively. The current &lt;a href=&quot;https://realpython.com/python315-jit-compiler/&quot;&gt;JIT&lt;/a&gt; delivers roughly an 8–9 percent geometric-mean speedup on x86-64 Linux and 12–13 percent on AArch64 macOS, but individual benchmarks swing from a 15 percent slowdown to better than a 100 percent speedup.&lt;/p&gt;
&lt;p&gt;JIT lead Ken Jin &lt;a href=&quot;https://discuss.python.org/t/community-perspectives-on-the-jit-experiences-expectations-and-concerns/107737&quot;&gt;floated&lt;/a&gt; a long-term target of around 20 percent, or as he put it, “one-half to one-quarter of PyPy.” For context, contributors measured PyPy at roughly 50 percent faster than CPython 3.15 on macOS, and 80–90 percent faster on x86-64 Linux. Either way, the JIT isn’t there yet, and the council wants a clear-eyed plan before it commits. Side by side, the gap is stark:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/graphic-python-news-july-2026-jit-speedup.bfa22c94e8e7.svg&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/graphic-python-news-july-2026-jit-speedup.bfa22c94e8e7.svg&quot; width=&quot;540&quot; height=&quot;300&quot; alt=&quot;Horizontal bar chart of speedup over CPython 3.15. Today&#x27;s JIT spans 8 to 13 percent, the target sits near 20 percent, and PyPy reaches 50 to 90 percent.&quot; data-asset=&quot;7204&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Today&#x27;s JIT Trails Its Target and Sits Far Below PyPy&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;Even the JIT’s optimistic 20 percent target barely dents PyPy’s lead, and today’s modest gains leave it well short of either mark.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The JIT still disables itself the moment you start &lt;a href=&quot;/ref/glossary/thread/&quot; class=&quot;ref-link&quot;&gt;threads&lt;/a&gt;, so it doesn’t yet play nicely with &lt;a href=&quot;https://realpython.com/python-news-july-2025/#python-314-beta-3-lands-free-threaded-support&quot;&gt;free-threaded Python&lt;/a&gt;. Making those two flagship projects work together is exactly the kind of guarantee the new PEP will need to address.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;It’s a healthy moment for the project. Forcing a real maintenance and security story now beats discovering the gaps after the JIT is on by default, so here’s hoping the extra rigor sets the JIT up for a strong future.&lt;/p&gt;
&lt;h3 id=&quot;two-maintenance-python-releases-and-two-betas&quot;&gt;Two Maintenance Python Releases and Two Betas&lt;a class=&quot;headerlink&quot; href=&quot;#two-maintenance-python-releases-and-two-betas&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;While the JIT debate simmered, the release managers kept the regular cadence going. &lt;a href=&quot;https://blog.python.org/2026/06/python-3146-31314/&quot;&gt;Python 3.14.6 and 3.13.14&lt;/a&gt; both shipped on June 10, with around 179 and 240 bug fixes, respectively. Neither is a security release, so there’s no fire drill here, just the usual steady stream of fixes that make it worth staying current on the &lt;a href=&quot;https://realpython.com/python-bugfix-version/&quot;&gt;latest bugfix version&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On the pre-release front, &lt;a href=&quot;https://www.python.org/downloads/release/python-3150b2/&quot;&gt;Python 3.15.0b2&lt;/a&gt; landed on June 2, the second of four planned betas. The feature set is frozen, so these betas are about stabilizing what’s already in.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Now that the 3.15 feature set is locked, running your test suite against the beta is the single most useful thing you can do for the release. &lt;a href=&quot;https://realpython.com/python-pre-release/&quot;&gt;Install the pre-release&lt;/a&gt; in an isolated environment, and file anything that breaks while there’s still time to fix it.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-july-2026/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-july-2026/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #301: Running Python Locally in a Sandbox</title>
      <id>https://realpython.com/podcasts/rpp/301/</id>
      <link href="https://realpython.com/podcasts/rpp/301/"/>
      <updated>2026-07-03T12:00:00+00:00</updated>
      <summary>How do you avoid the risk of running a Python application locally that could be malicious, break your code, or leak private data? How can you create a sandboxed local environment using WASM and MicroPython? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How do you avoid the risk of running a Python application locally that could be malicious, break your code, or leak private data? How can you create a sandboxed local environment using WASM and MicroPython? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python Interfaces: Object-Oriented Design Principles</title>
      <id>https://realpython.com/quizzes/interfaces-object-oriented-design-principles/</id>
      <link href="https://realpython.com/quizzes/interfaces-object-oriented-design-principles/"/>
      <updated>2026-07-03T12:00:00+00:00</updated>
      <summary>Check your understanding of Python interfaces, from informal interfaces and duck typing to formal interfaces built with the abc module.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the
&lt;a href=&quot;https://realpython.com/courses/interfaces-object-oriented-design-principles/&quot;&gt;Python Interfaces: Object-Oriented Design Principles&lt;/a&gt; video course.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to model interfaces in Python, including informal interfaces and duck typing, custom metaclasses, and formal interfaces built with the &lt;code&gt;abc&lt;/code&gt; module. You&amp;rsquo;ll also see how interfaces compare across languages like Java, C++, and Go.&lt;/p&gt;
&lt;p&gt;Interfaces help you design code around what objects do rather than what they are. Sharpening these skills will make your object-oriented Python more flexible.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Natural Language Processing With Python&#x27;s NLTK Package</title>
      <id>https://realpython.com/quizzes/nltk-nlp-python/</id>
      <link href="https://realpython.com/quizzes/nltk-nlp-python/"/>
      <updated>2026-07-02T12:00:00+00:00</updated>
      <summary>Test your understanding of natural language processing with Python&#x27;s NLTK, from tokenizing and stemming to tagging, chunking, and analyzing text.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/nltk-nlp-python/&quot;&gt;Natural Language Processing With Python&amp;rsquo;s NLTK Package&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through these questions, you&amp;rsquo;ll revisit how to preprocess text by tokenizing, filtering stop words, stemming, and lemmatizing, how to tag parts of speech, chunk phrases, and recognize named entities, and how to analyze text with concordances, dispersion plots, frequency distributions, and collocations.&lt;/p&gt;
&lt;p&gt;A solid grasp of these NLP building blocks will help you turn unstructured text into structured data that you can analyze with confidence.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python 3.15 Preview: Upgraded JIT Compiler</title>
      <id>https://realpython.com/python315-jit-compiler/</id>
      <link href="https://realpython.com/python315-jit-compiler/"/>
      <updated>2026-07-01T14:00:00+00:00</updated>
      <summary>Learn how the upgraded Python 3.15 JIT compiler speeds up your code with a new tracing frontend, register allocation, and in-place numeric operations.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python 3.15 sharpens the experimental Just-In-Time (JIT) compiler. It adds a new tracing frontend, basic register allocation, in-place &lt;code&gt;int&lt;/code&gt; and &lt;code&gt;float&lt;/code&gt; operations, tighter machine code, and more. In this tutorial, you’ll learn how to enable and benchmark the 3.15 JIT on your own machine and explore what makes it faster.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python 3.15&lt;/strong&gt; improved the experimental &lt;strong&gt;JIT compiler&lt;/strong&gt; that you opt into with &lt;code&gt;PYTHON_JIT=1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;new tracing frontend&lt;/strong&gt; records actual bytecode paths instead of estimating them, and the optimizer covers a wider set of operations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Basic register allocation&lt;/strong&gt; and tighter codegen reduce stack traffic and memory use.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reference-count elimination&lt;/strong&gt; and &lt;strong&gt;in-place ops&lt;/strong&gt; speed up float-heavy numeric loops.&lt;/li&gt;
&lt;li&gt;The official &lt;code&gt;pyperformance&lt;/code&gt; suite reports an &lt;strong&gt;8–9 percent geometric mean speedup&lt;/strong&gt; on x86-64 Linux.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First, you’ll set up a Python 3.15 build with the JIT compiled in and run a quick benchmark to see the speedup on your own machine. Then you’ll walk through each optimizer upgrade and verify the numbers against the official &lt;code&gt;pyperformance&lt;/code&gt; suite. The JIT is still experimental, so treat the numbers as a snapshot of where things stood in the 3.15 beta rather than a guarantee for the final release.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python315-jit-compiler-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python315-jit-compiler-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to benchmark the JIT and measure the speedup on your own machine.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Python 3.15 Preview: Upgraded JIT Compiler” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python315-jit-compiler/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #e5c6aa;&quot; alt=&quot;A person points at a monitor showing a rising performance line chart, beside a machine with a 3.15 flip-counter, a JIT compiling screen, a Python logo, and Trace and Register panels.&quot; src=&quot;https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.594123aaf5de.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.594123aaf5de.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.594123aaf5de.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.594123aaf5de.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.594123aaf5de.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python315-jit-compiler/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python 3.15 Preview: Upgraded JIT Compiler&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check your understanding of the Python 3.15 JIT compiler, from enabling and benchmarking it to the optimizer upgrades that make your code faster.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;set-up-a-python-315-build-with-the-jit-compiler&quot;&gt;Set Up a Python 3.15 Build With the JIT Compiler&lt;a class=&quot;headerlink&quot; href=&quot;#set-up-a-python-315-build-with-the-jit-compiler&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To follow along, you’ll need a pre-release of Python 3.15 with the &lt;a href=&quot;/ref/glossary/jit-compiler/&quot; class=&quot;ref-link&quot;&gt;JIT&lt;/a&gt; compiled in. At the time of this writing, the latest pre-release is &lt;strong&gt;3.15.0b2&lt;/strong&gt;. Once you have a JIT-capable build, you’ll opt into the JIT at runtime by setting the &lt;code&gt;PYTHON_JIT&lt;/code&gt; environment variable to &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The JIT has shipped in the official Python installer on Windows and macOS since &lt;a href=&quot;https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-jit&quot;&gt;Python 3.14&lt;/a&gt;, so the Windows and macOS installers from &lt;a href=&quot;https://www.python.org/downloads/&quot;&gt;python.org&lt;/a&gt; include it without any manual configuration step.&lt;/p&gt;
&lt;p&gt;A handy path to a JIT-capable build is to use &lt;a href=&quot;https://realpython.com/intro-to-pyenv/&quot;&gt;&lt;code&gt;pyenv&lt;/code&gt;&lt;/a&gt;, which accepts the JIT configure flag through an environment variable. If you have &lt;code&gt;pyenv&lt;/code&gt; installed, then you can run the following commands:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PYTHON_CONFIGURE_OPTS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;--enable-experimental-jit=yes-off&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;pyenv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;.15.0b2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;With these commands, &lt;code&gt;pyenv&lt;/code&gt; builds and installs Python 3.15.0b2 with the JIT included but switched off by default with the &lt;code&gt;yes-off&lt;/code&gt; value. You can enable the JIT manually with &lt;code&gt;PYTHON_JIT=1&lt;/code&gt;. If you’ve never installed a Python pre-release before, the guide &lt;a href=&quot;https://realpython.com/python-pre-release/&quot;&gt;How Can You Install a Pre-Release Version of Python?&lt;/a&gt; can walk you through the process.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you’d rather build &lt;a href=&quot;/ref/glossary/cpython/&quot; class=&quot;ref-link&quot;&gt;CPython&lt;/a&gt; yourself, then you can pass &lt;code&gt;--enable-experimental-jit=yes-off&lt;/code&gt; directly to &lt;code&gt;./configure&lt;/code&gt; and run &lt;code&gt;make&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;./configure&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--enable-experimental-jit&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;yes-off
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;make&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-j
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;You’ll need a matching version of the &lt;a href=&quot;https://llvm.org/&quot;&gt;LLVM&lt;/a&gt; compiler infrastructure installed locally because the build uses it to generate JIT stencils. The 3.15 build pins to LLVM 21.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;With the 3.15.0b2 build in place, you can confirm that the JIT is active by checking &lt;code&gt;sys._jit.is_enabled()&lt;/code&gt; with and without &lt;code&gt;PYTHON_JIT&lt;/code&gt; set:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;pyenv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;shell&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;.15.0b2

&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-c&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;import sys; print(sys._jit.is_enabled())&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;False&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PYTHON_JIT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-c&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;import sys; print(sys._jit.is_enabled())&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;In this example, you run the same one-liner twice—once without the environment variable and once with it. The &lt;code&gt;sys._jit&lt;/code&gt; &lt;a href=&quot;/ref/glossary/namespace/&quot; class=&quot;ref-link&quot;&gt;namespace&lt;/a&gt; is an experimental implementation detail signaled by the leading underscore, and it may change between minor releases. Treat any code that reads it as throwaway debugging code rather than production &lt;a href=&quot;/ref/glossary/introspection/&quot; class=&quot;ref-link&quot;&gt;introspection&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If the command with &lt;code&gt;PYTHON_JIT=1&lt;/code&gt; still prints &lt;code&gt;False&lt;/code&gt;, then the JIT wasn’t compiled into this build. Recheck your &lt;code&gt;configure&lt;/code&gt; flags or fall back to the python.org installer.&lt;/p&gt;
&lt;p&gt;Before you spend time building 3.15, it’s worth knowing that the JIT’s long-term future is under active discussion: the &lt;a href=&quot;/ref/glossary/python-steering-council/&quot; class=&quot;ref-link&quot;&gt;Python Steering Council&lt;/a&gt; recently paused new JIT development. The compiler still ships in 3.15 and keeps receiving bug and security fixes, and you’ll find the full story in &lt;a href=&quot;#decide-whether-to-enable-the-jit&quot;&gt;Decide Whether to Enable the JIT&lt;/a&gt; at the end of this tutorial.&lt;/p&gt;
&lt;h2 id=&quot;run-a-quick-jit-benchmark&quot;&gt;Run a Quick JIT Benchmark&lt;a class=&quot;headerlink&quot; href=&quot;#run-a-quick-jit-benchmark&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before diving into what’s new in 3.15’s JIT, you can see the speedup in action. The following &lt;code&gt;quick_bench.py&lt;/code&gt; script runs a tight, float-heavy loop wrapped in &lt;a href=&quot;https://docs.python.org/3/library/timeit.html&quot;&gt;&lt;code&gt;timeit&lt;/code&gt;&lt;/a&gt;, then prints whether the JIT was enabled and the average execution time per repeat:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;quick_bench.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Quick benchmark: compare CPython 3.15 with the JIT off vs on.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;Run twice against the same 3.15 build and compare the two timings:&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    PYTHON_JIT=0 python quick_bench.py&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    PYTHON_JIT=1 python quick_bench.py&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;timeit&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;timeit&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;ITERATIONS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;20_000_000&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;REPEATS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;workload&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1.0&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ITERATIONS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1.0001&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;jit_enabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;jit&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;getattr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;_jit&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;bool&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;jit&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;is_enabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;():&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;seconds&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;timeit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;workload&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;REPEATS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;REPEATS&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;label&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;JIT on&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;jit_enabled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;JIT off&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;seconds&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.2f&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; s&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;vm&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;__main__&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;In this script, you wrap &lt;code&gt;workload()&lt;/code&gt; in &lt;code&gt;timeit()&lt;/code&gt; and average across &lt;code&gt;REPEATS&lt;/code&gt; runs. The function is intentionally minimal and runs a tight loop that multiplies a &lt;a href=&quot;/ref/builtin-types/float/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;float&lt;/code&gt;&lt;/a&gt; by a small constant. That operation is where the new JIT’s &lt;code&gt;float&lt;/code&gt; optimization pays off, because the JIT can reuse the same &lt;code&gt;float&lt;/code&gt; object across iterations instead of allocating a fresh one each time.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; A &lt;strong&gt;tight loop&lt;/strong&gt; is a loop that performs minimal work on each pass and carries almost no overhead between iterations. The CPU spends nearly all its time running the loop body over and over.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You can &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;run the script&lt;/a&gt; twice against the same Python 3.15 build, toggling &lt;code&gt;PYTHON_JIT&lt;/code&gt; each time:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PYTHON_JIT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;quick_bench.py
&lt;span class=&quot;go&quot;&gt;JIT off: 1.54 s&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PYTHON_JIT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;quick_bench.py
&lt;span class=&quot;go&quot;&gt;JIT on: 0.96 s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python315-jit-compiler/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python315-jit-compiler/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python 3.15 Preview: Upgraded JIT Compiler</title>
      <id>https://realpython.com/quizzes/python315-jit-compiler/</id>
      <link href="https://realpython.com/quizzes/python315-jit-compiler/"/>
      <updated>2026-07-01T12:00:00+00:00</updated>
      <summary>Check your understanding of the Python 3.15 JIT compiler, from enabling and benchmarking it to the optimizer upgrades that make your code faster.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python315-jit-compiler/&quot;&gt;Python 3.15 Preview: Upgraded JIT Compiler&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to enable the experimental JIT compiler and confirm that it&amp;rsquo;s running. You&amp;rsquo;ll also recall what the optimizer does, explore the main upgrades that make Python 3.15 faster, and decide which workloads benefit most from turning the JIT on.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Managing and Measuring Python Code Quality</title>
      <id>https://realpython.com/courses/managing-and-measuring-python-code-quality/</id>
      <link href="https://realpython.com/courses/managing-and-measuring-python-code-quality/"/>
      <updated>2026-06-30T14:00:00+00:00</updated>
      <summary>Master Python code quality tools like linters, formatters, type checkers, and profilers to measure, manage, and improve the code you write.</summary>
      <content type="html">
        &lt;p&gt;Producing high-quality Python code involves using appropriate &lt;strong&gt;tools&lt;/strong&gt; and consistently applying &lt;strong&gt;best practices&lt;/strong&gt;. High-quality code is functional, readable, maintainable, efficient, and secure. It adheres to established standards and has excellent documentation.&lt;/p&gt;
&lt;p&gt;You can achieve these qualities by following best practices such as descriptive naming, consistent coding style, modular design, and robust error handling. To help you with all this, you can use tools such as linters, formatters, and profilers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Checking the quality of Python code&lt;/strong&gt; involves using tools like linters and static type checkers to ensure adherence to coding standards and detect potential errors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Writing quality code in Python&lt;/strong&gt; requires following best practices, such as clear naming conventions, modular design, and comprehensive testing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Good Python code&lt;/strong&gt; is characterized by readability, maintainability, efficiency, and adherence to standards like PEP 8.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Making Python code look good&lt;/strong&gt; involves using formatters to ensure consistent styling and readability, aligning with established coding styles.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Making Python code readable&lt;/strong&gt; means using descriptive names for variables, functions, classes, modules, and packages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Enjoy working through this course as you learn more about the strategies, tools, and best practices that will help you write high-quality Python code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Managing and Measuring Python Code Quality</title>
      <id>https://realpython.com/quizzes/managing-and-measuring-python-code-quality/</id>
      <link href="https://realpython.com/quizzes/managing-and-measuring-python-code-quality/"/>
      <updated>2026-06-30T12:00:00+00:00</updated>
      <summary>Test your understanding of what makes Python code functional, readable, efficient, and reusable, plus the tools that measure code quality.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the &lt;a href=&quot;https://realpython.com/courses/managing-and-measuring-python-code-quality/&quot;&gt;Managing and Measuring Python Code Quality&lt;/a&gt; course.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit what separates high-quality code from code that merely works. You&amp;rsquo;ll cover how to make code functional, readable, efficient, and reusable, how to pick the right data structures, and how to keep your code secure.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Get Started With the GitHub Copilot CLI</title>
      <id>https://realpython.com/github-copilot-cli/</id>
      <link href="https://realpython.com/github-copilot-cli/"/>
      <updated>2026-06-29T14:00:00+00:00</updated>
      <summary>Learn how to install, authenticate, and use the GitHub Copilot CLI to plan, write, and review Python code from your terminal with AI agents.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The GitHub Copilot CLI brings AI-assisted coding into your terminal. Unlike the older &lt;code&gt;gh copilot&lt;/code&gt; extension, which only suggests and explains shell commands, Copilot CLI is a standalone agentic app that answers questions, writes and debugs code, and interacts with GitHub.com services through natural-language prompts.&lt;/p&gt;
&lt;p&gt;For Python developers who feel at home on the &lt;a href=&quot;/ref/glossary/command-line-interface/&quot; class=&quot;ref-link&quot;&gt;command line&lt;/a&gt;, it offers a quick way to plan tasks, edit files, and run agentic workflows without leaving the shell.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GitHub Copilot CLI&lt;/strong&gt; is a &lt;strong&gt;terminal-based AI agent&lt;/strong&gt; that plans, writes, and debugs Python code from natural-language prompts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subagents&lt;/strong&gt; like &lt;strong&gt;explore&lt;/strong&gt; and &lt;strong&gt;code-review&lt;/strong&gt; do specialized work behind the scenes, and the &lt;code&gt;/fleet&lt;/code&gt; command runs them in &lt;strong&gt;parallel&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Standard&lt;/strong&gt;, &lt;strong&gt;Plan&lt;/strong&gt;, and &lt;strong&gt;Autopilot&lt;/strong&gt; modes let you manage the agent’s &lt;strong&gt;autonomy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The same session can &lt;strong&gt;switch&lt;/strong&gt; between &lt;strong&gt;Claude&lt;/strong&gt; and &lt;strong&gt;GPT&lt;/strong&gt; models with one &lt;code&gt;/model&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;Native &lt;strong&gt;GitHub&lt;/strong&gt; integration lets you work with issues, pull requests, and the cloud-based &lt;strong&gt;coding agent&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this guide, you’ll use a small Python project as a playground while trying out the features of &lt;a href=&quot;/ref/ai-coding-tools/copilot-cli/&quot; class=&quot;ref-link&quot;&gt;Copilot CLI&lt;/a&gt;. Familiarity with similar tools like &lt;a href=&quot;https://realpython.com/courses/getting-started-claude-code/&quot;&gt;Claude Code&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/how-to-use-gemini-cli/&quot;&gt;Gemini CLI&lt;/a&gt; will be a plus.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; GitHub Copilot CLI is &lt;em&gt;not&lt;/em&gt; the same as the &lt;a href=&quot;https://cli.github.com/&quot;&gt;GitHub CLI&lt;/a&gt; (&lt;code&gt;gh&lt;/code&gt;). The GitHub CLI is the long-standing tool for Git and GitHub workflows. Copilot CLI is an AI-powered &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt; for coding workflows in the terminal. You can use both side by side.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Before you read this guide and explore the features of GitHub Copilot CLI, take a minute to set up the prerequisites below.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/github-copilot-cli-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-github-copilot-cli-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use as a playground to plan, edit, and review a Python tic-tac-toe project with the GitHub Copilot CLI.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “How to Get Started With the GitHub Copilot CLI” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/github-copilot-cli/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #ffc973;&quot; alt=&quot;A person with headphones sits beside a robot labeled Copilot typing at a retro computer, with panels reading PLAN, EDIT, TEST, a GitHub console, and a Python logo chip labeled Auto-Pilot.&quot; src=&quot;https://files.realpython.com/media/How-to-Get-Started-With-the-GitHub-Copilot-CLI_Watermarked.36be7a18cacc.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/How-to-Get-Started-With-the-GitHub-Copilot-CLI_Watermarked.36be7a18cacc.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Get-Started-With-the-GitHub-Copilot-CLI_Watermarked.36be7a18cacc.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Get-Started-With-the-GitHub-Copilot-CLI_Watermarked.36be7a18cacc.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Get-Started-With-the-GitHub-Copilot-CLI_Watermarked.36be7a18cacc.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/github-copilot-cli/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Get Started With the GitHub Copilot CLI&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of the GitHub Copilot CLI, from installing it to running prompts, switching agent modes, and reviewing code in your terminal.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll need a few things in place before you start. If you’re missing one or two pieces, each requirement links to a resource that can help get you set up:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A GitHub account:&lt;/strong&gt; You need a GitHub account to authenticate the CLI and access your repositories. If you don’t have one, you can &lt;a href=&quot;https://github.com/signup&quot;&gt;sign up for free&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;An active Copilot subscription:&lt;/strong&gt; Any &lt;a href=&quot;https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&amp;amp;ref_loc=install-copilot-cli&amp;amp;ref_page=docs&quot;&gt;Copilot plan&lt;/a&gt; works. If you don’t have one yet, the free tier includes a monthly allowance of AI credits that covers chat and CLI usage, which might be enough to follow along with this tutorial. Agentic tasks consume these credits quickly, though, so selecting the &lt;em&gt;Auto&lt;/em&gt; option may help the free allowance go further.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Basic terminal familiarity:&lt;/strong&gt; You should be comfortable running commands in a terminal. If you’re not, then the &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal first-steps tutorial&lt;/a&gt; is a friendly starting point.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A sample &lt;a href=&quot;/ref/glossary/python/&quot; class=&quot;ref-link&quot;&gt;Python&lt;/a&gt; project:&lt;/strong&gt; You’ll use a sample Python project as a playground.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Download the project before you continue. It requires Python 3.10 or later, so make sure you have a recent version &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;installed&lt;/a&gt;. The project implements the &lt;a href=&quot;https://realpython.com/tic-tac-toe-python/&quot;&gt;tic-tac-toe game&lt;/a&gt; as a &lt;a href=&quot;https://realpython.com/python-gui-tkinter/&quot;&gt;Tkinter&lt;/a&gt; application that looks and works as shown below:&lt;/p&gt;
&lt;figure&gt;





&lt;div class=&quot;embed-responsive rounded mb-3 bg-light&quot; style=&quot;aspect-ratio: 720/832;&quot;&gt;
  &lt;video-animation data-src=&quot;https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/playlist.m3u8&quot;&gt;
    &lt;video class=&quot;embed-responsive-item&quot; muted loop playsinline preload=&quot;none&quot; poster=&quot;https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/thumbnail.jpg?width=1280&quot; disablepictureinpicture disableremoteplayback&gt;&lt;/video&gt;
  &lt;/video-animation&gt;
&lt;/div&gt;


  &lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Sample Project: The Tic-Tac-Toe Game as a Tkinter App&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;With your environment in place, the rest of the tutorial follows a natural arc: install Copilot CLI, take it for a spin, and then put it to work on a real-world Python project. You’ll move from a cautious, read-only session to fully autonomous edits as your trust in the agent grows.&lt;/p&gt;
&lt;h2 id=&quot;step-1-get-started-with-github-copilot-cli&quot;&gt;Step 1: Get Started With GitHub Copilot CLI&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-get-started-with-github-copilot-cli&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To kick things off, you’ll install Copilot CLI, sign in to GitHub, and get familiar with how to drive a session from the keyboard. By the end, you’ll be able to run &lt;a href=&quot;/ref/ai-coding-glossary/prompt/&quot; class=&quot;ref-link&quot;&gt;prompts&lt;/a&gt;, use slash commands, and navigate the interactive CLI with confidence.&lt;/p&gt;
&lt;h3 id=&quot;install-copilot-cli&quot;&gt;Install Copilot CLI&lt;a class=&quot;headerlink&quot; href=&quot;#install-copilot-cli&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The most portable way to install Copilot CLI is from a terminal. On Linux and macOS, run the official install script, which downloads a prebuilt binary and drops it under &lt;code&gt;~/.local/bin&lt;/code&gt;. On Windows, use &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/package-manager/winget/&quot;&gt;WinGet&lt;/a&gt;, which downloads the binary and adds &lt;code&gt;copilot.exe&lt;/code&gt; to your &lt;code&gt;PATH&lt;/code&gt; automatically:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#brands--windows&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;span class=&quot;icon baseline text-muted&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#v4--apple&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;winget&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GitHub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Copilot&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;curl&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-fsSL&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;https://gh.io/copilot-install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;bash

&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Or with wget if curl isn&#x27;t available:&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;wget&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-qO-&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;https://gh.io/copilot-install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;During the installation, the script may ask if you want to add Copilot CLI to your &lt;code&gt;PATH&lt;/code&gt;. If you say &lt;em&gt;yes&lt;/em&gt;, then it adds the install location to your shell profile so you can run &lt;code&gt;copilot&lt;/code&gt; from any terminal window.&lt;/p&gt;
&lt;p&gt;If you’d rather use a package manager, Copilot CLI is also distributed through &lt;a href=&quot;https://www.npmjs.com/&quot;&gt;&lt;code&gt;npm&lt;/code&gt;&lt;/a&gt; and Homebrew on macOS and Linux. Note that the &lt;code&gt;npm&lt;/code&gt; method requires Node.js 22 or later:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# With npm&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;npm&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-g&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;@github/copilot

&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# With Homebrew&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;brew&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;github/copilot/copilot-cli
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;GitHub also publishes a Windows installer and source bundles for macOS and Linux on the &lt;a href=&quot;https://github.com/github/copilot-cli/releases/&quot;&gt;Copilot CLI releases page&lt;/a&gt;. Use those if you need to pin a specific version or if your environment blocks the install commands above.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/github-copilot-cli/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/github-copilot-cli/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: How to Get Started With the GitHub Copilot CLI</title>
      <id>https://realpython.com/quizzes/github-copilot-cli/</id>
      <link href="https://realpython.com/quizzes/github-copilot-cli/"/>
      <updated>2026-06-29T12:00:00+00:00</updated>
      <summary>Test your understanding of the GitHub Copilot CLI, from installing it to running prompts, switching agent modes, and reviewing code in your terminal.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/github-copilot-cli/&quot;&gt;How to Get Started With the GitHub Copilot CLI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to install and authenticate the CLI, run one-shot and interactive prompts, use slash commands and agent modes, delegate work to subagents, and switch between AI models without leaving your terminal.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #300: Maintaining Your Python Developer Instincts While Using LLM Tools</title>
      <id>https://realpython.com/podcasts/rpp/300/</id>
      <link href="https://realpython.com/podcasts/rpp/300/"/>
      <updated>2026-06-26T12:00:00+00:00</updated>
      <summary>Do you feel like your Python skills are atrophying after using LLM coding tools? How do you add the right kind of friction into your coding routine to keep your developer instincts sharp? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Do you feel like your Python skills are atrophying after using LLM coding tools? How do you add the right kind of friction into your coding routine to keep your developer instincts sharp? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Django Tasks: Exploring the Built-in Tasks Framework</title>
      <id>https://realpython.com/django-tasks/</id>
      <link href="https://realpython.com/django-tasks/"/>
      <updated>2026-06-24T14:00:00+00:00</updated>
      <summary>Explore Django Tasks, the new built-in framework in Django 6.0, and run background jobs with @task, named queues, and a lightweight alternative to Celery.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Most Django apps eventually need to defer slow work outside the request-response cycle. Django Tasks, the new built-in framework in Django 6.0, gives you a standard way to push that work onto a background worker instead of a view function that keeps a user’s browser waiting. Common examples of such work include sending welcome emails, processing image uploads, and generating monthly reports.&lt;/p&gt;
&lt;p&gt;Before Django Tasks, you’d reach for Celery, RQ, or Django Q, each with its own &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt;, broker setup, and learning curve. The new framework standardizes the workflow. You define a task with a &lt;a href=&quot;https://realpython.com/primer-on-python-decorators/&quot;&gt;decorator&lt;/a&gt;, enqueue it, and check on it later, all through &lt;code&gt;django.tasks&lt;/code&gt;. That single entry point is what’s new, not a full Celery replacement. For production, you still install a third-party backend such as &lt;code&gt;django-tasks-db&lt;/code&gt; and run a separate worker.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll get hands-on with Django Tasks. You’ll write your first background task with the &lt;code&gt;@task&lt;/code&gt; decorator, run it on a database-backed worker using the third-party &lt;code&gt;django-tasks-db&lt;/code&gt; package, and decide whether the framework fits your project. You’ll also see when you should still pick Celery instead.&lt;/p&gt;
&lt;p&gt;You’ll get the most out of this tutorial if you’re comfortable with the basics of &lt;a href=&quot;https://realpython.com/get-started-with-django-1/&quot;&gt;building a Django project&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;working with virtual environments&lt;/a&gt;, and using &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; to install third-party packages. The code targets Django version 6.0 or later and Python 3.12 or later.&lt;/p&gt;
&lt;p&gt;The Tasks API is backend-agnostic, so the first practical question is which backend to start with, not which queue tool to commit to. The following table maps each use case to a starting backend:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;&lt;code&gt;django-tasks-db&lt;/code&gt;&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Celery or a heavier backend&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lightweight background jobs without an external broker&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complex workflows or high-throughput pipelines&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;—&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;You can start with &lt;code&gt;django-tasks-db&lt;/code&gt; and swap backends later as your needs grow, without rewriting any task code. The upstream &lt;code&gt;CeleryTaskBackend&lt;/code&gt; proposal would eventually let you keep your &lt;code&gt;@task&lt;/code&gt; code while running it on Celery infrastructure. If your project already lives in the heavy-workflow tier, the existing &lt;a href=&quot;https://realpython.com/asynchronous-tasks-with-django-and-celery/&quot;&gt;Celery tutorial&lt;/a&gt; is the better fit today. Otherwise, you’ll finish this tutorial with a working pattern you can drop into your own project.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/django-tasks-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-django-tasks-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to run background jobs with Django’s built-in Tasks framework, from a welcome-email task to named queues.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Django Tasks: Exploring the Built-in Tasks Framework” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/django-tasks/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;A kanban board with @task cards across READY, RUNNING, SUCCESSFUL, and FAILED columns, while a person at a desk inspects a RESULT sheet with a magnifying glass beside a Python chip.&quot; src=&quot;https://files.realpython.com/media/Django-Tasks_Watermarked.e42a76167baa.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Django-Tasks_Watermarked.e42a76167baa.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Django-Tasks_Watermarked.e42a76167baa.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Django-Tasks_Watermarked.e42a76167baa.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Django-Tasks_Watermarked.e42a76167baa.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/django-tasks/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Django Tasks: Exploring the Built-in Tasks Framework&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Practice using Django Tasks in Django 6.0 to run background jobs with the @task decorator, enqueue work, check task results, and use named queues.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;start-using-django-tasks&quot;&gt;Start Using Django Tasks&lt;a class=&quot;headerlink&quot; href=&quot;#start-using-django-tasks&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before pulling in any third-party package, you can try the Tasks API end-to-end with what ships in the framework itself. Django 6.0 includes two task backends out of the box: &lt;code&gt;ImmediateBackend&lt;/code&gt; and &lt;code&gt;DummyBackend&lt;/code&gt;. Both exist for development and testing. &lt;code&gt;ImmediateBackend&lt;/code&gt; runs each task in the calling thread the moment you call &lt;code&gt;.enqueue()&lt;/code&gt;, so it lets you define tasks and confirm they work without spinning up a worker.&lt;/p&gt;
&lt;p&gt;Set up a &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environment&lt;/a&gt; and install Django before scaffolding the project:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;django&amp;gt;=6.0,&amp;lt;7.0&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;The first command creates a fresh virtual environment in a &lt;code&gt;venv/&lt;/code&gt; folder, and the second activates it. From this point on, every shell command in the tutorial assumes you’re inside the active venv, which is why each prompt is prefixed with &lt;code&gt;(venv) $&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you already have a Django version 6.0 project handy, you can extend it here. Otherwise, follow the &lt;a href=&quot;https://realpython.com/django-setup/&quot;&gt;Django setup guide&lt;/a&gt; to scaffold one with &lt;code&gt;config/&lt;/code&gt; and &lt;code&gt;myapp/&lt;/code&gt; directories. Then add the following to your settings module:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;config/settings.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# ...&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;TASKS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;default&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;BACKEND&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;django.tasks.backends.immediate.ImmediateBackend&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# ...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;That single setting tells Django to dispatch every enqueued task through &lt;code&gt;ImmediateBackend&lt;/code&gt;, which runs tasks inline in the current thread.&lt;/p&gt;
&lt;p&gt;You’ll work with a small project throughout this tutorial. After &lt;code&gt;django-admin startproject config .&lt;/code&gt; and &lt;code&gt;python -m manage startapp myapp&lt;/code&gt;, you’ll have a standard layout: a &lt;code&gt;config/&lt;/code&gt; settings module that holds &lt;code&gt;settings.py&lt;/code&gt; and &lt;code&gt;urls.py&lt;/code&gt;, plus a &lt;code&gt;myapp/&lt;/code&gt; app for your code.&lt;/p&gt;
&lt;p&gt;Beyond that layout, you’ll add a few files by hand. Inside &lt;code&gt;myapp/&lt;/code&gt;, you’ll create &lt;code&gt;tasks.py&lt;/code&gt; for the task definitions and &lt;code&gt;urls.py&lt;/code&gt; to route the demo views you’ll build, and at the project root you’ll add a &lt;code&gt;requirements.txt&lt;/code&gt; to pin dependencies. Make sure &lt;code&gt;&quot;myapp&quot;&lt;/code&gt; appears in &lt;code&gt;INSTALLED_APPS&lt;/code&gt; in &lt;code&gt;config/settings.py&lt;/code&gt; so that Django picks up the tasks you define inside it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;startapp&lt;/code&gt; doesn’t create a tasks module for you, so create a new &lt;code&gt;myapp/tasks.py&lt;/code&gt; file. By convention, the framework looks for a &lt;code&gt;tasks&lt;/code&gt; module in each installed app:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;myapp/tasks.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;django.tasks&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;task&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@task&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;say_hello&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hello, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;!&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;The &lt;code&gt;@task&lt;/code&gt; &lt;a href=&quot;/ref/glossary/decorator/&quot; class=&quot;ref-link&quot;&gt;decorator&lt;/a&gt; wraps &lt;code&gt;say_hello()&lt;/code&gt; in a &lt;code&gt;Task&lt;/code&gt; object, which exposes &lt;code&gt;.enqueue()&lt;/code&gt; and related methods for sending the function to a worker.&lt;/p&gt;
&lt;p&gt;Now open the Django shell, which gives you a &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python REPL&lt;/a&gt; with your project’s settings preloaded:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;manage&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;shell
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Inside the shell, enqueue the function:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/django-tasks/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/django-tasks/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Django Tasks: Exploring the Built-in Tasks Framework</title>
      <id>https://realpython.com/quizzes/django-tasks/</id>
      <link href="https://realpython.com/quizzes/django-tasks/"/>
      <updated>2026-06-24T12:00:00+00:00</updated>
      <summary>Practice using Django Tasks in Django 6.0 to run background jobs with the @task decorator, enqueue work, check task results, and use named queues.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/django-tasks/&quot;&gt;Django Tasks: Exploring the Built-in Tasks Framework&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to define a task with the &lt;code&gt;@task&lt;/code&gt; decorator, enqueue it onto a background worker, check its result, and split fast and slow work across named queues.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Using LlamaIndex for RAG in Python</title>
      <id>https://realpython.com/courses/using-llamaindex-for-rag-in-python/</id>
      <link href="https://realpython.com/courses/using-llamaindex-for-rag-in-python/"/>
      <updated>2026-06-23T14:00:00+00:00</updated>
      <summary>Learn how to set up LlamaIndex, load your data, build and persist an index, and run queries to get grounded answers with RAG in Python.</summary>
      <content type="html">
        &lt;p&gt;Discover how to use LlamaIndex with practical examples. This framework helps you build retrieval-augmented generation (RAG) apps using Python. LlamaIndex lets you load your data and documents, create and persist searchable indexes, and query an LLM using your data as context.&lt;/p&gt;
&lt;p&gt;In this course, you&amp;rsquo;ll learn the basics of installing the package, setting AI providers, spinning up a query engine, and running queries against remote or local models.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You use &lt;strong&gt;LlamaIndex&lt;/strong&gt; to &lt;strong&gt;connect your data to LLMs&lt;/strong&gt;, allowing you to &lt;strong&gt;build AI agents&lt;/strong&gt;, &lt;strong&gt;workflows&lt;/strong&gt;, &lt;strong&gt;query engines&lt;/strong&gt;, and &lt;strong&gt;chat engines&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can perform &lt;strong&gt;RAG&lt;/strong&gt; with LlamaIndex to retrieve relevant context at query time, helping the LLM generate &lt;strong&gt;grounded answers&lt;/strong&gt; and &lt;strong&gt;minimize hallucinations&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll start by preparing your environment and installing LlamaIndex. From there, you&amp;rsquo;ll learn how to load your own files, build and save an index, choose different AI providers, and run targeted queries over your data through a query engine.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Using LlamaIndex for RAG in Python</title>
      <id>https://realpython.com/quizzes/using-llamaindex-for-rag-in-python/</id>
      <link href="https://realpython.com/quizzes/using-llamaindex-for-rag-in-python/"/>
      <updated>2026-06-23T12:00:00+00:00</updated>
      <summary>Test your understanding of RAG in Python with LlamaIndex by loading data, building and persisting an index, and querying an LLM for grounded answers.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the &lt;a href=&quot;https://realpython.com/courses/using-llamaindex-for-rag-in-python/&quot;&gt;Using LlamaIndex for RAG in Python&lt;/a&gt; course.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how RAG retrieves context to ground an LLM&amp;rsquo;s answers, how to load and index your own data, how to query it through a query engine, and why persisting your index saves time and money.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python for Data Analysis: A Practical Guide</title>
      <id>https://realpython.com/python-for-data-analysis/</id>
      <link href="https://realpython.com/python-for-data-analysis/"/>
      <updated>2026-06-22T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll learn data analysis with Python by following a structured workflow with pandas, Matplotlib, and scikit-learn.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;strong&gt;Data analysis&lt;/strong&gt; is a broad term that covers a wide range of techniques for revealing insights and relationships in raw data. &lt;strong&gt;Data analysis with Python&lt;/strong&gt; has become a default workflow in industry, thanks to a mature ecosystem of libraries like pandas, NumPy, Matplotlib, and scikit-learn. Once you’ve analyzed your data, you can use your findings to make sound business decisions, improve procedures, and even make informed predictions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand the need for a sound &lt;strong&gt;data analysis workflow&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Understand the &lt;strong&gt;different stages&lt;/strong&gt; of a data analysis workflow&lt;/li&gt;
&lt;li&gt;Learn how you can use &lt;strong&gt;Python&lt;/strong&gt; for data analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you start, you should familiarize yourself with &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter Notebook&lt;/a&gt;, a popular tool for data analysis. Alternatively, &lt;a href=&quot;https://realpython.com/using-jupyterlab/&quot;&gt;JupyterLab&lt;/a&gt; will give you an enhanced notebook experience. You might also like to learn how a &lt;a href=&quot;https://realpython.com/pandas-dataframe/#introducing-the-pandas-dataframe&quot;&gt;pandas DataFrame&lt;/a&gt; stores its data. Knowing the difference between a &lt;a href=&quot;https://pandas.pydata.org/docs/user_guide/dsintro.html#dataframe&quot;&gt;DataFrame&lt;/a&gt; and a &lt;a href=&quot;https://pandas.pydata.org/docs/user_guide/dsintro.html#series&quot;&gt;pandas Series&lt;/a&gt; will also prove useful.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-for-data-analysis-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-for-data-analysis-code&quot; markdown&gt;Click here to download the free data files and sample code&lt;/a&gt; for your mission into data analysis with Python.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In this tutorial, you’ll use a file named &lt;code&gt;james_bond_data.csv&lt;/code&gt;. This is a doctored version of the free &lt;a href=&quot;https://www.kaggle.com/datasets/dreb87/jamesbond/data&quot;&gt;James Bond Movie Dataset&lt;/a&gt;. The &lt;code&gt;james_bond_data.csv&lt;/code&gt; file contains a subset of the original data with some of the records altered to make them suitable for this tutorial. You’ll find it in the downloadable materials. Once you have your data file, you’re ready to begin your first mission into data analysis.&lt;/p&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Using Python for Data Analysis” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python-for-data-analysis/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #ff7e74;&quot; alt=&quot;Using Python for Data Analysis&quot; src=&quot;https://files.realpython.com/media/Data-Science-for-Beginners-Python-for-Data-Analysis_Watermarked.db873f10250a.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Data-Science-for-Beginners-Python-for-Data-Analysis_Watermarked.db873f10250a.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Data-Science-for-Beginners-Python-for-Data-Analysis_Watermarked.db873f10250a.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Data-Science-for-Beginners-Python-for-Data-Analysis_Watermarked.db873f10250a.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Data-Science-for-Beginners-Python-for-Data-Analysis_Watermarked.db873f10250a.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-for-data-analysis/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Using Python for Data Analysis&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of a data analysis workflow in Python, from cleansing raw data with pandas to spotting insights with regression.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;understanding-the-need-for-a-data-analysis-workflow&quot;&gt;Understanding the Need for a Data Analysis Workflow&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-the-need-for-a-data-analysis-workflow&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Data analysis is a very popular field and can involve performing many different tasks of varying complexity. Which specific analysis steps you perform will depend on which dataset you’re analyzing and what information you hope to glean. To overcome these scope and complexity issues, you need to take a strategic approach when performing your analysis. This is where a &lt;strong&gt;data analysis workflow&lt;/strong&gt; can help you.&lt;/p&gt;
&lt;p&gt;A data analysis workflow is a process that provides a set of steps for your analysis team to follow when analyzing data. The implementation of each of these steps will vary depending on the nature of your analysis, but following an agreed-upon workflow allows everyone involved to know what needs to happen and to see how the project is progressing.&lt;/p&gt;
&lt;p&gt;Using a workflow also helps futureproof your analysis methodology. By following the defined set of steps, your efforts become systematic, which minimizes the possibility that you’ll make mistakes or miss something. Furthermore, when you carefully document your work, you can reapply your procedures against future data as it becomes available. Data analysis workflows therefore also provide repeatability and scalability.&lt;/p&gt;
&lt;p&gt;There’s no single data workflow process that suits every analysis, nor is there universal terminology for the procedures used within it. To provide a structure for the rest of this tutorial, the diagram below illustrates the stages that you’ll commonly find in most workflows:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/ie-data-analysis-workflowv3.bfb835b95c5e.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block &quot; src=&quot;https://files.realpython.com/media/ie-data-analysis-workflowv3.bfb835b95c5e.png&quot; width=&quot;1292&quot; height=&quot;569&quot; srcset=&quot;/cdn-cgi/image/width=323,format=auto/https://files.realpython.com/media/ie-data-analysis-workflowv3.bfb835b95c5e.png 323w, /cdn-cgi/image/width=430,format=auto/https://files.realpython.com/media/ie-data-analysis-workflowv3.bfb835b95c5e.png 430w, /cdn-cgi/image/width=646,format=auto/https://files.realpython.com/media/ie-data-analysis-workflowv3.bfb835b95c5e.png 646w, /cdn-cgi/image/width=1292,format=auto/https://files.realpython.com/media/ie-data-analysis-workflowv3.bfb835b95c5e.png 1292w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;diagram of a data analysis workflow with iterations&quot; data-asset=&quot;5525&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;A Data Analysis Workflow&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;The solid arrows show the standard data analysis workflow that you’ll work through to learn what happens at each stage. The dashed arrows indicate where you may need to carry out some of the individual steps several times depending upon the success of your analysis. Indeed, you may even have to repeat the entire process should your first analysis reveal something interesting that demands further attention.&lt;/p&gt;
&lt;p&gt;Now that you have an understanding of the need for a data analysis workflow, you’ll work through its steps and perform an analysis of movie data. The movies that you’ll analyze all relate to the British secret agent Bond … &lt;em&gt;James Bond.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;setting-your-objectives&quot;&gt;Setting Your Objectives&lt;a class=&quot;headerlink&quot; href=&quot;#setting-your-objectives&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The very first workflow step in data analysis is to carefully but clearly define your objectives. It’s important for you and your analysis team to be clear on what exactly you’re all trying to achieve. This step doesn’t involve any programming but is every bit as important because, without an understanding of where you want to go, you’re unlikely to ever get there.&lt;/p&gt;
&lt;p&gt;The objectives of your data analysis will vary depending on what you’re analyzing. Your team leader may want to know why a new product hasn’t sold, or perhaps your government wants information about a clinical test of a new medical drug. You may even be asked to make investment recommendations based on the past results of a particular financial instrument. Regardless, you must still be clear on your objectives. These define your scope.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll gain experience in data analysis by having some fun with the James Bond movie dataset mentioned earlier. What are your objectives? &lt;em&gt;Now pay attention, 007&lt;/em&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is there any relationship between the Rotten Tomatoes ratings and those from IMDb?&lt;/li&gt;
&lt;li&gt;Are there any insights to be gleaned from analyzing the lengths of the movies?&lt;/li&gt;
&lt;li&gt;Is there a relationship between the number of enemies James Bond has killed and the user ratings of the movie in which they were killed?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that you’ve been briefed on your mission, it’s time to get out into the field and see what intelligence you can uncover.&lt;/p&gt;
&lt;h2 id=&quot;acquiring-your-data&quot;&gt;Acquiring Your Data&lt;a class=&quot;headerlink&quot; href=&quot;#acquiring-your-data&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Once you’ve established your objectives, your next step is to think about what data you’ll need to achieve them. Hopefully, this data will be readily available, but you may have to work hard to get it. You may need to extract it from the data storage systems within an organization or &lt;a href=&quot;https://en.wikipedia.org/wiki/Survey_data_collection&quot;&gt;collect survey data&lt;/a&gt;. Regardless, you’ll somehow need to get the data.&lt;/p&gt;
&lt;p&gt;In this case, you’re in luck. When your bosses briefed you on your objectives, they also gave you the data in the &lt;code&gt;james_bond_data.csv&lt;/code&gt; file. You must now spend some time becoming familiar with what you have in front of you. During the briefing, you made some notes on the content of this file:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Heading&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Release&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The release date of the movie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Movie&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The title of the movie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Bond&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The actor playing the title role&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Bond_Car_MFG&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The manufacturer of James Bond’s car&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;US_Gross&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The movie’s gross US earnings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;World_Gross&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The movie’s gross worldwide earnings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Budget ($ 000s)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The movie’s budget, in thousands of US dollars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Film_Length&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The running time of the movie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Avg_User_IMDB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The average user rating from IMDb&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Avg_User_Rtn_Tom&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The average user rating from Rotten Tomatoes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Martinis&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The number of martinis that Bond drank in the movie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Kills_Bond&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The number of enemies that Bond killed in the movie&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-for-data-analysis/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-for-data-analysis/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Context Engineering for Python Codebases</title>
      <id>https://realpython.com/python-context-engineering-ai/</id>
      <link href="https://realpython.com/python-context-engineering-ai/"/>
      <updated>2026-06-17T14:00:00+00:00</updated>
      <summary>Learn how context engineering shapes what your AI coding agent sees on every turn, and use four practical strategies to keep your Python projects on track.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Context engineering is the practice of curating the content that goes into an AI agent’s context window. In Python projects, that may mean pinning your dependency manager in an instruction file, trimming irrelevant history, delegating heavy tasks to subagents, and more.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;context window&lt;/strong&gt; holds everything the agent sees on a single turn, not just your latest prompt.&lt;/li&gt;
&lt;li&gt;Most agent failures come from &lt;strong&gt;bad context&lt;/strong&gt;, not a bad model.&lt;/li&gt;
&lt;li&gt;Bigger context windows don’t fix poor curation—they only &lt;strong&gt;delay the symptoms&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instruction files&lt;/strong&gt; like &lt;code&gt;AGENTS.md&lt;/code&gt; keep your Python conventions in front of the agent.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Curate&lt;/strong&gt;, &lt;strong&gt;Distill&lt;/strong&gt;, &lt;strong&gt;Delegate&lt;/strong&gt;, and &lt;strong&gt;Externalize&lt;/strong&gt; are strategies that can help you manage the agent’s context.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Modern &lt;a href=&quot;https://realpython.com/ai-coding-agents-guide/&quot;&gt;AI coding agents&lt;/a&gt;, such as Claude Code, Codex CLI, Cursor, &lt;a href=&quot;https://realpython.com/github-copilot-cli/&quot;&gt;Copilot CLI&lt;/a&gt;, and Antigravity CLI, work with &lt;em&gt;a fixed-size context window&lt;/em&gt;. Once you know what’s in that window and decide what belongs there for the task at hand, you’ll spend less time arguing with your agent and more time shipping quality Python code.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Cheat Sheet:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-context-engineering-ai-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-context-engineering-ai-cheatsheet&quot; markdown&gt;Click here to download a free PDF&lt;/a&gt; with the core techniques for steering AI coding assistants through your own Python codebases.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Context Engineering for Python Codebases” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python-context-engineering-ai/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;A person in a green coat drops a document into a cabinet labeled CONTEXT WINDOW, beside a token-budget gauge, a Python logo, and a checklist on a tripod.&quot; src=&quot;https://files.realpython.com/media/Context-Engineering-for-Python-Codebases_Watermarked.f3b3797b12c3.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Context-Engineering-for-Python-Codebases_Watermarked.f3b3797b12c3.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Context-Engineering-for-Python-Codebases_Watermarked.f3b3797b12c3.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Context-Engineering-for-Python-Codebases_Watermarked.f3b3797b12c3.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Context-Engineering-for-Python-Codebases_Watermarked.f3b3797b12c3.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-context-engineering-ai/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Context Engineering for Python Codebases&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Build a working framework to manage your AI coding agent&#x27;s context window using four practical strategies for Python projects.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you start learning about &lt;a href=&quot;/ref/ai-coding-glossary/context-engineering/&quot; class=&quot;ref-link&quot;&gt;context engineering&lt;/a&gt;, you should already have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hands-on experience with at least one AI coding &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt;, such as &lt;a href=&quot;/ref/ai-coding-tools/claude-code/&quot; class=&quot;ref-link&quot;&gt;Claude Code&lt;/a&gt;, &lt;a href=&quot;/ref/ai-coding-tools/codex-cli/&quot; class=&quot;ref-link&quot;&gt;Codex CLI&lt;/a&gt;, &lt;a href=&quot;/ref/ai-coding-tools/cursor/&quot; class=&quot;ref-link&quot;&gt;Cursor&lt;/a&gt;, &lt;a href=&quot;/ref/ai-coding-tools/copilot-cli/&quot; class=&quot;ref-link&quot;&gt;Copilot CLI&lt;/a&gt;, or &lt;a href=&quot;/ref/ai-coding-tools/google-antigravity/&quot; class=&quot;ref-link&quot;&gt;Antigravity CLI&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Comfort &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;working from a terminal&lt;/a&gt; and editing plain-text configuration files like &lt;code&gt;.md&lt;/code&gt;, &lt;a href=&quot;https://realpython.com/python-toml/&quot;&gt;&lt;code&gt;.toml&lt;/code&gt;&lt;/a&gt;, or &lt;a href=&quot;https://realpython.com/python-yaml/&quot;&gt;&lt;code&gt;.yaml&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A basic understanding of &lt;a href=&quot;/ref/ai-coding-glossary/llm/&quot; class=&quot;ref-link&quot;&gt;large language models (LLMs)&lt;/a&gt; and concepts like &lt;a href=&quot;/ref/ai-coding-glossary/token/&quot; class=&quot;ref-link&quot;&gt;tokens&lt;/a&gt;, &lt;a href=&quot;/ref/ai-coding-glossary/prompt/&quot; class=&quot;ref-link&quot;&gt;prompts&lt;/a&gt;, and chat history.&lt;/li&gt;
&lt;li&gt;Working knowledge of Python and its ecosystem.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To learn more about these and other related topics, you can check out the resources in this Real Python learning path:&lt;/p&gt;
&lt;div&gt;


&lt;learning-path-card data-path-id=&quot;coding-with-ai&quot; class=&quot;d-block container border rounded mb-4 shadow-sm&quot; data-progress-card&gt;
  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center px-3&quot;&gt;

        &lt;a href=&quot;/learning-paths/coding-with-ai/&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; data-not-previewable&gt;&lt;img loading=&quot;lazy&quot; src=&quot;https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Coding-With-AI-Learning-Path_Watermarked.5c81f9fcda0d.jpg 1920w&quot; style=&quot;background: #fe7e73;&quot; class=&quot;rounded img-fluid w-100 my-0&quot; alt=&quot;A person standing next to a brain under a dome representing artificial intelligence. The person is relaxed and supervising the AI doing work on the computer.&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;&lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col px-3 pl-sm-0 mt-3 mt-sm-0&quot;&gt;
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Learning Path&lt;/strong&gt;&lt;/p&gt;
      &lt;a class=&quot;stretched-link&quot; href=&quot;/learning-paths/coding-with-ai/&quot;&gt;&lt;h2 class=&quot;my-0 h3&quot;&gt;Python Coding With AI&lt;/h2&gt;&lt;/a&gt;
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;14 Resources ⋅ &lt;strong&gt;Skills:&lt;/strong&gt; Claude Code, Cursor, Gemini CLI, AI-Assisted Development&lt;/p&gt;


      &lt;div class=&quot;progress mt-2&quot; data-progress-placeholder&gt;
        &lt;div class=&quot;progress-bar bg-light text-black-50 small w-100&quot; data-progress-placeholder-bar&gt;&lt;/div&gt;
      &lt;/div&gt;


      &lt;div class=&quot;progress mt-2 d-none&quot; data-progress-container&gt;
        &lt;div class=&quot;progress-bar small&quot; role=&quot;progressbar&quot; data-progress-bar aria-valuenow=&quot;0&quot; aria-valuemin=&quot;0&quot; aria-valuemax=&quot;100&quot; style=&quot;min-width: 2.5em; cursor: default;&quot;&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/learning-path-card&gt;
&lt;/div&gt;

&lt;p&gt;You don’t need any prior exposure to context engineering itself. The whole point of this tutorial is to give you a working framework to effectively manage your agent’s context window.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Context engineering is different from &lt;a href=&quot;/ref/ai-coding-glossary/prompt-engineering/&quot; class=&quot;ref-link&quot;&gt;prompt engineering&lt;/a&gt;. Context engineering manages everything in the context window. Prompt engineering is about crafting individual prompts.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;With that distinction in mind, the next section opens up the context window so you can see exactly what’s competing for space on every turn.&lt;/p&gt;
&lt;h2 id=&quot;defining-context-for-ai-coding-agents&quot;&gt;Defining Context for AI Coding Agents&lt;a class=&quot;headerlink&quot; href=&quot;#defining-context-for-ai-coding-agents&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;/ref/ai-coding-glossary/context-window/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;context window&lt;/strong&gt;&lt;/a&gt; is everything the agent sees on a single turn. Your most recent &lt;a href=&quot;/ref/ai-coding-glossary/prompt/&quot; class=&quot;ref-link&quot;&gt;prompt&lt;/a&gt; is only the last item on the list. On any given turn, whenever you write a prompt and press &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-enter&quot;&gt;Enter&lt;/kbd&gt;&lt;/span&gt;, the agent’s window typically holds the following layers of content:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/ref/ai-coding-glossary/system-prompt/&quot; class=&quot;ref-link&quot;&gt;System prompt&lt;/a&gt;:&lt;/strong&gt; The agent’s built-in role and rules, typically set by the vendor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instruction files:&lt;/strong&gt; Files like &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, Cursor rules, or Copilot instructions, auto-loaded into every turn. Skill descriptions also live in this layer. The agent loads a skill’s full body only when it picks the skill for the task.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool definitions:&lt;/strong&gt; Names, short descriptions, and JSON Schema definitions for every tool the agent can call, including &lt;a href=&quot;/ref/ai-coding-glossary/mcp/&quot; class=&quot;ref-link&quot;&gt;MCP&lt;/a&gt; server tools and, in some frameworks, any &lt;em&gt;subagent&lt;/em&gt; the main agent can delegate to.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Opened files:&lt;/strong&gt; Source files, configuration files, or docs the agent has read in this session.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Search results:&lt;/strong&gt; Results from web searches, internal &lt;a href=&quot;/ref/ai-coding-glossary/retrieval-augmented-generation/&quot; class=&quot;ref-link&quot;&gt;RAG&lt;/a&gt; queries, or file searches.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conversation history:&lt;/strong&gt; Earlier prompts, replies, and tool outputs from the same session.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Your new prompt:&lt;/strong&gt; The prompt you just typed, plus any attachments.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In practice, all of this content lives inside the context window. The layers are listed separately here to clarify what’s consuming your context budget. The diagram below shows how all seven layers come together as the context window the agent reads before producing a reply:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/context-window-diagram.5ffc42e25091.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid &quot; src=&quot;https://files.realpython.com/media/context-window-diagram.5ffc42e25091.png&quot; width=&quot;1024&quot; height=&quot;576&quot; srcset=&quot;/cdn-cgi/image/width=256,format=auto/https://files.realpython.com/media/context-window-diagram.5ffc42e25091.png 256w, /cdn-cgi/image/width=341,format=auto/https://files.realpython.com/media/context-window-diagram.5ffc42e25091.png 341w, /cdn-cgi/image/width=512,format=auto/https://files.realpython.com/media/context-window-diagram.5ffc42e25091.png 512w, /cdn-cgi/image/width=1024,format=auto/https://files.realpython.com/media/context-window-diagram.5ffc42e25091.png 1024w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A labeled Context window frame holds seven colored input cards feeding via arrows into a central Agent box, which produces a Generated response box on the right.&quot; data-asset=&quot;7036&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;The Context Window on a Single Agent Turn&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;For a more concrete example, below is a snapshot of what a single turn in a Claude Code session might look like:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;text&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Text&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;Context Window&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;[system prompt]        You are Claude Code, an interactive CLI...
[CLAUDE.md]            Use uv. Python 3.14. Run tests with uv run pytest -q.
[tool catalog]         Read, Edit, Bash, Grep, WebFetch, ...
[opened file]          src/api/users.py  (340 lines)
[history turn 1]       User: Add an email validator to the User class.
[history turn 2]       Assistant: &amp;lt;edits users.py&amp;gt;
[tool result turn 2]   Bash: uv run pytest -q -&amp;gt; 3 failed
[history turn 3]       User: Fix the failing tests.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-context-engineering-ai/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-context-engineering-ai/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Building Python Skills for the Job Market</title>
      <id>https://realpython.com/courses/building-python-skills-for-the-job-market/</id>
      <link href="https://realpython.com/courses/building-python-skills-for-the-job-market/"/>
      <updated>2026-06-16T14:00:00+00:00</updated>
      <summary>Learn which Python skills employers value most and how to build them, using a skill roadmap worksheet, weekly practice plan, and interview prep tips.</summary>
      <content type="html">
        &lt;p&gt;When you&amp;rsquo;re learning Python, the sheer volume of topics to explore can feel overwhelming because there&amp;rsquo;s &lt;em&gt;so much&lt;/em&gt; you could focus on. Should you dive into web frameworks before exploring data science? Is test-driven development something you need right away? And which skills actually matter to employers in the age of AI-assisted software development?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll have:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A clear understanding of which &lt;strong&gt;Python skills&lt;/strong&gt; employers consistently look for&lt;/li&gt;
&lt;li&gt;A personalized &lt;strong&gt;Python developer roadmap&lt;/strong&gt; showing where you are and where you need to go&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;weekly practice plan&lt;/strong&gt; that makes consistent progress feel achievable&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Python itself is relatively beginner-friendly, but its versatility makes it easy to wander without direction. Without a clear plan, you can spend months studying topics that won&amp;rsquo;t help you land your first developer job.&lt;/p&gt;
&lt;p&gt;This course will show you how to build a focused learning strategy that aligns with real job market demands. You&amp;rsquo;ll learn how to research what employers value, assess your current strengths and gaps, and structure a practice routine that turns scattered study sessions into steady progress.&lt;/p&gt;
&lt;p&gt;Instead of guessing what to learn next, you&amp;rsquo;ll have a concrete document that shows you exactly where to focus:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;The Python skills worksheet as a table with one row filled out and a link showing on hover&quot; data-asset=&quot;6692&quot;/&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Work through this course to identify the skills you need and set yourself up for success.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Implementing Interfaces in Python: ABCs and Protocols</title>
      <id>https://realpython.com/python-interface/</id>
      <link href="https://realpython.com/python-interface/"/>
      <updated>2026-06-15T14:00:00+00:00</updated>
      <summary>Learn how to implement interfaces in Python using abstract base classes, Protocols, and duck typing, and enforce method contracts cleanly.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In object-oriented programming (OOP), an interface describes the methods a class must implement to play a specific role. This set of methods expresses the interface contract. Python has no dedicated syntax for interfaces, but it gives you two mechanisms for modeling them: abstract base classes and protocols. Python’s everyday duck typing takes advantage of both.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;abc.ABC&lt;/code&gt;&lt;/strong&gt; combined with &lt;strong&gt;&lt;code&gt;@abstractmethod&lt;/code&gt;&lt;/strong&gt; enforces the contract at &lt;strong&gt;instantiation time&lt;/strong&gt;, raising a &lt;code&gt;TypeError&lt;/code&gt; when a subclass is missing required methods.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;typing.Protocol&lt;/code&gt;&lt;/strong&gt; defines a &lt;strong&gt;structural interface&lt;/strong&gt; that classes satisfy without inheriting from the protocol, verified by static type checkers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Duck typing&lt;/strong&gt; treats any object exposing the expected methods as valid, leveraging Python’s dynamic nature.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;isinstance()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;issubclass()&lt;/code&gt;&lt;/strong&gt; verify contracts at runtime through ABC inheritance, virtual subclass registration, or &lt;strong&gt;&lt;code&gt;@runtime_checkable&lt;/code&gt;&lt;/strong&gt; protocols.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this tutorial, you’ll write code examples that model interfaces with ABCs and protocols, rely on duck typing for behavior-based contracts, and run explicit &lt;code&gt;isinstance()&lt;/code&gt; and &lt;code&gt;issubclass()&lt;/code&gt; checks when you need formal verification at runtime.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-interface-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-interface-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to model interfaces with ABCs and protocols.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Implementing Interfaces in Python: ABCs and Protocols” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/interface-in-python/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;Implementing an Interface in Python&quot; src=&quot;https://files.realpython.com/media/Interfaces-in-Python_Watermarked.f9ce5bda238c.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Interfaces-in-Python_Watermarked.f9ce5bda238c.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Interfaces-in-Python_Watermarked.f9ce5bda238c.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Interfaces-in-Python_Watermarked.f9ce5bda238c.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Interfaces-in-Python_Watermarked.f9ce5bda238c.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/interface-in-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Implementing Interfaces in Python: ABCs and Protocols&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check your understanding of Python interfaces with abstract base classes, protocols, and duck typing, and how to enforce method contracts.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;pythons-approach-to-interfaces&quot;&gt;Python’s Approach to Interfaces&lt;a class=&quot;headerlink&quot; href=&quot;#pythons-approach-to-interfaces&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt;, an &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;interface&lt;/strong&gt;&lt;/a&gt; acts as a &lt;em&gt;blueprint&lt;/em&gt; for implementing concrete &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt;. Interfaces define &lt;a href=&quot;/ref/glossary/method/&quot; class=&quot;ref-link&quot;&gt;methods&lt;/a&gt; that are typically &lt;a href=&quot;/ref/glossary/abstract-method/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;abstract&lt;/strong&gt;&lt;/a&gt;, which means that the interface declares them, but doesn’t implement them.&lt;/p&gt;
&lt;p&gt;The implementation is the job of any class that &lt;strong&gt;implements&lt;/strong&gt; the interface. By prescribing a set of methods, interfaces let you write code that works with many different types without caring about their concrete implementations.&lt;/p&gt;
&lt;p&gt;Python doesn’t have an &lt;code&gt;interface&lt;/code&gt; keyword like &lt;a href=&quot;https://realpython.com/java-vs-python/&quot;&gt;Java&lt;/a&gt; or Go, or a close equivalent like &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt;’s pure virtual classes. Instead, it offers two techniques for &lt;strong&gt;modeling&lt;/strong&gt; interfaces:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Inheritance-based interfaces with &lt;a href=&quot;/ref/glossary/abstract-base-class/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;abstract base classes (ABCs)&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Structural subtyping interfaces with &lt;a href=&quot;/ref/glossary/protocol-subtyping/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;protocols&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Python’s approach is just different. Where Java, Go, or C#—each with a dedicated &lt;code&gt;interface&lt;/code&gt; keyword—require a class to explicitly declare which interface it implements, Python relies on inheritance or structural matching.&lt;/p&gt;
&lt;h2 id=&quot;inheritance-based-interfaces-with-abstract-base-classes-abcs&quot;&gt;Inheritance-Based Interfaces With Abstract Base Classes (ABCs)&lt;a class=&quot;headerlink&quot; href=&quot;#inheritance-based-interfaces-with-abstract-base-classes-abcs&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;/ref/stdlib/abc/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;abc&lt;/code&gt;&lt;/a&gt; module in Python’s &lt;a href=&quot;/ref/glossary/standard-library/&quot; class=&quot;ref-link&quot;&gt;standard library&lt;/a&gt; gives you several tools for working with abstract base classes (ABCs) and modeling inheritance-based interfaces. ABCs were Python’s first formal interface mechanism, and they’re built on inheritance. A concrete class declares its intent to satisfy an interface by subclassing the corresponding ABC.&lt;/p&gt;
&lt;p&gt;ABCs &lt;strong&gt;enforce&lt;/strong&gt; the interface contract. Any subclass that’s missing a required method fails with a &lt;a href=&quot;/ref/builtin-exceptions/typeerror/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;TypeError&lt;/code&gt;&lt;/a&gt; the moment you try to instantiate it. This makes ABCs a solid choice when you control the hierarchy and want to strictly enforce a specific interface at instantiation time.&lt;/p&gt;
&lt;h3 id=&quot;defining-an-abc-based-interface&quot;&gt;Defining an ABC-Based Interface&lt;a class=&quot;headerlink&quot; href=&quot;#defining-an-abc-based-interface&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;An ABC declares &lt;strong&gt;abstract methods&lt;/strong&gt; using the &lt;code&gt;@abstractmethod&lt;/code&gt; &lt;a href=&quot;/ref/glossary/decorator/&quot; class=&quot;ref-link&quot;&gt;decorator&lt;/a&gt; from the &lt;a href=&quot;/ref/stdlib/abc/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;abc&lt;/code&gt;&lt;/a&gt; module. Any &lt;a href=&quot;/ref/glossary/subclass/&quot; class=&quot;ref-link&quot;&gt;subclass&lt;/a&gt; must implement every abstract method. Otherwise, Python &lt;a href=&quot;https://realpython.com/python-raise-exception/&quot;&gt;raises&lt;/a&gt; an error the moment you try to instantiate the subclass.&lt;/p&gt;
&lt;p&gt;Say you need an interface for file readers. Readers for different formats like PDFs and emails will require the same methods but with different internal logic. The shared contract is to load a file from a path and return the extracted text.&lt;/p&gt;
&lt;p&gt;Here’s that interface modeled as an ABC:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;readers_abc.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;abc&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ABC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;abstractmethod&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;FileReaderInterface&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ABC&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Interface for file readers.&quot;&quot;&quot;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@abstractmethod&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;load_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Load a file for text extraction.&quot;&quot;&quot;&lt;/span&gt;

    &lt;span class=&quot;nd&quot;&gt;@abstractmethod&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;extract_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Return text extracted from the loaded file.&quot;&quot;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;A few things to notice in this code snippet:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;FileReaderInterface&lt;/code&gt; inherits from &lt;code&gt;abc.ABC&lt;/code&gt;, which sets up the &lt;a href=&quot;https://realpython.com/python-metaclasses/&quot;&gt;metaclass&lt;/a&gt; for you.&lt;/li&gt;
&lt;li&gt;Each abstract method is decorated with &lt;code&gt;@abstractmethod&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The body of abstract methods can contain a descriptive &lt;a href=&quot;/ref/glossary/docstring/&quot; class=&quot;ref-link&quot;&gt;docstring&lt;/a&gt;, a bare &lt;a href=&quot;https://realpython.com/python-pass/&quot;&gt;&lt;code&gt;pass&lt;/code&gt; statement&lt;/a&gt;, an &lt;a href=&quot;https://realpython.com/python-ellipsis/&quot;&gt;ellipsis (&lt;code&gt;...&lt;/code&gt;)&lt;/a&gt;, or raise a &lt;a href=&quot;/ref/builtin-exceptions/notimplementederror/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;NotImplementedError&lt;/code&gt;&lt;/a&gt; exception.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, create two concrete classes, &lt;code&gt;PdfReader&lt;/code&gt; and &lt;code&gt;EmailReader&lt;/code&gt;, which inherit from &lt;code&gt;FileReaderInterface&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;readers_abc.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# ...&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;PdfReader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FileReaderInterface&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Extract text from a PDF.&quot;&quot;&quot;&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;load_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Load a PDF file for text extraction.&quot;&quot;&quot;&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Loading PDF from &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;extract_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Return text extracted from the loaded PDF.&quot;&quot;&quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Extracted PDF text&quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;EmailReader&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FileReaderInterface&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Extract text from an Email.&quot;&quot;&quot;&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;load_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Load an EML file for text extraction.&quot;&quot;&quot;&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Loading email from &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;hll&quot;&gt;    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;extract_email_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;sd&quot;&gt;&quot;&quot;&quot;Return text extracted from the loaded email.&quot;&quot;&quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Extracted email text&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;&lt;code&gt;PdfReader&lt;/code&gt; implements both abstract methods, so it satisfies the interface. &lt;code&gt;EmailReader&lt;/code&gt; defines &lt;code&gt;.extract_email_text()&lt;/code&gt; instead of the required &lt;code&gt;.extract_text()&lt;/code&gt;, so it doesn’t satisfy the contract.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-interface/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-interface/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #299: EuroPython 2026: Celebrating 25 Years</title>
      <id>https://realpython.com/podcasts/rpp/299/</id>
      <link href="https://realpython.com/podcasts/rpp/299/"/>
      <updated>2026-06-12T12:00:00+00:00</updated>
      <summary>What&#x27;s happening at EuroPython 2026? The conference celebrates its 25th anniversary this year in Kraków, Poland. This week on the show, organizers Mia Bajić and Daria Linhart Grudzien join me to discuss this year&#x27;s conference.</summary>
      <content type="html">
        &lt;p&gt;What&#x27;s happening at EuroPython 2026? The conference celebrates its 25th anniversary this year in Kraków, Poland. This week on the show, organizers Mia Bajić and Daria Linhart Grudzien join me to discuss this year&#x27;s conference.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Cursor vs Windsurf: Which AI Code Editor Is Best for Python?</title>
      <id>https://realpython.com/cursor-vs-windsurf-python/</id>
      <link href="https://realpython.com/cursor-vs-windsurf-python/"/>
      <updated>2026-06-10T14:00:00+00:00</updated>
      <summary>Compare Cursor vs Windsurf for Python across code completion, multi-file editing, and debugging to choose the right editor for your workflow.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;AI-powered code editors have moved beyond novelty to become everyday tools for many Python developers. Instead of having to switch between your editor and a separate AI chat, you can use tools like Cursor and Windsurf that bring AI directly into your workflow. As a result, the Cursor vs Windsurf question is a common one for developers deciding which to adopt.&lt;/p&gt;
&lt;p&gt;Both Cursor and Windsurf are &lt;a href=&quot;/ref/code-editors-ides/visual-studio-code/&quot; class=&quot;ref-link&quot;&gt;VS Code&lt;/a&gt; forks that import your keybindings, themes, and Python extensions, and both run the same frontier models. They look similar at first but diverge in how they handle changes as you build.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/ref/ai-coding-tools/cursor/&quot; class=&quot;ref-link&quot;&gt;Cursor&lt;/a&gt; focuses on control, surfacing AI-generated edits as reviewable diffs and relying on explicit rules to guide agent behavior. &lt;a href=&quot;/ref/ai-coding-tools/windsurf/&quot; class=&quot;ref-link&quot;&gt;Windsurf&lt;/a&gt; focuses on flow, applying edits directly in the editor while using broader workspace context, including terminal output, recent edits, and conversation history, to shape its behavior.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll compare both editors across:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AI code completion:&lt;/strong&gt; How each editor’s completion system behaves and what context it draws on&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agentic multi-file editing:&lt;/strong&gt; How each editor handles tasks involving multiple files, directories, and the terminal&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Debugging and error correction:&lt;/strong&gt; How each editor reviews generated code and integrates with your linter&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By the end, you’ll have a clear picture of which editor fits your Python workflow. If you’re coming from VS Code, the &lt;a href=&quot;https://realpython.com/python-development-visual-studio-code/&quot;&gt;Python Development in Visual Studio Code&lt;/a&gt; tutorial covers the baseline configuration that carries over to both forks.&lt;/p&gt;
&lt;p&gt;The table below helps you choose the right editor at a glance:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th class=&quot;text-left&quot;&gt;Use case&lt;/th&gt;
&lt;th class=&quot;text-left&quot;&gt;Cursor&lt;/th&gt;
&lt;th class=&quot;text-left&quot;&gt;Windsurf&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&quot;text-left&quot;&gt;You want AI-generated changes shown as reviewable diffs before they’re written to your files, guided by explicit rules&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;text-left&quot;&gt;You want edits applied directly as the agent works, using a broader workspace context (terminal output, recent edits, conversation history, and memory)&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;—&lt;/td&gt;
&lt;td class=&quot;text-left&quot;&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Cursor is the better fit if you want to review changes before they’re applied. Windsurf is the better fit if you prefer the agent to apply edits directly in your files as it works, drawing on the broader workspace context. To see how this plays out in completion, context management, and debugging, read on.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/cursor-vs-windsurf-python-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-cursor-vs-windsurf-python-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; for the resilient HTTP client you’ll build with Cursor and Windsurf in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Cursor vs Windsurf: Which AI Code Editor Is Best for Python?” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

  &lt;div class=&quot;row my-3&quot;&gt;
    &lt;div class=&quot;col-xs-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/cursor-vs-windsurf-python/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #e5c6aa;&quot; alt=&quot;Two people operating a factory machine with conveyor belts and panels labeled Manual Control Center and Automatic Flow Center, with a Python logo on a chip.&quot; src=&quot;https://files.realpython.com/media/Windsurf-vs-Cursor-Which-AI-Powered-Code-Editor-Is-Best-for-Python_Watermarked.5c2bcb8d1965.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Windsurf-vs-Cursor-Which-AI-Powered-Code-Editor-Is-Best-for-Python_Watermarked.5c2bcb8d1965.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Windsurf-vs-Cursor-Which-AI-Powered-Code-Editor-Is-Best-for-Python_Watermarked.5c2bcb8d1965.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Windsurf-vs-Cursor-Which-AI-Powered-Code-Editor-Is-Best-for-Python_Watermarked.5c2bcb8d1965.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Windsurf-vs-Cursor-Which-AI-Powered-Code-Editor-Is-Best-for-Python_Watermarked.5c2bcb8d1965.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 142px, (min-width: 1000px) 122px, (min-width: 780px) 112px, (min-width: 580px) 139px, calc(100vw - 62px)&quot;&gt;


          &lt;div class=&quot;card-img-overlay d-flex align-items-center&quot;&gt;
            &lt;div class=&quot;mx-auto&quot;&gt;
              &lt;span class=&quot;text-light&quot; style=&quot;opacity: 0.90;&quot;&gt;&lt;span class=&quot;icon baseline scale2x&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/cursor-vs-windsurf-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Cursor vs Windsurf: Which AI Code Editor Is Best for Python?&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of how Cursor and Windsurf compare for Python across AI completion, agentic edits, and debugging workflows.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;metrics-comparison-cursor-vs-windsurf&quot;&gt;Metrics Comparison: Cursor vs Windsurf&lt;a class=&quot;headerlink&quot; href=&quot;#metrics-comparison-cursor-vs-windsurf&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As you work through the hands-on sections and eventually bring either editor into your own Python projects, the table below gives you a quick reference for some key differences you might expect from each tool:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Cursor&lt;/th&gt;
&lt;th&gt;Windsurf&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;IDE support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Standalone VS Code fork plus a &lt;a href=&quot;https://plugins.jetbrains.com/plugin/30583-cursorj&quot;&gt;JetBrains plugin&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Standalone VS Code fork plus &lt;a href=&quot;https://docs.windsurf.com/plugins/compatibility#supported-ides-and-versions&quot;&gt;plugins&lt;/a&gt; for JetBrains IDEs, Vim, Neovim, Xcode, Visual Studio, and more&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI code completion&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fast, line-by-line prediction; strong on single-file typed structures&lt;/td&gt;
&lt;td&gt;Slower but more structurally aware across interconnected files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Startup performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Faster. Uses lightweight text search that requires no upfront project indexing.&lt;/td&gt;
&lt;td&gt;Slower initial response. Builds a semantic map of your project structure before it begins.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Debugging performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Identifies and fixes the root cause in one pass&lt;/td&gt;
&lt;td&gt;Reaches passing tests by working around the root cause over multiple iterations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Resource impact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Light. Low background CPU and RAM usage.&lt;/td&gt;
&lt;td&gt;Heavy. Background indexing can spike local CPU during initial project load.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Billing model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Monthly credit pool with unlimited &lt;em&gt;Tab&lt;/em&gt; and &lt;em&gt;Auto&lt;/em&gt; mode on Pro&lt;/td&gt;
&lt;td&gt;Daily and weekly usage quotas that refresh automatically on a schedule&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pro plan pricing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$20/month&lt;/td&gt;
&lt;td&gt;$20/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ideal project size&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Small to medium codebases where you already know the structure and can target files manually&lt;/td&gt;
&lt;td&gt;Large, highly interconnected codebases that benefit from its RAG-based context engine and automatic semantic indexing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;In the next sections, you’ll build a resilient HTTP client in Python from scratch and then send the same prompts to both editors to compare their responses.&lt;/p&gt;
&lt;h2 id=&quot;getting-started-installation&quot;&gt;Getting Started: Installation&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-installation&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Both editors ship as standalone desktop applications that closely match the VS Code experience. On first launch, they offer to import your local VS Code configuration, copying your keybindings, extensions, themes, and settings so your environment carries over with minimal setup.&lt;/p&gt;
&lt;p&gt;To follow the hands-on project later in this tutorial, you’ll also want Python 3.12 or later installed on your system. Beyond that, if you need a full VS Code baseline before starting, the &lt;a href=&quot;https://realpython.com/courses/python-development-visual-studio-code-setup-guide/&quot;&gt;Python Development in Visual Studio Code (Setup Guide)&lt;/a&gt; course covers the editor setup from scratch.&lt;/p&gt;
&lt;p&gt;Both Cursor and Windsurf offer free plans with enough model access to work through this comparison, though keep in mind that free-tier usage is limited and may run out under heavy use.&lt;/p&gt;
&lt;h3 id=&quot;installing-cursor&quot;&gt;Installing Cursor&lt;a class=&quot;headerlink&quot; href=&quot;#installing-cursor&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Head to the &lt;a href=&quot;https://cursor.com/download&quot;&gt;Cursor download page&lt;/a&gt; and download the correct version for your system. During setup, Cursor offers to import your VS Code configuration, including extensions, keybindings, and themes, so your environment carries over with minimal setup.&lt;/p&gt;
&lt;p&gt;Once the editor opens, you’re ready to go. You don’t need to configure anything else yet.&lt;/p&gt;
&lt;p&gt;If Cursor is new to you, Real Python’s video course on &lt;a href=&quot;https://realpython.com/courses/tips-using-ai-coding-editor-cursor/&quot;&gt;Tips for Using the AI Coding Editor Cursor&lt;/a&gt; covers setup, &lt;em&gt;Agent&lt;/em&gt; mode, &lt;em&gt;Plan&lt;/em&gt; mode, and model selection in a practical context, making the comparisons later in this tutorial easier to follow.&lt;/p&gt;
&lt;h3 id=&quot;installing-windsurf&quot;&gt;Installing Windsurf&lt;a class=&quot;headerlink&quot; href=&quot;#installing-windsurf&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Download Windsurf from the &lt;a href=&quot;https://windsurf.com/download&quot;&gt;Windsurf download page&lt;/a&gt; and run the installer. The VS Code profile import works identically to Cursor’s.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/cursor-vs-windsurf-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/cursor-vs-windsurf-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Accessing Multiple AI Models With the OpenRouter API</title>
      <id>https://realpython.com/courses/multiple-ai-models-openrouter-api/</id>
      <link href="https://realpython.com/courses/multiple-ai-models-openrouter-api/"/>
      <updated>2026-06-09T14:00:00+00:00</updated>
      <summary>Access models from popular AI providers in Python through OpenRouter&#x27;s unified API with smart routing, fallbacks, and cost controls.</summary>
      <content type="html">
        &lt;p&gt;One of the quickest ways to call multiple AI models from a single Python script is to use OpenRouter&amp;rsquo;s API, which acts as a unified routing layer between your code and multiple AI providers. By the end of this course, you&amp;rsquo;ll be able to access models from several providers through one unified API.&lt;/p&gt;
&lt;p&gt;This convenience matters because the AI ecosystem is highly fragmented: each provider exposes its own API, authentication scheme, rate limits, and model lineup. Working with multiple providers often requires additional setup and integration effort, especially when you want to experiment with different models, compare outputs, or evaluate trade-offs for a specific task.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://openrouter.ai/&quot;&gt;OpenRouter&lt;/a&gt; gives you access to thousands of models from leading providers like OpenAI, Anthropic, Mistral, Google, and Meta. You can switch between them without changing your application code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Python 3.15 Hits Feature Freeze and Other News for June 2026</title>
      <id>https://realpython.com/python-news-june-2026/</id>
      <link href="https://realpython.com/python-news-june-2026/"/>
      <updated>2026-06-08T14:00:00+00:00</updated>
      <summary>Python 3.15 hits feature freeze with a built-in sentinel, PEP 829 lands, Pydantic forks httpx, and AI goes bug-hunting in C code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;While the Northern Hemisphere warms up for summer, Python 3.15 went the other way with its &lt;strong&gt;beta 1 feature freeze&lt;/strong&gt; 🥶. Since May 7, the list of what will be included in the next release is final. That list includes a brand-new &lt;strong&gt;&lt;code&gt;sentinel&lt;/code&gt; built-in&lt;/strong&gt; that finally standardizes a pattern Python developers have been hand-rolling for decades.&lt;/p&gt;
&lt;p&gt;And while AI kept writing code, buggy or not, developers also directed it to &lt;em&gt;look&lt;/em&gt; for bugs in code that had been sitting untouched for years. The results were hundreds of bug fixes in Python’s C extensions and in Firefox. Meanwhile, in a quieter corner of the ecosystem, Pydantic forked &lt;code&gt;httpx&lt;/code&gt;, kicking off one of the more interesting governance stories of the year.&lt;/p&gt;
&lt;p&gt;Time to dig into the &lt;strong&gt;Python news&lt;/strong&gt; from the past month!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/newsletter/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; markdown&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you’ll never miss another Python tutorial, course, or news update.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-releases-and-pep-highlights&quot;&gt;Python Releases and PEP Highlights&lt;a class=&quot;headerlink&quot; href=&quot;#python-releases-and-pep-highlights&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The 3.15 release of &lt;a href=&quot;https://realpython.com/cpython-source-code-guide/&quot;&gt;CPython&lt;/a&gt; crossed from alpha into beta, which means its feature set is now frozen, and the &lt;a href=&quot;/ref/glossary/python-steering-council/&quot; class=&quot;ref-link&quot;&gt;Steering Council&lt;/a&gt; cleared out a backlog of proposals before the gate closed. Two of those changes will touch the code you write every day.&lt;/p&gt;
&lt;h3 id=&quot;beta-1-marks-the-315-feature-freeze&quot;&gt;Beta 1 Marks the 3.15 Feature Freeze&lt;a class=&quot;headerlink&quot; href=&quot;#beta-1-marks-the-315-feature-freeze&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Last month, &lt;a href=&quot;https://realpython.com/python-news-may-2026/#python-3150-alpha-8-final-alpha-before-beta-freeze&quot;&gt;the eighth and final alpha&lt;/a&gt; rolled out as the runway to the beta phase. With &lt;a href=&quot;https://www.python.org/downloads/release/python-3150b1/&quot;&gt;Python 3.15.0b1&lt;/a&gt; on May 7 came the &lt;strong&gt;feature freeze&lt;/strong&gt;, which means that from here until the final release of 3.15, the core team works only on bug fixes and polishing.&lt;/p&gt;
&lt;p&gt;That makes the beta releases a good moment to step back and look at the headline features of 3.15, which are now locked:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Explicit lazy imports&lt;/strong&gt; (&lt;a href=&quot;https://realpython.com/python-news-december-2025/#pep-810-accepted-explicit-lazy-imports&quot;&gt;PEP 810&lt;/a&gt;) for faster startup&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;&lt;code&gt;frozendict&lt;/code&gt; built-in&lt;/strong&gt; (&lt;a href=&quot;https://realpython.com/python-news-march-2026/#pep-814-accepted-frozendict-joins-the-built-ins&quot;&gt;PEP 814&lt;/a&gt;) for immutable mappings&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;&lt;code&gt;sentinel&lt;/code&gt; built-in&lt;/strong&gt; (&lt;a href=&quot;https://peps.python.org/pep-0661/&quot;&gt;PEP 661&lt;/a&gt;), which you’ll dig into &lt;a href=&quot;#a-built-in-sentinel-lands-in-python-315&quot;&gt;below&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unpacking in comprehensions&lt;/strong&gt; (&lt;a href=&quot;https://realpython.com/python-news-march-2026/#python-3150-alpha-6-comprehension-unpacking-and-more&quot;&gt;PEP 798&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UTF-8 as the default &lt;a href=&quot;https://realpython.com/python-encodings-guide/&quot;&gt;encoding&lt;/a&gt;&lt;/strong&gt; (&lt;a href=&quot;https://peps.python.org/pep-0686/&quot;&gt;PEP 686&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;A stable ABI for &lt;a href=&quot;https://realpython.com/python-news-may-2026/#pep-803-accepted-stable-abi-goes-free-threaded&quot;&gt;free-threaded builds&lt;/a&gt; (&lt;a href=&quot;https://peps.python.org/pep-0803/&quot;&gt;PEP 803&lt;/a&gt;), plus C-API modernization (PEPs &lt;a href=&quot;https://peps.python.org/pep-0820/&quot;&gt;820&lt;/a&gt; and &lt;a href=&quot;https://peps.python.org/pep-0793/&quot;&gt;793&lt;/a&gt;) that should make it easier to write C extensions that work across Python versions&lt;/li&gt;
&lt;li&gt;A new &lt;strong&gt;sampling profiler&lt;/strong&gt; in the &lt;a href=&quot;/ref/glossary/standard-library/&quot; class=&quot;ref-link&quot;&gt;standard library&lt;/a&gt; (&lt;a href=&quot;https://peps.python.org/pep-0799/&quot;&gt;PEP 799&lt;/a&gt;) for low-overhead &lt;a href=&quot;https://realpython.com/python-profiling/&quot;&gt;profiling&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;a href=&quot;/ref/glossary/jit-compiler/&quot; class=&quot;ref-link&quot;&gt;JIT compiler&lt;/a&gt; also &lt;a href=&quot;https://realpython.com/python315-jit-compiler/&quot;&gt;gets faster&lt;/a&gt;, with the beta announcement citing an 8–9 percent geometric-mean improvement on x86-64 Linux. If you’ve been putting off testing your code against 3.15, then now is the time to get started! The &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; surface won’t shift under you anymore, and your feedback will help catch regressions before the release candidate phase.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Beta builds are for testing, not production. &lt;a href=&quot;https://realpython.com/python-pre-release/&quot;&gt;Install the pre-release version&lt;/a&gt;, run your test suite against 3.15, and report anything that breaks while there’s still time to fix it before the release candidate.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The first round of improvements already landed with &lt;a href=&quot;https://www.python.org/downloads/release/python-3150b2/&quot;&gt;beta 2&lt;/a&gt; on June 2, and the next big checkpoint is the &lt;a href=&quot;/ref/glossary/release-candidate/&quot; class=&quot;ref-link&quot;&gt;release candidate&lt;/a&gt; phase on August 4, with the final release expected, as usual, this fall.&lt;/p&gt;
&lt;h3 id=&quot;a-built-in-sentinel-lands-in-python-315&quot;&gt;A Built-in &lt;code&gt;sentinel&lt;/code&gt; Lands in Python 3.15&lt;a class=&quot;headerlink&quot; href=&quot;#a-built-in-sentinel-lands-in-python-315&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Here’s the new feature that you’ll likely want to reach for. If you’ve ever needed to tell the difference between a caller passing &lt;code&gt;None&lt;/code&gt; and a caller passing nothing at all, then you’ve probably written something like this:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;_MISSING&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_MISSING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_MISSING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# No value was provided&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;It works, but it has rough edges. The &lt;code&gt;repr()&lt;/code&gt; is an unhelpful &lt;code&gt;&amp;lt;object object at 0x7f...&amp;gt;&lt;/code&gt;, the marker can’t be used cleanly in type &lt;a href=&quot;/ref/glossary/annotation/&quot; class=&quot;ref-link&quot;&gt;annotations&lt;/a&gt;, and its identity doesn’t survive copying or pickling. &lt;a href=&quot;https://peps.python.org/pep-0661/&quot;&gt;PEP 661&lt;/a&gt; replaces the idiom with a new &lt;a href=&quot;https://docs.python.org/3.15/library/functions.html#sentinel&quot;&gt;&lt;code&gt;sentinel&lt;/code&gt;&lt;/a&gt; built-in:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot;&gt;&lt;span class=&quot;sr-only&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;MISSING&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sentinel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;MISSING&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MISSING&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MISSING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;MISSING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# No value was provided&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1f206cb9a381.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;The signature is &lt;code&gt;sentinel(name, /, *, repr=None)&lt;/code&gt;, and the result is a unique truthy object whose default &lt;code&gt;repr()&lt;/code&gt; is the name you gave it, so &lt;code&gt;MISSING&lt;/code&gt; shows up as &lt;code&gt;MISSING&lt;/code&gt; in &lt;a href=&quot;/ref/glossary/traceback/&quot; class=&quot;ref-link&quot;&gt;tracebacks&lt;/a&gt; instead of a memory address.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Sentinels and &lt;code&gt;None&lt;/code&gt; solve related but different problems. If you’re still fuzzy on when &lt;code&gt;None&lt;/code&gt; is the right tool, then Real Python’s guide to &lt;a href=&quot;https://realpython.com/null-in-python/&quot;&gt;Python’s &lt;code&gt;None&lt;/code&gt;&lt;/a&gt; is worth revisiting.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Because the sentinel is its own type, you can drop it straight into annotations like &lt;code&gt;int | MISSING&lt;/code&gt; without reaching for &lt;code&gt;Literal&lt;/code&gt;. The &lt;a href=&quot;/ref/glossary/pep/&quot; class=&quot;ref-link&quot;&gt;PEP&lt;/a&gt; was first submitted back in 2021, so it’s satisfying to see it cross the finish line.&lt;/p&gt;
&lt;h3 id=&quot;pep-829-graduates-from-draft-to-accepted&quot;&gt;PEP 829 Graduates From Draft to Accepted&lt;a class=&quot;headerlink&quot; href=&quot;#pep-829-graduates-from-draft-to-accepted&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://realpython.com/python-news-may-2026/#pep-829-draft-replacing-pth-files-for-package-startup&quot;&gt;Last month’s roundup&lt;/a&gt; featured PEP 829 while it was still a draft. It’s since been accepted for Python 3.15, so the change is now official.&lt;/p&gt;
&lt;p&gt;As a quick recap, &lt;code&gt;.pth&lt;/code&gt; files in your &lt;code&gt;site-packages&lt;/code&gt; directory can do two things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extend &lt;code&gt;sys.path&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run arbitrary code through &lt;code&gt;import&lt;/code&gt; lines that Python feeds directly to &lt;a href=&quot;https://realpython.com/python-exec/&quot;&gt;&lt;code&gt;exec()&lt;/code&gt;&lt;/a&gt; at startup&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-june-2026/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-june-2026/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #298: Reducing the Size of Python Docker Containers</title>
      <id>https://realpython.com/podcasts/rpp/298/</id>
      <link href="https://realpython.com/podcasts/rpp/298/"/>
      <updated>2026-06-05T12:00:00+00:00</updated>
      <summary>How can you easily reduce the size of a Python Docker container? What are the exceptions you should catch in your code? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How can you easily reduce the size of a Python Docker container? What are the exceptions you should catch in your code? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Structuring Your Python Script</title>
      <id>https://realpython.com/courses/structuring-your-python-script/</id>
      <link href="https://realpython.com/courses/structuring-your-python-script/"/>
      <updated>2026-06-02T14:00:00+00:00</updated>
      <summary>Master Python script structure with best practices for shebangs, ordered imports, formatting with Ruff, constants, and a clean entry point.</summary>
      <content type="html">
        &lt;p&gt;You may have begun your Python journey interactively, exploring ideas within Jupyter Notebooks or through the Python REPL. While that&amp;rsquo;s great for quick experimentation and immediate feedback, you&amp;rsquo;ll likely find yourself saving code into &lt;code&gt;.py&lt;/code&gt; files. However, as your codebase grows, knowing where things should go in your script becomes increasingly important.&lt;/p&gt;
&lt;p&gt;Transitioning from interactive environments to structured scripts helps promote readability, enabling better collaboration and more robust development practices. This video course shows you the foundations of organizing a Python script: where the runnable bits go, how to arrange your imports, and how to refactor with constants and a fixed entry point.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll know how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make a script &lt;strong&gt;directly executable&lt;/strong&gt; on Unix-like systems with a &lt;strong&gt;shebang line&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Organize your &lt;strong&gt;import statements&lt;/strong&gt; using standard grouping conventions&lt;/li&gt;
&lt;li&gt;Automatically sort imports and format your code with the &lt;strong&gt;&lt;code&gt;ruff&lt;/code&gt;&lt;/strong&gt; linter&lt;/li&gt;
&lt;li&gt;Replace hard-coded values with meaningful &lt;strong&gt;constants&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Define a clear script entry point using &lt;code&gt;if __name__ == &quot;__main__&quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Without further ado, it&amp;rsquo;s time to start working through a concrete script and progressively shape it into well-organized, shareable code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #297: Improving Python Through PEPs and Protocols</title>
      <id>https://realpython.com/podcasts/rpp/297/</id>
      <link href="https://realpython.com/podcasts/rpp/297/"/>
      <updated>2026-05-29T12:00:00+00:00</updated>
      <summary>Have you ever been confused by the naming of modules you&#x27;re importing from a package? Is there a standard way to organize and name your Python virtual environments? This week on the show, Brett Cannon returns to discuss the Python Enhancement Proposals (PEPs) he&#x27;s been working on recently.</summary>
      <content type="html">
        &lt;p&gt;Have you ever been confused by the naming of modules you&#x27;re importing from a package? Is there a standard way to organize and name your Python virtual environments? This week on the show, Brett Cannon returns to discuss the Python Enhancement Proposals (PEPs) he&#x27;s been working on recently.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Connecting LLMs to Your Data With Python MCP Servers</title>
      <id>https://realpython.com/courses/connecting-llms-data-python-mcp-servers/</id>
      <link href="https://realpython.com/courses/connecting-llms-data-python-mcp-servers/"/>
      <updated>2026-05-26T14:00:00+00:00</updated>
      <summary>Build an MCP server in Python that exposes tools, resources, and prompts so AI agents like Cursor can interact with your data.</summary>
      <content type="html">
        &lt;p&gt;The Model Context Protocol (MCP) is a new open protocol that allows AI models to interact with external systems in a standardized, extensible way. In this video course, you&amp;rsquo;ll install MCP, explore its client-server architecture, and work with its core concepts: prompts, resources, and tools. You&amp;rsquo;ll then build and test a Python MCP server that queries e-commerce data and integrate it with an AI agent in Cursor to see real tool calls in action.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What &lt;strong&gt;MCP&lt;/strong&gt; is and why it was created&lt;/li&gt;
&lt;li&gt;What MCP &lt;strong&gt;prompts&lt;/strong&gt;, &lt;strong&gt;resources&lt;/strong&gt;, and &lt;strong&gt;tools&lt;/strong&gt; are&lt;/li&gt;
&lt;li&gt;How to build an &lt;strong&gt;MCP server&lt;/strong&gt; with customized tools&lt;/li&gt;
&lt;li&gt;How to integrate your MCP server with &lt;strong&gt;AI agents&lt;/strong&gt; like &lt;strong&gt;Cursor&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll get hands-on experience with Python MCP by creating and testing MCP servers and connecting your MCP to AI tools. To keep the focus on learning MCP rather than building a complex project, you&amp;rsquo;ll build a simple MCP server that interacts with a simulated e-commerce database. You&amp;rsquo;ll also use Cursor&amp;rsquo;s MCP client, which saves you from having to implement your own.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #296: Managing Polars Schema Issues &amp; Profiling GitHub Users</title>
      <id>https://realpython.com/podcasts/rpp/296/</id>
      <link href="https://realpython.com/podcasts/rpp/296/"/>
      <updated>2026-05-22T12:00:00+00:00</updated>
      <summary>How can you avoid schema problems in your Polars data pipeline when adding new columns? How can you quickly examine a GitHub user&#x27;s profile to decide how much to invest in their contributions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How can you avoid schema problems in your Polars data pipeline when adding new columns? How can you quickly examine a GitHub user&#x27;s profile to decide how much to invest in their contributions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Tapping Into the Zen of Python</title>
      <id>https://realpython.com/courses/tapping-into-the-zen-of-python/</id>
      <link href="https://realpython.com/courses/tapping-into-the-zen-of-python/"/>
      <updated>2026-05-19T14:00:00+00:00</updated>
      <summary>Explore the Zen of Python and its 19 guiding principles for writing readable, practical code. Learn its history, jokes, and meaning.</summary>
      <content type="html">
        &lt;p&gt;The &lt;strong&gt;Zen of Python&lt;/strong&gt; is a collection of 19 aphorisms that capture the guiding principles behind Python&amp;rsquo;s design. You can display them anytime by running &lt;code&gt;import this&lt;/code&gt; in a Python REPL. Tim Peters wrote them in 1999 as a joke, but they became an iconic part of Python culture that was even formalized as &lt;a href=&quot;/ref/glossary/pep/&quot; class=&quot;ref-link&quot;&gt;PEP&lt;/a&gt; 20.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Zen of Python is a &lt;strong&gt;humorous poem&lt;/strong&gt; of 19 aphorisms describing Python&amp;rsquo;s design philosophy&lt;/li&gt;
&lt;li&gt;Running &lt;code&gt;import this&lt;/code&gt; in a Python &lt;a href=&quot;/ref/glossary/interpreter/&quot; class=&quot;ref-link&quot;&gt;interpreter&lt;/a&gt; displays the &lt;strong&gt;complete text&lt;/strong&gt; of the Zen of Python&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tim Peters&lt;/strong&gt; wrote the Zen of Python in 1999 as a tongue-in-cheek comment on a mailing list&lt;/li&gt;
&lt;li&gt;The aphorisms are &lt;strong&gt;guidelines, not strict rules&lt;/strong&gt;, and some intentionally contradict each other&lt;/li&gt;
&lt;li&gt;The principles promote &lt;strong&gt;readability, simplicity, and explicitness&lt;/strong&gt; while acknowledging that practicality matters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Experienced Pythonistas often refer to the Zen of Python as a source of wisdom and guidance, especially when they want to settle an argument about certain design decisions in a piece of code. In this video course, you&amp;rsquo;ll explore the origins of the Zen of Python, learn how to interpret its mysterious aphorisms, and discover the Easter eggs hidden within it.&lt;/p&gt;
&lt;p&gt;You don&amp;rsquo;t need to be a Python master to understand the Zen of Python! But you do need to answer an important question: &lt;strong&gt;What exactly is the Zen of Python?&lt;/strong&gt;&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #295: Agentic Architecture: Why Files Aren&#x27;t Always Enough</title>
      <id>https://realpython.com/podcasts/rpp/295/</id>
      <link href="https://realpython.com/podcasts/rpp/295/"/>
      <updated>2026-05-15T12:00:00+00:00</updated>
      <summary>What are the limitations of using a file-based agent workflow? Why do massive context windows tend to collapse? This week on the show, Mikiko Bazeley from MongoDB joins us to discuss agentic architecture and context engineering.</summary>
      <content type="html">
        &lt;p&gt;What are the limitations of using a file-based agent workflow? Why do massive context windows tend to collapse? This week on the show, Mikiko Bazeley from MongoDB joins us to discuss agentic architecture and context engineering.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Building Type-Safe LLM Agents With Pydantic AI</title>
      <id>https://realpython.com/courses/building-type-safe-llm-agents-with-pydantic-ai/</id>
      <link href="https://realpython.com/courses/building-type-safe-llm-agents-with-pydantic-ai/"/>
      <updated>2026-05-12T14:00:00+00:00</updated>
      <summary>Build type-safe LLM agents in Python with Pydantic AI using structured outputs, function calling, and dependency injection.</summary>
      <content type="html">
        &lt;p&gt;Pydantic AI is a Python framework for building LLM agents that return validated, structured outputs using Pydantic models. Instead of parsing raw strings from LLMs, you get type-safe objects with automatic validation.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve used FastAPI or Pydantic before, then you&amp;rsquo;ll recognize the familiar pattern of defining schemas with type hints and letting the framework handle the type validation for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pydantic AI&lt;/strong&gt; uses &lt;code&gt;BaseModel&lt;/code&gt; classes to define structured outputs that guarantee &lt;strong&gt;type safety&lt;/strong&gt; and automatic &lt;strong&gt;validation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;@agent.tool&lt;/code&gt; &lt;strong&gt;decorator&lt;/strong&gt; registers Python functions that &lt;strong&gt;LLMs can invoke&lt;/strong&gt; based on user queries and docstrings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dependency injection&lt;/strong&gt; with &lt;code&gt;deps_type&lt;/code&gt; provides &lt;strong&gt;type-safe&lt;/strong&gt; runtime context like database connections without using &lt;strong&gt;global state&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validation retries&lt;/strong&gt; automatically rerun queries when the LLM returns invalid data, which increases &lt;strong&gt;reliability&lt;/strong&gt; but also &lt;strong&gt;API costs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Google Gemini&lt;/strong&gt;, &lt;strong&gt;OpenAI&lt;/strong&gt;, and &lt;strong&gt;Anthropic&lt;/strong&gt; models support structured outputs best, while other providers have &lt;strong&gt;varying capabilities&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #294: Declarative Charts in Python &amp; Discerning Iterators vs Iterables</title>
      <id>https://realpython.com/podcasts/rpp/294/</id>
      <link href="https://realpython.com/podcasts/rpp/294/"/>
      <updated>2026-05-08T12:00:00+00:00</updated>
      <summary>What if you could build charts in Python by describing what your data means, instead of scripting every visual detail? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What if you could build charts in Python by describing what your data means, instead of scripting every visual detail? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Use Codex CLI to Enhance Your Python Projects</title>
      <id>https://realpython.com/courses/use-codex-cli-enhance-your-python-projects/</id>
      <link href="https://realpython.com/courses/use-codex-cli-enhance-your-python-projects/"/>
      <updated>2026-05-05T14:00:00+00:00</updated>
      <summary>Learn how to use Codex CLI to add features to Python projects directly from your terminal, without needing a browser or IDE plugins.</summary>
      <content type="html">
        &lt;p&gt;After watching this video course, you&amp;rsquo;ll be able to use Codex CLI to add features to a Python project directly from your terminal. &lt;strong&gt;Codex CLI&lt;/strong&gt; is an AI-powered coding assistant that runs inside your terminal. It understands your project structure, reads your files, and proposes multi-file changes using natural language instructions.&lt;/p&gt;
&lt;p&gt;Instead of copying code from a browser or relying on an IDE plugin, you&amp;rsquo;ll use Codex CLI to implement a real feature in a multi-file Python project directly from your terminal.&lt;/p&gt;
&lt;p&gt;In the following lessons, you&amp;rsquo;ll install and configure Codex CLI, use it to implement a deletion feature in a contact book app, and then refine that feature through iterative prompting.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #293: Agentic Data Science Pair Programming With marimo pair</title>
      <id>https://realpython.com/podcasts/rpp/293/</id>
      <link href="https://realpython.com/podcasts/rpp/293/"/>
      <updated>2026-05-01T12:00:00+00:00</updated>
      <summary>How do you add agent skills to your data science workflow? How can a coding agent assist with data wrangling and research? This week on the show, Trevor Manz from marimo joins us to discuss marimo pair.</summary>
      <content type="html">
        &lt;p&gt;How do you add agent skills to your data science workflow? How can a coding agent assist with data wrangling and research? This week on the show, Trevor Manz from marimo joins us to discuss marimo pair.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Game Development</title>
      <id>https://realpython.com/learning-paths/python-game-development/</id>
      <link href="https://realpython.com/learning-paths/python-game-development/"/>
      <updated>2026-04-16T12:00:00+00:00</updated>
      <summary>Build Python games from command-line projects to 2D graphical games with turtle, Tkinter, Pygame, and Arcade.</summary>
      <content type="html">
        &lt;p&gt;Build Python games from command-line projects to 2D graphical games with turtle, Tkinter, Pygame, and Arcade.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: LLM Application Development With Python</title>
      <id>https://realpython.com/learning-paths/llm-application-development-python/</id>
      <link href="https://realpython.com/learning-paths/llm-application-development-python/"/>
      <updated>2026-03-19T12:00:00+00:00</updated>
      <summary>Build LLM-powered applications in Python. Call model APIs, craft prompts, add retrieval-augmented generation, create AI agents, and connect via MCP.</summary>
      <content type="html">
        &lt;p&gt;Build LLM-powered applications in Python. Call model APIs, craft prompts, add retrieval-augmented generation, create AI agents, and connect via MCP.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Coding With AI</title>
      <id>https://realpython.com/learning-paths/coding-with-ai/</id>
      <link href="https://realpython.com/learning-paths/coding-with-ai/"/>
      <updated>2025-12-07T12:00:00+00:00</updated>
      <summary>Use AI coding assistants to write, review, and debug Python code faster. Pick from Claude Code, Cursor, or Gemini CLI and start coding.</summary>
      <content type="html">
        &lt;p&gt;Use AI coding assistants to write, review, and debug Python code faster. Pick from Claude Code, Cursor, or Gemini CLI and start coding.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Data Structures</title>
      <id>https://realpython.com/learning-paths/basic-python-data-structures/</id>
      <link href="https://realpython.com/learning-paths/basic-python-data-structures/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn Python&#x27;s built-in data structures: strings, lists, tuples, dictionaries, sets, and bytes, plus sorting, copying, and comprehensions.</summary>
      <content type="html">
        &lt;p&gt;Learn Python&#x27;s built-in data structures: strings, lists, tuples, dictionaries, sets, and bytes, plus sorting, copying, and comprehensions.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Perfect Your Python Development Setup</title>
      <id>https://realpython.com/learning-paths/perfect-your-python-development-setup/</id>
      <link href="https://realpython.com/learning-paths/perfect-your-python-development-setup/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Set up a Python development environment with VS Code, PyCharm, virtual environments, Git, pyenv, Docker, and AI coding tools like Claude Code and Cursor.</summary>
      <content type="html">
        &lt;p&gt;Set up a Python development environment with VS Code, PyCharm, virtual environments, Git, pyenv, Docker, and AI coding tools like Claude Code and Cursor.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Control Flow and Loops</title>
      <id>https://realpython.com/learning-paths/python-control-flow-and-loops/</id>
      <link href="https://realpython.com/learning-paths/python-control-flow-and-loops/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn Python control flow and loops. Use conditional statements, Boolean operators, for and while loops, and keywords like break and continue.</summary>
      <content type="html">
        &lt;p&gt;Learn Python control flow and loops. Use conditional statements, Boolean operators, for and while loops, and keywords like break and continue.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Modules and Packages</title>
      <id>https://realpython.com/learning-paths/modules-and-packages/</id>
      <link href="https://realpython.com/learning-paths/modules-and-packages/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn Python&#x27;s import system, organize code into modules and packages, manage dependencies with pip, and publish to PyPI.</summary>
      <content type="html">
        &lt;p&gt;Learn Python&#x27;s import system, organize code into modules and packages, manage dependencies with pip, and publish to PyPI.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Create Graphical User Interfaces (GUI)</title>
      <id>https://realpython.com/learning-paths/python-gui-programming/</id>
      <link href="https://realpython.com/learning-paths/python-gui-programming/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Build Python GUI applications with Tkinter, PyQt, wxPython, and Kivy. Learn layouts, event handling, threading, and database integration.</summary>
      <content type="html">
        &lt;p&gt;Build Python GUI applications with Tkinter, PyQt, wxPython, and Kivy. Learn layouts, event handling, threading, and database integration.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Important Standard Library Modules</title>
      <id>https://realpython.com/learning-paths/standard-library-modules-you-should-know/</id>
      <link href="https://realpython.com/learning-paths/standard-library-modules-you-should-know/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Explore Python standard library modules including math, datetime, JSON, CSV, regex, subprocess, and argparse through hands-on tutorials and courses.</summary>
      <content type="html">
        &lt;p&gt;Explore Python standard library modules including math, datetime, JSON, CSV, regex, subprocess, and argparse through hands-on tutorials and courses.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Network Programming and Security</title>
      <id>https://realpython.com/learning-paths/network-programming-and-security/</id>
      <link href="https://realpython.com/learning-paths/network-programming-and-security/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn network programming and security in Python. Work with CRUD operations, REST APIs, HTTPS, and socket programming to build networked apps.</summary>
      <content type="html">
        &lt;p&gt;Learn network programming and security in Python. Work with CRUD operations, REST APIs, HTTPS, and socket programming to build networked apps.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
