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

  
    <entry>
      <title>Quiz: Exploring Keywords in Python</title>
      <id>https://realpython.com/quizzes/exploring-keywords-in-python/</id>
      <link href="https://realpython.com/quizzes/exploring-keywords-in-python/"/>
      <updated>2026-04-01T12:00:00+00:00</updated>
      <summary>Test your understanding of Python keywords, including the difference between regular and soft keywords, keyword categories, and common pitfalls.</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/exploring-keywords-in-python/&quot;&gt;Exploring Keywords in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to identify Python keywords,
understand the difference between regular and soft keywords, categorize
keywords by purpose, and avoid common pitfalls with deprecated keywords.&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>Adding Python to PATH</title>
      <id>https://realpython.com/courses/adding-python-to-path/</id>
      <link href="https://realpython.com/courses/adding-python-to-path/"/>
      <updated>2026-03-31T14:00:00+00:00</updated>
      <summary>Learn how to add Python to your PATH environment variable on Windows, macOS, and Linux so you can run Python from the command line.</summary>
      <content type="html">
        &lt;p&gt;You may need to add Python to &lt;code&gt;PATH&lt;/code&gt; if you&amp;rsquo;ve &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;installed Python&lt;/a&gt;, but typing &lt;code&gt;python&lt;/code&gt; on the command line doesn&amp;rsquo;t seem to work. You might see a message saying that &lt;code&gt;python&lt;/code&gt; isn&amp;rsquo;t recognized, or you might end up running the wrong version of Python.&lt;/p&gt;
&lt;p&gt;A common fix for these problems is adding Python to the &lt;code&gt;PATH&lt;/code&gt; &lt;a href=&quot;https://en.wikipedia.org/wiki/Environment_variable&quot;&gt;environment variable&lt;/a&gt;. In this video course, you&amp;rsquo;ll learn how to add Python to &lt;code&gt;PATH&lt;/code&gt;. You&amp;rsquo;ll also learn what &lt;code&gt;PATH&lt;/code&gt; is and why it&amp;rsquo;s essential for tools like the command line to be able to find your Python installation.&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: Test-Driven Development With pytest</title>
      <id>https://realpython.com/quizzes/test-driven-development-pytest/</id>
      <link href="https://realpython.com/quizzes/test-driven-development-pytest/"/>
      <updated>2026-03-31T12:00:00+00:00</updated>
      <summary>Test your TDD skills with pytest. Practice writing unit tests, following pytest conventions, and measuring code coverage.</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/test-driven-development-pytest/&quot;&gt;Test-Driven Development With pytest&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit creating and executing Python unit tests with pytest, practicing test-driven development, finding bugs before users, and checking code coverage.&lt;/p&gt;
&lt;p&gt;Use this quiz to confirm what you learned and spot gaps to review. Return to the video course for hands-on examples and guidance.&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 Ollama to Run Large Language Models Locally</title>
      <id>https://realpython.com/ollama/</id>
      <link href="https://realpython.com/ollama/"/>
      <updated>2026-03-30T14:00:00+00:00</updated>
      <summary>Learn how to use Ollama to run large language models locally. Install it, pull models, and start chatting from your terminal without needing API keys.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Running Ollama in your terminal allows you to start chatting with a local large language model (LLM) quickly. You won’t need API keys, cloud services, or ongoing costs. Ollama is a free, open-source tool that lets you download and run models directly on your machine. By following this guide, you’ll install Ollama, chat with local models from your terminal, and use them to power agentic coding tools:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 &quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/1168128663?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;
  &lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Example of Using Ollama to Run an LLM Locally&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Large language models traditionally require expensive &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; subscriptions and a constant internet connection. &lt;a href=&quot;/ref/ai-coding-tools/ollama/&quot; class=&quot;ref-link&quot;&gt;Ollama&lt;/a&gt; eliminates both requirements by running models directly on your hardware. Because everything runs locally, your prompts stay on your machine, and no per-token fees apply.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Cheat Sheet:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/ollama-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-ollama-cheatsheet&quot; markdown&gt;Click here to download your free Ollama cheat sheet&lt;/a&gt; and keep the essential steps and commands for running LLMs locally at your fingertips.&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.1fb5b1968c3f.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 Ollama to Run Large Language Models Locally” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe0e6;&quot; alt=&quot;How to Run Large Language Models Locally With Ollama&quot; src=&quot;https://files.realpython.com/media/How-to-Run-Large-Language-Models-Locally-with-Ollama_Watermarked.c14373d94c34.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-Run-Large-Language-Models-Locally-with-Ollama_Watermarked.c14373d94c34.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Run-Large-Language-Models-Locally-with-Ollama_Watermarked.c14373d94c34.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Run-Large-Language-Models-Locally-with-Ollama_Watermarked.c14373d94c34.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Run-Large-Language-Models-Locally-with-Ollama_Watermarked.c14373d94c34.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/ollama/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use Ollama to Run Large Language Models Locally&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your knowledge of running LLMs locally with Ollama. Install it, pull models, chat, and connect coding tools from your terminal.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To follow this guide, you’ll need the following software and hardware:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;macOS 14 Sonoma or newer&lt;/strong&gt;, &lt;strong&gt;Windows 10 or newer&lt;/strong&gt;, or a recent &lt;strong&gt;Linux&lt;/strong&gt; distribution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;At least 8 GB of RAM&lt;/strong&gt;, or &lt;strong&gt;16 GB or more&lt;/strong&gt; for larger models&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;5–16 GB of free disk space&lt;/strong&gt; to store models&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Basic skills with the command line or terminal&lt;/strong&gt;, including opening a terminal and running commands&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No Python installation is required for this guide, and no prior experience with &lt;a href=&quot;/ref/ai-coding-glossary/llm/&quot; class=&quot;ref-link&quot;&gt;LLMs&lt;/a&gt; or AI is needed. If you want to integrate Ollama with Python after finishing here, check out &lt;a href=&quot;https://realpython.com/ollama-python/&quot;&gt;How to Integrate Local LLMs With Ollama and Python&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;step-1-install-ollama-and-pull-your-first-model&quot;&gt;Step 1: Install Ollama and Pull Your First Model&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-install-ollama-and-pull-your-first-model&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To quickly install Ollama on your operating system, run the following command based on your platform:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;span class=&quot;icon baseline text-muted&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.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; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;ollama&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;com&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.1fb5b1968c3f.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; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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://ollama.com/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;sh
&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.1fb5b1968c3f.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 this command finishes, Ollama will be installed on your 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; In some Linux distributions, you may need to install &lt;code&gt;curl&lt;/code&gt; to download the installer and the &lt;code&gt;zstd&lt;/code&gt; library for extraction. On Debian/Ubuntu, you can install them with the following command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;sudo&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;update&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;sudo&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;apt&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;curl&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;zstd
&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.1fb5b1968c3f.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;p&gt;Alternatively, you can download a dedicated installer for Windows and macOS. Visit Ollama’s &lt;a href=&quot;https://ollama.com/download&quot;&gt;download&lt;/a&gt; page to get the installer for those operating systems.&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; Ollama has a &lt;a href=&quot;/ref/glossary/graphical-user-interface/&quot; class=&quot;ref-link&quot;&gt;GUI&lt;/a&gt; application for macOS and Windows users. This quick guide focuses solely on the &lt;a href=&quot;/ref/glossary/command-line-interface/&quot; class=&quot;ref-link&quot;&gt;command-line (CLI)&lt;/a&gt; tool. See Ollama’s &lt;a href=&quot;https://ollama.com/blog/new-app&quot;&gt;app announcement&lt;/a&gt; if you want to explore that option.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;After installation, you can verify that the CLI is available with the following command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;ollama&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-v
&lt;span class=&quot;go&quot;&gt;ollama version is 0.17.7&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.1fb5b1968c3f.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 Ollama service should be running in the background. Normally, you don’t need to start it manually. It runs on port &lt;code&gt;11434&lt;/code&gt; by default. If you get a warning after running the command above, then you may need to run the background server manually:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;ollama&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;serve
&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.1fb5b1968c3f.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/ollama/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ollama/ »&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: Using Jupyter Notebooks</title>
      <id>https://realpython.com/quizzes/using-jupyter-notebooks/</id>
      <link href="https://realpython.com/quizzes/using-jupyter-notebooks/"/>
      <updated>2026-03-30T12:00:00+00:00</updated>
      <summary>Test your Jupyter Notebook skills: cells, modes, shortcuts, Markdown, server tools, and exporting notebooks to HTML.</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/using-jupyter-notebooks/&quot;&gt;Using Jupyter Notebooks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll review Jupyter Notebook basics: running code cells, switching modes, using shortcuts, formatting Markdown, managing the server, and exporting notebooks.&lt;/p&gt;
&lt;p&gt;Use it to check your workflow knowledge and spot areas to review.&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 #289: Limitations in Human and Automated Code Review</title>
      <id>https://realpython.com/podcasts/rpp/289/</id>
      <link href="https://realpython.com/podcasts/rpp/289/"/>
      <updated>2026-03-27T12:00:00+00:00</updated>
      <summary>With the mountains of Python code that it&#x27;s possible to generate now, how&#x27;s your code review going? What are the limitations of human review, and where does machine review excel? 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;With the mountains of Python code that it&#x27;s possible to generate now, how&#x27;s your code review going? What are the limitations of human review, and where does machine review excel? 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: Interacting With REST APIs and Python</title>
      <id>https://realpython.com/quizzes/interacting-rest-apis-python/</id>
      <link href="https://realpython.com/quizzes/interacting-rest-apis-python/"/>
      <updated>2026-03-27T12:00:00+00:00</updated>
      <summary>Test your Python REST API knowledge: consuming, building, HTTP methods, status codes, Flask, FastAPI, and Django basics.</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/interacting-rest-apis-python/&quot;&gt;Interacting with REST APIs in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This quiz reviews REST principles, HTTP methods, status codes, and Python tools like requests, Flask, FastAPI, and Django REST Framework.&lt;/p&gt;
&lt;p&gt;Test your understanding of consuming and designing REST APIs, Pydantic validation, and endpoint design. For more practice, revisit the course page for guided lessons and examples.&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 Django: Building a Portfolio App</title>
      <id>https://realpython.com/quizzes/django-portfolio-project/</id>
      <link href="https://realpython.com/quizzes/django-portfolio-project/"/>
      <updated>2026-03-26T12:00:00+00:00</updated>
      <summary>Test your Django basics: frameworks, projects, views, templates, models, URLs, and migrations with practical questions.</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/django-portfolio-project/&quot;&gt;Getting Started With Django: Building a Portfolio App&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll review core Django concepts like projects, apps, URL routing, views, templates, models, and migrations.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll reinforce how Django&amp;rsquo;s framework pieces fit together to handle requests and interact with the database. This quiz helps solidify the foundations needed to build and structure real-world Django 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>How to Use Git: A Beginner&#x27;s Guide</title>
      <id>https://realpython.com/how-to-use-git/</id>
      <link href="https://realpython.com/how-to-use-git/"/>
      <updated>2026-03-25T14:00:00+00:00</updated>
      <summary>Learn how to track your code with Git using clear, step-by-step instructions. Use this guide as a reference for managing projects with version control.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;This tutorial shows you how to use Git to track changes in a project using just a few core commands and save clean snapshots of your work. If you’ve ever changed a file, broken something, and wished you could undo it, version control makes that possible. Git keeps a running history of your files so you can see what changed and when.&lt;/p&gt;
