<?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-09-04T12:00:00+00:00</updated>
  <id>https://realpython.com/</id>
  <author>
    <name>Real Python</name>
  </author>

  
    <entry>
      <title>The Real Python Podcast – Episode #310: Performance Engineering: Profiling and Making Apps Fast by Default</title>
      <id>https://realpython.com/podcasts/rpp/310/</id>
      <link href="https://realpython.com/podcasts/rpp/310/"/>
      <updated>2026-09-04T12:00:00+00:00</updated>
      <summary>How do you plan for the performance of your Python applications? What does a performance budget entail, and where should you spend your resources? This week on the show, we speak with Den Odell about his new book &quot;Fast by Default: Practical Performance Engineering.&quot;</summary>
      <content type="html">
        &lt;p&gt;How do you plan for the performance of your Python applications? What does a performance budget entail, and where should you spend your resources? This week on the show, we speak with Den Odell about his new book &quot;Fast by Default: Practical Performance Engineering.&quot;&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: Common Python Data Structures (Guide)</title>
      <id>https://realpython.com/quizzes/common-python-data-structures/</id>
      <link href="https://realpython.com/quizzes/common-python-data-structures/"/>
      <updated>2026-09-04T12:00:00+00:00</updated>
      <summary>Test your grasp of Python&#x27;s built-in data structures. Work through dictionaries, arrays, records, sets, stacks, queues, and priority 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/python-data-structures/&quot;&gt;Common Python Data Structures (Guide)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit the abstract data types that ship with Python&amp;rsquo;s standard library and how they map onto Python&amp;rsquo;s naming scheme.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll cover dictionaries and their specialized variants, array-like types, records and data objects, sets and multisets, and the stacks, queues, and priority queues that you can build from them.&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 AI: How to Build a Neural Network &amp; Make Predictions</title>
      <id>https://realpython.com/quizzes/python-ai-neural-network/</id>
      <link href="https://realpython.com/quizzes/python-ai-neural-network/"/>
      <updated>2026-09-03T12:00:00+00:00</updated>
      <summary>Check your grasp of how neural networks make predictions in Python, from dot products and activation functions to gradient descent and backpropagation.</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-ai-neural-network/&quot;&gt;Python AI: How to Build a Neural Network &amp;amp; Make Predictions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how a neural network takes an input vector,
transforms it through layers, and adjusts its weights and bias to make better predictions.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also check your grasp of the math that drives training, including the dot product,
the sigmoid activation function, mean squared error, and backpropagation.&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: UTF-8 by Default</title>
      <id>https://realpython.com/python315-utf8-default/</id>
      <link href="https://realpython.com/python315-utf8-default/"/>
      <updated>2026-09-02T14:00:00+00:00</updated>
      <summary>Preview the Python 3.15 UTF-8 default: see what changes, try it on a pre-release, and keep your file I/O portable across every platform.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python 3.15 makes UTF-8 the default text encoding. A plain &lt;code&gt;open(&quot;notes.txt&quot;)&lt;/code&gt; call now decodes the same way on every platform, including Windows. Earlier Python versions picked an encoding from your locale, so on Windows the same code that worked on Linux and macOS could produce garbage.&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; enables &lt;strong&gt;UTF-8&lt;/strong&gt; as its default text encoding, so text I/O uses it when you omit the &lt;code&gt;encoding&lt;/code&gt; argument.&lt;/li&gt;