&lt;p&gt;In this guide, you’ll set up Git locally and use the core workflow from the terminal to track and record changes in a Python project. By the end, you’ll have a working Git repository with a recorded commit history you can inspect and manage:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/git-log-example.9ee63cec3e36.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/git-log-example.9ee63cec3e36.png&quot; width=&quot;1920&quot; height=&quot;1141&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/git-log-example.9ee63cec3e36.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/git-log-example.9ee63cec3e36.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/git-log-example.9ee63cec3e36.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/git-log-example.9ee63cec3e36.png 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Terminal output showing git log with several commits in the repository history.&quot; data-asset=&quot;6831&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Commit History Displayed With git log&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;In the next sections, you’ll create your own repository and begin building that history from scratch. Before you begin, you can download a Git cheat sheet to keep the core commands handy:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Cheat Sheet:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/how-to-use-git-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-how-to-use-git-cheatsheet&quot; markdown&gt;Click here to download your free Git cheat sheet&lt;/a&gt; and keep the core Git workflow, essential commands, and commit tips at your fingertips.&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.1fb5b1968c3f.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 Git: A Beginner&#x27;s Guide” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;How to Use Git: A Beginner&#x27;s Guide&quot; src=&quot;https://files.realpython.com/media/How-to-Use-Git_Watermarked.295cafcd8d51.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-Git_Watermarked.295cafcd8d51.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Use-Git_Watermarked.295cafcd8d51.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Use-Git_Watermarked.295cafcd8d51.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Use-Git_Watermarked.295cafcd8d51.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/how-to-use-git/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use Git: A Beginner&#x27;s Guide&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your knowledge of Git basics: initializing repos, staging files, committing snapshots, and managing your project history.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;how-to-use-git-prerequisites&quot;&gt;How to Use Git: Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#how-to-use-git-prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you start tracking your code with Git, make sure you have the right tools in place. This tutorial assumes that you’re comfortable working with the command line and have some basic Python knowledge.&lt;/p&gt;
&lt;p&gt;Here’s what you’ll need to get started:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; or command prompt&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;Python 3.10 or higher&lt;/a&gt; installed on your system&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; Git and GitHub are often confused, but they’re not the same thing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;a href=&quot;/ref/tools/git/&quot; class=&quot;ref-link&quot;&gt;Git&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt; is &lt;a href=&quot;/ref/best-practices/version-control/&quot; class=&quot;ref-link&quot;&gt;version control&lt;/a&gt; software that runs on your computer. It tracks changes to your files and manages your project’s history locally.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;GitHub&lt;/em&gt;&lt;/strong&gt; is an online platform for hosting Git repositories. It provides collaboration tools that make sharing code, working with teams, and backing up your projects easier.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You don’t need a GitHub account to use Git or follow this tutorial. Later, if you want to share your code with others or back it up online, you can optionally push your Git repository to platforms like &lt;a href=&quot;https://github.com/&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;https://about.gitlab.com/&quot;&gt;GitLab&lt;/a&gt;, or &lt;a href=&quot;https://www.atlassian.com/software/bitbucket&quot;&gt;Bitbucket&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To learn more about the differences between Git and GitHub, check out &lt;a href=&quot;https://realpython.com/python-git-github-intro/&quot;&gt;Introduction to Git and GitHub for Python Developers&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;With these prerequisites in place, you’re ready to begin setting up Git and tracking changes in your project. In the next step, you’ll install Git, prepare your existing Python files, and initialize your first repository.&lt;/p&gt;
&lt;h2 id=&quot;step-1-install-git-and-prepare-your-project&quot;&gt;Step 1: Install Git and Prepare Your Project&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-install-git-and-prepare-your-project&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To start, you’ll check whether Git is installed on your system, prepare a simple project, and initialize a Git repository so you can begin tracking changes right away.&lt;/p&gt;
&lt;h3 id=&quot;check-whether-git-is-already-installed&quot;&gt;Check Whether Git Is Already Installed&lt;a class=&quot;headerlink&quot; href=&quot;#check-whether-git-is-already-installed&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Before you can start using Git, you need to make sure it’s installed on your machine. Chances are that Git is already present on your system. To check whether Git is installed, run this command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--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.1fb5b1968c3f.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 this command displays a Git version, you’re good to go and can &lt;a href=&quot;https://realpython.com/how-to-use-git/#create-a-project-directory&quot;&gt;create a project directory&lt;/a&gt;. Otherwise, you need to install Git on your system before continuing.&lt;/p&gt;
&lt;h3 id=&quot;install-git-on-your-system&quot;&gt;Install Git on Your System&lt;a class=&quot;headerlink&quot; href=&quot;#install-git-on-your-system&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Luckily, Git provides installers for Windows, macOS, and Linux on its &lt;a href=&quot;https://git-scm.com/install&quot;&gt;official website&lt;/a&gt;, offering a straightforward way to install Git on your machine. Because installation steps vary across operating systems, this guide links to the official documentation rather than reproducing those steps here.&lt;/p&gt;
&lt;p&gt;If you prefer a graphical interface, you can install a Git client such as &lt;a href=&quot;https://desktop.github.com/&quot;&gt;GitHub Desktop&lt;/a&gt;, &lt;a href=&quot;https://www.sourcetreeapp.com/&quot;&gt;Sourcetree&lt;/a&gt;, or &lt;a href=&quot;https://www.gitkraken.com/&quot;&gt;GitKraken&lt;/a&gt;. These tools install Git automatically during setup.&lt;/p&gt;
&lt;p&gt;Once installed, open your terminal and confirm that Git is available:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--version
&lt;span class=&quot;go&quot;&gt;git version 2.24.0.windows.2&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.1fb5b1968c3f.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;Your Git version may appear slightly different from this example, depending on your operating system and when you installed Git. That’s perfectly fine. As long as Git is installed and the command runs successfully, you’ll be able to follow along with the rest of this tutorial without any issues.&lt;/p&gt;
&lt;h3 id=&quot;create-a-project-directory&quot;&gt;Create a Project Directory&lt;a class=&quot;headerlink&quot; href=&quot;#create-a-project-directory&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-git/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/how-to-use-git/ »&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: Using Data Classes in Python</title>
      <id>https://realpython.com/quizzes/data-classes/</id>
      <link href="https://realpython.com/quizzes/data-classes/"/>
      <updated>2026-03-25T12:00:00+00:00</updated>
      <summary>Test your knowledge of Python data classes, namedtuple, immutability, auto-generated methods, inheritance, and slots.</summary>
      <content type="html">
        &lt;p&gt;Revisit how Python data classes work with &lt;a href=&quot;https://realpython.com/courses/python-data-classes/&quot;&gt;Python Data Classes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll review how to define data classes, add default values to fields, customize ordering and comparisons, and work with immutable data classes.&lt;/p&gt;
&lt;p&gt;This quiz is based on the video course and reinforces the practical syntax and patterns you need to create concise classes and reduce boilerplate.&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 CRUD Operations in SQL</title>
      <id>https://realpython.com/courses/understanding-crud-operations-sql/</id>
      <link href="https://realpython.com/courses/understanding-crud-operations-sql/"/>
      <updated>2026-03-24T14:00:00+00:00</updated>
      <summary>Learn how CRUD operations work in SQL by writing raw SQL queries with SQLite and using SQLAlchemy as an ORM in Python.</summary>
      <content type="html">
        &lt;p&gt;CRUD operations are at the heart of nearly every application you interact with. As a developer, you usually want to create data, read or retrieve data, update data, and delete data. Whether you access a database or interact with a REST API, only when all four operations are present are you able to make a complete data roundtrip in your app.&lt;/p&gt;
&lt;p&gt;Creating, reading, updating, and deleting are so vital in software development that these methods are widely referred to as &lt;strong&gt;CRUD&lt;/strong&gt;. Understanding CRUD will give you an actionable blueprint when you build applications and help you understand how the applications you use work behind the scenes. So, what exactly does CRUD mean?&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 Modules and Packages: An Introduction</title>
      <id>https://realpython.com/quizzes/python-modules-packages-introduction/</id>
      <link href="https://realpython.com/quizzes/python-modules-packages-introduction/"/>
      <updated>2026-03-24T12:00:00+00:00</updated>
      <summary>Test your knowledge of Python modules and packages. Learn about imports, namespaces, the dir() function, and more.</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-modules-packages/&quot;&gt;Python Modules and Packages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to write and import modules and packages, how to structure code for modular development, and how to combine modules to create larger applications.&lt;/p&gt;
&lt;p&gt;This quiz will help you practice organizing projects so they stay easier to maintain and grow.&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 Note-Taking to Learn Python</title>
      <id>https://realpython.com/python-note-taking-guide/</id>
      <link href="https://realpython.com/python-note-taking-guide/"/>
      <updated>2026-03-23T14:00:00+00:00</updated>
      <summary>Having a hard time retaining information from learning resources? Learn some Python note-taking tips to enhance your learning experience!</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Learning Python can be genuinely hard, and it’s normal to struggle with fundamental concepts. Research has shown that note-taking is invaluable when learning new things. This guide will help you get the most out of your learning efforts by showing you how to take better notes as you walk through an existing tutorial and keep handwritten notes on the side:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/optimized-title.83c09e9c51f4.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid &quot; src=&quot;https://files.realpython.com/media/optimized-title.83c09e9c51f4.png&quot; width=&quot;1268&quot; height=&quot;1116&quot; srcset=&quot;/cdn-cgi/image/width=317,format=auto/https://files.realpython.com/media/optimized-title.83c09e9c51f4.png 317w, /cdn-cgi/image/width=422,format=auto/https://files.realpython.com/media/optimized-title.83c09e9c51f4.png 422w, /cdn-cgi/image/width=634,format=auto/https://files.realpython.com/media/optimized-title.83c09e9c51f4.png 634w, /cdn-cgi/image/width=1268,format=auto/https://files.realpython.com/media/optimized-title.83c09e9c51f4.png 1268w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Photo of handwritten Python Learning Notes&quot; data-asset=&quot;6780&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;In this guide, you’ll begin by briefly learning about the benefits of note-taking. Then, you’ll follow along with an existing Real Python tutorial as you perform note-taking steps to help make the information in the tutorial really stick. To help you stay organized as you practice, download the &lt;strong&gt;Python Note-Taking Worksheet&lt;/strong&gt; below. It outlines the process you’ll learn here and provides a repeatable framework you can use with future tutorials:&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 PDF:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-note-taking-guide-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-note-taking-guide-cheatsheet&quot; markdown&gt;Click here to download your free Python Note-Taking Worksheet&lt;/a&gt; that outlines that note-taking process.&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.1fb5b1968c3f.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 Note-Taking to Learn Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;How to Use Note Taking to Learn Python&quot; src=&quot;https://files.realpython.com/media/How-to-Use-Note-Taking-to-Learn-Python_Watermarked.b92aea8039f7.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-Note-Taking-to-Learn-Python_Watermarked.b92aea8039f7.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Use-Note-Taking-to-Learn-Python_Watermarked.b92aea8039f7.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Use-Note-Taking-to-Learn-Python_Watermarked.b92aea8039f7.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Use-Note-Taking-to-Learn-Python_Watermarked.b92aea8039f7.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-note-taking-guide/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use Note-Taking to Learn Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of note-taking techniques that help you learn Python more effectively and retain what you study.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;what-is-python-note-taking&quot;&gt;What Is Python Note-Taking?&lt;a class=&quot;headerlink&quot; href=&quot;#what-is-python-note-taking&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In the context of learning, &lt;strong&gt;note-taking&lt;/strong&gt; is the process of recording information from a source while you’re consuming it. A traditional example is a student jotting down key concepts during a lecture. Another example is typing out lines of code or unfamiliar words while watching a video course, listening to a presentation, or reading a learning resource.&lt;/p&gt;