&lt;li&gt;The previous encoding default came from your &lt;strong&gt;locale&lt;/strong&gt;, which often meant &lt;code&gt;cp1252&lt;/code&gt; on Windows and &lt;code&gt;utf-8&lt;/code&gt; on Linux and macOS.&lt;/li&gt;
&lt;li&gt;Passing &lt;code&gt;encoding=&quot;utf-8&quot;&lt;/code&gt; keeps your file I/O &lt;strong&gt;portable&lt;/strong&gt; and safe across every Python version and platform.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;flake8-encodings&lt;/code&gt; tool and the &lt;code&gt;-X warn_default_encoding&lt;/code&gt; flag help you find code that leans on the &lt;strong&gt;implicit&lt;/strong&gt; default.&lt;/li&gt;
&lt;li&gt;Setting &lt;code&gt;PYTHONUTF8=0&lt;/code&gt; or passing &lt;code&gt;encoding=&quot;locale&quot;&lt;/code&gt; restores the &lt;strong&gt;locale-based&lt;/strong&gt; behavior when you need it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s what the change looks like. Say that you save the text &lt;code&gt;&quot;Café ☕&quot;&lt;/code&gt; to a file and read it back with a bare call to &lt;a href=&quot;/ref/builtin-functions/open/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;open()&lt;/code&gt;&lt;/a&gt; on Windows:&lt;/p&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;py&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;14&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;print(open(&#x27;cafe.txt&#x27;).read())&quot;&lt;/span&gt;
&lt;span class=&quot;hll&quot;&gt;&lt;span class=&quot;go&quot;&gt;CafÃ© â˜•&lt;/span&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.8f1dcd28e216.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, the default decoder—often &lt;code&gt;cp1252&lt;/code&gt;—misinterprets the UTF-8 bytes, so the code prints &lt;a href=&quot;https://en.wikipedia.org/wiki/Mojibake&quot;&gt;mojibake&lt;/a&gt;. Now look at how the same code behaves on Python 3.15:&lt;/p&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;py&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;15&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-c&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;print(open(&#x27;cafe.txt&#x27;).read())&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Café ☕&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.8f1dcd28e216.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;Same code, no &lt;code&gt;encoding&lt;/code&gt; argument to &lt;code&gt;open()&lt;/code&gt;, and the mojibake is gone because of the consistent UTF-8 default. In this tutorial, you’ll first see exactly what changes, then try the new default on a Python 3.15 pre-release. After that, you’ll learn how to keep your own code working the same way on every Python version and platform.&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-utf8-default-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python315-utf8-default-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to find implicit-encoding calls and keep your file I/O portable across every platform.&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.8f1dcd28e216.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: UTF-8 by Default” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python315-utf8-default/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;A person places the third of three identical Café cards onto a numbered rack beside a machine with gauges, a Python logo, and panels labeled UTF-8 and SAFE.&quot; src=&quot;https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.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-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-3.15-Preview-UTF-8-by-Default_Watermarked.5bc9458d892f.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.8f1dcd28e216.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 position-relative&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-utf8-default/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python 3.15 Preview: UTF-8 by Default&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Python 3.15&#x27;s UTF-8 default, from the origins of the old locale-based encoding to passing explicit encodings in your code.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;meet-python-315s-utf-8-default&quot;&gt;Meet Python 3.15’s UTF-8 Default&lt;a class=&quot;headerlink&quot; href=&quot;#meet-python-315s-utf-8-default&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It helps to understand why the default &lt;a href=&quot;/ref/glossary/text-encoding/&quot; class=&quot;ref-link&quot;&gt;text encoding&lt;/a&gt; behavior was a problem in Python versions older than 3.15. Take the built-in &lt;code&gt;open()&lt;/code&gt; &lt;a href=&quot;/ref/glossary/function/&quot; class=&quot;ref-link&quot;&gt;function&lt;/a&gt; as a baseline. Whenever you omitted the &lt;code&gt;encoding&lt;/code&gt; &lt;a href=&quot;/ref/glossary/argument/&quot; class=&quot;ref-link&quot;&gt;argument&lt;/a&gt; when opening a &lt;a href=&quot;/ref/glossary/text-file/&quot; class=&quot;ref-link&quot;&gt;text file&lt;/a&gt;, Python fell back to whatever &lt;a href=&quot;/ref/stdlib/locale/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;locale.getencoding()&lt;/code&gt;&lt;/a&gt; returned on your operating system.&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; For a refresher on how text encodings work before you dig in, check out the &lt;a href=&quot;https://realpython.com/python-encodings-guide/&quot;&gt;Unicode &amp;amp; Character Encodings in Python: A Painless Guide&lt;/a&gt; tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;On Windows, that fallback was the ANSI code page—the legacy character set that Windows selects from your system’s regional settings. Common examples are &lt;code&gt;cp1252&lt;/code&gt; in the Americas and Western Europe, &lt;code&gt;cp1251&lt;/code&gt; in Cyrillic-script regions, and &lt;code&gt;cp932&lt;/code&gt; in Japan.&lt;/p&gt;
&lt;p&gt;On Unix, it was the codeset from your &lt;a href=&quot;https://docs.python.org/3/library/locale.html#locale.LC_CTYPE&quot;&gt;&lt;code&gt;LC_CTYPE&lt;/code&gt;&lt;/a&gt; locale, which was &lt;code&gt;utf-8&lt;/code&gt; on a modern Linux or macOS system but plain &lt;a href=&quot;/ref/glossary/ascii/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;ascii&lt;/code&gt;&lt;/a&gt; under a bare &lt;code&gt;C&lt;/code&gt; or &lt;code&gt;POSIX&lt;/code&gt; locale. The latter two are the minimal default locales that a system uses when nothing else is configured, which is often the case in containers and CI runners. You end up with the same code but different text encoding or decoding behaviors depending on where the code runs.&lt;/p&gt;
&lt;p&gt;This inconsistent behavior can raise &lt;code&gt;UnicodeDecodeError&lt;/code&gt; or &lt;code&gt;UnicodeEncodeError&lt;/code&gt; when reading or writing text files, respectively. It can also produce mojibake, as you saw earlier, with no error at all.&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 inconsistent text encoding behavior reaches far beyond the built-in &lt;code&gt;open()&lt;/code&gt; function. The same encoding rule applies to &lt;a href=&quot;https://realpython.com/python-pathlib/&quot;&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/a&gt; &lt;a href=&quot;/ref/glossary/method/&quot; class=&quot;ref-link&quot;&gt;methods&lt;/a&gt; like &lt;code&gt;Path.read_text()&lt;/code&gt; and &lt;code&gt;Path.write_text()&lt;/code&gt;, the text modes of &lt;code&gt;gzip.open()&lt;/code&gt;, &lt;code&gt;bz2.open()&lt;/code&gt;, and &lt;code&gt;lzma.open()&lt;/code&gt;, and &lt;a href=&quot;https://realpython.com/python-subprocess/&quot;&gt;&lt;code&gt;subprocess&lt;/code&gt;&lt;/a&gt; calls that pass &lt;code&gt;text=True&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It also affects the text-mode files from &lt;a href=&quot;/ref/stdlib/tempfile/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;tempfile&lt;/code&gt;&lt;/a&gt;, &lt;code&gt;configparser.ConfigParser.read()&lt;/code&gt;, and &lt;code&gt;logging.FileHandler&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;/ref/computer-science-glossary/utf-8/&quot; class=&quot;ref-link&quot;&gt;UTF-8&lt;/a&gt; became the de facto standard everywhere long ago, except in Python’s own default. It’s the standard for &lt;a href=&quot;/ref/glossary/source-code/&quot; class=&quot;ref-link&quot;&gt;source code&lt;/a&gt; files, &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-toml/&quot;&gt;TOML&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-yaml/&quot;&gt;YAML&lt;/a&gt;, as well as on the web and in other programming languages like Go, Rust, and Java. On top of that, every mainstream editor, such as &lt;a href=&quot;https://realpython.com/advanced-visual-studio-code-python/&quot;&gt;Visual Studio Code&lt;/a&gt;, uses it out of the box.&lt;/p&gt;
&lt;p&gt;Python 3.15 closes that gap through &lt;a href=&quot;https://peps.python.org/pep-0686/&quot;&gt;PEP 686&lt;/a&gt;. Text &lt;a href=&quot;/ref/glossary/input-output/&quot; class=&quot;ref-link&quot;&gt;input/output (I/O)&lt;/a&gt; without an explicit encoding now uses UTF-8 no matter which operating system or locale you’re using.&lt;/p&gt;
&lt;p&gt;The table below summarizes the default text encoding that &lt;code&gt;open()&lt;/code&gt; picks before and after Python 3.15:&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;Scenario&lt;/th&gt;
&lt;th&gt;Default up to 3.14&lt;/th&gt;
&lt;th&gt;Default in 3.15+&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Windows&lt;/td&gt;
&lt;td&gt;ANSI code page (&lt;code&gt;cp1252&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux/macOS (UTF-8 locale)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Any OS under a &lt;code&gt;C&lt;/code&gt;/&lt;code&gt;POSIX&lt;/code&gt; locale&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ascii&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;utf-8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;encoding=&quot;&amp;lt;your_preferred_encoding&amp;gt;&quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;as given&lt;/td&gt;
&lt;td&gt;as given&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The rows that change are the ones that used to depend on the operating system or the locale. On a UTF-8 Linux or macOS system, your everyday runs look the same, but the &lt;code&gt;C&lt;/code&gt;/&lt;code&gt;POSIX&lt;/code&gt; row still applies to you, since containers, cron jobs, and CI runners often start under a bare &lt;code&gt;C&lt;/code&gt; locale. Your code also has to decode correctly on other people’s machines. On Windows, this change removes a whole class of bugs.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;A bit of history:&lt;/strong&gt; This text encoding gap has a long history of tripping up real users. &lt;a href=&quot;https://peps.python.org/pep-0597/&quot;&gt;PEP 597&lt;/a&gt; recounts the classic case from the days of &lt;a href=&quot;https://setuptools.pypa.io/en/latest/userguide/quickstart.html&quot;&gt;&lt;code&gt;setup.py&lt;/code&gt;&lt;/a&gt; scripts. &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;Package&lt;/a&gt; authors often wrote &lt;code&gt;long_description = open(&quot;README.md&quot;).read()&lt;/code&gt; in their &lt;code&gt;setup.py&lt;/code&gt; file. This line worked fine on Linux and macOS, but it failed with a &lt;code&gt;UnicodeDecodeError&lt;/code&gt; on Windows if the target &lt;a href=&quot;https://realpython.com/readme-python-project/&quot;&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/a&gt; contained emojis or accented characters.&lt;/p&gt;
&lt;p&gt;That specific example is dated now because modern Python projects rely on &lt;a href=&quot;https://realpython.com/python-pyproject-toml/&quot;&gt;&lt;code&gt;pyproject.toml&lt;/code&gt;&lt;/a&gt; instead of &lt;code&gt;setup.py&lt;/code&gt;. As a result, this particular bug rarely bites anymore. Still, it captures the root problem perfectly: the same bare &lt;code&gt;open()&lt;/code&gt; call decoding differently depending on where it runs. That’s exactly what the new default fixes.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you want to go deeper into how character encodings work under the hood, Real Python’s video course on &lt;a href=&quot;https://realpython.com/courses/python-unicode/&quot;&gt;Unicode in Python: Working With Character Encodings&lt;/a&gt; covers code points, byte representations, and the built-in functions for converting between them.&lt;/p&gt;
&lt;p&gt;Now that you understand the problem, it’s time to try out the new text encoding default on your own.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python315-utf8-default/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python315-utf8-default/ »&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 Project Structure: How to Choose the Right Layout</title>
      <id>https://realpython.com/quizzes/python-application-layouts/</id>
      <link href="https://realpython.com/quizzes/python-application-layouts/"/>
      <updated>2026-09-02T12:00:00+00:00</updated>
      <summary>Test your understanding of Python project structure, from flat and src layouts to organizing packages for CLI, web, and GUI applications.</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-application-layouts/&quot;&gt;Python Project Structure: How to Choose the Right Layout&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to tell scripts, applications, and
libraries apart, weigh the flat layout against the &lt;code&gt;src/&lt;/code&gt; layout, and organize a package
with focused modules, a thin entry point, and domain-named subpackages.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also check how those patterns play out in real Django, Flask, FastAPI, and GUI
projects. For the configuration side of things, the guide on how to
&lt;a href=&quot;https://realpython.com/python-pyproject-toml/&quot;&gt;manage projects with pyproject.toml&lt;/a&gt;
covers the file that ties a layout together.&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 3.15 Preview: UTF-8 by Default</title>
      <id>https://realpython.com/quizzes/python315-utf8-default/</id>
      <link href="https://realpython.com/quizzes/python315-utf8-default/"/>
      <updated>2026-09-02T12:00:00+00:00</updated>
      <summary>Test your understanding of Python 3.15&#x27;s UTF-8 default, from the origins of the old locale-based encoding to passing explicit encodings in your code.</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-utf8-default/&quot;&gt;Python 3.15 Preview: UTF-8 by Default&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit where Python&amp;rsquo;s old default text encoding came
from, which operations rely on that default, how to find code that leans on it, how to pass
an explicit encoding in your own functions and libraries, and how to restore the
locale-based behavior when you really need it.&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>Build Your Own Face Recognition Tool With Python</title>
      <id>https://realpython.com/face-recognition-with-python/</id>
      <link href="https://realpython.com/face-recognition-with-python/"/>
      <updated>2026-09-01T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll build your own face recognition command-line tool with Python. You&#x27;ll learn how to use face detection to identify faces in an image and label them using face recognition. With this knowledge, you can create your own face recognition tool from start to finish!</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Do you have a phone that you can unlock with your face? Have you ever wondered how that works? Have you ever wanted to build your own face recognizer? With Python, some data, and a few helper packages, you can create your very own. In this project, you’ll use &lt;strong&gt;face detection&lt;/strong&gt; and &lt;strong&gt;face recognition&lt;/strong&gt; to identify faces in a given image.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this tutorial, you’ll build your own face recognition tool using:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Face detection to &lt;strong&gt;find faces&lt;/strong&gt; in an image&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;/ref/ai-coding-glossary/machine-learning/&quot; class=&quot;ref-link&quot;&gt;Machine learning&lt;/a&gt;&lt;/strong&gt; to power face recognition for given images&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Command-line arguments&lt;/strong&gt; to direct your application with &lt;code&gt;argparse&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Bounding boxes to label faces with the help of &lt;strong&gt;Pillow&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these techniques, you’ll gain a solid foundation in &lt;strong&gt;computer vision&lt;/strong&gt;. After implementing your knowledge in this project, you’ll be ready to apply these techniques in solving real-world problems beyond face recognition.&lt;/p&gt;
&lt;p&gt;Click the link below to download the complete source code for this project:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/face-recognition-python-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-face-recognition-python-code&quot; markdown&gt;Click here to download the full source code&lt;/a&gt; to build your own face recognition app with Python.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;a class=&quot;headerlink&quot; href=&quot;#demo&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you’re done with this project, you’ll have a face recognition application that you can train on any set of images. Once it’s trained, you’ll be able to give your application a new image, and the app will draw boxes on any faces that it finds and label each face by name:&lt;/p&gt;
&lt;div&gt;





&lt;div class=&quot;ratio rounded overflow-hidden mb-3 bg-body-tertiary&quot; style=&quot;aspect-ratio: 3360/1890;&quot;&gt;
  &lt;video-animation data-src=&quot;https://stream.realpython.com/6d3a28d1-67cf-421e-93f6-8ff4ef767418/playlist.m3u8&quot;&gt;
    &lt;video muted loop playsinline preload=&quot;none&quot; poster=&quot;https://stream.realpython.com/6d3a28d1-67cf-421e-93f6-8ff4ef767418/thumbnail.jpg?width=1280&quot; disablepictureinpicture disableremoteplayback&gt;&lt;/video&gt;
  &lt;/video-animation&gt;
&lt;/div&gt;



&lt;/div&gt;

&lt;p&gt;In this video, you saw this project in action: &lt;a href=&quot;/ref/ai-coding-glossary/training/&quot; class=&quot;ref-link&quot;&gt;training&lt;/a&gt; a new model on a list of images, validating it against an image with known faces, and then testing it with a brand-new image. After finishing this tutorial, you’ll have your very own application that works just like this.&lt;/p&gt;
&lt;h2 id=&quot;project-overview&quot;&gt;Project Overview&lt;a class=&quot;headerlink&quot; href=&quot;#project-overview&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Your program will be a typical command-line application, but it’ll offer some impressive capabilities. To accomplish this feat, you’ll first use &lt;strong&gt;face detection&lt;/strong&gt;, or the ability to find faces in an image. Then, you’ll implement &lt;strong&gt;face recognition&lt;/strong&gt;, which is the ability to identify detected faces in an image. To that end, your program will do three primary tasks:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Train a new face recognition model.&lt;/li&gt;
&lt;li&gt;Validate the model.&lt;/li&gt;
&lt;li&gt;Test the model.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When &lt;strong&gt;training&lt;/strong&gt;, your face recognizer will need to open and read many image files. It’ll also need to know who appears in each one. To accomplish this, you’ll set up a directory structure to give your program information about the data. Specifically, your project directory will contain three data directories:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;training/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;validation/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;output/&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can put images directly into &lt;code&gt;validation/&lt;/code&gt;. For &lt;code&gt;training/&lt;/code&gt;, you should have images separated by subject into directories with the subject’s name.&lt;/p&gt;
&lt;p&gt;Setting your training directory up this way will allow you to give your face recognizer the information that it needs to associate a label—the person pictured—with the underlying image data.&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; This strategy works well for training on images that contain a single face. If you want to train on images with multiple identifiable faces, then you’ll have to investigate an alternative strategy for marking the faces in the training images.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You’ll walk through this project step by step, starting with preparing your environment and data. After that, you’ll be ready to load your training data and get to work on training your model to recognize unlabeled faces.&lt;/p&gt;
&lt;p&gt;Once your app is able to do that, you’ll need a way to display your results. You’ll build a command-line interface so that users can interact with your app. &lt;/p&gt;
&lt;p&gt;Finally, you’ll run the app through all of its paces. This is of vital importance because it’ll help you see your application through the eyes of a user. That way, you can better understand how your application works in practice, a process that’s key to finding bugs.&lt;/p&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;To build this face recognition application, you &lt;em&gt;won’t&lt;/em&gt; need advanced linear algebra, deep machine learning algorithm knowledge, or even any experience with OpenCV, one of the leading Python libraries enabling a lot of computer vision work.&lt;/p&gt;
&lt;p&gt;Instead, you should have an intermediate-level understanding of Python. You should be comfortable with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Installing &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;third-party modules with &lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Using &lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;&lt;code&gt;argparse&lt;/code&gt; to create a command-line interface&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Opening and reading files with &lt;a href=&quot;https://realpython.com/python-pathlib/&quot;&gt;&lt;code&gt;pathlib&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Serializing and deserializing Python &lt;a href=&quot;/ref/glossary/object/&quot; class=&quot;ref-link&quot;&gt;objects&lt;/a&gt; with &lt;a href=&quot;https://realpython.com/python-pickle-module/&quot;&gt;&lt;code&gt;pickle&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/face-recognition-with-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/face-recognition-with-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>Primer on Python Decorators</title>
      <id>https://realpython.com/primer-on-python-decorators/</id>
      <link href="https://realpython.com/primer-on-python-decorators/"/>
      <updated>2026-09-01T14:00:00+00:00</updated>
      <summary>In this tutorial, you&#x27;ll look at what Python decorators are and how you define and use them. Decorators can make your code more readable and reusable. Come take a look at how decorators work under the hood and practice writing your own decorators.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python decorators allow you to modify or extend the behavior of functions and methods without changing their actual code. When you use a Python decorator, you wrap a function with another function, which takes the original function as an &lt;a href=&quot;/ref/glossary/argument/&quot; class=&quot;ref-link&quot;&gt;argument&lt;/a&gt; and returns its modified version. This technique provides a simple way to implement &lt;a href=&quot;/ref/glossary/higher-order-function/&quot; class=&quot;ref-link&quot;&gt;higher-order functions&lt;/a&gt; in Python, enhancing code reusability and readability.&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;Practical use cases&lt;/strong&gt; for decorators include &lt;a href=&quot;/ref/best-practices/logging/&quot; class=&quot;ref-link&quot;&gt;logging&lt;/a&gt;, enforcing access control, &lt;a href=&quot;/ref/computer-science-glossary/caching/&quot; class=&quot;ref-link&quot;&gt;caching&lt;/a&gt; results, and measuring execution time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom decorators&lt;/strong&gt; are written by defining a function that takes another function as an argument, defines a nested wrapper function, and returns the wrapper.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple decorators&lt;/strong&gt; can be applied to a single function by stacking them before the function definition.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;order of decorators&lt;/strong&gt; impacts the final output since each decorator wraps the next, influencing the behavior of the decorated function.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can find all the examples from this tutorial by downloading the accompanying materials 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/primer-on-python-decorators-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-primer-on-python-decorators-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to create and use Python decorators.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/power-of-decorators-fixed/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-power-of-decorators-fixed&quot; markdown&gt;Click here to get access to a free “The Power of Python Decorators” guide&lt;/a&gt; that shows you three advanced decorator patterns and techniques you can use to write cleaner and more Pythonic programs.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Decorators Cheat Sheet:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/decorators-cheatsheet/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-decorators-cheatsheet&quot; markdown&gt;Click here to get access to a free three-page Python decorators cheat sheet&lt;/a&gt; that summarizes the techniques explained in this tutorial.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Decorators Q&amp;amp;A Transcript:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/decorators-qa-2019/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-decorators-qa-2019&quot; markdown&gt;Click here to get access to a 25-page chat log from our Python decorators Q&amp;amp;A session&lt;/a&gt; in the Real Python Community Slack where we discussed common decorator questions.&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.8f1dcd28e216.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 “Primer on Python Decorators” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/decorators/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;Python Decorators&quot; src=&quot;https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Primer-on-Python-Decorators_Watermarked.d0da542fa3fc.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.8f1dcd28e216.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 position-relative&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/decorators/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Primer on Python Decorators&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;In this quiz, you&#x27;ll revisit the foundational concepts of what Python decorators are and how to create and use them.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;python-functions&quot;&gt;Python Functions&lt;a class=&quot;headerlink&quot; href=&quot;#python-functions&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In order to understand decorators, you must first understand some finer points of how &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt; work. There are many aspects to functions, but in the context of decorators, &lt;strong&gt;a function returns a value based on the given arguments&lt;/strong&gt;. Here’s a basic example:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&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.8f1dcd28e216.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;&amp;gt;&amp;gt;&amp;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;add_one&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;p&quot;&gt;):&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;... &lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;return&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;mi&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;...&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_one&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3&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.8f1dcd28e216.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 general, functions in Python may also have side effects rather than just turning an input into an output. &lt;a href=&quot;https://realpython.com/python-print/&quot;&gt;The &lt;code&gt;print()&lt;/code&gt; function&lt;/a&gt; is an example of this: it &lt;a href=&quot;https://realpython.com/python-return-statement/&quot;&gt;returns&lt;/a&gt; &lt;a href=&quot;https://realpython.com/null-in-python/&quot;&gt;&lt;code&gt;None&lt;/code&gt;&lt;/a&gt; while having the side effect of outputting something to the console. However, to understand decorators, it’s enough to think about functions as tools that turn given arguments into values.&lt;/p&gt;
&lt;h3 id=&quot;first-class-objects&quot;&gt;First-Class Objects&lt;a class=&quot;headerlink&quot; href=&quot;#first-class-objects&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In &lt;a href=&quot;https://realpython.com/python-functional-programming/&quot;&gt;functional programming&lt;/a&gt;, you work almost entirely with pure functions that don’t have side effects. While not a purely functional language, Python supports many functional programming concepts, including treating functions as &lt;a href=&quot;https://dbader.org/blog/python-first-class-functions&quot;&gt;first-class objects&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This means that &lt;em&gt;functions can be passed around and used as arguments&lt;/em&gt;, just like &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;any other object like &lt;code&gt;str&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;list&lt;/code&gt;, and so on&lt;/a&gt;. Consider the following three functions:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;greeters.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;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;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;be_awesome&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;Yo &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;, together we&#x27;re the awesomest!&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;greet_bob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;greeter_func&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;greeter_func&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Bob&quot;&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.8f1dcd28e216.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;Here, &lt;code&gt;say_hello()&lt;/code&gt; and &lt;code&gt;be_awesome()&lt;/code&gt; are regular functions that expect a name given as a string. The &lt;code&gt;greet_bob()&lt;/code&gt; function, however, expects a function as its argument. You can, for example, pass it the &lt;code&gt;say_hello()&lt;/code&gt; or the &lt;code&gt;be_awesome()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;To test your functions, you can run your code in interactive mode. You do this with the &lt;code&gt;-i&lt;/code&gt; flag. For example, if your code is in a file named &lt;code&gt;greeters.py&lt;/code&gt;, then you run &lt;code&gt;python -i greeters.py&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&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.8f1dcd28e216.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;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;greet_bob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;say_hello&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;Hello Bob&#x27;&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;greet_bob&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;be_awesome&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&quot;Yo Bob, together we&#x27;re the awesomest!&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.8f1dcd28e216.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;Note that &lt;code&gt;greet_bob(say_hello)&lt;/code&gt; refers to two functions, &lt;code&gt;greet_bob()&lt;/code&gt; and &lt;code&gt;say_hello&lt;/code&gt;, but in different ways. The &lt;code&gt;say_hello&lt;/code&gt; function is named without parentheses. This means that only a reference to the function is passed. The function isn’t executed. The &lt;code&gt;greet_bob()&lt;/code&gt; function, on the other hand, is written with parentheses, so it will be called as usual.&lt;/p&gt;
&lt;p&gt;This is an important distinction that’s crucial for how functions work as first-class objects. A function name without parentheses is a reference to a function, while a function name with trailing parentheses calls the function and refers to its return value.&lt;/p&gt;
&lt;h3 id=&quot;inner-functions&quot;&gt;Inner Functions&lt;a class=&quot;headerlink&quot; href=&quot;#inner-functions&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It’s possible to &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;define functions&lt;/a&gt; &lt;em&gt;inside other functions&lt;/em&gt;. Such functions are called &lt;a href=&quot;https://realpython.com/inner-functions-what-are-they-good-for/&quot;&gt;inner functions&lt;/a&gt;. Here’s an example of a function with two inner functions:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;inner_functions.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;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;parent&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;s2&quot;&gt;&quot;Printing from parent()&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;first_child&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;s2&quot;&gt;&quot;Printing from first_child()&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;second_child&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;s2&quot;&gt;&quot;Printing from second_child()&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;second_child&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;first_child&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.8f1dcd28e216.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/primer-on-python-decorators/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/primer-on-python-decorators/ »&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>How to Get Started With Ollama</title>
      <id>https://realpython.com/courses/get-started-with-ollama/</id>
      <link href="https://realpython.com/courses/get-started-with-ollama/"/>
      <updated>2026-09-01T14:00:00+00:00</updated>
      <summary>Learn how to install Ollama, pull local models, and connect them to your Python code using the chat and text generation interfaces.</summary>
      <content type="html">
        &lt;p&gt;Integrating local large language models (LLMs) into your Python projects with Ollama is a great way to improve privacy, reduce costs, and build offline-capable AI-powered apps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ollama&lt;/strong&gt; is an open-source platform that makes it straightforward to run modern LLMs locally on your machine. Once you&amp;rsquo;ve set up Ollama and pulled the models you want to use, you can connect to them from Python using the &lt;code&gt;ollama&lt;/code&gt; library.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll integrate local LLMs into your Python projects using the Ollama platform and its Python SDK.&lt;/p&gt;
&lt;p&gt;First, you&amp;rsquo;ll set up Ollama and pull a couple of LLMs. Then, you&amp;rsquo;ll learn how to use chat and text generation from your Python code. These skills will enable you to build AI-powered apps that run locally, ensuring better privacy and reducing costs.&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: Automating EDA With fg-data-profiling</title>
      <id>https://realpython.com/quizzes/automating-eda-with-fg-data-profiling/</id>
      <link href="https://realpython.com/quizzes/automating-eda-with-fg-data-profiling/"/>
      <updated>2026-09-01T12:00:00+00:00</updated>
      <summary>Check what you know about automating exploratory data analysis with fg-data-profiling, from building reports to profiling time series.</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/courses/automating-eda-with-fg-data-profiling/&quot;&gt;Automating EDA With fg-data-profiling&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to turn a pandas DataFrame into an
interactive exploratory data analysis report, how to read the statistics, correlations,
and alerts that the report contains, and how to export it to HTML or view it inline in a
Jupyter notebook.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also cover the options that unlock time series analysis, the workflow for comparing
two datasets in a single report, and the arguments that let you attach your own metadata.&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>Async Programming in Python: From Generators to asyncio</title>
      <id>https://realpython.com/python-async-features/</id>
      <link href="https://realpython.com/python-async-features/"/>
      <updated>2026-08-31T14:00:00+00:00</updated>
      <summary>Learn how Python async programming works. Write async functions with async and await, and run slow I/O operations concurrently with asyncio.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;&lt;strong&gt;Python async&lt;/strong&gt; programming lets a single-threaded program stay busy while it waits on slow work, such as a network request, a database query, or a file read. Instead of blocking the CPU until the result arrives, your code hands control back to an &lt;strong&gt;event loop&lt;/strong&gt;, which runs other work in the meantime.&lt;/p&gt;
&lt;p&gt;You write asynchronous code with the &lt;code&gt;async&lt;/code&gt; and &lt;code&gt;await&lt;/code&gt; keywords and run it with &lt;code&gt;asyncio&lt;/code&gt; from the standard library. An &lt;strong&gt;async function&lt;/strong&gt; is one you define with &lt;code&gt;async def&lt;/code&gt;. Calling it doesn’t run it. It returns a coroutine that runs only once you await it or schedule it on the event loop.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll arrive at that model one step at a time, starting from ordinary synchronous code and adding a single idea at each stage. Along the way, you’ll see how far you can get with generators alone and where &lt;code&gt;asyncio&lt;/code&gt; takes over.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How &lt;strong&gt;synchronous&lt;/strong&gt; and &lt;strong&gt;asynchronous&lt;/strong&gt; programming differ&lt;/li&gt;
&lt;li&gt;What &lt;strong&gt;blocking&lt;/strong&gt; and &lt;strong&gt;non-blocking&lt;/strong&gt; code mean in practice&lt;/li&gt;
&lt;li&gt;How the &lt;strong&gt;event loop&lt;/strong&gt; schedules tasks, and how to inspect it while it runs&lt;/li&gt;
&lt;li&gt;How to write an &lt;strong&gt;async function&lt;/strong&gt; with &lt;code&gt;async&lt;/code&gt; and &lt;code&gt;await&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;How to run tasks concurrently with &lt;strong&gt;&lt;code&gt;asyncio.TaskGroup&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The examples run on Python 3.11 and later, and the output shown comes from Python 3.14. You can grab a copy of the code to follow along by clicking the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Download Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/async-features/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-async-features&quot; markdown&gt;Click here to download the code you’ll use&lt;/a&gt; to learn about async features in Python 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.8f1dcd28e216.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 “Async Programming in Python: From Generators to asyncio” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python-async-features/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #ffc873;&quot; alt=&quot;Async Programming in Python: From Generators to asyncio&quot; src=&quot;https://files.realpython.com/media/Understanding-Asynchronous-Programming-in-Python_Watermarked.4b590c7c03ea.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Understanding-Asynchronous-Programming-in-Python_Watermarked.4b590c7c03ea.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Understanding-Asynchronous-Programming-in-Python_Watermarked.4b590c7c03ea.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Understanding-Asynchronous-Programming-in-Python_Watermarked.4b590c7c03ea.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Understanding-Asynchronous-Programming-in-Python_Watermarked.4b590c7c03ea.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.8f1dcd28e216.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 position-relative&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-async-features/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Async Programming in Python: From Generators to asyncio&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of async features in Python, including async and await, blocking versus non-blocking code, and the event loop.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;understanding-asynchronous-programming&quot;&gt;Understanding Asynchronous Programming&lt;a class=&quot;headerlink&quot; href=&quot;#understanding-asynchronous-programming&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;synchronous program&lt;/strong&gt; is executed one step at a time. Even with conditional branching, loops, and function calls, you can still think about the code in terms of taking one execution step at a time. When each step is complete, the program moves on to the next one.&lt;/p&gt;
&lt;p&gt;Here are two examples of programs that work this way:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Batch-processing programs&lt;/strong&gt; are often created as synchronous programs. You get some input, process it, and create some output. Steps follow one after the other until the program reaches the desired output. The program only needs to pay attention to the steps and their order.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Quick automation scripts&lt;/strong&gt; are small processes that often run in a terminal. These scripts create something, transform one thing into something else, generate a report, or perhaps list out some data. This can be expressed as a series of program steps that are executed sequentially until the program is done.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;An &lt;strong&gt;asynchronous program&lt;/strong&gt; behaves differently. It still takes one execution step at a time. The difference is that the system may not wait for an execution step to be completed before moving on to the next one.&lt;/p&gt;
&lt;p&gt;This means that the program will move on to future execution steps even though a previous step hasn’t yet finished and is still running elsewhere. This also means that the program knows what to do when a previous step does finish running.&lt;/p&gt;
&lt;p&gt;Why would you want to write a program in this manner? The rest of this tutorial will help you answer that question and give you the tools you need to elegantly solve interesting asynchronous problems.&lt;/p&gt;
&lt;p&gt;To understand the difference between synchronous and asynchronous programming, consider a real-world example: &lt;em&gt;a web server&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;A web server’s basic unit of work is, more or less, the same as batch processing. The server will get some input, process it, and create the output. Written as a synchronous program, this would create a working web server.&lt;/p&gt;
&lt;p&gt;It would also be an &lt;em&gt;absolutely terrible&lt;/em&gt; web server.&lt;/p&gt;
&lt;p&gt;Why? In this case, one unit of work (input, process, output) is not the only purpose. The real purpose is to handle hundreds or even thousands of units of work as quickly as possible. This can happen over long periods of time, and several work units may even arrive all at once.&lt;/p&gt;
&lt;p&gt;Can a synchronous web server be made better? Sure, you could optimize the execution steps so that all the work coming in is handled as quickly as possible. Unfortunately, there are limitations to this approach. The result could be a web server that doesn’t respond fast enough, can’t handle enough work, or even times out when work gets stacked up.&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; There are other limitations you might see if you tried to optimize the above approach. These include network speed, file &lt;a href=&quot;/ref/glossary/input-output/&quot; class=&quot;ref-link&quot;&gt;I/O&lt;/a&gt; speed, database query speed, and the speed of other connected services, to name a few. What these all have in common is that they are all I/O functions. All of these items are orders of magnitude slower than the CPU’s processing speed.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In a synchronous program, if an execution step starts a database query, then the CPU is essentially idle until the query results come back. For batch-oriented programs, this isn’t a priority most of the time. Processing the results of that I/O operation is the goal. Often, this can take longer than the I/O operation itself. Any optimization efforts would be focused on the processing work, not the I/O.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/ref/glossary/asynchronous-programming/&quot; class=&quot;ref-link&quot;&gt;Asynchronous programming&lt;/a&gt; techniques allow your programs to take advantage of relatively slow I/O processes by freeing the CPU to do other work.&lt;/p&gt;
&lt;p&gt;If you’d like a real-world analogy before you start writing code, then expand the section below.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card25e1fb&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-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapse25e1fb&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse25e1fb&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;Thinking Differently About Programming: A Parent&#x27;s Analogy&lt;/span&gt;&lt;span class=&quot;float-end 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-bs-parent=&quot;#collapse_card25e1fb&quot; id=&quot;collapse25e1fb&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;When you start learning asynchronous programming, you’ll run into a lot of discussion about blocking and &lt;a href=&quot;/ref/glossary/non-blocking-operation/&quot; class=&quot;ref-link&quot;&gt;non-blocking&lt;/a&gt; code. Those terms stay abstract until you connect them to something familiar.&lt;/p&gt;
&lt;p&gt;Writing asynchronous programs asks you to think differently about a program’s flow. That shift can be hard to wrap your head around at first, but the real world is almost entirely asynchronous, and so is the way you move through it.&lt;/p&gt;
&lt;p&gt;Imagine you’re a parent trying to do several things at once. You have to balance the checkbook, do the laundry, and keep an eye on the kids. Somehow, you manage all three without much conscious effort, following a few strategies to keep everything moving along:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Balancing the checkbook is a &lt;strong&gt;synchronous&lt;/strong&gt; task, because one step follows another until it’s done. You’re doing all the work yourself.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Doing the laundry, though, lets you break away from the checkbook. You unload the dryer, move clothes from the washer to the dryer, and start another load in the washer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Working with the washer and dryer is a synchronous task, but the bulk of the work happens &lt;em&gt;after&lt;/em&gt; the washer and dryer are started. Once you’ve got them going, you can walk away and get back to the checkbook task. At this point, the washer and dryer tasks have become &lt;strong&gt;asynchronous&lt;/strong&gt;. The washer and dryer will run independently until the buzzer goes off (notifying you that the task needs attention).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Watching your kids is another asynchronous task. Once they are set up and playing, they can do so independently for the most part. This changes when someone needs attention, like when someone gets hungry or hurt. When one of your kids yells in alarm, you react. The kids are a long-running task with high priority. Watching them supersedes any other tasks you might be doing, like the checkbook or laundry.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These examples illustrate blocking and non-blocking tasks. In programming terms, you’re the CPU. While you’re moving the laundry around, you’re busy and blocked from doing other work, like balancing the checkbook. That’s fine, because the task is quick.&lt;/p&gt;
&lt;p&gt;On the other hand, starting the washer and dryer doesn’t block you from performing other tasks. It’s an asynchronous task because you don’t have to wait for it to finish. Once it’s started, you can go back to something else. This is called a context switch: the context of what you’re doing has changed, and the machine’s buzzer will notify you sometime in the future when the laundry task is complete.&lt;/p&gt;
&lt;p&gt;As a human, this is how you work all the time. You naturally juggle multiple things at once, often without thinking about it. As a developer, the trick is how to translate this kind of behavior into code that does the same kind of thing.&lt;/p&gt;
&lt;p&gt;If you recognize yourself (or your parents) in the example above, then that’s great! You’ve got a leg up in understanding asynchronous programming. Again, you’re able to switch contexts between competing tasks fairly easily, picking up some tasks and resuming others. Now you’re going to try and program this behavior into virtual parents!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Experiment #1: The Synchronous Parent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;How would you create a parent program to do the above tasks in a completely synchronous manner? Since watching the kids is a high-priority task, perhaps your program would do just that. The parent watches over the kids while waiting for something to happen that might need their attention. However, nothing else (like the checkbook or laundry) would get done in this scenario.&lt;/p&gt;
&lt;p&gt;Now, you can reprioritize the tasks any way you want, but only one of them would happen at any given time. That’s the result of a synchronous, step-by-step approach. Like the synchronous web server described above, this would work, but it might not be the best way to live.&lt;/p&gt;
&lt;p&gt;The parent couldn’t complete any other task until the kids fell asleep. Everything else would happen afterward, well into the night. A couple of weeks of this and many real parents might jump out the window!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Experiment #2: The Polling Parent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you used &lt;a href=&quot;https://en.wikipedia.org/wiki/Polling_(computer_science)&quot;&gt;polling&lt;/a&gt;, then you could change things up so that multiple tasks are completed. In this approach, the parent would periodically break away from the current task and check to see if any other tasks need attention.&lt;/p&gt;
&lt;p&gt;Say the polling interval is fifteen minutes. Every fifteen minutes, your parent checks whether the washer, dryer, or kids need attention. If not, then they go back to the checkbook. If any of those tasks &lt;em&gt;do&lt;/em&gt; need attention, then they handle it before returning to the checkbook. The cycle repeats until the next timeout of the polling loop.&lt;/p&gt;
&lt;p&gt;This approach also works, since multiple tasks are getting attention. However, there are a couple of problems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The parent may spend a lot of time checking on things that don’t need attention:&lt;/strong&gt; The washer and dryer haven’t yet finished, and the kids don’t need any attention unless something unexpected happens.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The parent may miss completed tasks that do need attention:&lt;/strong&gt; For instance, if the washer finished its cycle at the beginning of the polling interval, then it wouldn’t get any attention for up to fifteen minutes! What’s more, watching the kids is supposedly the highest-priority task. They couldn’t tolerate fifteen minutes with no attention when something might be going drastically wrong.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You could address these issues by shortening the polling interval, but now your parent (the CPU) would be spending more time context switching between tasks. This is when you start to hit a point of diminishing returns. (Once again, a couple of weeks living like this and, well… See the previous comment about windows and jumping.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Experiment #3: The Threading Parent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;“If I could only clone myself…” If you’re a parent, then you’ve probably had similar thoughts! Since you’re programming virtual parents, you can essentially do this by using threading. This is a mechanism that allows multiple sections of one program to run at the same time. Each section of code that runs independently is known as a &lt;a href=&quot;/ref/glossary/thread/&quot; class=&quot;ref-link&quot;&gt;thread&lt;/a&gt;, and all threads share the same memory space.&lt;/p&gt;
&lt;p&gt;If you think of each task as a part of one program, then you can separate them and run them as threads. In other words, you can “clone” the parent, creating one instance for each task: watching the kids, monitoring the washer, monitoring the dryer, and balancing the checkbook. All of these “clones” are running independently.&lt;/p&gt;
&lt;p&gt;This sounds like a pretty nice solution, but there are some issues here as well. One is that you’ll have to explicitly tell each parent instance what to do in your program. This can lead to some problems since all instances share everything in the program space.&lt;/p&gt;
&lt;p&gt;For example, say that Parent A is monitoring the dryer. The clothes are dry, so Parent A takes control of the dryer and begins unloading them.&lt;/p&gt;
&lt;p&gt;At the same time, Parent B sees that the washer is done and takes control of it to remove the wet clothes. But Parent B also needs the dryer to put those clothes inside, and Parent A is still holding it.&lt;/p&gt;
&lt;p&gt;After a short while, Parent A has finished unloading clothes. Now they want to take control of the washer and start moving clothes into the empty dryer. This can’t happen, either, because Parent B currently has control of the washer!&lt;/p&gt;
&lt;p&gt;These two parents are now &lt;a href=&quot;https://realpython.com/intro-to-python-threading/#deadlock&quot;&gt;deadlocked&lt;/a&gt;. Both have control of their own resource &lt;em&gt;and&lt;/em&gt; want control of the other resource. They’ll wait forever for the other parent instance to release control. As the programmer, you’d have to write code to work this situation out.&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; Threaded programs allow you to create multiple, parallel paths of execution that all share the same memory space. This is both an advantage and a disadvantage. Any memory shared between threads is subject to one or more threads trying to use the same shared memory at the same time. This can lead to data corruption, data read in an invalid state, and data that’s just messy in general.&lt;/p&gt;
&lt;p&gt;In threaded programming, the context switch happens under the system’s control, not the programmer’s. The system controls when to switch contexts and when to give threads access to shared data, thereby changing the context of how the memory is being used. All of these kinds of problems are manageable in threaded code, but it’s difficult to get right and hard to debug when it’s wrong.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Here’s another issue that might arise from threading. Suppose that a child gets hurt and needs to be taken to urgent care. Parent C has been assigned the task of watching over the kids, so they take the child right away. At the urgent care, Parent C needs to write a fairly large check to cover the cost of seeing the doctor.&lt;/p&gt;
&lt;p&gt;Meanwhile, Parent D is at home working on the checkbook. They’re unaware of this large check being written, so they’re very surprised when the family checking account is suddenly overdrawn!&lt;/p&gt;
&lt;p&gt;Remember, these two parent instances are working within the same program. The family checking account is a shared resource, so you’d have to work out a way for the child-watching parent to inform the checkbook-balancing parent. Otherwise, you’d need to provide some kind of locking mechanism so that the checkbook resource can only be used by one parent at a time.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-async-features/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-async-features/ »&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: Async Programming in Python: From Generators to asyncio</title>
      <id>https://realpython.com/quizzes/python-async-features/</id>
      <link href="https://realpython.com/quizzes/python-async-features/"/>
      <updated>2026-08-31T12:00:00+00:00</updated>
      <summary>Test your understanding of async features in Python, including async and await, blocking versus non-blocking code, and the event loop.</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-async-features/&quot;&gt;Async Programming in Python: From Generators to asyncio&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit the concepts of synchronous and asynchronous programs,
why you might want to write an asynchronous program, and how to use Python async features.&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 #309: Exploring Complex Systems &amp; Maintainable Data Science Pipelines</title>
      <id>https://realpython.com/podcasts/rpp/309/</id>
      <link href="https://realpython.com/podcasts/rpp/309/"/>
      <updated>2026-08-28T12:00:00+00:00</updated>
      <summary>What are the key characteristics of complex systems, and what are practical patterns for tackling complex coding problems? 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 are the key characteristics of complex systems, and what are practical patterns for tackling complex coding problems? 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: Rock, Paper, Scissors With Python: A Command Line Game</title>
      <id>https://realpython.com/quizzes/python-rock-paper-scissors-game/</id>
      <link href="https://realpython.com/quizzes/python-rock-paper-scissors-game/"/>
      <updated>2026-08-28T12:00:00+00:00</updated>
      <summary>Check your understanding of building a command line rock paper scissors game in Python, from player input and loops to enums and dictionary rules.</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/courses/python-rock-paper-scissors-game/&quot;&gt;Rock, Paper, Scissors With Python: A Command Line Game&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to collect and normalize player
input, replay rounds with a &lt;code&gt;while&lt;/code&gt; loop, decide a winner with dictionary-based
rules, and swap fragile hard-coded strings for &lt;code&gt;IntEnum&lt;/code&gt; members.&lt;/p&gt;
&lt;p&gt;Game programming is a friendly way to practice skills you&amp;rsquo;ll use everywhere else,
so take your throw.&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: Getting Started With Claude Code</title>
      <id>https://realpython.com/quizzes/getting-started-claude-code/</id>
      <link href="https://realpython.com/quizzes/getting-started-claude-code/"/>
      <updated>2026-08-27T12:00:00+00:00</updated>
      <summary>Test your Claude Code basics: install it, set it up, work with CLAUDE.md, and use Git to stay in control of your changes.</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/courses/getting-started-claude-code/&quot;&gt;Getting Started With Claude Code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how Claude Code differs from Claude Chat, how to install and set it up, what belongs in a &lt;code&gt;CLAUDE.md&lt;/code&gt; file, and how Git keeps you in control of the changes that Claude Code makes.&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: Sampling Profiler</title>
      <id>https://realpython.com/python315-sampling-profiler/</id>
      <link href="https://realpython.com/python315-sampling-profiler/"/>
      <updated>2026-08-26T14:00:00+00:00</updated>
      <summary>Explore Python 3.15&#x27;s new sampling profiler and learn low-overhead profiling of scripts, threads, and live production processes.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python 3.15 ships with a brand-new &lt;code&gt;profiling&lt;/code&gt; package defined in PEP 799. It finally retires the ancient &lt;code&gt;profile&lt;/code&gt; module, gives &lt;code&gt;cProfile&lt;/code&gt; a new home under &lt;code&gt;profiling.tracing&lt;/code&gt;, and adds &lt;code&gt;profiling.sampling&lt;/code&gt;, a statistical sampling profiler code-named Tachyon. You can point it at a script, a module, or even a live production process, and it’ll tell you where the time goes with virtually no overhead.&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; organizes its profilers under a new &lt;code&gt;profiling&lt;/code&gt; package, deprecating the old &lt;code&gt;profile&lt;/code&gt; module.&lt;/li&gt;
&lt;li&gt;The new &lt;strong&gt;sampling profiler&lt;/strong&gt; peeks at your program’s call stack from the outside, so your code runs at full speed while being profiled.&lt;/li&gt;
&lt;li&gt;You can &lt;strong&gt;attach to a running process&lt;/strong&gt; by its PID without restarting or modifying the target, as long as you have the right permissions.&lt;/li&gt;
&lt;li&gt;Sampling &lt;strong&gt;modes&lt;/strong&gt; let you separate CPU work from I/O waits and isolate code that runs while holding the GIL or handling an exception.&lt;/li&gt;
&lt;li&gt;The profiler supports many &lt;strong&gt;output formats&lt;/strong&gt;, including interactive flame graphs, line-level heatmaps, and a live top-like terminal dashboard.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First, you’ll get a quick refresher on how tracing and sampling profilers differ. Then, you’ll set up Python 3.15 with &lt;a href=&quot;/ref/tools/uv/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;uv&lt;/code&gt;&lt;/a&gt; and profile a small 3D renderer with deliberately planted bottlenecks. Along the way, you’ll try out &lt;a href=&quot;/ref/glossary/thread/&quot; class=&quot;ref-link&quot;&gt;threads&lt;/a&gt;, &lt;a href=&quot;/ref/glossary/asynchronous-programming/&quot; class=&quot;ref-link&quot;&gt;async&lt;/a&gt; tasks, native-code boundaries, and the visualizations the profiler offers.&lt;/p&gt;
&lt;p&gt;To get the most out of this tutorial, you should be comfortable running commands in a &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; because that’s where the profiler lives. It’ll also help if you’ve dabbled in &lt;a href=&quot;https://realpython.com/intro-to-python-threading/&quot;&gt;threading&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/async-io-python/&quot;&gt;asyncio&lt;/a&gt; before, as you’ll profile both kinds of &lt;a href=&quot;/ref/best-practices/concurrency/&quot; class=&quot;ref-link&quot;&gt;concurrency&lt;/a&gt;. Prior &lt;a href=&quot;https://realpython.com/python-profiling/&quot;&gt;profiling&lt;/a&gt; experience is a plus, not a requirement. You’ll review the essential theory as you go.&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 examples in this tutorial use Python 3.15.0b4, so some details may shift slightly before the &lt;a href=&quot;https://peps.python.org/pep-0790/&quot;&gt;final release&lt;/a&gt; in October.&lt;/p&gt;
&lt;/div&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-sampling-profiler-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python315-sampling-profiler-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to explore the sampling profiler in Python 3.15.&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.8f1dcd28e216.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: Sampling Profiler” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/python315-sampling-profiler/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;A person holding a notebook plugs a cable into a bank of profiling machines showing a sampling timeline, a snapshot lever, waveform readouts, a flame graph, and a Python logo.&quot; src=&quot;https://files.realpython.com/media/Python-3.15-Preview-New-Profiling-Module_Watermarked.27cdafb337e4.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-New-Profiling-Module_Watermarked.27cdafb337e4.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-3.15-Preview-New-Profiling-Module_Watermarked.27cdafb337e4.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-3.15-Preview-New-Profiling-Module_Watermarked.27cdafb337e4.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-3.15-Preview-New-Profiling-Module_Watermarked.27cdafb337e4.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.8f1dcd28e216.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 position-relative&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-sampling-profiler/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python 3.15 Preview: Sampling Profiler&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Python 3.15&#x27;s new sampling profiler, from CPU and GIL modes to flame graphs, heatmaps, and attaching to a live process.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;get-to-know-pythons-new-profiling-package&quot;&gt;Get to Know Python’s New &lt;code&gt;profiling&lt;/code&gt; Package&lt;a class=&quot;headerlink&quot; href=&quot;#get-to-know-pythons-new-profiling-package&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For decades, Python has shipped two deterministic profilers in the &lt;a href=&quot;/ref/glossary/standard-library/&quot; class=&quot;ref-link&quot;&gt;standard library&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;/ref/stdlib/profile/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;profile&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/ref/stdlib/cprofile/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;cProfile&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The first one is a pure-Python implementation that’s mostly of educational value, while the second one does the same job in the &lt;a href=&quot;https://realpython.com/c-for-python-programmers/&quot;&gt;C programming language&lt;/a&gt; at a fraction of the cost. &lt;a href=&quot;https://peps.python.org/pep-0799/&quot;&gt;PEP 799&lt;/a&gt; tidies up this corner in Python 3.15 by introducing a dedicated &lt;code&gt;profiling&lt;/code&gt; &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;package&lt;/a&gt; with two &lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;submodules&lt;/a&gt;:&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;Module&lt;/th&gt;
&lt;th&gt;What It Is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;profiling.tracing&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The deterministic tracing profiler formerly known as &lt;code&gt;cProfile&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;profiling.sampling&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The new statistical sampling profiler, code-named Tachyon&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The old modules don’t disappear overnight, though. The &lt;a href=&quot;https://realpython.com/python-profiling/#cprofile-collect-detailed-runtime-statistics&quot;&gt;&lt;code&gt;cProfile&lt;/code&gt;&lt;/a&gt; module sticks around indefinitely as a thin alias, so your existing tooling won’t break. On the other hand, the pure-Python &lt;code&gt;profile&lt;/code&gt; module enters its retirement. Importing it now triggers a warning, and Python 3.17 will remove it entirely:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&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.8f1dcd28e216.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;&amp;gt;&amp;gt;&amp;gt; &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;profile&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;python-input-0&amp;gt;:1: DeprecationWarning: The profile module is deprecated&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;⮑ and will be removed in Python 3.17. Use profiling.tracing (or cProfile)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;⮑ for tracing profilers instead.&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &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;cProfile&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &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;profiling.tracing&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cProfile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Profile&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;profiling&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tracing&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Profile&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.8f1dcd28e216.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 comparison in the last line proves that &lt;code&gt;cProfile&lt;/code&gt; and &lt;code&gt;profiling.tracing&lt;/code&gt; expose the very same &lt;a href=&quot;/ref/glossary/class/&quot; class=&quot;ref-link&quot;&gt;class&lt;/a&gt;, so the two names are interchangeable. If you’d like a refresher on using the tracing profiler and interpreting its output, then check out &lt;a href=&quot;https://realpython.com/python-profiling/&quot;&gt;Profiling in Python&lt;/a&gt;, which walks through &lt;code&gt;cProfile&lt;/code&gt; and friends in detail.&lt;/p&gt;
&lt;p&gt;The package reorganization in the standard library is the boring part of PEP 799. The interesting part is &lt;code&gt;profiling.sampling&lt;/code&gt;, and that’s what you’ll spend the rest of this tutorial on.&lt;/p&gt;
&lt;h2 id=&quot;compare-tracing-and-sampling-profilers&quot;&gt;Compare Tracing and Sampling Profilers&lt;a class=&quot;headerlink&quot; href=&quot;#compare-tracing-and-sampling-profilers&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you fire up the new sampling profiler, it helps to know how it differs from its tracing counterpart. Both tools answer the same question, namely where your program spends most of its time. They just gather evidence in different ways. That difference dictates when you should reach for each of them. Here’s the thirty-second version of the theory before you dive deeper.&lt;/p&gt;
&lt;h3 id=&quot;how-tracing-profilers-work&quot;&gt;How Tracing Profilers Work&lt;a class=&quot;headerlink&quot; href=&quot;#how-tracing-profilers-work&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A &lt;strong&gt;deterministic tracing profiler&lt;/strong&gt; hooks into the &lt;a href=&quot;/ref/glossary/interpreter/&quot; class=&quot;ref-link&quot;&gt;interpreter&lt;/a&gt; and registers a &lt;a href=&quot;/ref/glossary/callback/&quot; class=&quot;ref-link&quot;&gt;callback&lt;/a&gt; that runs on every single function call and return. Nothing escapes it. The resulting numbers are exact, down to how many times each function ran.&lt;/p&gt;
&lt;p&gt;You can watch this happen below. Press play, and the profiler fires a hook on every call and return of a small demo program:&lt;/p&gt;
&lt;div&gt;
  &lt;widget-embed src=&quot;/widgets/tracing-profiler-timeline/1784287422/&quot; slug=&quot;tracing-profiler-timeline&quot; class=&quot;border rounded&quot; title=&quot;How a Tracing Profiler Sees Your Program&quot;&gt;
    &lt;div class=&quot;widget-embed__fallback&quot; data-widget-fallback&gt;
      Interactive diagram — enable JavaScript to view.
    &lt;/div&gt;
  &lt;/widget-embed&gt;
&lt;/div&gt;

&lt;p&gt;That precision comes at a price. The constant interruptions can slow your program down severalfold and, worse, distort the measurements themselves. Cheap functions called millions of times suddenly look expensive because the profiler’s bookkeeping dwarfs their actual work. That’s why running a tracing profiler against a production workload is rarely an option.&lt;/p&gt;
&lt;h3 id=&quot;how-sampling-profilers-work&quot;&gt;How Sampling Profilers Work&lt;a class=&quot;headerlink&quot; href=&quot;#how-sampling-profilers-work&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python315-sampling-profiler/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python315-sampling-profiler/ »&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: Sampling Profiler</title>
      <id>https://realpython.com/quizzes/python315-sampling-profiler/</id>
      <link href="https://realpython.com/quizzes/python315-sampling-profiler/"/>
      <updated>2026-08-26T12:00:00+00:00</updated>
      <summary>Test your understanding of Python 3.15&#x27;s new sampling profiler, from CPU and GIL modes to flame graphs, heatmaps, and attaching to a live process.</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-sampling-profiler/&quot;&gt;Python 3.15 Preview: Sampling Profiler&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how a sampling profiler differs from a
tracing one, how to split wall-clock time from CPU time, how to spot which thread is
hogging the GIL, how to read flame graphs and line-level heatmaps, and how to attach the
profiler to a process that&amp;rsquo;s already running.&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 Python print() Function: Go Beyond the Basics</title>
      <id>https://realpython.com/courses/python-print/</id>
      <link href="https://realpython.com/courses/python-print/"/>
      <updated>2026-08-25T14:00:00+00:00</updated>
      <summary>Learn about Python&#x27;s print() function, discover its lesser-known features, avoid common mistakes, and know when to use a better alternative.</summary>
      <content type="html">
        &lt;p&gt;If you&amp;rsquo;re like most Python users, including us, then you probably started your Python journey by learning about &lt;strong&gt;&lt;code&gt;print()&lt;/code&gt;&lt;/strong&gt;. It helped you write your very own &lt;code&gt;Hello World&lt;/code&gt; one-liner. You can use it to display formatted messages onto the screen and perhaps find some bugs. But if you think that&amp;rsquo;s all there is to know about Python&amp;rsquo;s &lt;code&gt;print()&lt;/code&gt;, then you&amp;rsquo;re missing out on a lot!&lt;/p&gt;
&lt;p&gt;Keep reading to take full advantage of this underappreciated little function. This course will get you up to speed with using Python &lt;code&gt;print()&lt;/code&gt; effectively. Prepare for a deep dive as you go through the sections. You may be surprised how much &lt;code&gt;print()&lt;/code&gt; has to offer!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll know how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Avoid common mistakes with Python&amp;rsquo;s &lt;code&gt;print()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Deal with newlines, character encodings, and buffering&lt;/li&gt;
&lt;li&gt;Write text to files&lt;/li&gt;
&lt;li&gt;Mock &lt;code&gt;print()&lt;/code&gt; in unit tests&lt;/li&gt;
&lt;li&gt;Build advanced user interfaces in the terminal&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;print()&lt;/code&gt; was a major addition to Python 3, in which it replaced the old &lt;code&gt;print&lt;/code&gt; statement available in Python 2.&lt;/p&gt;
&lt;p&gt;There were a number of good reasons for that, as you&amp;rsquo;ll see shortly. Although this tutorial focuses on Python 3, it does show the old way of printing in Python for reference.&lt;/p&gt;
&lt;/div&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: The Python print() Function: Go Beyond the Basics</title>
      <id>https://realpython.com/quizzes/python-print-course/</id>
      <link href="https://realpython.com/quizzes/python-print-course/"/>
      <updated>2026-08-25T12:00:00+00:00</updated>
      <summary>Check what you know about Python&#x27;s print() function, including string formatting, escape sequences, file streams, and when to reach for logging instead.</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/courses/python-print/&quot;&gt;The Python print() Function: Go Beyond the Basics&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how string literals and f-strings work,
how the &lt;code&gt;sep&lt;/code&gt;, &lt;code&gt;end&lt;/code&gt;, and &lt;code&gt;flush&lt;/code&gt; arguments shape your output, and how to send that
output somewhere other than the screen.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also cover how to control the way your own objects display, how to style and
animate terminal text with escape sequences, and how to test and debug code that calls
&lt;code&gt;print()&lt;/code&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>How to Write an AGENTS.md File for a Python Project</title>
      <id>https://realpython.com/agents-md/</id>
      <link href="https://realpython.com/agents-md/"/>
      <updated>2026-08-24T14:00:00+00:00</updated>
      <summary>Learn how to write an AGENTS.md file so your AI coding agent produces idiomatic Python code that fits your project on the first try.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;An &lt;code&gt;AGENTS.md&lt;/code&gt; file gives your AI coding agent the context it needs to write code that fits your project’s guidelines. It’s a plain Markdown file at your project root where you can pin your Python version, dependency manager, coding conventions, and constraints.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll build one of these files section by section and watch your agent go from sloppy output to clean, idiomatic code.&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;An &lt;strong&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/strong&gt; file at your &lt;strong&gt;project root&lt;/strong&gt; loads into the agent’s &lt;strong&gt;context window&lt;/strong&gt; at the start of a session and stays there on every turn.&lt;/li&gt;
&lt;li&gt;The file’s format is &lt;strong&gt;freeform Markdown&lt;/strong&gt; with no required schema, and many coding agents read it.&lt;/li&gt;
&lt;li&gt;Pinning things like your &lt;strong&gt;dependency manager&lt;/strong&gt;, &lt;strong&gt;coding style&lt;/strong&gt;, and &lt;strong&gt;quality gates&lt;/strong&gt; stops the agent from guessing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Constraints&lt;/strong&gt; and &lt;strong&gt;ignore rules&lt;/strong&gt; keep the agent away from files it shouldn’t touch.&lt;/li&gt;
&lt;li&gt;A good &lt;strong&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/strong&gt; file helps your agent produce &lt;strong&gt;idiomatic code&lt;/strong&gt; on the first try, with no re-prompting.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To follow along, you should be comfortable with Python and have used an AI coding assistant like &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;, or &lt;a href=&quot;/ref/ai-coding-tools/cursor/&quot; class=&quot;ref-link&quot;&gt;Cursor&lt;/a&gt; before. If working with an agent is new to you, Real Python’s &lt;a href=&quot;https://realpython.com/courses/getting-started-claude-code/&quot;&gt;Getting Started With Claude Code&lt;/a&gt; video course covers the basics of the workflow.&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/agents-md-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-agents-md-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to build an AGENTS.md file that steers your AI coding agent toward clean, idiomatic Python that fits your project.&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.8f1dcd28e216.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 Write an AGENTS.md File for a Python Project” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/agents-md/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;A person points at a podium labeled AGENTS.md that lists house rules and bears a Python logo, facing three robots beside quality-check and step-queue panels.&quot; src=&quot;https://files.realpython.com/media/How-to-Write-an-AGENTS.md-File-for-a-Python-Project_Watermarked.48cd85ac2760.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-Write-an-AGENTS.md-File-for-a-Python-Project_Watermarked.48cd85ac2760.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Write-an-AGENTS.md-File-for-a-Python-Project_Watermarked.48cd85ac2760.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Write-an-AGENTS.md-File-for-a-Python-Project_Watermarked.48cd85ac2760.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Write-an-AGENTS.md-File-for-a-Python-Project_Watermarked.48cd85ac2760.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.8f1dcd28e216.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 position-relative&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/agents-md/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Write an AGENTS.md File for a Python Project&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check your understanding of how an AGENTS.md file gives your AI coding agent the project context it needs to write code that fits your project.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;running-an-ai-agent-in-your-python-project&quot;&gt;Running an AI Agent in Your Python Project&lt;a class=&quot;headerlink&quot; href=&quot;#running-an-ai-agent-in-your-python-project&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you can improve how an AI &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt; behaves, you need to see it misbehave. First, you’ll work with a small FastAPI project and ask the agent to add two endpoints to the &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt;, with no &lt;code&gt;AGENTS.md&lt;/code&gt; file in the repository to guide it. Then you’ll save the resulting code to compare against a second run.&lt;/p&gt;
&lt;p&gt;You’ll start with a read-only REST API for a collection of cars, built with &lt;a href=&quot;https://realpython.com/get-started-with-fastapi/&quot;&gt;FastAPI&lt;/a&gt;. It loads its data from a &lt;code&gt;cars.json&lt;/code&gt; file and exposes two endpoints: one to list every car and one to fetch a single car by its &lt;code&gt;id&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The complete file holds ten cars. An &lt;code&gt;engine_cc&lt;/code&gt; of &lt;code&gt;0&lt;/code&gt; marks a fully electric car, like the Tesla. Expand the section below to see the whole file and get familiar with the data’s shape:&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_cardc95b57&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-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapsec95b57&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapsec95b57&quot; markdown&gt;&lt;span class=&quot;float-start&quot; markdown&gt;The Complete &lt;code&gt;cars.json&lt;/code&gt; File&lt;/span&gt;&lt;span class=&quot;float-end 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-bs-parent=&quot;#collapse_cardc95b57&quot; id=&quot;collapsec95b57&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;json&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--purple&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;JSON&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;cars.json&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;p&quot;&gt;[&lt;/span&gt;
&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;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;1&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Ford&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Mustang&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;1969&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;290&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;5752&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Manual&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;2&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Chevrolet&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Corvette&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2020&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;490&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;6162&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;3&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Dodge&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Charger&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2023&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;370&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;5654&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;4&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Tesla&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Model S&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2022&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;670&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;0&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;5&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Jeep&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Wrangler&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2021&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;285&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;3604&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;6&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Ford&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;F-150&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2024&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;400&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;3496&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;7&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Cadillac&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Escalade&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2023&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;420&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;6162&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;8&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Chevrolet&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Camaro&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2018&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;455&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;6162&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Manual&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;9&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;GMC&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;Sierra&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2022&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;355&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;5328&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&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;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&quot;id&quot;&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;mi&quot;&gt;10&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;nt&quot;&gt;&quot;make&quot;&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;s2&quot;&gt;&quot;Chrysler&quot;&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;nt&quot;&gt;&quot;model&quot;&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;s2&quot;&gt;&quot;300&quot;&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;nt&quot;&gt;&quot;year&quot;&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;mi&quot;&gt;2019&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;nt&quot;&gt;&quot;horsepower&quot;&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;mi&quot;&gt;292&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;nt&quot;&gt;&quot;engine_cc&quot;&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;mi&quot;&gt;3604&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;nt&quot;&gt;&quot;transmission&quot;&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;s2&quot;&gt;&quot;Automatic&quot;&lt;/span&gt;
&lt;span class=&quot;w&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;/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.8f1dcd28e216.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;Each car is a flat record with a unique &lt;code&gt;id&lt;/code&gt; and the fields &lt;code&gt;make&lt;/code&gt;, &lt;code&gt;model&lt;/code&gt;, &lt;code&gt;year&lt;/code&gt;, &lt;code&gt;horsepower&lt;/code&gt;, &lt;code&gt;engine_cc&lt;/code&gt;, and &lt;code&gt;transmission&lt;/code&gt;. That’s the entire data model your API will work with.&lt;/p&gt;
&lt;p&gt;The application that serves this data is just as compact, as the following &lt;code&gt;main.py&lt;/code&gt; file shows:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;main.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;json&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;pathlib&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;Path&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;fastapi&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;FastAPI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HTTPException&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;app&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FastAPI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;cars&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;dict&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;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;Path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;cars.json&quot;&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;read_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@app&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/cars&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;list_cars&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;list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;dict&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 a list of all cars.&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cars&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@app&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/cars/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{car_id}&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;get_car&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;car_id&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;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;dict&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 a single car by its id, or raise 404 if it doesn&#x27;t exist.&quot;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;car&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cars&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;car&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;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;car_id&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;car&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HTTPException&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status_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;n&quot;&gt;detail&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Car not found&quot;&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.8f1dcd28e216.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 app loads the cars data from &lt;code&gt;cars.json&lt;/code&gt; and defines the two endpoints you saw earlier: &lt;code&gt;list_cars()&lt;/code&gt; and &lt;code&gt;get_car()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To run the API yourself, initialize the project, install the &lt;a href=&quot;/ref/glossary/dependency/&quot; class=&quot;ref-link&quot;&gt;dependencies&lt;/a&gt; with &lt;a href=&quot;https://realpython.com/python-uv/&quot;&gt;&lt;code&gt;uv&lt;/code&gt;&lt;/a&gt;, and start the development server:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;uv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;init
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;uv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;add&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;fastapi[standard]&quot;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;uv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;run&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;fastapi&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;dev&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;main.py
&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.8f1dcd28e216.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 the server running on &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt;, you can try both endpoints from another terminal. Start by listing every car with a &lt;code&gt;GET&lt;/code&gt; request to &lt;code&gt;/cars&lt;/code&gt;, piping the response through &lt;code&gt;python -m json.tool&lt;/code&gt; to pretty-print 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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;-s&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;http://127.0.0.1:8000/cars&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;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;json.tool
&lt;span class=&quot;go&quot;&gt;[&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    {&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        &quot;id&quot;: 1,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        &quot;make&quot;: &quot;Ford&quot;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        &quot;model&quot;: &quot;Mustang&quot;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        &quot;year&quot;: 1969,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        &quot;horsepower&quot;: 290,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        &quot;engine_cc&quot;: 5752,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;        &quot;transmission&quot;: &quot;Manual&quot;&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    },&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    ...&lt;/span&gt;
&lt;span class=&quot;go&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.8f1dcd28e216.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 API returns the full contents of &lt;code&gt;cars.json&lt;/code&gt; as a single &lt;a href=&quot;/ref/glossary/json/&quot; class=&quot;ref-link&quot;&gt;JSON&lt;/a&gt; array, trimmed here to its first car. To fetch just one car, add its &lt;code&gt;id&lt;/code&gt; to the path. For example, car &lt;code&gt;4&lt;/code&gt; is the fully electric Tesla, with an &lt;code&gt;engine_cc&lt;/code&gt; of &lt;code&gt;0&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;-s&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;http://127.0.0.1:8000/cars/4&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;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;json.tool
&lt;span class=&quot;go&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &quot;id&quot;: 4,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &quot;make&quot;: &quot;Tesla&quot;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &quot;model&quot;: &quot;Model S&quot;,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &quot;year&quot;: 2022,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &quot;horsepower&quot;: 670,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &quot;engine_cc&quot;: 0,&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    &quot;transmission&quot;: &quot;Automatic&quot;&lt;/span&gt;
&lt;span class=&quot;go&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.8f1dcd28e216.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 both cases, &lt;code&gt;curl&lt;/code&gt; sends an HTTP &lt;code&gt;GET&lt;/code&gt; request and prints the JSON the API returns. The &lt;code&gt;/cars&lt;/code&gt; route returns every record in the dataset, while &lt;code&gt;/cars/{car_id}&lt;/code&gt; reads the &lt;code&gt;id&lt;/code&gt; from the URL and returns only the matching car. Ask for an &lt;code&gt;id&lt;/code&gt; that isn’t there, such as &lt;code&gt;/cars/999&lt;/code&gt;, and &lt;code&gt;get_car()&lt;/code&gt; raises an &lt;code&gt;HTTPException&lt;/code&gt; that FastAPI turns into a &lt;code&gt;404 Not Found&lt;/code&gt; response.&lt;/p&gt;
&lt;p&gt;With the project in place, say that you want to grow the API with two more endpoints. Here’s the task you’ll hand to your agent. It’s a deliberately ordinary request, the kind you’d type without thinking twice:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Text&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;Base prompt&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;The FastAPI app in main.py only supports listing cars and getting one car
by id. Add the following endpoints to the API:
  - Create a new car
  - Delete an existing car
&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.8f1dcd28e216.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/agents-md/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/agents-md/ »&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 #308: Navigating Silent Failures in AI: Strategies for Effective Oversight</title>
      <id>https://realpython.com/podcasts/rpp/308/</id>
      <link href="https://realpython.com/podcasts/rpp/308/"/>
      <updated>2026-08-21T12:00:00+00:00</updated>
      <summary>Why do AI systems silently fail? How can you set up a system that produces results while also reviewing and validating the work? This week on the show, Calvin Hendryx-Parker returns to discuss his recent talk &quot;Orchestrate Agentic AI: Context, Checklists, and No-Miss Reviews.&quot;</summary>
      <content type="html">
        &lt;p&gt;Why do AI systems silently fail? How can you set up a system that produces results while also reviewing and validating the work? This week on the show, Calvin Hendryx-Parker returns to discuss his recent talk &quot;Orchestrate Agentic AI: Context, Checklists, and No-Miss Reviews.&quot;&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 Claude Code to Write and Debug Python</title>
      <id>https://realpython.com/how-to-use-claude-code/</id>
      <link href="https://realpython.com/how-to-use-claude-code/"/>
      <updated>2026-08-19T14:00:00+00:00</updated>
      <summary>Learn how to use Claude Code to build and debug Python projects with natural-language commands right from your terminal.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In this tutorial, you’ll learn how to use Claude Code to build and debug Python projects using natural-language commands directly from your terminal. Unlike browser-based AI assistants, where you copy code back and forth, Claude Code operates inside your project directory. It reads your files, runs shell commands, proposes edits as diffs, and waits for your approval before making any changes.&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/claude-code-start-screen.8e12c007e725.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/claude-code-start-screen.8e12c007e725.png&quot; width=&quot;1559&quot; height=&quot;944&quot; srcset=&quot;/cdn-cgi/image/width=389,format=auto/https://files.realpython.com/media/claude-code-start-screen.8e12c007e725.png 389w, /cdn-cgi/image/width=519,format=auto/https://files.realpython.com/media/claude-code-start-screen.8e12c007e725.png 519w, /cdn-cgi/image/width=779,format=auto/https://files.realpython.com/media/claude-code-start-screen.8e12c007e725.png 779w, /cdn-cgi/image/width=1559,format=auto/https://files.realpython.com/media/claude-code-start-screen.8e12c007e725.png 1559w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Claude Code terminal start screen with a pink pixel-art pig, a welcome back greeting, the current project path, and a prompt suggesting to try fix lint errors.&quot; data-asset=&quot;7341&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Claude Code Start Screen Ready for a Prompt&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;You’ll start by installing and configuring Claude Code, then use it to build a command-line application from scratch. After that, you’ll return to the project as if picking it up after time away, and ask Claude Code to find and fix bugs. Along the way, you’ll develop a repeatable workflow: plan first, review every change, commit often, and clear context between sessions.&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-claude-code-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-how-to-use-claude-code-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to build and debug mini-contacts, the command-line contact manager you create with Claude Code 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.8f1dcd28e216.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 Claude Code to Write and Debug 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/how-to-use-claude-code/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe0e6;&quot; alt=&quot;A person arranging plan cards on a drafting table beside a machine with BUILD, DEBUG, and EXTEND panels, a Claude Code console, a project folder holding a pixel-art bug, and a Python chip.&quot; src=&quot;https://files.realpython.com/media/How-to-Use-Claude-Code-Your-Terminal-AI-Coding-Assistant_Watermarked.2916c96a3049.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-Claude-Code-Your-Terminal-AI-Coding-Assistant_Watermarked.2916c96a3049.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Use-Claude-Code-Your-Terminal-AI-Coding-Assistant_Watermarked.2916c96a3049.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Use-Claude-Code-Your-Terminal-AI-Coding-Assistant_Watermarked.2916c96a3049.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Use-Claude-Code-Your-Terminal-AI-Coding-Assistant_Watermarked.2916c96a3049.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.8f1dcd28e216.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 position-relative&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-claude-code/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use Claude Code to Write and Debug Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Claude Code by working through installation, plan mode, diff review, and debugging a Python project.&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;&lt;a href=&quot;/ref/ai-coding-tools/claude-code/&quot; class=&quot;ref-link&quot;&gt;Claude Code&lt;/a&gt; is a standalone application that doesn’t depend on any specific Python version. Before you start, make sure you have the following tools and accounts ready:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A paid Anthropic account&lt;/strong&gt;: To use all Claude Code features, you need either a &lt;a href=&quot;https://claude.com/pricing&quot;&gt;Claude subscription&lt;/a&gt; at the Pro, Max, or Team tier, or an Anthropic &lt;a href=&quot;https://console.anthropic.com/&quot;&gt;Console&lt;/a&gt; account with &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; billing enabled.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Git&lt;/strong&gt;: You’ll use &lt;a href=&quot;/ref/tools/git/&quot; class=&quot;ref-link&quot;&gt;Git&lt;/a&gt; as a safety net throughout this tutorial, committing between tasks so you can always revert if Claude Code makes an unwanted change. If you’re new to Git, work through &lt;a href=&quot;https://realpython.com/python-git-github-intro/&quot;&gt;Introduction to Git and GitHub&lt;/a&gt; and configure your name and email before continuing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You don’t need prior experience with &lt;a href=&quot;https://realpython.com/ai-coding-agents-guide/&quot;&gt;AI coding tools&lt;/a&gt;. This tutorial assumes you’re trying Claude Code for the first time and walks through every step from installation to building a working project.&lt;/p&gt;
&lt;h2 id=&quot;step-1-install-and-configure-claude-code&quot;&gt;Step 1: Install and Configure Claude Code&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-install-and-configure-claude-code&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Claude Code ships as a self-contained native binary, with no Node.js, global npm packages, or version manager required. In this step, you’ll install it, sign in to your Anthropic account, and take a quick tour of the built-in commands before writing any code.&lt;/p&gt;
&lt;h3 id=&quot;install-and-authenticate&quot;&gt;Install and Authenticate&lt;a class=&quot;headerlink&quot; href=&quot;#install-and-authenticate&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Claude Code installs from a single script. Pick the command for your operating system. On Windows, you can install natively in PowerShell or use Windows Subsystem for Linux (WSL), which runs the Linux command:&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-bs-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 me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.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-bs-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.8f1dcd28e216.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;nb&quot;&gt;irm &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;https&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;://&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;claude&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ai&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;iex&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.8f1dcd28e216.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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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://claude.ai/install.sh&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.8f1dcd28e216.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;The installer drops a &lt;code&gt;claude&lt;/code&gt; binary into your path and handles auto-updates going forward. Verify the install by checking the version:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;claude&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--version
&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.8f1dcd28e216.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;If you see a version number, you’re ready to authenticate. Start Claude Code to trigger the login flow:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;claude
&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.8f1dcd28e216.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 launch shows Claude Code’s welcome screen in your &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt;, which looks something like this:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/welcome-to-claude-code.8269579ff3a2.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/welcome-to-claude-code.8269579ff3a2.png&quot; width=&quot;1678&quot; height=&quot;1007&quot; srcset=&quot;/cdn-cgi/image/width=419,format=auto/https://files.realpython.com/media/welcome-to-claude-code.8269579ff3a2.png 419w, /cdn-cgi/image/width=559,format=auto/https://files.realpython.com/media/welcome-to-claude-code.8269579ff3a2.png 559w, /cdn-cgi/image/width=839,format=auto/https://files.realpython.com/media/welcome-to-claude-code.8269579ff3a2.png 839w, /cdn-cgi/image/width=1678,format=auto/https://files.realpython.com/media/welcome-to-claude-code.8269579ff3a2.png 1678w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Claude Code onboarding screen showing pixel-art clouds, a crescent moon, and a pink pixel-art pig, with the heading Welcome to Claude Code and the line Let&#x27;s get started.&quot; data-asset=&quot;7340&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Claude Code&#x27;s Welcome Screen&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;On the first run, Claude Code opens a browser tab for login. Sign in with your Claude Pro, Max, or Team account, or choose the Anthropic Console option if you’re billing through the API. Once authenticated, Claude Code stores a login credential locally and won’t prompt you again unless it expires or you run the &lt;code&gt;/logout&lt;/code&gt; command.&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; Because Claude Code can edit and delete files, only run it inside project directories you’re actively working on. Starting it from your home directory gives the &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt; access to far more than it needs and will trigger a warning.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;With Claude Code installed and authenticated, you’re ready to look at what it can do. &lt;/p&gt;
&lt;h3 id=&quot;explore-the-cli-interface&quot;&gt;Explore the CLI Interface&lt;a class=&quot;headerlink&quot; href=&quot;#explore-the-cli-interface&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/how-to-use-claude-code/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/how-to-use-claude-code/ »&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>Working With Python&#x27;s deque</title>
      <id>https://realpython.com/courses/working-with-pythons-deque/</id>
      <link href="https://realpython.com/courses/working-with-pythons-deque/"/>
      <updated>2026-08-18T14:00:00+00:00</updated>
      <summary>Learn how to use Python&#x27;s deque to efficiently append and pop items from both ends, build queues and stacks, and set maxlen for bounded history.</summary>
      <content type="html">
        &lt;p&gt;You can use Python&amp;rsquo;s &lt;code&gt;deque&lt;/code&gt; for efficient appends and pops at both ends of a sequence-like data type. These capabilities are critical when you need to implement queue and stack data structures that operate efficiently even under heavy workloads.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll learn how &lt;code&gt;deque&lt;/code&gt; works, when to use it over a &lt;code&gt;list&lt;/code&gt;, and how to apply it in real code.&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;code&gt;deque&lt;/code&gt; internally uses a &lt;strong&gt;doubly &lt;a href=&quot;/ref/computer-science-glossary/linked-list/&quot; class=&quot;ref-link&quot;&gt;linked list&lt;/a&gt;&lt;/strong&gt;, so end operations are &lt;em&gt;O(1)&lt;/em&gt; while random indexing is &lt;em&gt;O(n)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;You can build a &lt;strong&gt;FIFO queue&lt;/strong&gt; with &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.popleft()&lt;/code&gt;&lt;/strong&gt;, and a &lt;strong&gt;LIFO stack&lt;/strong&gt; with &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.pop()&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;deque&lt;/code&gt; supports &lt;strong&gt;indexing&lt;/strong&gt; but doesn&amp;rsquo;t support &lt;strong&gt;slicing&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Passing a value to &lt;strong&gt;&lt;code&gt;maxlen&lt;/code&gt;&lt;/strong&gt; creates a bounded deque that &lt;strong&gt;drops items&lt;/strong&gt; from the opposite end when full.&lt;/li&gt;
&lt;li&gt;In CPython, &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.appendleft()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.pop()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.popleft()&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;len()&lt;/code&gt;&lt;/strong&gt; are &lt;strong&gt;thread-safe&lt;/strong&gt; for multithreaded use.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Up next, you&amp;rsquo;ll get started with &lt;code&gt;deque&lt;/code&gt;, benchmark it against &lt;code&gt;list&lt;/code&gt;, and explore how it shines in real-world use cases, such as queues, stacks, history buffers, and thread-safe producer-consumer setups.&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 Debug Python Code With an AI Agent</title>
      <id>https://realpython.com/ai-debugging/</id>
      <link href="https://realpython.com/ai-debugging/"/>
      <updated>2026-08-17T14:00:00+00:00</updated>
      <summary>Learn AI debugging by pairing with an AI coding agent: reproduce the bug with a failing test, give your agent context, then verify the fix.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;AI debugging is fixing broken code by pairing with an AI coding agent instead of hunting down bugs on your own. In this tutorial, you’ll debug Python code with an AI agent by reproducing a bug with a failing test, giving your agent the context it needs, and verifying the fix that gets your program running again.&lt;/p&gt;
&lt;p&gt;Most developers seek what’s called a &lt;em&gt;flow state&lt;/em&gt; when building programs or fixing code. This is a state of high focus. However, it can occasionally be interrupted by bugs. While &lt;a href=&quot;/ref/glossary/debugging/&quot; class=&quot;ref-link&quot;&gt;debugging&lt;/a&gt; has for decades been largely carried out by humans aided by tools like &lt;a href=&quot;https://realpython.com/python-debugging-pdb/&quot;&gt;pdb&lt;/a&gt;, AI coding agents have now become instrumental to the process, helping to make it faster.&lt;/p&gt;
&lt;p&gt;The Python project that you’ll debug in this guide places you in the position of an alien pet owner using a tool to keep your pet happy. This tool has checks for when your pet is well fed and well rested. However, you’ve learned that your pet is never happy no matter how often it eats or rests. You suspect a bug, and your AI agent has come to the rescue.&lt;/p&gt;
&lt;p&gt;By applying the steps in this tutorial, you’ll get this broken pet project back into a working state:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/space-pet-run-2.46a0c49e686a.gif&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/space-pet-run-2.46a0c49e686a.gif&quot; width=&quot;1483&quot; height=&quot;818&quot; srcset=&quot;/cdn-cgi/image/width=370,format=auto/https://files.realpython.com/media/space-pet-run-2.46a0c49e686a.gif 370w, /cdn-cgi/image/width=494,format=auto/https://files.realpython.com/media/space-pet-run-2.46a0c49e686a.gif 494w, /cdn-cgi/image/width=741,format=auto/https://files.realpython.com/media/space-pet-run-2.46a0c49e686a.gif 741w, /cdn-cgi/image/width=1483,format=auto/https://files.realpython.com/media/space-pet-run-2.46a0c49e686a.gif 1483w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Terminal output showing successful execution of pet program after debugging session.&quot; data-asset=&quot;7193&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;The Fixed Pet Program Running Successfully&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;You’ll use the newly released &lt;a href=&quot;https://realpython.com/antigravity-cli/&quot;&gt;Antigravity CLI&lt;/a&gt; by Google to see this workflow play out in real time. But if that’s not your preferred coding agent, that’s fine too, and you can still follow along with the steps.&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/ai-debugging-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-ai-debugging-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to debug the broken alien pet project with an AI coding agent.&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.8f1dcd28e216.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 Debug Python Code With an AI Agent” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/ai-debugging/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #ffc973;&quot; alt=&quot;A robot points and says Bug Found beside panels labeled AI Agent, Debug, and Verify, a code screen, a meter of happy-to-sad faces, a Python logo chip, and a green bug creature in a glass case.&quot; src=&quot;https://files.realpython.com/media/How-to-Debug-Python-Code-With-an-AI-Agent_Watermarked.44341c4ae7ec.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-Debug-Python-Code-With-an-AI-Agent_Watermarked.44341c4ae7ec.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Debug-Python-Code-With-an-AI-Agent_Watermarked.44341c4ae7ec.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Debug-Python-Code-With-an-AI-Agent_Watermarked.44341c4ae7ec.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Debug-Python-Code-With-an-AI-Agent_Watermarked.44341c4ae7ec.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.8f1dcd28e216.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 position-relative&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/ai-debugging/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Debug Python Code With an AI Agent&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of debugging Python code with an AI agent, from reproducing a bug with a failing test to verifying the fix.&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;To work through this tutorial comfortably, you should have the following at your fingertips:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Git commands:&lt;/strong&gt; You should be comfortable setting up &lt;a href=&quot;https://realpython.com/python-git-github-intro/&quot;&gt;Git&lt;/a&gt; in your project’s root folder and working with a few basic commands.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python 3.11 or newer:&lt;/strong&gt; You’ll need Python to run the sample project.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A working &lt;a href=&quot;https://realpython.com/ai-coding-agents-guide/&quot;&gt;AI coding agent&lt;/a&gt;:&lt;/strong&gt; You’ll be using one to debug, so being familiar with an agent that can read and write files is important. This tutorial uses &lt;a href=&quot;https://realpython.com/antigravity-cli/&quot;&gt;Antigravity CLI&lt;/a&gt;, and Step 1 walks through the setup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python testing with &lt;code&gt;pytest&lt;/code&gt;:&lt;/strong&gt; You should be comfortable &lt;a href=&quot;https://realpython.com/pytest-python-testing/&quot;&gt;reading and writing tests with &lt;code&gt;pytest&lt;/code&gt;&lt;/a&gt;. You’ll write a failing test to reproduce the bug, then rerun it to confirm your agent’s fix works.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these prerequisites in place, you’re ready to set up the alien pet project and start tracking down the bug that’s keeping your pet unhappy.&lt;/p&gt;
&lt;h2 id=&quot;step-1-set-up-your-workspace-for-ai-debugging&quot;&gt;Step 1: Set Up Your Workspace for AI Debugging&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-set-up-your-workspace-for-ai-debugging&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you already have a preferred agent set up, or you’ve already installed Antigravity CLI, skip the setup below and scroll to the directory tree to add the required files to your workspace.&lt;/p&gt;
&lt;p&gt;To set up Antigravity CLI for this tutorial, you’ll need to have a Google account. If you’re familiar with the just-retired &lt;a href=&quot;/ref/ai-coding-tools/gemini-cli/&quot; class=&quot;ref-link&quot;&gt;Gemini CLI&lt;/a&gt;, you’ll find that the setup processes are quite similar. First, go to the &lt;a href=&quot;https://antigravity.google/docs/cli/install&quot;&gt;Antigravity CLI installation guide&lt;/a&gt; for instructions on installing it.&lt;/p&gt;
&lt;p&gt;Choose the appropriate installation command for your operating system and run it in your terminal:&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-bs-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 me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.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-bs-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.8f1dcd28e216.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;nb&quot;&gt;irm &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;https&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;://&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;antigravity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;google&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cli&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;iex&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.8f1dcd28e216.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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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://antigravity.google/cli/install.sh&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.8f1dcd28e216.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;Once that’s done, your new AI coding agent is successfully installed. Next, create your project folder, initialize a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; to safely isolate your dependencies, and activate 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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;alien-pet-care
&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;alien-pet-care
&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;/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.8f1dcd28e216.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;Activating the virtual environment ensures that any &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;packages&lt;/a&gt; you install moving forward remain self-contained within this project directory. Depending on your operating system, your terminal prompt should now show the &lt;code&gt;(venv)&lt;/code&gt; prefix.&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’re a Windows user running PowerShell, activate your environment using &lt;code&gt;venv\Scripts\activate&lt;/code&gt;. If your system blocks the script, you can temporarily permit execution for your current session by running &lt;code&gt;Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Now, launch the CLI configuration inside your project directory by typing the following 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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;agy
&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.8f1dcd28e216.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 triggers a first-launch setup, where you’ll be prompted to log in with your Google account details. You’ll be redirected to a page or instructed to paste an authorization code in an input field:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ai-debugging/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ai-debugging/ »&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 #307: Improving NumPy Performance on Free-Threaded Python</title>
      <id>https://realpython.com/podcasts/rpp/307/</id>
      <link href="https://realpython.com/podcasts/rpp/307/"/>
      <updated>2026-08-14T12:00:00+00:00</updated>
      <summary>What bottlenecks were preventing NumPy from scaling on free-threaded Python? 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 bottlenecks were preventing NumPy from scaling on free-threaded Python? 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>How to Integrate OpenTelemetry With a FastAPI App</title>
      <id>https://realpython.com/fastapi-opentelemetry/</id>
      <link href="https://realpython.com/fastapi-opentelemetry/"/>
      <updated>2026-08-12T14:00:00+00:00</updated>
      <summary>Learn how to integrate OpenTelemetry with a FastAPI app in Python to instrument endpoints, export traces, add custom spans, and correlate logs.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Adding observability to your applications is crucial for diagnosing issues in production. In this tutorial, you’ll learn how to integrate OpenTelemetry—an open-source observability framework—into a FastAPI application. After following along, you’ll be able to instrument FastAPI with OpenTelemetry to export traces and correlate them with your application logs, allowing you to explore your &lt;a href=&quot;/ref/ai-coding-glossary/telemetry/&quot; class=&quot;ref-link&quot;&gt;telemetry&lt;/a&gt; in a dedicated dashboard:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/fastapi-otel-preview.9da248b5bc9d.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/fastapi-otel-preview.9da248b5bc9d.png&quot; width=&quot;1528&quot; height=&quot;945&quot; srcset=&quot;/cdn-cgi/image/width=382,format=auto/https://files.realpython.com/media/fastapi-otel-preview.9da248b5bc9d.png 382w, /cdn-cgi/image/width=509,format=auto/https://files.realpython.com/media/fastapi-otel-preview.9da248b5bc9d.png 509w, /cdn-cgi/image/width=764,format=auto/https://files.realpython.com/media/fastapi-otel-preview.9da248b5bc9d.png 764w, /cdn-cgi/image/width=1528,format=auto/https://files.realpython.com/media/fastapi-otel-preview.9da248b5bc9d.png 1528w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Jaeger UI showing a FastAPI request trace with a custom span and correlated logs&quot; data-asset=&quot;7210&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;A Fully Traced FastAPI Request in the Jaeger UI&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;The image above previews the &lt;a href=&quot;https://www.jaegertracing.io/&quot;&gt;Jaeger&lt;/a&gt; UI that you’ll build toward over the course of this tutorial.&lt;/p&gt;
&lt;p&gt;As your application grows, tracking down bugs across different services can become challenging. By adding observability, you gain clear insights into how your application performs and exactly where errors happen.&lt;/p&gt;
&lt;p&gt;To achieve this, you’ll use &lt;a href=&quot;https://opentelemetry.io/&quot;&gt;OpenTelemetry&lt;/a&gt;, often called OTel. This vendor-neutral framework provides a standard way to collect telemetry data from your applications. It supports multiple programming languages, including Python, and exports data to various backends like Jaeger, &lt;a href=&quot;https://prometheus.io/&quot;&gt;Prometheus&lt;/a&gt;, and &lt;a href=&quot;https://grafana.com/&quot;&gt;Grafana&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For this tutorial, you’ll use Jaeger, a popular open-source backend, to visualize your data. Together, OpenTelemetry and Jaeger let you analyze request paths, troubleshoot errors, and understand system bottlenecks.&lt;/p&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;To follow along with this tutorial, you’ll need a couple of tools on your system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python 3.10&lt;/strong&gt; or higher&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Docker&lt;/strong&gt; to run the Jaeger backend &lt;a href=&quot;/ref/software-engineering-glossary/containerization/&quot; class=&quot;ref-link&quot;&gt;container&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even if you’re new to Docker, you’ll only run a single command to start a ready-made container, and this tutorial walks you through it. If you’d like to go deeper, then you can explore the &lt;a href=&quot;https://realpython.com/tutorials/docker/&quot;&gt;Docker tutorials&lt;/a&gt; later.&lt;/p&gt;
&lt;p&gt;You should also be comfortable with a basic &lt;strong&gt;FastAPI&lt;/strong&gt; app. If you need a refresher on the framework, then check out the introductory guide to &lt;a href=&quot;https://realpython.com/get-started-with-fastapi/&quot;&gt;get started with FastAPI&lt;/a&gt;. If you prefer learning by video, Real Python’s &lt;a href=&quot;https://realpython.com/courses/start-building-with-fastapi/&quot;&gt;Start Building With FastAPI&lt;/a&gt; course covers the same essentials.&lt;/p&gt;
&lt;p&gt;You can download the complete source code for the examples in this tutorial to use as a reference:&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/fastapi-opentelemetry-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-fastapi-opentelemetry-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to instrument a FastAPI app with OpenTelemetry, exporting traces to a Jaeger backend, adding custom spans, correlating logs with traces, and tuning sampling.&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.8f1dcd28e216.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 Integrate OpenTelemetry With a FastAPI App” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/fastapi-opentelemetry/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #e5c6aa;&quot; alt=&quot;A person wearing headphones points at a mission-control console with a radar graph, gauges labeled Latency, a Traces and Logs panel, a Python logo, and a green Status OK screen.&quot; src=&quot;https://files.realpython.com/media/How-to-Integrate-OpenTelemetry-With-FastAPI-App_Watermarked.750b03bc7c47.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-Integrate-OpenTelemetry-With-FastAPI-App_Watermarked.750b03bc7c47.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Integrate-OpenTelemetry-With-FastAPI-App_Watermarked.750b03bc7c47.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Integrate-OpenTelemetry-With-FastAPI-App_Watermarked.750b03bc7c47.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Integrate-OpenTelemetry-With-FastAPI-App_Watermarked.750b03bc7c47.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.8f1dcd28e216.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 position-relative&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/fastapi-opentelemetry/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Integrate OpenTelemetry With a FastAPI App&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Instrument a FastAPI app with OpenTelemetry to export traces, add custom spans, and correlate your application logs with traces.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;step-1-build-your-fastapi-opentelemetry-pipeline&quot;&gt;Step 1: Build Your FastAPI OpenTelemetry Pipeline&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-build-your-fastapi-opentelemetry-pipeline&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To begin, you need a backend to receive and display your traces. Jaeger’s &lt;a href=&quot;https://www.jaegertracing.io/docs/latest/getting-started/&quot;&gt;all-in-one Docker image&lt;/a&gt; bundles everything into a single container for local development.&lt;/p&gt;
&lt;p&gt;Open your terminal and start the Jaeger container using Docker:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;docker&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;run&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-d&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--name&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;jaeger&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;-p&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;16686&lt;/span&gt;:16686&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;-p&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4317&lt;/span&gt;:4317&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;-p&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4318&lt;/span&gt;:4318&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;jaegertracing/all-in-one:latest
&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.8f1dcd28e216.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 launches Jaeger in the background. The port mappings each serve a distinct purpose. Port &lt;code&gt;16686&lt;/code&gt; exposes the web UI that you’ll use to explore your traces, while ports &lt;code&gt;4317&lt;/code&gt; and &lt;code&gt;4318&lt;/code&gt; accept incoming telemetry via the &lt;a href=&quot;https://opentelemetry.io/docs/specs/otel/protocol/&quot;&gt;OpenTelemetry Protocol (OTLP)&lt;/a&gt; over &lt;a href=&quot;https://realpython.com/python-microservices-grpc/&quot;&gt;gRPC&lt;/a&gt; and HTTP, respectively. Keeping these apart matters later because your application will send data to an OTLP port, and you’ll view the results on the UI port.&lt;/p&gt;
&lt;p&gt;Next, you’ll install the FastAPI framework along with the OpenTelemetry libraries. Before you do, create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; so that the &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;packages&lt;/a&gt; don’t end up in your system Python:&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-bs-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 me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.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-bs-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.8f1dcd28e216.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.8f1dcd28e216.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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Activate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps1&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.8f1dcd28e216.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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;/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.8f1dcd28e216.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;With your virtual environment active, install the packages. You’ll need the core OpenTelemetry distribution, the specific FastAPI instrumentation package, and the OTLP exporter to send your data to Jaeger:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;fastapi&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;uvicorn&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;         &lt;/span&gt;opentelemetry-distro&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;         &lt;/span&gt;opentelemetry-instrumentation-fastapi&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;         &lt;/span&gt;opentelemetry-exporter-otlp
&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.8f1dcd28e216.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 that the tools are installed, you can build your application. Create a file named &lt;code&gt;main.py&lt;/code&gt; and add the following code:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/fastapi-opentelemetry/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/fastapi-opentelemetry/ »&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>Coding With OpenCode: AI-Assisted Python</title>
      <id>https://realpython.com/courses/coding-with-opencode-ai/</id>
      <link href="https://realpython.com/courses/coding-with-opencode-ai/"/>
      <updated>2026-08-11T14:00:00+00:00</updated>
      <summary>Learn how to use OpenCode for AI-assisted Python coding, using a free Gemini API key to analyze and refactor code right in your terminal.</summary>
      <content type="html">
        &lt;p&gt;OpenCode is an open-source AI coding agent that runs in your terminal and lets you analyze and refactor a Python project through conversational commands. In this video course, you&amp;rsquo;ll install it on your system, set it up with a free Google Gemini API key, and learn the basics of how to use it in your daily programming work.&lt;/p&gt;
&lt;p&gt;OpenCode works as a conversational assistant you explicitly direct. Ask it to analyze functions, refactor code, or explain issues. Press Enter to send your query, and you&amp;rsquo;ll get a response with full awareness of your project context. It supports more than seventy-five AI providers, including Anthropic, OpenAI, and Google Gemini.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re a Python developer who prefers working in the terminal, OpenCode offers deliberate, context-aware assistance and a customizable &lt;code&gt;AGENTS.md&lt;/code&gt; configuration file.&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>Qt Designer and Python: Build Your GUI Applications Faster</title>
      <id>https://realpython.com/qt-designer-python/</id>
      <link href="https://realpython.com/qt-designer-python/"/>
      <updated>2026-08-10T14:00:00+00:00</updated>
      <summary>Learn how to use Qt Designer to build Python GUIs with PyQt6. Create your main windows and dialogs visually, then load them in your app.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Qt Designer is a tool that lets you build the graphical user interface (GUI) of a PyQt application visually, by dragging and dropping widgets onto a form instead of writing layout code by hand. In Python, you save those designs as &lt;code&gt;.ui&lt;/code&gt; files and load them into your apps, which can speed up your GUI development considerably.&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;Qt Designer&lt;/strong&gt; produces XML-based &lt;code&gt;.ui&lt;/code&gt; files that don’t depend on a particular Qt binding, so you build your GUI visually and then use it from &lt;strong&gt;PyQt6&lt;/strong&gt; code.&lt;/li&gt;
&lt;li&gt;You install the &lt;strong&gt;PyQt6&lt;/strong&gt; bindings with &lt;code&gt;pip install pyqt6&lt;/code&gt; and get the Qt Designer app from &lt;strong&gt;PySide6&lt;/strong&gt;, your system package manager, or the official Qt installer.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;pyuic6&lt;/code&gt; command turns a &lt;code&gt;.ui&lt;/code&gt; file into a Python module, while &lt;code&gt;uic.loadUi()&lt;/code&gt; reads the same file at &lt;strong&gt;runtime&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A single Qt Designer form can hold a complete &lt;strong&gt;main window&lt;/strong&gt; with menus, toolbars, and a status bar, or a standalone &lt;strong&gt;dialog&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You connect a widget’s &lt;strong&gt;signals&lt;/strong&gt; to &lt;strong&gt;slots&lt;/strong&gt; visually in Qt Designer, without hand-writing the connection code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll also see when it makes sense to reach for Qt Designer instead of hand coding your GUIs in plain Python.&lt;/p&gt;
&lt;p&gt;For a better understanding of the topics in this tutorial, you can check out the following resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-pyqt-gui-calculator/&quot;&gt;Python and PyQt: Building a GUI Desktop Calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-menus-toolbars/&quot;&gt;Python and PyQt: Creating Menus, Toolbars, and Status Bars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-pyqt-layout/&quot;&gt;PyQt Layouts: Create Professional-Looking GUI Applications&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You’ll put all this knowledge together by using the GUIs that you’ll build with Qt Designer in a sample text editor application. You can get the code and all the required resources to build this application by clicking the link 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 the Source Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/qt-designer-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-qt-designer-code&quot; markdown&gt;Click here to get the source code you’ll use&lt;/a&gt; to learn about creating Python GUI applications with Qt Designer 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.8f1dcd28e216.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 “Qt Designer and Python: Build Your GUI Applications Faster” 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

      &lt;a href=&quot;/quizzes/qt-designer-python/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;Qt Designer and Python: Build Your GUI Applications Faster&quot; src=&quot;https://files.realpython.com/media/Creating-Python-GUI-Applications-with-Qt-Designer_Watermarked.a557daee0374.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Creating-Python-GUI-Applications-with-Qt-Designer_Watermarked.a557daee0374.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Creating-Python-GUI-Applications-with-Qt-Designer_Watermarked.a557daee0374.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Creating-Python-GUI-Applications-with-Qt-Designer_Watermarked.a557daee0374.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Creating-Python-GUI-Applications-with-Qt-Designer_Watermarked.a557daee0374.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.8f1dcd28e216.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 position-relative&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/qt-designer-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Qt Designer and Python: Build Your GUI Applications Faster&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your knowledge of Qt Designer for Python. Build PyQt GUIs visually with drag-and-drop, signals and slots, and .ui files.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-started-with-qt-designer&quot;&gt;Getting Started With Qt Designer&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-qt-designer&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Qt Designer&lt;/strong&gt; is a &lt;a href=&quot;https://www.qt.io/&quot;&gt;Qt&lt;/a&gt; tool that provides you with a &lt;a href=&quot;https://en.wikipedia.org/wiki/WYSIWYG&quot;&gt;what-you-see-is-what-you-get (WYSIWYG)&lt;/a&gt; user interface to create GUIs for your PyQt applications productively and efficiently. With this tool, you create GUIs by dragging and dropping &lt;a href=&quot;https://doc.qt.io/qt-6/qtwidgets-index.html&quot;&gt;&lt;code&gt;QWidget&lt;/code&gt;&lt;/a&gt; objects on an empty form. After that, you can arrange them into a coherent GUI using different layout managers.&lt;/p&gt;
&lt;p&gt;Qt Designer also allows you to preview your GUIs using different styles and resolutions, connect &lt;a href=&quot;https://www.riverbankcomputing.com/static/Docs/PyQt6/signals_slots.html&quot;&gt;signals and slots&lt;/a&gt;, create menus and toolbars, and more.&lt;/p&gt;
&lt;p&gt;Qt Designer is platform and programming language independent. It doesn’t produce code in any particular programming language, but it creates &lt;a href=&quot;https://doc.qt.io/qt-6/designer-ui-file-format.html&quot;&gt;&lt;code&gt;.ui&lt;/code&gt; files&lt;/a&gt;. These files are &lt;code&gt;XML&lt;/code&gt; files with detailed descriptions of how to generate Qt-based GUIs.&lt;/p&gt;
&lt;p&gt;You can translate the content of &lt;code&gt;.ui&lt;/code&gt; files into Python code with &lt;a href=&quot;https://www.riverbankcomputing.com/static/Docs/PyQt6/designer.html#pyuic6&quot;&gt;&lt;code&gt;pyuic6&lt;/code&gt;&lt;/a&gt;, which is a command-line tool that comes with PyQt. Then you can use this Python code in your GUI applications. You can also read &lt;code&gt;.ui&lt;/code&gt; files directly and load their content to generate the associated GUI.&lt;/p&gt;
&lt;h3 id=&quot;installing-and-running-qt-designer&quot;&gt;Installing and Running Qt Designer&lt;a class=&quot;headerlink&quot; href=&quot;#installing-and-running-qt-designer&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There are several ways to install Qt Designer, and the right one depends on your platform. Qt Designer is a separate application, so you’ll set up two separate pieces: the &lt;strong&gt;PyQt6&lt;/strong&gt; bindings that your code will use, and the Qt Designer application itself.&lt;/p&gt;
&lt;p&gt;First, create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;Python virtual environment&lt;/a&gt; and install &lt;a href=&quot;https://pypi.org/project/PyQt6/&quot;&gt;PyQt6&lt;/a&gt; with &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;python3&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;pyqt6
&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.8f1dcd28e216.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 installs PyQt6 along with a private copy of the required Qt libraries. It also gives you &lt;code&gt;pyuic6&lt;/code&gt;, a command-line tool that you’ll use later to turn your &lt;code&gt;.ui&lt;/code&gt; files into Python code.&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; In PyQt5, you installed Qt Designer through the &lt;code&gt;pyqt5-tools&lt;/code&gt; package. In PyQt6, &lt;code&gt;pyqt6-tools&lt;/code&gt; is no longer maintained and won’t install on current Python versions, so you’ll install Qt Designer on its own instead.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Next, install the Qt Designer application. Because Qt Designer saves its work in binding-agnostic &lt;code&gt;.ui&lt;/code&gt; files, you can get the tool in whatever way is most convenient for your platform.&lt;/p&gt;
&lt;p&gt;Even though your application code uses PyQt6, the quickest cross-platform way to get Qt Designer is to install &lt;a href=&quot;https://pypi.org/project/PySide6/&quot;&gt;PySide6&lt;/a&gt;, which ships with a ready-to-run copy of the tool:&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;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&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.8f1dcd28e216.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;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pyside6
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;pyside6-designer
&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.8f1dcd28e216.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;pyside6-designer&lt;/code&gt; command launches the same Qt Designer that you’d get directly from Qt. You design your GUI here and then load the resulting &lt;code&gt;.ui&lt;/code&gt; file from PyQt6.&lt;/p&gt;
&lt;p&gt;You can also install Qt Designer in a few platform-specific ways:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/qt-designer-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/qt-designer-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>The Real Python Podcast – Episode #306: Programmatically Developing LLM Prompts With DSPy</title>
      <id>https://realpython.com/podcasts/rpp/306/</id>
      <link href="https://realpython.com/podcasts/rpp/306/"/>
      <updated>2026-08-07T12:00:00+00:00</updated>
      <summary>How can you move from manually writing prompts for an LLM application toward defining them programmatically? This week on the show, Brett Kennedy returns to discuss his new book &quot;Building LLM Applications with DSPy.&quot;</summary>
      <content type="html">
        &lt;p&gt;How can you move from manually writing prompts for an LLM application toward defining them programmatically? This week on the show, Brett Kennedy returns to discuss his new book &quot;Building LLM Applications with DSPy.&quot;&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>Sending Emails Using Python</title>
      <id>https://realpython.com/courses/sending-emails-using-python/</id>
      <link href="https://realpython.com/courses/sending-emails-using-python/"/>
      <updated>2026-08-04T14:00:00+00:00</updated>
      <summary>Learn how to send emails with Python using SMTP and smtplib, attach files, format HTML messages, and personalize bulk emails.</summary>
      <content type="html">
        &lt;p&gt;You probably found this video course because you want to send emails with Python to automate confirmation messages, password resets, or scheduled notifications. Python&amp;rsquo;s standard library covers the whole pipeline, from making a server connection to building the message and sending it to one or many recipients. This course walks through every step in working code.&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;A safe testing setup uses a &lt;strong&gt;throwaway Gmail account&lt;/strong&gt; with an &lt;strong&gt;app password&lt;/strong&gt;, a local &lt;code&gt;aiosmtpd&lt;/code&gt; debug server, or a privacy-focused provider like Posteo or Proton Mail.&lt;/li&gt;
&lt;li&gt;A secure SMTP session uses &lt;code&gt;.SMTP_SSL()&lt;/code&gt; with &lt;code&gt;ssl.create_default_context()&lt;/code&gt;, which &lt;strong&gt;validates the server certificate&lt;/strong&gt; and &lt;strong&gt;encrypts&lt;/strong&gt; your credentials and message content.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;EmailMessage&lt;/code&gt; class from the &lt;code&gt;email&lt;/code&gt; package assembles &lt;strong&gt;plain text&lt;/strong&gt;, &lt;strong&gt;HTML alternatives&lt;/strong&gt;, &lt;strong&gt;file attachments&lt;/strong&gt;, and &lt;strong&gt;personalized fields&lt;/strong&gt; through &lt;code&gt;.set_content()&lt;/code&gt;, &lt;code&gt;.add_alternative()&lt;/code&gt;, and &lt;code&gt;.add_attachment()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Setting &lt;code&gt;msg[&quot;reply-to&quot;]&lt;/code&gt; or any other RFC 5322 header on an &lt;code&gt;EmailMessage&lt;/code&gt; routes &lt;strong&gt;replies&lt;/strong&gt; to a different mailbox than the sender address.&lt;/li&gt;
&lt;li&gt;For high-volume sending, &lt;strong&gt;transactional email services&lt;/strong&gt; like SendGrid, Mailgun, and Brevo provide deliverability, statistics, and &lt;strong&gt;API libraries&lt;/strong&gt; that go beyond what &lt;code&gt;smtplib&lt;/code&gt; alone offers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you jump into the code, you&amp;rsquo;ll set up a throwaway email account or a local debug server so you can experiment freely without spamming real inboxes.&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 #305: Should You Understand Your Entire Python Codebase?</title>
      <id>https://realpython.com/podcasts/rpp/305/</id>
      <link href="https://realpython.com/podcasts/rpp/305/"/>
      <updated>2026-07-31T12:00:00+00:00</updated>
      <summary>Should you understand the entirety of your codebase? How familiar are you with Python&#x27;s built-in functions? 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;Should you understand the entirety of your codebase? How familiar are you with Python&#x27;s built-in functions? 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>Managing Imports With Python&#x27;s __all__</title>
      <id>https://realpython.com/courses/managing-imports-dunder-all/</id>
      <link href="https://realpython.com/courses/managing-imports-dunder-all/"/>
      <updated>2026-07-28T14:00:00+00:00</updated>
      <summary>Learn how Python&#x27;s dunder all variable controls wildcard imports and shapes the public API your packages and modules expose.</summary>
      <content type="html">
        &lt;p&gt;Python has something called &lt;strong&gt;wildcard imports&lt;/strong&gt;, which look like &lt;code&gt;from module import *&lt;/code&gt;. This type of import allows you to quickly get all the objects from a module into your namespace. However, using this import on a package can be confusing because it&amp;rsquo;s not clear what you want to import: subpackages, modules, objects? Python has the &lt;strong&gt;&lt;code&gt;__all__&lt;/code&gt;&lt;/strong&gt; variable to work around this issue.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;__all__&lt;/code&gt; variable is a list of strings where each string represents the name of a variable, function, class, or module that you want to expose to wildcard imports.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand &lt;strong&gt;wildcard imports&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;&lt;code&gt;__all__&lt;/code&gt;&lt;/strong&gt; to control the modules that you &lt;strong&gt;expose&lt;/strong&gt; to wildcard imports&lt;/li&gt;
&lt;li&gt;Control the &lt;strong&gt;names&lt;/strong&gt; that you expose in &lt;strong&gt;modules&lt;/strong&gt; and &lt;strong&gt;packages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Explore &lt;strong&gt;other use cases&lt;/strong&gt; of the &lt;code&gt;__all__&lt;/code&gt; variable&lt;/li&gt;
&lt;li&gt;Learn some &lt;strong&gt;benefits&lt;/strong&gt; and &lt;strong&gt;best practices&lt;/strong&gt; of using &lt;code&gt;__all__&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this course, you should be familiar with a few Python concepts, including &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;modules and packages&lt;/a&gt;, and the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import&lt;/a&gt; system.&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 #304: Configuring a Versatile LLM Harness &amp; Scraping the Web With Scrapy</title>
      <id>https://realpython.com/podcasts/rpp/304/</id>
      <link href="https://realpython.com/podcasts/rpp/304/"/>
      <updated>2026-07-24T12:00:00+00:00</updated>
      <summary>Which is more important, the model or the &quot;harness&quot; around an LLM? What are ways to assemble an efficient agentic developer workflow? This week on the show, Ayan Pahwa joins us to discuss harnessing, web scraping, and self-hosting Python applications.</summary>
      <content type="html">
        &lt;p&gt;Which is more important, the model or the &quot;harness&quot; around an LLM? What are ways to assemble an efficient agentic developer workflow? This week on the show, Ayan Pahwa joins us to discuss harnessing, web scraping, and self-hosting Python applications.&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: FastAPI: Python API Development With Light Speed</title>
      <id>https://realpython.com/learning-paths/fastapi/</id>
      <link href="https://realpython.com/learning-paths/fastapi/"/>
      <updated>2026-07-22T12:00:00+00:00</updated>
      <summary>Learn FastAPI from the ground up. Build REST APIs, serve web pages with Jinja2 templates, and create a complete URL shortener project in Python.</summary>
      <content type="html">
        &lt;p&gt;Learn FastAPI from the ground up. Build REST APIs, serve web pages with Jinja2 templates, and create a complete URL shortener project in Python.&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>Exploring Python&#x27;s Built-in Functions</title>
      <id>https://realpython.com/courses/exploring-pythons-built-in-functions/</id>
      <link href="https://realpython.com/courses/exploring-pythons-built-in-functions/"/>
      <updated>2026-07-21T14:00:00+00:00</updated>
      <summary>Learn Python&#x27;s built-in functions for math, data types, iterables, and I/O, and when to use each to write more Pythonic code.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;strong&gt;built-in functions&lt;/strong&gt; are predefined functions you can use anywhere in your code without any imports. They handle common tasks across math, data type creation, iterable processing, and input and output. Knowing which ones to reach for makes your code shorter and more &lt;strong&gt;Pythonic&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recognize Python&amp;rsquo;s &lt;strong&gt;built-in functions&lt;/strong&gt; and the &lt;strong&gt;built-in scope&lt;/strong&gt; they live in&lt;/li&gt;
&lt;li&gt;Use the right built-in for &lt;strong&gt;tasks&lt;/strong&gt; involving &lt;strong&gt;math&lt;/strong&gt;, &lt;strong&gt;data types&lt;/strong&gt;, &lt;strong&gt;iterables&lt;/strong&gt;, and &lt;strong&gt;I/O&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Distinguish &lt;strong&gt;real functions&lt;/strong&gt; from &lt;strong&gt;classes&lt;/strong&gt; that only look like them&lt;/li&gt;
&lt;li&gt;Apply built-ins to solve &lt;strong&gt;practical problems&lt;/strong&gt; with less code you have to write yourself&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this video course, you&amp;rsquo;ll need to be familiar with Python programming, including topics like working with built-in &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;data types&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/primer-on-python-decorators/&quot;&gt;decorators&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-scope-legb-rule/&quot;&gt;scopes&lt;/a&gt;, and the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import&lt;/a&gt; system.&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 #303: Free-Threaded Python&#x27;s History &amp; uv in Production</title>
      <id>https://realpython.com/podcasts/rpp/303/</id>
      <link href="https://realpython.com/podcasts/rpp/303/"/>
      <updated>2026-07-17T12:00:00+00:00</updated>
      <summary>How many attempts have been made to remove Python&#x27;s Global Interpreter Lock (GIL)? How do they compare to the current approach? 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 many attempts have been made to remove Python&#x27;s Global Interpreter Lock (GIL)? How do they compare to the current approach? 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>Understanding Mixin Classes in Python</title>
      <id>https://realpython.com/courses/understanding-mixin-classes-in-python/</id>
      <link href="https://realpython.com/courses/understanding-mixin-classes-in-python/"/>
      <updated>2026-07-14T14:00:00+00:00</updated>
      <summary>Learn how to write reusable Python mixin classes, distinguish them from abstract base classes, and steer clear of common pitfalls.</summary>
      <content type="html">
        &lt;p&gt;Mixins offer a powerful way to reuse code across multiple Python classes without forcing them into a rigid inheritance hierarchy. Instead of building deep and brittle class trees, you can use mixins to share common behaviors in a modular and flexible way. Learn when and how to implement mixin classes effectively in your Python projects.&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;Mixins&lt;/strong&gt; allow you to add isolated, reusable functionalities to classes without enforcing a strict type hierarchy.&lt;/li&gt;
&lt;li&gt;Python has &lt;strong&gt;no dedicated syntax&lt;/strong&gt; for declaring mixins. You create mixins by defining &lt;strong&gt;classes&lt;/strong&gt; with specific behaviors that other classes can inherit without forming an &lt;em&gt;is-a&lt;/em&gt; relationship.&lt;/li&gt;
&lt;li&gt;Mixins rely on &lt;strong&gt;multiple inheritance&lt;/strong&gt; to combine features from different classes, enhancing flexibility and code reuse.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stateful mixins&lt;/strong&gt; require careful design to manage instance attributes and avoid conflicts with other classes.&lt;/li&gt;
&lt;li&gt;Python&amp;rsquo;s &lt;strong&gt;method resolution order (MRO)&lt;/strong&gt; determines the order in which classes are inherited, affecting how mixins are applied.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this video course, you should have a good understanding of &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming (OOP)&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/solid-principles-python/&quot;&gt;SOLID principles&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/inheritance-composition-python/&quot;&gt;inheritance&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;Python classes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, what is a Python mixin, and when should you use one?&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 #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>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>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>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>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. Choose an editor-based assistant like Cursor or a terminal-based one like Claude Code, then make it part of your daily workflow.</summary>
      <content type="html">
        &lt;p&gt;Use AI coding assistants to write, review, and debug Python code faster. Choose an editor-based assistant like Cursor or a terminal-based one like Claude Code, then make it part of your daily workflow.&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: 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: 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>
  
    <entry>
      <title>Learning Path: Exceptions, Logging, and Debugging</title>
      <id>https://realpython.com/learning-paths/exception-handling-logging-debugging/</id>
      <link href="https://realpython.com/learning-paths/exception-handling-logging-debugging/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn Python exception handling, logging, and debugging. Work with raise, built-in exceptions, the logging module, and pdb to write reliable code.</summary>
      <content type="html">
        &lt;p&gt;Learn Python exception handling, logging, and debugging. Work with raise, built-in exceptions, the logging module, and pdb to write reliable 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>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: 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>
  

</feed>