&lt;p&gt;In this guide, Python note-taking refers to taking notes specific to learning Python.&lt;/p&gt;
&lt;p&gt;People take notes for a variety of reasons. Usually, the intent is to return to the notes at a later time to remind the note-taker of the information covered during the learning session.&lt;/p&gt;
&lt;p&gt;In addition to the value of having a physical set of notes to refer back to, &lt;a href=&quot;https://www.academia.edu/95318355/The_impact_of_note_taking_while_listening_on_listening_comprehension_in_a_higher_education_context&quot;&gt;studies have found&lt;/a&gt; that the act of taking notes alone improves a student’s ability to recall information on a topic.&lt;/p&gt;
&lt;p&gt;This guide focuses on handwritten note-taking—that is, using a writing utensil and paper. &lt;a href=&quot;https://www.sciencedirect.com/science/article/pii/S2211368118300214&quot;&gt;Several studies&lt;/a&gt; suggest that this form of note-taking is especially effective for understanding a topic and remembering it later. If taking notes by hand isn’t viable for you, don’t worry! The concepts presented here should be applicable to other forms of note-taking as well.&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;Since this guide focuses on taking notes while learning Python programming, you’ll start by referencing the Real Python tutorial &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;Python for Loops: The Pythonic Way&lt;/a&gt;. This resource is a strong choice because it clearly explains a fundamental programming concept that you’ll use throughout your Python journey.&lt;/p&gt;
&lt;p&gt;Once you have the resource open in your browser, set aside a few pieces of paper and have a pen or pencil ready. Alternatively, you can take notes on a tablet with a stylus or another writing tool.&lt;/p&gt;
&lt;p&gt;Generally, taking notes by hand has a stronger impact on learning than other methods, such as typing into a text document. For more information on the effectiveness of taking notes by hand versus typing, see this &lt;a href=&quot;https://www.gse.harvard.edu/ideas/usable-knowledge/17/08/note-taking-low-tech-often-best&quot;&gt;article from the Harvard Graduate School of Education&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;step-1-write-down-major-concepts&quot;&gt;Step 1: Write Down Major Concepts&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-write-down-major-concepts&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With your note-taking tools ready, start by skimming the learning resource. Usually, you want to look at the major headings to see what topics the material covers. For Real Python content, you can instead just look at the table of contents at the top of the page, since this lists the main sections.&lt;/p&gt;
&lt;p&gt;The major headings for your example resource are as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-for-loop/#getting-started-with-the-python-for-loop&quot;&gt;Getting Started with the Python &lt;code&gt;for&lt;/code&gt; Loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-for-loop/#traversing-built-in-collections-in-python&quot;&gt;Traversing Built-In Collections in Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-for-loop/#using-advanced-for-loop-syntax&quot;&gt;Using Advanced &lt;code&gt;for&lt;/code&gt; Loop Syntax&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-for-loop/#exploring-pythonic-looping-techniques&quot;&gt;Exploring Pythonic Looping Techniques&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-for-loop/#understanding-common-pitfalls-in-for-loops&quot;&gt;Understanding Common Pitfalls in &lt;code&gt;for&lt;/code&gt; Loops&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-for-loop/#using-for-loops-vs-comprehensions&quot;&gt;Using &lt;code&gt;for&lt;/code&gt; Loops vs Comprehensions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-for-loop/#using-async-for-loops-for-asynchronous-iteration&quot;&gt;Using &lt;code&gt;async for&lt;/code&gt; Loops for Asynchronous Iteration&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The list above doesn’t include subheadings like “Sequences: Lists, Tuples, Strings, and Ranges” under “Traversing Built-In Collections in Python”. For now, stick to top-level headings.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-note-taking-guide/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-note-taking-guide/ »&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: Strings and Character Data in Python</title>
      <id>https://realpython.com/quizzes/python-strings-characters/</id>
      <link href="https://realpython.com/quizzes/python-strings-characters/"/>
      <updated>2026-03-23T12:00:00+00:00</updated>
      <summary>Test your Python string and bytes knowledge! Explore immutability, f-strings, indexing, string methods, and bytes() usage.</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-strings/&quot;&gt;Python Strings and Character Data&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This quiz helps you deepen your understanding of Python&amp;rsquo;s string and byte data types. You&amp;rsquo;ll explore core concepts like string immutability, interpolation with f-strings, Unicode handling, key string methods, and working with &lt;code&gt;bytes&lt;/code&gt; objects.&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 #288: Automate Exploratory Data Analysis &amp; Invent Python Comprehensions</title>
      <id>https://realpython.com/podcasts/rpp/288/</id>
      <link href="https://realpython.com/podcasts/rpp/288/"/>
      <updated>2026-03-20T12:00:00+00:00</updated>
      <summary>How do you quickly get an understanding of what&#x27;s inside a new set of data? How can you share an exploratory data analysis with your team? 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 quickly get an understanding of what&#x27;s inside a new set of data? How can you share an exploratory data analysis with your team? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Python Decorators 101</title>
      <id>https://realpython.com/quizzes/python-decorators-101/</id>
      <link href="https://realpython.com/quizzes/python-decorators-101/"/>
      <updated>2026-03-20T12:00:00+00:00</updated>
      <summary>Work through this quiz to review first-class functions, inner functions, and decorators, and learn how to use them to extend behavior cleanly in Python.</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-decorators-101/&quot;&gt;Python Decorators 101&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Work through this quiz to review first-class functions, inner functions, and decorators, and learn how to create, reuse, and apply them to extend behavior cleanly 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>Quiz: How to Add Python to PATH</title>
      <id>https://realpython.com/quizzes/add-python-to-path/</id>
      <link href="https://realpython.com/quizzes/add-python-to-path/"/>
      <updated>2026-03-19T12:00:00+00:00</updated>
      <summary>Test your knowledge of the PATH variable and learn how to add Python on Windows, Linux, and macOS for easy terminal access.</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/add-python-to-path/&quot;&gt;Add Python to PATH&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll review what the &lt;code&gt;PATH&lt;/code&gt; environment variable is, how the shell searches it in order.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also practice adding Python to &lt;code&gt;PATH&lt;/code&gt; on Windows, Linux, and macOS, prepending directories with export, refreshing your session with source, and managing unwanted entries so the &lt;code&gt;python&lt;/code&gt; command works as expected.&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 Weekly Python Study Schedule: 7 Days to Consistent Progress</title>
      <id>https://realpython.com/weekly-study-schedule/</id>
      <link href="https://realpython.com/weekly-study-schedule/"/>
      <updated>2026-03-18T14:00:00+00:00</updated>
      <summary>Create a weekly Python study schedule you can stick to. Build a realistic 7-day plan, stay consistent, and turn learning Python into a sustainable habit.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Staying consistent with learning Python can be challenging. This guide helps you create a weekly Python study schedule that you can stick to and shows you how it works in practice.&lt;/p&gt;
&lt;p&gt;By the end of this guide, you’ll have a &lt;strong&gt;practical, personal schedule&lt;/strong&gt; that fits your life, not the other way around. You’ll walk away with a repeatable 7-day plan and a worksheet you can reuse each week. You’ll know exactly what to study, when to study, and how to maintain momentum, even when life gets busy.&lt;/p&gt;
&lt;p&gt;In this guide, you’ll learn how to move from vague intentions to a concrete system using three steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Clarify Your Goal:&lt;/strong&gt; Define exactly what progress looks like for the next seven days.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design Your Plan:&lt;/strong&gt; Build a specific 7-day schedule that accounts for real life.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make It Stick:&lt;/strong&gt; Use behavioral psychology to turn that schedule into a habit.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By following these steps, you’ll transform your learning process from random bursts of energy into a sustainable routine. Before you dive in, take a moment to make sure you have everything you need to get started.&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;This guide is for beginners and early intermediate learners who feel stuck, inconsistent, or overwhelmed by scattered tutorials. You don’t need advanced technical knowledge to benefit from this system.&lt;/p&gt;
&lt;p&gt;To get the most out of this process, you’ll need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Time:&lt;/strong&gt; A willingness to invest 30 to 45 minutes per day for one week.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tools:&lt;/strong&gt; A calendar app (Google Calendar, Outlook, Notion) or a physical notebook.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ideas:&lt;/strong&gt; A rough list of Python topics you want to learn or a manageable project idea. If you need inspiration, check out &lt;a href=&quot;https://realpython.com/what-can-i-do-with-python/&quot;&gt;What Can I Do With Python?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Materials:&lt;/strong&gt; The &lt;strong&gt;Weekly Python Study Schedule Worksheet&lt;/strong&gt;, which is available as a downloadable PDF:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your PDF:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/weekly-study-schedule-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-weekly-study-schedule-cheatsheet&quot; markdown&gt;Click here to download the free Weekly Python Study Schedule Worksheet&lt;/a&gt; you can use to build a consistent study schedule.&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.1fb5b1968c3f.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 “Build Your Weekly Python Study Schedule: 7 Days to Consistent Progress” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

      &lt;a href=&quot;/quizzes/weekly-study-schedule/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe0e6;&quot; alt=&quot;Build Your Python Weekly Study Schedule: 7 Days to Consistent Progress&quot; src=&quot;https://files.realpython.com/media/Build-Your-Python-Weekly-Study-Schedule-7-Days-to-Consistent-Progress_Watermarked.d8098e8b5692.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Build-Your-Python-Weekly-Study-Schedule-7-Days-to-Consistent-Progress_Watermarked.d8098e8b5692.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Build-Your-Python-Weekly-Study-Schedule-7-Days-to-Consistent-Progress_Watermarked.d8098e8b5692.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Build-Your-Python-Weekly-Study-Schedule-7-Days-to-Consistent-Progress_Watermarked.d8098e8b5692.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Build-Your-Python-Weekly-Study-Schedule-7-Days-to-Consistent-Progress_Watermarked.d8098e8b5692.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/weekly-study-schedule/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Build Your Weekly Python Study Schedule: 7 Days to Consistent Progress&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Build a consistent Python study habit with a repeatable 7-day plan. Learn to set specific goals, schedule your week, and make practice stick.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;p&gt;Once you have these ready, the first step is to clarify exactly what you’re aiming for this week.&lt;/p&gt;
&lt;h2 id=&quot;step-1-define-what-progress-means-for-you-this-week&quot;&gt;Step 1: Define What Progress Means for You This Week&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-define-what-progress-means-for-you-this-week&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;People often fall off their learning goals because those goals are too abstract. Statements like “I want to learn Python” are broad aspirations rather than specific tasks. They describe intentions, but they don’t give you a concrete action to take.&lt;/p&gt;
&lt;p&gt;Similarly, “I want to get better at Python” sounds nice, but it doesn’t tell you what to do on Monday at 7 p.m. When you sit down at your computer with a goal that vague, you can spend the first twenty minutes just deciding what to do.&lt;/p&gt;
&lt;p&gt;To fix this, you need to shrink your horizon and focus on a smaller timeframe. Instead of trying to plan your entire coding journey at once, focus exclusively on the next seven days. This approach reduces the pressure to know everything right now and lets you focus on immediate, achievable tasks.&lt;/p&gt;
&lt;h3 id=&quot;understand-why-specificity-matters&quot;&gt;Understand Why Specificity Matters&lt;a class=&quot;headerlink&quot; href=&quot;#understand-why-specificity-matters&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Research on goal setting, specifically the work by Locke and Latham, highlights the relationship between clarity and effort. Their studies show that specific, challenging goals lead to higher performance than easy goals or vague instructions to “do your best.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Specific goals focus attention, increase effort and persistence, and motivate the development of strategies to accomplish the goal.&lt;/p&gt;
&lt;p&gt;— Locke and Latham, &lt;em&gt;A Theory of Goal Setting &amp;amp; Task Performance&lt;/em&gt; (&lt;a href=&quot;https://www.researchgate.net/publication/232501090_A_Theory_of_Goal_Setting_Task_Performance&quot;&gt;Source&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you define a specific target, your brain switches from “What should I do?” to “How do I do it?” If you can’t describe what progress looks like in seven days, your schedule doesn’t have anything to aim toward.&lt;/p&gt;
&lt;p&gt;Abstract goals require motivation to start. Specific goals require only clarity. When you know the target, practice becomes more approachable and sustainable.&lt;/p&gt;
&lt;p&gt;You can see the difference in clarity in the table below:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/weekly-study-schedule/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/weekly-study-schedule/ »&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>Downloading Files From URLs With Python</title>
      <id>https://realpython.com/courses/downloading-files-urls/</id>
      <link href="https://realpython.com/courses/downloading-files-urls/"/>
      <updated>2026-03-17T14:00:00+00:00</updated>
      <summary>Learn to download files from URLs with Python using urllib and requests, including data streaming for large files.</summary>
      <content type="html">
        &lt;p&gt;Python makes it straightforward to download files from a URL with its robust set of libraries. For quick tasks, you can use the built-in &lt;code&gt;urllib&lt;/code&gt; module or the &lt;code&gt;requests&lt;/code&gt; library to fetch and save files. When working with large files, streaming data in chunks can help save memory and improve performance.&lt;/p&gt;
&lt;p&gt;You can also perform parallel file downloads using &lt;code&gt;ThreadPoolExecutor&lt;/code&gt; for multithreading or the &lt;code&gt;aiohttp&lt;/code&gt; library for asynchronous tasks. These approaches allow you to handle multiple downloads concurrently, significantly reducing the total download time if you&amp;rsquo;re handling many files.&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;You can use Python to &lt;strong&gt;download files with libraries&lt;/strong&gt; like &lt;strong&gt;&lt;code&gt;urllib&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;requests&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;download a file using a URL&lt;/strong&gt; in Python, you can use &lt;strong&gt;&lt;code&gt;urlretrieve()&lt;/code&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;code&gt;requests.get()&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;extract data from a URL&lt;/strong&gt; in Python, you use the response object from &lt;strong&gt;&lt;code&gt;requests&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;download a CSV file from a URL&lt;/strong&gt; in Python, you may need to specify the format in the URL or query parameters.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll be downloading a range of economic data from the World Bank Open Data platform.&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>Spyder: Your IDE for Data Science Development in Python</title>
      <id>https://realpython.com/spyder-ide/</id>
      <link href="https://realpython.com/spyder-ide/"/>
      <updated>2026-03-16T14:00:00+00:00</updated>
      <summary>Learn how to use the Spyder IDE, a Python code editor built for scientists, engineers, and data analysts working with data-heavy workflows.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;There are many different integrated development environments (IDEs) to choose from for Python development. One popular option for data-focused work is Spyder, an open-source Python IDE geared toward scientists, engineers, and data analysts. Its name comes from &lt;em&gt;Scientific PYthon Development EnviRonment&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Out of the box, it has powerful plotting, what-if, and profiling capabilities. It also integrates well with the &lt;a href=&quot;https://realpython.com/tutorials/data-science/&quot;&gt;data science&lt;/a&gt; ecosystem, is extensible with first- or third-party plugins, and has a relatively quick learning curve.&lt;/p&gt;
&lt;p&gt;How does Spyder stack up against other Python &lt;a href=&quot;/ref/glossary/ide/&quot; class=&quot;ref-link&quot;&gt;IDEs&lt;/a&gt;? It depends on your use case. It’s not as powerful or customizable as &lt;a href=&quot;/ref/code-editors-ides/visual-studio-code/&quot; class=&quot;ref-link&quot;&gt;VS Code&lt;/a&gt;, nor does it pretend to be. It does, however, excel for data science workflows:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Pick Spyder&lt;/th&gt;
&lt;th&gt;Pick an Alternative&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Optimized for data science workflows&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dedicated to Python&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full-featured&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;VS Code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Supports interactive notebooks&lt;/td&gt;
&lt;td&gt;✅ With a plugin&lt;/td&gt;
&lt;td&gt;Jupyter, VS Code&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;If you’re focused on data science in Python, Spyder is a strong fit. For a more full-featured IDE or heavy notebook use, consider &lt;a href=&quot;https://realpython.com/jupyter-notebook-introduction/&quot;&gt;Jupyter&lt;/a&gt; or VS Code instead.&lt;/p&gt;
&lt;p&gt;You can get a handy Spyder IDE cheat sheet at 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 Your Free Spyder Cheat Sheet:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/spyder-ide-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-spyder-ide-cheatsheet&quot; markdown&gt;Click here to download the PDF&lt;/a&gt; with installation steps, shortcuts, and interface tips.&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.1fb5b1968c3f.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 “Spyder: Your IDE for Data Science Development in Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;Spyder: Your IDE for Data Science Development in Python&quot; src=&quot;https://files.realpython.com/media/Pythons-Spyder-IDE_Watermarked.a5f4691ecaa3.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Pythons-Spyder-IDE_Watermarked.a5f4691ecaa3.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Pythons-Spyder-IDE_Watermarked.a5f4691ecaa3.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Pythons-Spyder-IDE_Watermarked.a5f4691ecaa3.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Pythons-Spyder-IDE_Watermarked.a5f4691ecaa3.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/spyder-ide/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Spyder: Your IDE for Data Science Development in Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your knowledge of the Spyder IDE for Python data science, including its Variable Explorer, Plots pane, and Profiler.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;start-using-the-spyder-ide&quot;&gt;Start Using the Spyder IDE&lt;a class=&quot;headerlink&quot; href=&quot;#start-using-the-spyder-ide&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can install &lt;a href=&quot;/ref/code-editors-ides/spyder/&quot; class=&quot;ref-link&quot;&gt;Spyder&lt;/a&gt; in a few ways: as a standalone program, through a prepackaged distribution, or from the command line. You can also try out Spyder &lt;a href=&quot;https://mybinder.org/v2/gh/spyder-ide/binder-environments/spyder-stable?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fspyder-ide%252FSpyder-Workshop%26urlpath%3Ddesktop%252F%26branch%3Dmaster&quot;&gt;online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To install Spyder as a standalone application, go to the Spyder &lt;a href=&quot;https://www.spyder-ide.org/download&quot;&gt;download page&lt;/a&gt;. When you visit the site, it detects your operating system and offers the appropriate download. Once you download your install file, open it and follow the directions.&lt;/p&gt;
&lt;p&gt;You can also install a Python distribution tailored to data science, such as &lt;a href=&quot;/ref/tools/anaconda/&quot; class=&quot;ref-link&quot;&gt;Anaconda&lt;/a&gt; or &lt;a href=&quot;https://winpython.github.io/&quot;&gt;WinPython&lt;/a&gt;. Both of these choices include Spyder in their base installations.&lt;/p&gt;
&lt;p&gt;You’ll likely want to install dependencies and useful data libraries in addition to Spyder. In this case, first create a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;Python virtual environment&lt;/a&gt;, then use this command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;conda&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;create&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-c&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;conda-forge&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-n&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;spyder-env&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;spyder&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;numpy&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;scipy&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pandas&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;matplotlib&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;sympy&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cython
&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.1fb5b1968c3f.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 install process for &lt;a href=&quot;/ref/glossary/pip/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; is similar. To install &lt;code&gt;spyder&lt;/code&gt; together with common packages, run:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;spyder&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;numpy&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;scipy&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pandas&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;matplotlib&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;sympy&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;cython
&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.1fb5b1968c3f.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;For more information on installing Spyder, refer to their &lt;a href=&quot;https://docs.spyder-ide.org/current/installation.html&quot;&gt;install guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Out of the box, the Spyder interface consists of three panes:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/interface.ab9b83e4a70e.jpg&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/interface.ab9b83e4a70e.jpg&quot; width=&quot;1904&quot; height=&quot;1072&quot; srcset=&quot;/cdn-cgi/image/width=476,format=auto/https://files.realpython.com/media/interface.ab9b83e4a70e.jpg 476w, /cdn-cgi/image/width=634,format=auto/https://files.realpython.com/media/interface.ab9b83e4a70e.jpg 634w, /cdn-cgi/image/width=952,format=auto/https://files.realpython.com/media/interface.ab9b83e4a70e.jpg 952w, /cdn-cgi/image/width=1904,format=auto/https://files.realpython.com/media/interface.ab9b83e4a70e.jpg 1904w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Spyder IDE Interface&quot; data-asset=&quot;6708&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;The Spyder IDE Interface&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;On the left, you see code in the &lt;em&gt;Editor&lt;/em&gt; pane. In the bottom right, you’ll find the &lt;em&gt;&lt;a href=&quot;https://realpython.com/ipython-interactive-python-shell/&quot;&gt;IPython&lt;/a&gt; Console&lt;/em&gt;. Here, you can run code and check past commands using the &lt;em&gt;History&lt;/em&gt; tab. The top-right area includes tabs such as &lt;em&gt;Help&lt;/em&gt;, &lt;em&gt;Debugger&lt;/em&gt;, &lt;em&gt;Files&lt;/em&gt;, &lt;em&gt;Find&lt;/em&gt;, and &lt;em&gt;Code Analysis&lt;/em&gt;. You’ll learn about the &lt;em&gt;Variable Explorer&lt;/em&gt;, &lt;em&gt;Plots&lt;/em&gt;, and &lt;em&gt;Profiler&lt;/em&gt; in the upcoming sections.&lt;/p&gt;
&lt;h2 id=&quot;explore-data-with-the-variable-explorer&quot;&gt;Explore Data With the Variable Explorer&lt;a class=&quot;headerlink&quot; href=&quot;#explore-data-with-the-variable-explorer&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/spyder-ide/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/spyder-ide/ »&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 #287: Crafting and Editing In-Depth Tutorials at Real Python</title>
      <id>https://realpython.com/podcasts/rpp/287/</id>
      <link href="https://realpython.com/podcasts/rpp/287/"/>
      <updated>2026-03-13T12:00:00+00:00</updated>
      <summary>What goes into creating the tutorials you read at Real Python? What are the steps in the editorial process, and who are the people behind the scenes? This week on the show, Real Python team members Martin Breuss, Brenda Weleschuk, and Philipp Acsany join us to discuss topic curation, review stages, and quality assurance.</summary>
      <content type="html">
        &lt;p&gt;What goes into creating the tutorials you read at Real Python? What are the steps in the editorial process, and who are the people behind the scenes? This week on the show, Real Python team members Martin Breuss, Brenda Weleschuk, and Philipp Acsany join us to discuss topic curation, review stages, and quality assurance.&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>Pydantic AI: Build Type-Safe LLM Agents in Python</title>
      <id>https://realpython.com/pydantic-ai/</id>
      <link href="https://realpython.com/pydantic-ai/"/>
      <updated>2026-03-11T14:00:00+00:00</updated>
      <summary>Learn how to use Pydantic AI to build type-safe LLM agents in Python with structured outputs, function calling, and dependency injection patterns.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Pydantic AI is a Python framework for building LLM agents that return validated, structured outputs using Pydantic models. Instead of parsing raw strings from LLMs, you get type-safe objects with automatic validation.&lt;/p&gt;
&lt;p&gt;If you’ve used FastAPI or Pydantic before, then you’ll recognize the familiar pattern of defining schemas with type hints and letting the framework handle the type validation for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pydantic AI&lt;/strong&gt; uses &lt;code&gt;BaseModel&lt;/code&gt; classes to define structured outputs that guarantee &lt;strong&gt;type safety&lt;/strong&gt; and automatic &lt;strong&gt;validation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;@agent.tool&lt;/code&gt; &lt;strong&gt;decorator&lt;/strong&gt; registers Python functions that &lt;strong&gt;LLMs can invoke&lt;/strong&gt; based on user queries and docstrings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dependency injection&lt;/strong&gt; with &lt;code&gt;deps_type&lt;/code&gt; provides &lt;strong&gt;type-safe&lt;/strong&gt; runtime context like database connections without using &lt;strong&gt;global state&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validation retries&lt;/strong&gt; automatically rerun queries when the LLM returns invalid data, which increases &lt;strong&gt;reliability&lt;/strong&gt; but also &lt;strong&gt;API costs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Google Gemini&lt;/strong&gt;, &lt;strong&gt;OpenAI&lt;/strong&gt;, and &lt;strong&gt;Anthropic&lt;/strong&gt; models support structured outputs best, while other providers have &lt;strong&gt;varying capabilities&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you invest time learning Pydantic AI, it helps to understand when it’s the right tool for your project. This decision table highlights common use cases and what to choose in each scenario:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Pydantic AI&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;If not, look into …&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You need structured, validated outputs from an LLM&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You’re building a quick prototype or single-agent app&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You already use Pydantic or FastAPI&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You need a large ecosystem of pre-built integrations (vector stores, retrievers, and so on)&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;&lt;a href=&quot;https://realpython.com/build-llm-rag-chatbot-with-langchain/&quot;&gt;LangChain&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/llamaindex-examples/&quot;&gt;LlamaIndex&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You want fine-grained control over prompts with no framework overhead&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;&lt;a href=&quot;https://realpython.com/chatgpt-api-python/&quot;&gt;Direct API calls&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Pydantic AI emphasizes type safety and minimal boilerplate, making it ideal if you value the FastAPI-style development experience.&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/pydantic-ai-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-pydantic-ai-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to work with Pydantic AI and build type-safe LLM agents in Python.&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.1fb5b1968c3f.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 “Pydantic AI: Build Type-Safe LLM Agents in Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #fe7e73;&quot; alt=&quot;PydanticAI: Typed LLM Agents With Structured Outputs&quot; src=&quot;https://files.realpython.com/media/Pydantic-AI-Typed-LLM-Agents-with-Structured-Outputs_Watermarked.baed59eae2f9.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Pydantic-AI-Typed-LLM-Agents-with-Structured-Outputs_Watermarked.baed59eae2f9.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Pydantic-AI-Typed-LLM-Agents-with-Structured-Outputs_Watermarked.baed59eae2f9.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Pydantic-AI-Typed-LLM-Agents-with-Structured-Outputs_Watermarked.baed59eae2f9.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Pydantic-AI-Typed-LLM-Agents-with-Structured-Outputs_Watermarked.baed59eae2f9.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/pydantic-ai/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Pydantic AI: Build Type-Safe LLM Agents in Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Learn the trade-offs of using Pydantic AI in production, including validation retries, structured outputs, tool usage, and token costs.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;start-using-pydantic-ai-to-create-agents&quot;&gt;Start Using Pydantic AI to Create Agents&lt;a class=&quot;headerlink&quot; href=&quot;#start-using-pydantic-ai-to-create-agents&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you dive into building agents with &lt;a href=&quot;/ref/ai-coding-tools/pydantic-ai/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;Pydantic AI&lt;/strong&gt;&lt;/a&gt; and Python, you’ll need to install it and set up an &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; key for your chosen language model provider. For this tutorial, you’ll use Google &lt;a href=&quot;/ref/ai-coding-tools/gemini/&quot; class=&quot;ref-link&quot;&gt;Gemini&lt;/a&gt;, which offers a free tier perfect for experimentation.&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; Pydantic AI is LLM-agnostic and supports multiple AI providers. Check the &lt;a href=&quot;https://ai.pydantic.dev/models/overview/&quot;&gt;Model Providers&lt;/a&gt; documentation page for more details on other providers.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You can install Pydantic AI from the &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;Python Package Index (PyPI)&lt;/a&gt; using a package manager like &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;. Before running the command below, you should create and activate a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;pydantic-ai
&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.1fb5b1968c3f.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 installs all supported model providers, including Google, Anthropic, and OpenAI. From this point on, you just need to set up your favorite provider’s API key to use their models with Pydantic AI. Note that in most cases, you’d need a paid subscription to get a working API key.&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; You can also power your Pydantic AI apps with local language models. To do this, you can use &lt;a href=&quot;/ref/ai-coding-tools/ollama/&quot; class=&quot;ref-link&quot;&gt;Ollama&lt;/a&gt; with your favorite local models. In this scenario, you won’t need to set up an API key.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;If you prefer a minimal installation with only Google Gemini support, you can install the &lt;a href=&quot;https://ai.pydantic.dev/install/#slim-install&quot;&gt;slim package&lt;/a&gt; instead:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;&lt;span class=&quot;s2&quot;&gt;&quot;pydantic-ai-slim[google]&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.1fb5b1968c3f.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;You need a personal &lt;a href=&quot;https://www.google.com/account/about/&quot;&gt;Google account&lt;/a&gt; to use the Gemini free tier. You’ll also need a Google API key to run the examples in this tutorial, so head over to &lt;a href=&quot;https://ai.google.dev/gemini-api/docs/api-key&quot;&gt;ai.google.dev&lt;/a&gt; to get a free API key.&lt;/p&gt;
&lt;p&gt;Once you have the API key, set it as an environment variable:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;span class=&quot;icon baseline text-muted&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.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; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ENV:GOOGLE_API_KEY&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;your-api-key-here&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.1fb5b1968c3f.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; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;&lt;span class=&quot;nb&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;your-api-key-here&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.1fb5b1968c3f.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 the installation complete and your API key configured, you’re ready to create your first agent. The Python professionals on Real Python’s team have technically reviewed and tested all the code examples in this tutorial, so you can work through them knowing they run as shown.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/pydantic-ai/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/pydantic-ai/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Working With APIs in Python: Reading Public Data</title>
      <id>https://realpython.com/courses/working-apis-reading-public-data/</id>
      <link href="https://realpython.com/courses/working-apis-reading-public-data/"/>
      <updated>2026-03-10T14:00:00+00:00</updated>
      <summary>Learn how to consume REST APIs with Python using the requests library, including authentication, query parameters, and handling responses.</summary>
      <content type="html">
        &lt;p&gt;Python is an excellent choice for working with Application Programming Interfaces (APIs), allowing you to efficiently consume and interact with them. By using the Requests library, you can easily fetch data from APIs that communicate using HTTP, such as REST, SOAP, or GraphQL APIs. This video course covers the essentials of consuming REST APIs with Python, including authentication and handling responses.&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;An &lt;strong&gt;API&lt;/strong&gt; is an interface that allows different systems to communicate, typically through requests and responses.&lt;/li&gt;
&lt;li&gt;Python is a versatile language for &lt;strong&gt;consuming APIs&lt;/strong&gt;, offering libraries like &lt;strong&gt;Requests&lt;/strong&gt; to simplify the process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;REST and GraphQL&lt;/strong&gt; are two common &lt;strong&gt;types of APIs&lt;/strong&gt;, with REST being more widely used for public APIs.&lt;/li&gt;
&lt;li&gt;To handle &lt;strong&gt;API authentication in Python&lt;/strong&gt;, you can use API keys or more complex methods like &lt;strong&gt;OAuth&lt;/strong&gt; to access protected resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Knowing how to consume an API is one of those magical skills that, once mastered, will crack open a whole new world of possibilities, and consuming APIs using Python is a great way to learn such a skill.&lt;/p&gt;
&lt;p&gt;By the end of this video course, you&amp;rsquo;ll be able to use Python to consume most of the APIs that you come across. If you&amp;rsquo;re a developer, then knowing how to consume APIs with Python will empower you to integrate data from various online sources into your 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>Python Gains frozendict and Other Python News for March 2026</title>
      <id>https://realpython.com/python-news-march-2026/</id>
      <link href="https://realpython.com/python-news-march-2026/"/>
      <updated>2026-03-09T14:00:00+00:00</updated>
      <summary>Catch up on the latest Python news: frozendict joins the built-ins, Django patches SQL injections, and AI SDKs race to add WebSocket transport.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;After years of community requests, Python is finally getting &lt;strong&gt;&lt;code&gt;frozendict&lt;/code&gt;&lt;/strong&gt;. The Steering Council accepted &lt;a href=&quot;https://peps.python.org/pep-0814/&quot;&gt;PEP 814&lt;/a&gt; in February, bringing an immutable, hashable dictionary as a built-in type in Python 3.15. It’s one of those additions that feels overdue, and the &lt;code&gt;frozenset&lt;/code&gt;-to-&lt;code&gt;set&lt;/code&gt; analogy makes it immediately intuitive. This is just one piece of a busy month of Python news.&lt;/p&gt;
&lt;p&gt;Beyond that, February brought security patches, AI SDK updates, and some satisfying infrastructure improvements under Python’s hood. Time to dive into the biggest Python news from the past month!&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/newsletter/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; markdown&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you’ll never miss another Python tutorial, course, or news update.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;python-releases-and-pep-highlights&quot;&gt;Python Releases and PEP Highlights&lt;a class=&quot;headerlink&quot; href=&quot;#python-releases-and-pep-highlights&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;/ref/glossary/python-steering-council/&quot; class=&quot;ref-link&quot;&gt;Steering Council&lt;/a&gt; was active in February, with several &lt;a href=&quot;/ref/glossary/pep/&quot; class=&quot;ref-link&quot;&gt;PEP&lt;/a&gt; decisions landing. On the release side, both the 3.14 and 3.13 branches got maintenance updates.&lt;/p&gt;
&lt;h3 id=&quot;python-3150-alpha-6-comprehension-unpacking-and-more&quot;&gt;Python 3.15.0 Alpha 6: Comprehension Unpacking and More&lt;a class=&quot;headerlink&quot; href=&quot;#python-3150-alpha-6-comprehension-unpacking-and-more&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://pythoninsider.blogspot.com/2026/02/python-3150-alpha-6.html&quot;&gt;Python 3.15.0a6&lt;/a&gt; shipped on February 11, continuing the alpha series toward the May 5 beta freeze. This release includes several accepted PEPs that are now testable:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://peps.python.org/pep-0798/&quot;&gt;PEP 798&lt;/a&gt;: Unpacking in &lt;a href=&quot;https://realpython.com/list-comprehension-python/&quot;&gt;comprehensions&lt;/a&gt; using &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;**&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://peps.python.org/pep-0799/&quot;&gt;PEP 799&lt;/a&gt;: A high-frequency, low-overhead statistical sampling &lt;a href=&quot;https://realpython.com/python-profiling/&quot;&gt;profiler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://peps.python.org/pep-0686/&quot;&gt;PEP 686&lt;/a&gt;: &lt;a href=&quot;https://realpython.com/python-encodings-guide/&quot;&gt;UTF-8&lt;/a&gt; as the default text encoding&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://peps.python.org/pep-0728/&quot;&gt;PEP 728&lt;/a&gt;: &lt;code&gt;TypedDict&lt;/code&gt; with typed extra items&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PEP 798 is the kind of quality-of-life improvement that makes you smile. It lets you &lt;a href=&quot;https://realpython.com/python-flatten-list/&quot;&gt;flatten&lt;/a&gt; or merge &lt;a href=&quot;/ref/glossary/collection/&quot; class=&quot;ref-link&quot;&gt;collections&lt;/a&gt; directly in a &lt;a href=&quot;/ref/glossary/comprehension/&quot; class=&quot;ref-link&quot;&gt;comprehension&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;lists&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&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;p&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;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&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;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;it&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lists&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;[1, 2, 3, 4, 5]&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;dicts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;a&quot;&lt;/span&gt;&lt;span class=&quot;p&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;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;b&quot;&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;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &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;d&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;d&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dicts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;{&#x27;a&#x27;: 1, &#x27;b&#x27;: 2}&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.1fb5b1968c3f.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;No more writing explicit loops just to concatenate a list of lists.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;/ref/glossary/jit-compiler/&quot; class=&quot;ref-link&quot;&gt;JIT compiler&lt;/a&gt; continues to show gains: &lt;strong&gt;3-4% on x86-64 Linux&lt;/strong&gt; over the standard &lt;a href=&quot;/ref/glossary/interpreter/&quot; class=&quot;ref-link&quot;&gt;interpreter&lt;/a&gt; and &lt;strong&gt;7-8% on AArch64 macOS&lt;/strong&gt; over the tail-calling interpreter, matching the numbers from &lt;a href=&quot;https://realpython.com/python-news-february-2026/#python-3150-alpha-4-and-5-two-releases-in-two-days&quot;&gt;alpha 5&lt;/a&gt;.&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; Alpha 7 is scheduled for March 10, 2026, with the beta phase starting May 5. If you maintain packages, now is a great time to &lt;a href=&quot;https://realpython.com/python-pre-release/&quot;&gt;test against early builds&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;h3 id=&quot;python-3143-and-31312-maintenance-releases&quot;&gt;Python 3.14.3 and 3.13.12: Maintenance Releases&lt;a class=&quot;headerlink&quot; href=&quot;#python-3143-and-31312-maintenance-releases&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;On February 3, the team shipped &lt;a href=&quot;https://www.python.org/downloads/release/python-3143/&quot;&gt;Python 3.14.3&lt;/a&gt; with around 300 bug fixes and &lt;a href=&quot;https://www.python.org/downloads/release/python-31312/&quot;&gt;Python 3.13.12&lt;/a&gt; with about 240 fixes. No new features here, but if you’re running either version in production, it’s worth grabbing these patches to stay current.&lt;/p&gt;
&lt;h3 id=&quot;pep-814-accepted-frozendict-joins-the-built-ins&quot;&gt;PEP 814 Accepted: &lt;code&gt;frozendict&lt;/code&gt; Joins the Built-Ins&lt;a class=&quot;headerlink&quot; href=&quot;#pep-814-accepted-frozendict-joins-the-built-ins&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This one has been on many Python developers’ wishlists for over a decade. &lt;a href=&quot;https://peps.python.org/pep-0814/&quot;&gt;PEP 814&lt;/a&gt;, authored by Victor Stinner and Donghee Na, adds &lt;code&gt;frozendict&lt;/code&gt; as a built-in &lt;a href=&quot;/ref/glossary/immutable/&quot; class=&quot;ref-link&quot;&gt;immutable&lt;/a&gt; &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionary&lt;/a&gt; type in Python 3.15.&lt;/p&gt;
&lt;p&gt;The concept is straightforward. Just as &lt;a href=&quot;/ref/builtin-types/frozenset/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;frozenset&lt;/code&gt;&lt;/a&gt; gives you an immutable version of &lt;a href=&quot;https://realpython.com/python-sets/&quot;&gt;&lt;code&gt;set&lt;/code&gt;&lt;/a&gt;, &lt;code&gt;frozendict&lt;/code&gt; gives you an immutable version of &lt;a href=&quot;/ref/builtin-types/dict/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;dict&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&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;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;config&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;frozendict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;localhost&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8080&lt;/span&gt;&lt;span class=&quot;p&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;config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;host&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&#x27;localhost&#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;config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;host&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;s2&quot;&gt;&quot;0.0.0.0&quot;&lt;/span&gt;
&lt;span class=&quot;gt&quot;&gt;Traceback (most recent call last):&lt;/span&gt;
&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;gr&quot;&gt;TypeError&lt;/span&gt;: &lt;span class=&quot;n&quot;&gt;&#x27;frozendict&#x27; object does not support item assignment&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.1fb5b1968c3f.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-news-march-2026/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-news-march-2026/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Use the OpenRouter API to Access Multiple AI Models via Python</title>
      <id>https://realpython.com/openrouter-api/</id>
      <link href="https://realpython.com/openrouter-api/"/>
      <updated>2026-03-04T14:00:00+00:00</updated>
      <summary>Access models from popular AI providers in Python through OpenRouter&#x27;s unified API with smart routing, fallbacks, and cost controls.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;One of the quickest ways to call multiple AI models from a single Python script is to use OpenRouter’s API, which acts as a unified routing layer between your code and multiple AI providers. By the end of this guide, you’ll access models from several providers through one unified API, as shown in the image below:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/open-router-multiple-AI-models-screenshot.adfb5097125a.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/open-router-multiple-AI-models-screenshot.adfb5097125a.png&quot; width=&quot;1527&quot; height=&quot;773&quot; srcset=&quot;/cdn-cgi/image/width=381,format=auto/https://files.realpython.com/media/open-router-multiple-AI-models-screenshot.adfb5097125a.png 381w, /cdn-cgi/image/width=509,format=auto/https://files.realpython.com/media/open-router-multiple-AI-models-screenshot.adfb5097125a.png 509w, /cdn-cgi/image/width=763,format=auto/https://files.realpython.com/media/open-router-multiple-AI-models-screenshot.adfb5097125a.png 763w, /cdn-cgi/image/width=1527,format=auto/https://files.realpython.com/media/open-router-multiple-AI-models-screenshot.adfb5097125a.png 1527w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Open Router Running Multiple AI Models&quot; data-asset=&quot;6755&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;OpenRouter Unified API Running Multiple AI Models&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;This convenience matters because the AI ecosystem is highly fragmented: each provider exposes its own API, authentication scheme, rate limits, and model lineup. Working with multiple providers often requires additional setup and integration effort, especially when you want to experiment with different models, compare outputs, or evaluate trade-offs for a specific task.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://openrouter.ai/&quot;&gt;OpenRouter&lt;/a&gt; gives you access to thousands of models from leading providers such as OpenAI, Anthropic, Mistral, Google, and Meta. You switch between them without changing your application code.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/openrouter-api-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-openrouter-api-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to use the OpenRouter API to access multiple AI models via Python.&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.1fb5b1968c3f.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 the OpenRouter API to Access Multiple AI Models via Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;How to Use the OpenRouter API to Access Multiple AI Models via Python&quot; src=&quot;https://files.realpython.com/media/How-To-Use-OpenRouter-to-Access-Multiple-AI-Models-via-Python_Watermarked-2.7cb51570b2ac.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-OpenRouter-to-Access-Multiple-AI-Models-via-Python_Watermarked-2.7cb51570b2ac.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-To-Use-OpenRouter-to-Access-Multiple-AI-Models-via-Python_Watermarked-2.7cb51570b2ac.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-To-Use-OpenRouter-to-Access-Multiple-AI-Models-via-Python_Watermarked-2.7cb51570b2ac.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-To-Use-OpenRouter-to-Access-Multiple-AI-Models-via-Python_Watermarked-2.7cb51570b2ac.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/openrouter-api/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use the OpenRouter API to Access Multiple AI Models via Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your Python skills with OpenRouter: learn unified API access, model switching, provider routing, and fallback strategies.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before diving into OpenRouter, you should be comfortable with Python fundamentals like importing &lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;modules&lt;/a&gt;, working with &lt;a href=&quot;/ref/glossary/dictionary/&quot; class=&quot;ref-link&quot;&gt;dictionaries&lt;/a&gt;, &lt;a href=&quot;/ref/builtin-exceptions/&quot; class=&quot;ref-link&quot;&gt;handling exceptions&lt;/a&gt;, and using environment &lt;a href=&quot;/ref/glossary/variable/&quot; class=&quot;ref-link&quot;&gt;variables&lt;/a&gt;. If you’re familiar with these basics, the first step is authenticating with OpenRouter’s API.&lt;/p&gt;
&lt;h2 id=&quot;step-1-connect-to-openrouters-api&quot;&gt;Step 1: Connect to OpenRouter’s API&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-connect-to-openrouters-api&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before using OpenRouter, you need to create an account and generate an &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; key. Some models require prepaid credits for access, but you can start with free access to test the API and confirm that everything is working.&lt;/p&gt;
&lt;p&gt;To generate an API key:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create an account at &lt;a href=&quot;https://openrouter.ai/&quot;&gt;OpenRouter.ai&lt;/a&gt; or sign in if you already have an account.&lt;/li&gt;
&lt;li&gt;Select &lt;em&gt;Keys&lt;/em&gt; from the dropdown menu and create an &lt;a href=&quot;https://openrouter.ai/settings/keys&quot;&gt;API key&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the name, something like &lt;em&gt;OpenRouter Testing&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Leave the remaining defaults and click &lt;em&gt;Create&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Copy the generated key and keep it secure. In a moment, you’ll store it as an environment variable rather than embedding it directly in your code.&lt;/p&gt;
&lt;p&gt;To call multiple AI models from a single &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;Python script&lt;/a&gt;, you’ll use OpenRouter’s API. You’ll use the &lt;a href=&quot;https://realpython.com/python-requests/&quot;&gt;&lt;code&gt;requests&lt;/code&gt; library&lt;/a&gt; to make HTTP calls, which gives you full control over the API interactions without requiring a specific &lt;a href=&quot;https://en.wikipedia.org/wiki/Software_development_kit&quot;&gt;SDK&lt;/a&gt;. This approach works with any HTTP client and keeps your code simple and transparent.&lt;/p&gt;
&lt;p&gt;First, create a new directory for your project and set up a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;. This isolates your project dependencies from your system Python installation:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;openrouter-project/
&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;openrouter-project/
&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;/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.1fb5b1968c3f.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, you can activate the virtual environment:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;span class=&quot;icon baseline text-muted&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.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; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;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;/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.1fb5b1968c3f.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; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;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.1fb5b1968c3f.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;You should see &lt;a href=&quot;/ref/stdlib/venv/&quot; class=&quot;ref-link&quot;&gt;(&lt;code&gt;venv&lt;/code&gt;)&lt;/a&gt; in your terminal prompt when it’s active. Now you’re ready to install the &lt;code&gt;requests&lt;/code&gt; package for conveniently &lt;a href=&quot;https://realpython.com/python-requests/&quot;&gt;making HTTP calls&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;requests
&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.1fb5b1968c3f.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/openrouter-api/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/openrouter-api/ »&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>What Does Python&#x27;s __init__.py Do?</title>
      <id>https://realpython.com/courses/init-py/</id>
      <link href="https://realpython.com/courses/init-py/"/>
      <updated>2026-03-03T14:00:00+00:00</updated>
      <summary>Learn how Python&#x27;s __init__.py declares packages, initializes variables, simplifies imports, and controls what gets exported.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s special &lt;code&gt;__init__.py&lt;/code&gt; file marks a directory as a regular Python package and allows you to import its modules. This file runs automatically the first time you import its containing package. You can use it to initialize package-level variables, define functions or classes, and structure the package&amp;rsquo;s namespace clearly for users.&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;A directory &lt;strong&gt;without an &lt;code&gt;__init__.py&lt;/code&gt; file&lt;/strong&gt; becomes a &lt;strong&gt;namespace package&lt;/strong&gt;, which behaves differently from a regular package and may cause slower imports.&lt;/li&gt;
&lt;li&gt;You can use &lt;code&gt;__init__.py&lt;/code&gt; to explicitly define a package&amp;rsquo;s &lt;strong&gt;public API&lt;/strong&gt; by importing specific modules or functions into the package namespace.&lt;/li&gt;
&lt;li&gt;The Python convention of using &lt;strong&gt;leading underscores&lt;/strong&gt; helps indicate to users which objects are intended as &lt;strong&gt;non-public&lt;/strong&gt;, although this convention can still be bypassed.&lt;/li&gt;
&lt;li&gt;Code inside &lt;code&gt;__init__.py&lt;/code&gt; runs &lt;strong&gt;only once&lt;/strong&gt; during the first import, even if you run the import statement multiple times.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Understanding how to effectively use &lt;code&gt;__init__.py&lt;/code&gt; helps you structure your Python packages in a clear, maintainable way, improving usability and namespace management.&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>Automate Python Data Analysis With YData Profiling</title>
      <id>https://realpython.com/ydata-profiling-eda/</id>
      <link href="https://realpython.com/ydata-profiling-eda/"/>
      <updated>2026-03-02T14:00:00+00:00</updated>
      <summary>Automate exploratory data analysis by transforming DataFrames into interactive reports with one command from YData Profiling.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The YData Profiling package generates an exploratory data analysis (EDA) report with a few lines of code. The report provides dataset and column-level analysis, including plots and summary statistics to help you quickly understand your dataset. These reports can be exported to HTML or JSON so you can share them with other stakeholders.&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;YData Profiling generates interactive reports&lt;/strong&gt; containing EDA results, including summary statistics, visualizations, correlation matrices, and data quality warnings from DataFrames.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ProfileReport&lt;/code&gt; creates a profile&lt;/strong&gt; you can save with &lt;code&gt;.to_file()&lt;/code&gt; for HTML or JSON export, or display inline with &lt;code&gt;.to_notebook_iframe()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Setting &lt;code&gt;tsmode=True&lt;/code&gt; and specifying a date column with &lt;code&gt;sortby&lt;/code&gt; &lt;strong&gt;enables time series analysis&lt;/strong&gt;, including stationarity tests and seasonality detection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The &lt;code&gt;.compare()&lt;/code&gt; method generates side-by-side reports&lt;/strong&gt; highlighting distribution shifts and statistical differences between datasets.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this tutorial, you’ll benefit from having knowledge of &lt;a href=&quot;https://realpython.com/learning-paths/pandas-data-science/&quot;&gt;pandas&lt;/a&gt;.&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 were tested using Python &lt;a href=&quot;https://realpython.com/python313-new-features/&quot;&gt;3.13&lt;/a&gt;. Additionally, you may need to install &lt;code&gt;setuptools&amp;lt;81&lt;/code&gt; for backward compatibility.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You can install this package using &lt;a href=&quot;/ref/glossary/pip/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&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.1fb5b1968c3f.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;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;ydata-profiling
&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.1fb5b1968c3f.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;Once installed, you’re ready to transform any &lt;a href=&quot;https://realpython.com/pandas-dataframe/&quot;&gt;pandas DataFrame&lt;/a&gt; into an interactive report. To follow along, download the example dataset you’ll work with 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 Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/ydata-profiling-eda-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-ydata-profiling-eda-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; and start automating Python data analysis with YData Profiling.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The following example generates a profiling report from the 2024 flight delay dataset and saves it to disk:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot; aria-label=&quot;Filename&quot;&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;flight_report.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;pandas&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;pd&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;ydata_profiling&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;ProfileReport&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;df&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read_csv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;flight_data_2024_sample.csv&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;profile&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ProfileReport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;profile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;flight_report.html&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.1fb5b1968c3f.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 &lt;a href=&quot;/ref/glossary/source-code/&quot; class=&quot;ref-link&quot;&gt;code&lt;/a&gt; generates an HTML file containing interactive visualizations, statistical summaries, and data quality warnings:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/report-overview.c5b7b1fa2ba4.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/report-overview.c5b7b1fa2ba4.png&quot; width=&quot;2225&quot; height=&quot;995&quot; srcset=&quot;/cdn-cgi/image/width=556,format=auto/https://files.realpython.com/media/report-overview.c5b7b1fa2ba4.png 556w, /cdn-cgi/image/width=741,format=auto/https://files.realpython.com/media/report-overview.c5b7b1fa2ba4.png 741w, /cdn-cgi/image/width=1112,format=auto/https://files.realpython.com/media/report-overview.c5b7b1fa2ba4.png 1112w, /cdn-cgi/image/width=2225,format=auto/https://files.realpython.com/media/report-overview.c5b7b1fa2ba4.png 2225w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Dataset overview displaying statistics and variable types. Statistics include 35 variables, 10,000 observations, and 3.2% missing cells. Variable types: 5 categorical, 23 numeric, 1 DateTime, 6 text.&quot; data-asset=&quot;6762&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;You can open the file in any browser to explore your data’s characteristics without writing additional analysis code.&lt;/p&gt;
&lt;p&gt;There are a number of tools available for high-level dataset exploration, but not all are built for the same purpose. The following table highlights a few common options and when each one is a good fit:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use case&lt;/th&gt;
&lt;th&gt;Pick&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You want to quickly generate an exploratory report&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ydata-profiling&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Generating exploratory data analysis reports with visualizations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You want an overview of a large dataset&lt;/td&gt;
&lt;td&gt;&lt;code&gt;skimpy&lt;/code&gt; or &lt;code&gt;df.describe()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Providing fast, lightweight summaries in the console&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You want to enforce data quality&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pandera&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Validating schemas and catching errors in data pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Overall, &lt;a href=&quot;https://docs.profiling.ydata.ai/latest/&quot;&gt;YData Profiling&lt;/a&gt; is best used as an exploratory report creation tool. If you’re looking to generate an overview for a large dataset, using &lt;a href=&quot;https://aeturrell.github.io/skimpy/&quot;&gt;SkimPy&lt;/a&gt; or a built-in &lt;a href=&quot;/ref/glossary/dataframe/&quot; class=&quot;ref-link&quot;&gt;DataFrame&lt;/a&gt; library method may be more efficient. Other tools, like &lt;a href=&quot;https://pandera.readthedocs.io/en/stable/&quot;&gt;Pandera&lt;/a&gt;, are more appropriate for data validation.&lt;/p&gt;
&lt;p&gt;If YData Profiling looks like the right choice for your use case, then keep reading to learn about its most important features.&lt;/p&gt;
&lt;div class=&quot;container border rounded text-wrap-pretty my-3&quot;&gt;

  &lt;p class=&quot;my-3&quot;&gt;&lt;mark class=&quot;marker-highlight&quot;&gt;&lt;strong&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.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 “Automate Python Data Analysis With YData Profiling” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

      &lt;a href=&quot;/quizzes/ydata-profiling-eda/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;Automate Python Data Analysis With YData Profiling&quot; src=&quot;https://files.realpython.com/media/YData-Profiling-One-Click-EDA_Watermarked.dd7cbf2e0693.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/YData-Profiling-One-Click-EDA_Watermarked.dd7cbf2e0693.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/YData-Profiling-One-Click-EDA_Watermarked.dd7cbf2e0693.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/YData-Profiling-One-Click-EDA_Watermarked.dd7cbf2e0693.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/YData-Profiling-One-Click-EDA_Watermarked.dd7cbf2e0693.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/ydata-profiling-eda/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Automate Python Data Analysis With YData Profiling&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your knowledge of YData Profiling, including report creation, customization, performance optimization, time series analysis, and comparisons.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;building-a-report-with-ydata-profiling&quot;&gt;Building a Report With YData Profiling&lt;a class=&quot;headerlink&quot; href=&quot;#building-a-report-with-ydata-profiling&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A YData Profiling report is composed of several sections that summarize different aspects of your dataset. Before customizing a report, it helps to understand the main components it includes and what each one is designed to show.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ydata-profiling-eda/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ydata-profiling-eda/ »&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 #286: Overcoming Testing Obstacles With Python&#x27;s Mock Object Library</title>
      <id>https://realpython.com/podcasts/rpp/286/</id>
      <link href="https://realpython.com/podcasts/rpp/286/"/>
      <updated>2026-02-27T12:00:00+00:00</updated>
      <summary>Do you have complex logic and unpredictable dependencies that make it hard to write reliable tests? How can you use Python&#x27;s mock object library to improve your tests? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Do you have complex logic and unpredictable dependencies that make it hard to write reliable tests? How can you use Python&#x27;s mock object library to improve your tests? 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 Run Your Python Scripts and Code</title>
      <id>https://realpython.com/run-python-scripts/</id>
      <link href="https://realpython.com/run-python-scripts/"/>
      <updated>2026-02-25T14:00:00+00:00</updated>
      <summary>Learn how to run Python scripts from the command line, REPL, IDEs, and file managers on Windows, Linux, and macOS. Master all execution approaches.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Running Python scripts is essential for executing your code. You can run Python scripts from the command line using &lt;code&gt;python script.py&lt;/code&gt;, directly by making files executable with shebangs on Unix systems, or through IDEs and code editors. Python also supports interactive execution through the standard REPL for testing code snippets.&lt;/p&gt;
&lt;p&gt;This tutorial covers the most common practical approaches for running Python scripts across Windows, Linux, and macOS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;python&lt;/code&gt;&lt;/strong&gt; command followed by a &lt;strong&gt;script filename&lt;/strong&gt; executes the code from the &lt;strong&gt;command line&lt;/strong&gt; on all operating systems.&lt;/li&gt;
&lt;li&gt;Script mode runs code from &lt;strong&gt;files sequentially&lt;/strong&gt;, while interactive mode uses the &lt;strong&gt;REPL&lt;/strong&gt; for execution and testing with immediate feedback.&lt;/li&gt;
&lt;li&gt;Unix systems require &lt;strong&gt;executable permissions&lt;/strong&gt; and a &lt;strong&gt;shebang line&lt;/strong&gt; like &lt;code&gt;#!/usr/bin/env python3&lt;/code&gt; to run scripts directly as programs.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;python&lt;/code&gt; command’s &lt;code&gt;-m&lt;/code&gt; option runs &lt;strong&gt;Python modules&lt;/strong&gt; by searching &lt;code&gt;sys.path&lt;/code&gt; rather than requiring file paths.&lt;/li&gt;
&lt;li&gt;IDEs like PyCharm and code editors like Visual Studio Code provide built-in options to &lt;strong&gt;run scripts&lt;/strong&gt; from the environment interface.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this tutorial, you should know the basics of working with your operating system’s &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; and file manager. It’d also be beneficial to be familiar with a Python-friendly &lt;a href=&quot;https://realpython.com/python-ides-code-editors-guide/&quot;&gt;IDE or code editor&lt;/a&gt; and with the standard Python &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;REPL&lt;/a&gt; (Read-Eval-Print Loop).&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Download:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-tricks-sample-pdf/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-tricks-sample-pdf&quot; markdown&gt;Get a sample chapter from Python Tricks: The Book&lt;/a&gt; that shows you Python’s best practices with simple examples you can apply instantly to write more beautiful + Pythonic code.&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.1fb5b1968c3f.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 Run Your Python Scripts” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #e6c7ab;&quot; alt=&quot;How to Run Your Python Scripts&quot; src=&quot;https://files.realpython.com/media/How-to-Run-A-Python-Script_Watermarked.65fe32bf5487.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-Run-A-Python-Script_Watermarked.65fe32bf5487.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Run-A-Python-Script_Watermarked.65fe32bf5487.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Run-A-Python-Script_Watermarked.65fe32bf5487.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Run-A-Python-Script_Watermarked.65fe32bf5487.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.1fb5b1968c3f.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/run-python-scripts/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Run Your Python Scripts&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;One of the most important skills you need to build as a Python developer is to be able to run Python scripts and code. Test your understanding on how good you are with running your code.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;what-scripts-and-modules-are&quot;&gt;What Scripts and Modules Are&lt;a class=&quot;headerlink&quot; href=&quot;#what-scripts-and-modules-are&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In computing, the term &lt;strong&gt;script&lt;/strong&gt; refers to a text file containing a logical sequence of orders that you can run to accomplish a specific task. These orders are typically expressed in a &lt;a href=&quot;https://en.wikipedia.org/wiki/Scripting_language&quot;&gt;scripting language&lt;/a&gt;, which is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Programming_language&quot;&gt;programming language&lt;/a&gt; that allows you to manipulate, customize, and automate tasks.&lt;/p&gt;
&lt;p&gt;Scripting languages are usually &lt;a href=&quot;https://en.wikipedia.org/wiki/Interpreter_(computing)&quot;&gt;interpreted&lt;/a&gt; at &lt;a href=&quot;https://en.wikipedia.org/wiki/Runtime_(program_lifecycle_phase)&quot;&gt;runtime&lt;/a&gt; rather than &lt;a href=&quot;https://en.wikipedia.org/wiki/Compiler&quot;&gt;compiled&lt;/a&gt;. So, scripts are typically run by an &lt;a href=&quot;/ref/glossary/interpreter/&quot; class=&quot;ref-link&quot;&gt;interpreter&lt;/a&gt;, which is responsible for executing each order in a sequence.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/ref/glossary/python/&quot; class=&quot;ref-link&quot;&gt;Python&lt;/a&gt; is an interpreted language. Because of that, Python programs are commonly called scripts. However, this terminology isn’t completely accurate because Python programs can be way more complex than a simple, sequential script.&lt;/p&gt;
&lt;p&gt;In general, a &lt;a href=&quot;/ref/glossary/text-file/&quot; class=&quot;ref-link&quot;&gt;file&lt;/a&gt; containing executable Python &lt;a href=&quot;/ref/glossary/source-code/&quot; class=&quot;ref-link&quot;&gt;code&lt;/a&gt; is called a script—or an &lt;strong&gt;entry-point script&lt;/strong&gt; in more complex applications—which is a common term for a top-level &lt;strong&gt;program&lt;/strong&gt;. On the other hand, a file containing Python code that’s designed to be &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;imported&lt;/a&gt; and used from another Python file is called a &lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;module&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, the main difference between a &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;module&lt;/a&gt; and a script is that modules store &lt;strong&gt;importable code&lt;/strong&gt; while scripts hold &lt;strong&gt;executable code&lt;/strong&gt;.&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; Importable code is code that defines something but doesn’t perform a specific action. Some examples include &lt;a href=&quot;/ref/glossary/function/&quot; class=&quot;ref-link&quot;&gt;function&lt;/a&gt; and &lt;a href=&quot;/ref/glossary/class/&quot; class=&quot;ref-link&quot;&gt;class&lt;/a&gt; definitions. In contrast, executable code is code that performs specific actions. Some examples include &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/#calling-functions-in-python&quot;&gt;function calls&lt;/a&gt;, &lt;a href=&quot;/ref/glossary/loop/&quot; class=&quot;ref-link&quot;&gt;loops&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditionals&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In the following sections, you’ll learn how to run Python scripts, programs, and code in general. To kick things off, you’ll start by learning how to run them from your operating system’s command line or terminal.&lt;/p&gt;
&lt;h2 id=&quot;how-to-run-python-scripts-from-the-command-line&quot;&gt;How to Run Python Scripts From the Command Line&lt;a class=&quot;headerlink&quot; href=&quot;#how-to-run-python-scripts-from-the-command-line&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In Python programming, you’ll write programs in plain text files. By convention, files containing Python code use the &lt;code&gt;.py&lt;/code&gt; extension, and there’s no distinction between scripts or executable programs and modules. All of them will use the same extension.&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; On &lt;a href=&quot;https://realpython.com/python-coding-setup-windows/&quot;&gt;Windows&lt;/a&gt; systems, the extension can also be &lt;code&gt;.pyw&lt;/code&gt; for those applications that should use the &lt;code&gt;pythonw.exe&lt;/code&gt; launcher.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;To create a Python script, you can use any Python-friendly &lt;a href=&quot;https://realpython.com/python-ides-code-editors-guide/&quot;&gt;code editor or IDE&lt;/a&gt; (integrated development environment). To keep moving forward in this tutorial, you’ll need to create a basic script, so fire up your favorite text editor and create a new &lt;code&gt;hello.py&lt;/code&gt; file containing the following code:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot; aria-label=&quot;Filename&quot;&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;hello.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;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;Hello, World!&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.1fb5b1968c3f.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 is the classic &lt;code&gt;&quot;Hello, World!&quot;&lt;/code&gt; program in Python. The executable code consists of a call to the built-in &lt;a href=&quot;https://realpython.com/python-print/&quot;&gt;&lt;code&gt;print()&lt;/code&gt;&lt;/a&gt; function that displays the &lt;code&gt;&quot;Hello, World!&quot;&lt;/code&gt; message on your screen.&lt;/p&gt;
&lt;p&gt;With this small program in place, you’re ready to learn different ways to run it. You’ll start by running the program from your command line, which is arguably the most commonly used approach to running scripts.&lt;/p&gt;
&lt;h3 id=&quot;using-the-python-command&quot;&gt;Using the &lt;code&gt;python&lt;/code&gt; Command&lt;a class=&quot;headerlink&quot; href=&quot;#using-the-python-command&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To run Python scripts with the &lt;code&gt;python&lt;/code&gt; command, you need to open a command-line window and type in the word &lt;code&gt;python&lt;/code&gt; followed by the path to your target script:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-linuxmacos&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body small&quot; id=&quot;macos-tab-1&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-1&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-1&quot; aria-selected=&quot;false&quot;&gt;&lt;span class=&quot;icon baseline text-muted&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.1fb5b1968c3f.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&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/run-python-scripts/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/run-python-scripts/ »&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>Start Building With FastAPI</title>
      <id>https://realpython.com/courses/start-building-with-fastapi/</id>
      <link href="https://realpython.com/courses/start-building-with-fastapi/"/>
      <updated>2026-02-24T14:00:00+00:00</updated>
      <summary>Learn how to build APIs with FastAPI in Python, including Pydantic models, HTTP methods, CRUD operations, and interactive documentation.</summary>
      <content type="html">
        &lt;p&gt;FastAPI is a web framework for building APIs with Python. It leverages standard Python type hints to provide automatic validation, serialization, and interactive documentation. When you&amp;rsquo;re deciding between Python web frameworks, FastAPI stands out for its speed, developer experience, and built-in features that reduce boilerplate code for API development:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Pick FastAPI&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Pick Flask or Django&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You want to build an API-driven web app&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You need a full-stack web framework&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;—&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You value automatic API documentation&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;✅&lt;/td&gt;
&lt;td class=&quot;text-center&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;Whether you&amp;rsquo;re building a minimal &lt;a href=&quot;https://realpython.com/api-integration-in-python/&quot;&gt;REST API&lt;/a&gt; or a complex backend service, understanding core features of &lt;a href=&quot;https://fastapi.tiangolo.com/&quot;&gt;FastAPI&lt;/a&gt; will help you make an informed decision about adopting it for your projects. To get the most from this video course, you&amp;rsquo;ll benefit from having basic knowledge of Python &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-requests/&quot;&gt;HTTP concepts&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-json/&quot;&gt;JSON&lt;/a&gt; handling.&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 #285: Exploring MCP Apps &amp; Adding Interactive UIs to Clients</title>
      <id>https://realpython.com/podcasts/rpp/285/</id>
      <link href="https://realpython.com/podcasts/rpp/285/"/>
      <updated>2026-02-20T12:00:00+00:00</updated>
      <summary>How can you move your MCP tools beyond plain text? How do you add interactive UI components directly inside chat conversations? This week on the show, Den Delimarsky from Anthropic joins us to discuss MCP Apps and interactive UIs in MCP.</summary>
      <content type="html">
        &lt;p&gt;How can you move your MCP tools beyond plain text? How do you add interactive UI components directly inside chat conversations? This week on the show, Den Delimarsky from Anthropic joins us to discuss MCP Apps and interactive UIs in 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>Write Python Docstrings Effectively</title>
      <id>https://realpython.com/courses/write-python-docstrings-effectively/</id>
      <link href="https://realpython.com/courses/write-python-docstrings-effectively/"/>
      <updated>2026-02-17T14:00:00+00:00</updated>
      <summary>Learn to write clear, effective Python docstrings using best practices, common styles, and built-in conventions for your code.</summary>
      <content type="html">
        &lt;p&gt;Writing clear, consistent docstrings in Python helps others understand your code&amp;rsquo;s purpose, parameters, and outputs. In this video course, you&amp;rsquo;ll learn about best practices, standard formats, and common pitfalls to avoid, ensuring your documentation is accessible to users and tools alike.&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;Docstrings are strings used to &lt;strong&gt;document your Python code&lt;/strong&gt; and can be accessed at runtime.&lt;/li&gt;
&lt;li&gt;Python &lt;strong&gt;comments and docstrings&lt;/strong&gt; have important differences.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One-line&lt;/strong&gt; and &lt;strong&gt;multiline docstrings&lt;/strong&gt; are classifications of docstrings.&lt;/li&gt;
&lt;li&gt;Common docstring formats include &lt;strong&gt;reStructuredText&lt;/strong&gt;, &lt;strong&gt;Google-style&lt;/strong&gt;, &lt;strong&gt;NumPy-style&lt;/strong&gt;, and &lt;strong&gt;doctest-style&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Antipatterns&lt;/strong&gt; such as inconsistent formatting &lt;strong&gt;should be avoided&lt;/strong&gt; when writing docstrings.&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #284: Running Local LLMs With Ollama and Connecting With Python</title>
      <id>https://realpython.com/podcasts/rpp/284/</id>
      <link href="https://realpython.com/podcasts/rpp/284/"/>
      <updated>2026-02-13T12:00:00+00:00</updated>
      <summary>Would you like to learn how to work with LLMs locally on your own computer? How do you integrate your Python projects with a local model? 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;Would you like to learn how to work with LLMs locally on your own computer? How do you integrate your Python projects with a local model? 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>Improving Your Tests With the Python Mock Object Library</title>
      <id>https://realpython.com/courses/improve-tests-mock-object-library/</id>
      <link href="https://realpython.com/courses/improve-tests-mock-object-library/"/>
      <updated>2026-02-10T14:00:00+00:00</updated>
      <summary>Master Python testing with unittest.mock. Create mock objects to tame complex logic and unpredictable dependencies.</summary>
      <content type="html">
        &lt;p&gt;When you&amp;rsquo;re writing robust code, &lt;strong&gt;tests&lt;/strong&gt; are essential for verifying that your application logic is correct, reliable, and efficient. However, the value of your tests depends on how well they demonstrate these qualities. Obstacles such as &lt;strong&gt;complex logic&lt;/strong&gt; and unpredictable &lt;strong&gt;dependencies&lt;/strong&gt; can make writing valuable tests challenging. The Python mock object library, &lt;strong&gt;&lt;code&gt;unittest.mock&lt;/code&gt;&lt;/strong&gt;, can help you overcome these obstacles.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll be able to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create Python mock objects using &lt;code&gt;Mock&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Assert that you&amp;rsquo;re using objects as you intended&lt;/li&gt;
&lt;li&gt;Inspect usage data stored on your Python mocks&lt;/li&gt;
&lt;li&gt;Configure certain aspects of your Python mock objects&lt;/li&gt;
&lt;li&gt;Substitute your mocks for real objects using &lt;code&gt;patch()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Avoid common problems inherent in Python mocking&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll begin by learning what mocking is and how it will improve your tests!&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 #283: Improving Your GitHub Developer Experience</title>
      <id>https://realpython.com/podcasts/rpp/283/</id>
      <link href="https://realpython.com/podcasts/rpp/283/"/>
      <updated>2026-02-06T12:00:00+00:00</updated>
      <summary>What are ways to improve how you&#x27;re using GitHub? How can you collaborate more effectively and improve your technical writing? This week on the show, Adam Johnson is back to talk about his new book, &quot;Boost Your GitHub DX: Tame the Octocat and Elevate Your Productivity&quot;.</summary>
      <content type="html">
        &lt;p&gt;What are ways to improve how you&#x27;re using GitHub? How can you collaborate more effectively and improve your technical writing? This week on the show, Adam Johnson is back to talk about his new book, &quot;Boost Your GitHub DX: Tame the Octocat and Elevate Your Productivity&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>Getting Started With Google Gemini CLI</title>
      <id>https://realpython.com/courses/getting-started-google-gemini-cli/</id>
      <link href="https://realpython.com/courses/getting-started-google-gemini-cli/"/>
      <updated>2026-02-03T14:00:00+00:00</updated>
      <summary>Learn how to use Gemini CLI to bring Google&#x27;s AI-powered coding assistance into your terminal for faster code analysis, debugging, and fixes.</summary>
      <content type="html">
        &lt;p&gt;This video course will teach you how to use &lt;a href=&quot;/ref/ai-coding-tools/gemini-cli/&quot; class=&quot;ref-link&quot;&gt;Gemini CLI&lt;/a&gt; to bring Google&amp;rsquo;s AI-powered coding assistance directly into your terminal. After you authenticate with your Google account, this tool will be ready to help you analyze code, identify bugs, and suggest fixes&amp;mdash;all without leaving your familiar development environment.&lt;/p&gt;
&lt;p&gt;Imagine &lt;a href=&quot;/ref/glossary/debugging/&quot; class=&quot;ref-link&quot;&gt;debugging&lt;/a&gt; code without switching between your &lt;a href=&quot;/ref/glossary/console/&quot; class=&quot;ref-link&quot;&gt;console&lt;/a&gt; and browser, or picture getting instant explanations for unfamiliar projects. Like other command-line AI assistants, Google&amp;rsquo;s Gemini CLI brings AI-powered coding assistance directly into your command line, allowing you to stay focused in your development workflow.&lt;/p&gt;
&lt;p&gt;Whether you&amp;rsquo;re troubleshooting a stubborn bug, understanding legacy code, or generating documentation, this tool acts as an intelligent pair-programming partner that understands your codebase&amp;rsquo;s context.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re about to install Gemini CLI, authenticate with Google&amp;rsquo;s free tier, and put it to work on an actual Python project. You&amp;rsquo;ll discover how natural language queries can help you understand code faster and catch bugs that might slip past manual review.&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 #282: Testing Python Code for Scalability &amp; What&#x27;s New in pandas 3.0</title>
      <id>https://realpython.com/podcasts/rpp/282/</id>
      <link href="https://realpython.com/podcasts/rpp/282/"/>
      <updated>2026-01-30T12:00:00+00:00</updated>
      <summary>How do you create automated tests to check your code for degraded performance as data sizes increase? What are the new features in pandas 3.0? 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 create automated tests to check your code for degraded performance as data sizes increase? What are the new features in pandas 3.0? 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>Create Callable Instances With Python&#x27;s .__call__()</title>
      <id>https://realpython.com/courses/create-callable-instances-dunder-call/</id>
      <link href="https://realpython.com/courses/create-callable-instances-dunder-call/"/>
      <updated>2026-01-27T14:00:00+00:00</updated>
      <summary>Learn Python callables: what &quot;callable&quot; means, how to use dunder call, and how to build callable objects with step-by-step examples.</summary>
      <content type="html">
        &lt;p&gt;In Python, a &lt;strong&gt;callable&lt;/strong&gt; is any object that you can call using a pair of parentheses and, optionally, a series of arguments. Functions, classes, and methods are all common examples of callables in Python. Besides these, you can also create custom classes that produce &lt;strong&gt;callable instances&lt;/strong&gt;. To do this, you can add the &lt;strong&gt;&lt;code&gt;.__call__()&lt;/code&gt;&lt;/strong&gt; special method to your class.&lt;/p&gt;
&lt;p&gt;Instances of a class with a &lt;code&gt;.__call__()&lt;/code&gt; method behave like functions, providing a flexible and handy way to add functionality to your objects. Understanding how to create and use callable instances is a valuable skill for any Python developer.&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 the concept of &lt;strong&gt;callable objects&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Create &lt;strong&gt;callable instances&lt;/strong&gt; by adding a &lt;strong&gt;&lt;code&gt;.__call__()&lt;/code&gt;&lt;/strong&gt; method to your classes &lt;/li&gt;
&lt;li&gt;Compare &lt;strong&gt;&lt;code&gt;.__init__()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.__call__()&lt;/code&gt;&lt;/strong&gt; and understand their distinct roles&lt;/li&gt;
&lt;li&gt;Build practical examples that use callable instances to &lt;strong&gt;solve real-world problems&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #281: Continuing to Improve the Learning Experience at Real Python</title>
      <id>https://realpython.com/podcasts/rpp/281/</id>
      <link href="https://realpython.com/podcasts/rpp/281/"/>
      <updated>2026-01-23T12:00:00+00:00</updated>
      <summary>If you haven&#x27;t visited the Real Python website lately, then it&#x27;s time to check out a great batch of updates on realpython.com! Dan Bader returns to the show this week to discuss improvements to the site and more ways to learn Python.</summary>
      <content type="html">
        &lt;p&gt;If you haven&#x27;t visited the Real Python website lately, then it&#x27;s time to check out a great batch of updates on realpython.com! Dan Bader returns to the show this week to discuss improvements to the site and more ways to learn 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>The Real Python Podcast – Episode #280: Considering Fast and Slow in Python Programming</title>
      <id>https://realpython.com/podcasts/rpp/280/</id>
      <link href="https://realpython.com/podcasts/rpp/280/"/>
      <updated>2026-01-16T12:00:00+00:00</updated>
      <summary>How often have you heard about the speed of Python? What&#x27;s actually being measured, where are the bottlenecks---development time or run time---and which matters more for productivity? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How often have you heard about the speed of Python? What&#x27;s actually being measured, where are the bottlenecks---development time or run time---and which matters more for productivity? Christopher Trudeau is back on the show this week, bringing 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>
  

</feed>
