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

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

  
    <entry>
      <title>The Real Python Podcast – Episode #305: Should You Understand Your Entire Python Codebase?</title>
      <id>https://realpython.com/podcasts/rpp/305/</id>
      <link href="https://realpython.com/podcasts/rpp/305/"/>
      <updated>2026-07-31T12:00:00+00:00</updated>
      <summary>Should you understand the entirety of your codebase? How familiar are you with Python&#x27;s built-in functions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Should you understand the entirety of your codebase? How familiar are you with Python&#x27;s built-in functions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: 11 Beginner Tips for Learning Python Programming</title>
      <id>https://realpython.com/quizzes/python-beginner-tips/</id>
      <link href="https://realpython.com/quizzes/python-beginner-tips/"/>
      <updated>2026-07-31T12:00:00+00:00</updated>
      <summary>Test your knowledge of the habits that help you learn Python, from coding daily to asking good questions and building your first project.</summary>
      <content type="html">
        &lt;p&gt;Test your understanding of &lt;a href=&quot;https://realpython.com/python-beginner-tips/&quot;&gt;11 Beginner Tips for Learning Python Programming&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll revisit the habits that make new concepts stick, the people and communities that speed up your progress, and the projects that turn what you know into what you can build.&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: NumPy Tutorial: Your First Steps Into Data Science in Python</title>
      <id>https://realpython.com/quizzes/numpy-tutorial/</id>
      <link href="https://realpython.com/quizzes/numpy-tutorial/"/>
      <updated>2026-07-30T12:00:00+00:00</updated>
      <summary>Test your NumPy knowledge of arrays, axes, broadcasting, indexing, masks, and data types, the foundation of data science 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/numpy-tutorial/&quot;&gt;NumPy Tutorial: Your First Steps Into Data Science in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through these questions, you&amp;rsquo;ll revisit how NumPy arrays work, including axes, broadcasting, indexing, Boolean masks, and data types. These are the building blocks that most of Python&amp;rsquo;s data science ecosystem relies on.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>CrewAI in Python: Coordinating Teams of AI Agents</title>
      <id>https://realpython.com/crewai-python/</id>
      <link href="https://realpython.com/crewai-python/"/>
      <updated>2026-07-29T14:00:00+00:00</updated>
      <summary>Learn how to use CrewAI to build teams of AI agents in Python, define roles and tools, and coordinate multi-agent workflows that solve complex tasks.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Have you ever asked ChatGPT to research something, analyze the findings, and then write a polished report, all in one prompt? You probably got &lt;em&gt;something&lt;/em&gt; back, but it wasn’t great. That’s because you’re asking a single model to wear way too many hats at once. CrewAI is a Python framework that solves this by letting you build a crew of specialized AI agents, each focusing on one part of the job.&lt;/p&gt;
&lt;p&gt;For example, instead of cramming research, validation, and writing into a single prompt, you create a team. One agent researches, another validates, and a third writes. Each focuses on what it does best, working together to complete the task.&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;CrewAI&lt;/strong&gt; coordinates teams where each agent has a specific &lt;strong&gt;role&lt;/strong&gt;, &lt;strong&gt;goal&lt;/strong&gt;, and &lt;strong&gt;backstory&lt;/strong&gt; that influence its behavior.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sequential workflows&lt;/strong&gt; automatically pass outputs from one agent to the next, making &lt;strong&gt;coordinated pipelines&lt;/strong&gt; straightforward.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;context&lt;/code&gt; parameter&lt;/strong&gt; gives you fine-grained control over which task outputs feed into other tasks.&lt;/li&gt;
&lt;li&gt;You can equip agents with &lt;strong&gt;tools&lt;/strong&gt; like web scraping to expand what they can do beyond text generation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API costs&lt;/strong&gt; multiply quickly since each agent makes separate LLM calls, and &lt;strong&gt;verbose logging&lt;/strong&gt; helps you debug agent behavior.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before you invest time learning CrewAI, you should understand when it’s the right tool for your project. This comparison highlights the key trade-offs:&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 CrewAI&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Pick LangGraph&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;Pick AG2 / AutoGen&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;You need structured, role-based workflows&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;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You want minimal boilerplate to go from prototype to production&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;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;You need complex state machines with conditional branching&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;td class=&quot;text-center&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Your agents need conversational, chat-driven coordination&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;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;CrewAI’s sweet spot is workflows where agents have clear responsibilities and work in a predictable sequence. If you need fine-grained state management with branching logic, LangGraph gives you more control. If your agents need conversational back-and-forth, AG2—the community fork of AutoGen—supports chat-driven coordination patterns and may be a better fit.&lt;/p&gt;
&lt;p&gt;Microsoft AutoGen is now in maintenance mode, so new projects typically choose &lt;a href=&quot;https://www.ag2.ai/product&quot;&gt;AG2&lt;/a&gt; or &lt;a href=&quot;https://learn.microsoft.com/en-us/agent-framework/overview/&quot;&gt;Microsoft Agent Framework&lt;/a&gt;.&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/crewai-python-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-crewai-python-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to build and coordinate teams of AI agents with CrewAI 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.769d3e9e5a0b.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 “CrewAI in Python: Coordinating Teams of AI Agents” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #ffc973;&quot; alt=&quot;Coordinating Teams of AI Agents with CrewAI in Python&quot; src=&quot;https://files.realpython.com/media/Coordinating-Teams-of-AI-Agents-with-CrewAI-in-Python_Watermarked.d44efee0c44f.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Coordinating-Teams-of-AI-Agents-with-CrewAI-in-Python_Watermarked.d44efee0c44f.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Coordinating-Teams-of-AI-Agents-with-CrewAI-in-Python_Watermarked.d44efee0c44f.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Coordinating-Teams-of-AI-Agents-with-CrewAI-in-Python_Watermarked.d44efee0c44f.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Coordinating-Teams-of-AI-Agents-with-CrewAI-in-Python_Watermarked.d44efee0c44f.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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/crewai-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;CrewAI in Python: Coordinating Teams of AI Agents&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check your understanding of CrewAI in Python. Review how to define agent roles, assign tasks, add tools, and coordinate multi-agent workflows.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;get-started-with-crewai-in-python&quot;&gt;Get Started With CrewAI in Python&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-crewai-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you dive into building multi-agent systems with CrewAI, 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. This tutorial uses Google’s &lt;a href=&quot;/ref/ai-coding-tools/gemini/&quot; class=&quot;ref-link&quot;&gt;Gemini&lt;/a&gt; model, which you can access for free through Google AI Studio.&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; CrewAI is model-agnostic, so you’re not locked into Gemini. It also works with OpenAI, Anthropic’s &lt;a href=&quot;/ref/ai-coding-tools/claude/&quot; class=&quot;ref-link&quot;&gt;Claude&lt;/a&gt;, Mistral, Groq, and &lt;a href=&quot;/ref/ai-coding-tools/ollama/&quot; class=&quot;ref-link&quot;&gt;Ollama&lt;/a&gt; for local models, among others. Check the &lt;a href=&quot;https://docs.crewai.com/&quot;&gt;CrewAI documentation&lt;/a&gt; for the full list of supported providers.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You can install CrewAI from &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;PyPI&lt;/a&gt; using &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;. CrewAI requires &lt;strong&gt;Python 3.10 to 3.13&lt;/strong&gt;, so run &lt;code&gt;python --version&lt;/code&gt; first—installing on Python 3.14 or later will silently resolve to a much older CrewAI release and then fail to build:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;&lt;span class=&quot;s1&quot;&gt;&#x27;crewai[tools,google-genai]&#x27;&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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;This installs CrewAI’s core framework, the native Google Gemini provider, and prebuilt tools like &lt;a href=&quot;https://realpython.com/python-web-scraping-practical-introduction/&quot;&gt;web scraping&lt;/a&gt; that agents can use during their work.&lt;/p&gt;
&lt;p&gt;You’ll need a Gemini API key to run the examples in this tutorial. If you don’t have one yet, then head over to &lt;a href=&quot;https://aistudio.google.com/welcome&quot;&gt;Google AI Studio&lt;/a&gt; to sign in with your Google account and generate an API key for free.&lt;/p&gt;
&lt;p&gt;Once you have your 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-bs-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#brands--windows&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




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

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;nv&quot;&gt;$ENV:GEMINI_API_KEY&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;your-gemini-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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;your-gemini-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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;With your environment variable set, CrewAI is ready to connect to Gemini in your projects.&lt;/p&gt;
&lt;p&gt;To get started with CrewAI, you can create a single &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt; that acts as a travel advisor:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/crewai-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/crewai-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Managing Imports With Python&#x27;s __all__</title>
      <id>https://realpython.com/courses/managing-imports-dunder-all/</id>
      <link href="https://realpython.com/courses/managing-imports-dunder-all/"/>
      <updated>2026-07-28T14:00:00+00:00</updated>
      <summary>Learn how Python&#x27;s dunder all variable controls wildcard imports and shapes the public API your packages and modules expose.</summary>
      <content type="html">
        &lt;p&gt;Python has something called &lt;strong&gt;wildcard imports&lt;/strong&gt;, which look like &lt;code&gt;from module import *&lt;/code&gt;. This type of import allows you to quickly get all the objects from a module into your namespace. However, using this import on a package can be confusing because it&amp;rsquo;s not clear what you want to import: subpackages, modules, objects? Python has the &lt;strong&gt;&lt;code&gt;__all__&lt;/code&gt;&lt;/strong&gt; variable to work around this issue.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;__all__&lt;/code&gt; variable is a list of strings where each string represents the name of a variable, function, class, or module that you want to expose to wildcard imports.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand &lt;strong&gt;wildcard imports&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;&lt;code&gt;__all__&lt;/code&gt;&lt;/strong&gt; to control the modules that you &lt;strong&gt;expose&lt;/strong&gt; to wildcard imports&lt;/li&gt;
&lt;li&gt;Control the &lt;strong&gt;names&lt;/strong&gt; that you expose in &lt;strong&gt;modules&lt;/strong&gt; and &lt;strong&gt;packages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Explore &lt;strong&gt;other use cases&lt;/strong&gt; of the &lt;code&gt;__all__&lt;/code&gt; variable&lt;/li&gt;
&lt;li&gt;Learn some &lt;strong&gt;benefits&lt;/strong&gt; and &lt;strong&gt;best practices&lt;/strong&gt; of using &lt;code&gt;__all__&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this course, you should be familiar with a few Python concepts, including &lt;a href=&quot;https://realpython.com/python-modules-packages/&quot;&gt;modules and packages&lt;/a&gt;, and the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import&lt;/a&gt; system.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Managing Imports With Python&#x27;s __all__</title>
      <id>https://realpython.com/quizzes/managing-imports-dunder-all/</id>
      <link href="https://realpython.com/quizzes/managing-imports-dunder-all/"/>
      <updated>2026-07-28T12:00:00+00:00</updated>
      <summary>Check your understanding of wildcard imports, the dunder all variable, and how to control the public APIs of your Python modules and packages.</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/managing-imports-dunder-all/&quot;&gt;Managing Imports With Python&amp;rsquo;s __all__&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how wildcard imports work, what role the &lt;code&gt;__all__&lt;/code&gt; variable plays in modules and packages, and how to define a clean public API for your Python code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Use Google&#x27;s Antigravity CLI for AI Code Assistance</title>
      <id>https://realpython.com/antigravity-cli/</id>
      <link href="https://realpython.com/antigravity-cli/"/>
      <updated>2026-07-27T14:00:00+00:00</updated>
      <summary>Get started with Google&#x27;s Antigravity CLI, a terminal-based AI coding agent, and use it to read, review, and refactor your Python code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Antigravity CLI is a terminal-based AI coding tool that brings Google’s agent assistance into your workflow. After installing it and signing in with your Google account, you can ask questions about your code, add new features, track down bugs, and even dispatch multiple subagents to work on separate tasks in parallel, all without leaving your shell:&lt;/p&gt;
&lt;figure&gt;





&lt;video-player-next class=&quot;video-player-next rounded mb-3&quot; style=&quot;aspect-ratio: 1920/1080;&quot; data-src=&quot;https://stream.realpython.com/3a3373df-3e7b-4fdc-b006-bf4559924dc8/playlist.m3u8&quot; data-thumbnails-url=&quot;/video-thumbnails/05f42aa2-eb3b-4907-bdae-2b1595065faf.vtt&quot; data-thumbnails-cols=&quot;6&quot; data-thumbnails-rows=&quot;6&quot; data-title=&quot;Antigravity CLI&quot;&gt;

    &lt;img class=&quot;video-player-next__poster&quot; src=&quot;https://stream.realpython.com/3a3373df-3e7b-4fdc-b006-bf4559924dc8/thumbnail.jpg?width=1280&quot; srcset=&quot;https://stream.realpython.com/3a3373df-3e7b-4fdc-b006-bf4559924dc8/thumbnail.jpg?width=480 480w, https://stream.realpython.com/3a3373df-3e7b-4fdc-b006-bf4559924dc8/thumbnail.jpg?width=640 640w, https://stream.realpython.com/3a3373df-3e7b-4fdc-b006-bf4559924dc8/thumbnail.jpg?width=960 960w, https://stream.realpython.com/3a3373df-3e7b-4fdc-b006-bf4559924dc8/thumbnail.jpg?width=1920 1920w&quot; alt=&quot;Antigravity CLI&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;

&lt;/video-player-next&gt;


  &lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Antigravity CLI&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Antigravity CLI replaced &lt;a href=&quot;/ref/ai-coding-tools/gemini-cli/&quot; class=&quot;ref-link&quot;&gt;Gemini CLI&lt;/a&gt;, which Google retired in June 2026. If you’ve used Gemini CLI, then a lot of this will feel familiar. Your skills, hooks, subagents, and plugins carry over, and the tool still reads its configuration from &lt;code&gt;~/.gemini/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You don’t need any of that history to follow along, though. This is a hands-on guide to using Antigravity CLI, not a migration manual. But if you’re switching, then the &lt;a href=&quot;#coming-from-gemini-cli&quot;&gt;&lt;em&gt;Coming From Gemini CLI?&lt;/em&gt;&lt;/a&gt; section rounds up what changed and what to watch out for.&lt;/p&gt;
&lt;p&gt;You’re about to install Antigravity CLI, sign in with your Google account, and put it to work on a Python project. It’ll read an unfamiliar &lt;a href=&quot;/ref/glossary/module/&quot; class=&quot;ref-link&quot;&gt;module&lt;/a&gt;, review it against your conventions, and &lt;a href=&quot;/ref/best-practices/refactoring/&quot; class=&quot;ref-link&quot;&gt;refactor&lt;/a&gt; the code while the &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt; verifies its own work.&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.769d3e9e5a0b.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 Google&#x27;s Antigravity CLI for AI Code Assistance” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;A floating scientist in a lab coat operates a control panel with a lever, a terminal screen reading prompt, a Python logo, and drawers labeled FLOW, DATA, and LOGS, beside a waving robot.&quot; src=&quot;https://files.realpython.com/media/Use-Antigravity-CLI-for-Code-Assistance_Watermarked.5eb983b3713c.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Use-Antigravity-CLI-for-Code-Assistance_Watermarked.5eb983b3713c.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Use-Antigravity-CLI-for-Code-Assistance_Watermarked.5eb983b3713c.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Use-Antigravity-CLI-for-Code-Assistance_Watermarked.5eb983b3713c.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Use-Antigravity-CLI-for-Code-Assistance_Watermarked.5eb983b3713c.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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/antigravity-cli/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Use Google&#x27;s Antigravity CLI for AI Code Assistance&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your knowledge of Google&#x27;s Antigravity CLI, a terminal-based AI coding agent, and how to use it to read, review, and refactor Python code.&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 along with this tutorial, you’ll need the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Google Account:&lt;/strong&gt; A &lt;a href=&quot;https://www.google.com/account/about/&quot;&gt;Google account&lt;/a&gt; lets you sign in to Antigravity CLI. A free account is enough to finish this tutorial, although the free tier’s usage limits are tight and have shifted since launch, so expect to bump into them on longer sessions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python 3.12 or higher:&lt;/strong&gt; You’ll work with a small Python &lt;a href=&quot;https://realpython.com/command-line-interfaces-python-argparse/&quot;&gt;command-line application&lt;/a&gt;. If you haven’t already, &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;install Python&lt;/a&gt;, making sure the minimum version is &lt;a href=&quot;https://realpython.com/python312-new-features/&quot;&gt;Python 3.12&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because Antigravity CLI is a command-line tool, you should feel comfortable navigating your &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; and running basic shell commands. The tool ships as a single binary for macOS, Linux, and Windows, so any of these platforms will work. Unlike Gemini CLI, it doesn’t depend on &lt;a href=&quot;https://nodejs.org/&quot;&gt;Node.js&lt;/a&gt;, which means there’s no separate runtime to install first.&lt;/p&gt;
&lt;p&gt;Go ahead and download the supporting materials for the Python project you’ll work with throughout this tutorial:&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/antigravity-cli-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-antigravity-cli-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to follow along as Antigravity CLI reads, reviews, and refactors a small Python command-line tool.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Once you’ve extracted the files, you’ll find an &lt;code&gt;expense-report/&lt;/code&gt; directory with a tiny command-line tool that &lt;a href=&quot;https://realpython.com/python-csv/&quot;&gt;reads a CSV&lt;/a&gt; of transactions and &lt;a href=&quot;https://realpython.com/python-print/&quot;&gt;prints&lt;/a&gt; a per-category spending summary. To get the most out of this tutorial, initialize a new &lt;a href=&quot;/ref/tools/git/&quot; class=&quot;ref-link&quot;&gt;Git&lt;/a&gt; repository in that directory and make an initial commit so you have a clean baseline to diff against later:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;cd&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;expense-report/
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;init
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;add&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;.
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;git&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;commit&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Initial commit&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.769d3e9e5a0b.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 project is the kind of small, undocumented &lt;a href=&quot;https://realpython.com/run-python-scripts/&quot;&gt;script&lt;/a&gt; you might inherit from a teammate, which makes it a good testing ground for Antigravity CLI’s code-reading and &lt;a href=&quot;https://realpython.com/python-refactoring/&quot;&gt;refactoring&lt;/a&gt; features.&lt;/p&gt;
&lt;h2 id=&quot;step-1-install-and-set-up-antigravity-cli&quot;&gt;Step 1: Install and Set Up Antigravity CLI&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-install-and-set-up-antigravity-cli&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you can use &lt;a href=&quot;https://antigravity.google/product/antigravity-cli&quot;&gt;Antigravity CLI&lt;/a&gt;, you need to install it and sign in with your Google account. In this step, you’ll run the official installer, verify the freshly installed &lt;code&gt;agy&lt;/code&gt; command, authenticate, and pick a capable model.&lt;/p&gt;
&lt;h3 id=&quot;install-the-binary&quot;&gt;Install the Binary&lt;a class=&quot;headerlink&quot; href=&quot;#install-the-binary&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Antigravity CLI is distributed as a self-contained &lt;a href=&quot;/ref/glossary/binary-file/&quot; class=&quot;ref-link&quot;&gt;binary file&lt;/a&gt; that ships with the entire &lt;a href=&quot;https://go.dev/&quot;&gt;Go&lt;/a&gt; runtime, so you can download and install it using a single command. Here’s how you can run the official installer script for 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-bs-toggle=&quot;tab&quot; href=&quot;#windows-1&quot; role=&quot;tab&quot; aria-controls=&quot;windows-1&quot; aria-selected=&quot;true&quot;&gt;&lt;span class=&quot;icon baseline text-muted me-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#brands--windows&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Windows&lt;/a&gt;
  &lt;/li&gt;




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

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;irm &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;https&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;://&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;antigravity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;google&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cli&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ps1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;iex&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;curl&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-fsSL&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;https://antigravity.google/cli/install.sh&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The installer places the &lt;code&gt;agy&lt;/code&gt; executable in a local &lt;code&gt;bin/&lt;/code&gt; directory, which is &lt;code&gt;~/.local/bin/&lt;/code&gt; on macOS and Linux. As part of the same run, the installer’s setup step also tries to wire up your &lt;a href=&quot;https://realpython.com/add-python-to-path/&quot;&gt;&lt;code&gt;PATH&lt;/code&gt;&lt;/a&gt; and shell profile for you.&lt;/p&gt;
&lt;p&gt;Open a new terminal session, or reload your shell profile, and then confirm that the installation worked by checking the version:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;agy&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--version
&lt;span class=&quot;go&quot;&gt;1.0.12&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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;If you see a version number, then you’re ready to authenticate. Because it’s a single Go binary, Antigravity CLI updates itself in place whenever a newer release is available. But you can trigger that manually at any time with &lt;code&gt;agy update&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/antigravity-cli/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/antigravity-cli/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: How to Use Google&#x27;s Antigravity CLI for AI Code Assistance</title>
      <id>https://realpython.com/quizzes/antigravity-cli/</id>
      <link href="https://realpython.com/quizzes/antigravity-cli/"/>
      <updated>2026-07-27T12:00:00+00:00</updated>
      <summary>Test your knowledge of Google&#x27;s Antigravity CLI, a terminal-based AI coding agent, and how to use it to read, review, and refactor Python code.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/antigravity-cli/&quot;&gt;How to Use Google&amp;rsquo;s Antigravity CLI for AI Code Assistance&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to install and authenticate the tool, prompt the agent to read and refactor your code, and review its work before it lands.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also recall how to resume past conversations and hand parallel jobs to subagents. To keep learning, explore the &lt;a href=&quot;https://realpython.com/learning-paths/coding-with-ai/&quot;&gt;Python Coding With AI&lt;/a&gt; learning path.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #304: Configuring a Versatile LLM Harness &amp; Scraping the Web With Scrapy</title>
      <id>https://realpython.com/podcasts/rpp/304/</id>
      <link href="https://realpython.com/podcasts/rpp/304/"/>
      <updated>2026-07-24T12:00:00+00:00</updated>
      <summary>Which is more important, the model or the &quot;harness&quot; around an LLM? What are ways to assemble an efficient agentic developer workflow? This week on the show, Ayan Pahwa joins us to discuss harnessing, web scraping, and self-hosting Python applications.</summary>
      <content type="html">
        &lt;p&gt;Which is more important, the model or the &quot;harness&quot; around an LLM? What are ways to assemble an efficient agentic developer workflow? This week on the show, Ayan Pahwa joins us to discuss harnessing, web scraping, and self-hosting Python applications.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: A Guide to Excel Spreadsheets in Python With openpyxl</title>
      <id>https://realpython.com/quizzes/openpyxl-excel-spreadsheets-python/</id>
      <link href="https://realpython.com/quizzes/openpyxl-excel-spreadsheets-python/"/>
      <updated>2026-07-23T12:00:00+00:00</updated>
      <summary>Practice reading, writing, and styling Excel spreadsheets in Python with openpyxl, from cell values and formulas to charts and images.</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/openpyxl-excel-spreadsheets-python/&quot;&gt;A Guide to Excel Spreadsheets in Python With openpyxl&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to read data from spreadsheets,
create new workbooks, and work with cells, rows, and columns. You&amp;rsquo;ll also review
adding formulas, styles, conditional formatting, images, and charts with &lt;code&gt;openpyxl&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Spreadsheets show up everywhere in data work, so knowing how to handle them
programmatically is a handy skill whether you&amp;rsquo;re importing product data, exporting
database records, or building reports.&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>Tool-Agnostic Python Lock Files With PEP 751 and pylock.toml</title>
      <id>https://realpython.com/python-lock-file-pylock-toml/</id>
      <link href="https://realpython.com/python-lock-file-pylock-toml/"/>
      <updated>2026-07-22T14:00:00+00:00</updated>
      <summary>Learn how PEP 751 standardizes Python lock files with pylock.toml: generate one with pip or uv, install it with uv or pdm, and retire requirements.txt.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The Python lock file, &lt;code&gt;pylock.toml&lt;/code&gt;, records exact dependencies your project needs so installs come out the same every time. It isn’t the first of its kind, though—most modern package tools already define their own lock formats. This has led to a fragmented landscape where reproducibility is often limited to a single tool’s workflow, with each ecosystem effectively speaking its own lock file dialect.&lt;/p&gt;
&lt;p&gt;From this fragmentation comes a shared standard: &lt;code&gt;pylock.toml&lt;/code&gt;. Defined in &lt;a href=&quot;https://peps.python.org/pep-0751/&quot;&gt;PEP 751&lt;/a&gt;, &lt;code&gt;pylock.toml&lt;/code&gt; standardizes reproducible dependency management across different tools, eliminating vendor lock-in and fragmented &lt;code&gt;requirements.txt&lt;/code&gt; workflows. Its purpose is to capture a fully resolved set of dependencies in a format that every tool can understand.&lt;/p&gt;
&lt;p&gt;But doesn’t &lt;code&gt;requirements.txt&lt;/code&gt; already do this? Not exactly. &lt;code&gt;requirements.txt&lt;/code&gt; isn’t so much a &lt;em&gt;standardized specification&lt;/em&gt; as an implementation detail of &lt;code&gt;pip&lt;/code&gt;. The &lt;a href=&quot;https://pip.pypa.io/en/stable/reference/requirements-file-format/&quot;&gt;Requirements File Format&lt;/a&gt; specifies that “requirements files serve as a list of items to be installed by pip, when using pip install.”&lt;/p&gt;
&lt;p&gt;Still, both files exist to enumerate dependencies that should end up in an environment. The difference lies in how that information is represented, either as tool-specific instructions or as a structured, tool-agnostic record of a resolved state:&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;&lt;strong&gt;If you…&lt;/strong&gt;&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;&lt;strong&gt;&lt;code&gt;pylock.toml&lt;/code&gt;&lt;/strong&gt;&lt;/th&gt;
&lt;th class=&quot;text-center&quot;&gt;&lt;strong&gt;&lt;code&gt;requirements.txt&lt;/code&gt;&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Want to share a single lock file with teammates who use different tools (&lt;code&gt;uv&lt;/code&gt;, &lt;code&gt;pip&lt;/code&gt;, &lt;code&gt;pdm&lt;/code&gt;)&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;Need reproducible, hash-verified installs in CI&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;Want to install without resolving dependencies on the machine&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;Need to pass &lt;code&gt;pip&lt;/code&gt; flags like &lt;code&gt;--index-url&lt;/code&gt; or &lt;code&gt;--no-deps&lt;/code&gt; from the file&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;Want to jot down a couple of dependencies for a quick script by hand&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;This means &lt;code&gt;pylock.toml&lt;/code&gt; is the better choice when you care about reproducibility across tools, the integrity of installed artifacts, or a single shared source of truth that can be consumed in different workflows. It’s especially useful in team settings or &lt;a href=&quot;https://realpython.com/python-continuous-integration/&quot;&gt;continuous integration (CI)&lt;/a&gt; pipelines where consistency matters more than manual control.&lt;/p&gt;
&lt;p&gt;In contrast, &lt;code&gt;requirements.txt&lt;/code&gt; remains a good fit for lightweight workflows, quick experiments, or cases where direct control over &lt;code&gt;pip&lt;/code&gt; behavior and flags is more important than cross-tool interoperability or strict locking guarantees.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-lock-file-pylock-toml-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-lock-file-pylock-toml-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to generate, inspect, and reuse pylock.toml lock files across pip, uv, and pdm.&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.769d3e9e5a0b.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 “Tool-Agnostic Python Lock Files With PEP 751 and pylock.toml” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

      &lt;a href=&quot;/quizzes/python-lock-file-pylock-toml/&quot; tabindex=&quot;-1&quot;&gt;
        &lt;div class=&quot;ratio ratio-16x9&quot;&gt;

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #ffc973;&quot; alt=&quot;A person triumphantly raises a key in front of a vault labeled pylock.toml, with a rack of colored keys, wooden crates marked with hashes, and a Python chip alongside.&quot; src=&quot;https://files.realpython.com/media/Manage-Dependencies-with-Pythons-pylock.toml-Lock-File_Watermarked.94f86fd67ee8.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Manage-Dependencies-with-Pythons-pylock.toml-Lock-File_Watermarked.94f86fd67ee8.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Manage-Dependencies-with-Pythons-pylock.toml-Lock-File_Watermarked.94f86fd67ee8.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Manage-Dependencies-with-Pythons-pylock.toml-Lock-File_Watermarked.94f86fd67ee8.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Manage-Dependencies-with-Pythons-pylock.toml-Lock-File_Watermarked.94f86fd67ee8.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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-lock-file-pylock-toml/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Tool-Agnostic Python Lock Files With PEP 751 and pylock.toml&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of Python lock files and PEP 751, from generating a pylock.toml with pip to installing it across uv and pdm.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;generating-a-python-lock-file-with-pip&quot;&gt;Generating a Python Lock File With &lt;code&gt;pip&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#generating-a-python-lock-file-with-pip&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; &lt;a href=&quot;https://pip.pypa.io/en/stable/news/#v25-1&quot;&gt;version 25.1&lt;/a&gt; or newer, you can generate a &lt;code&gt;pylock.toml&lt;/code&gt; file from a &lt;code&gt;requirements.txt&lt;/code&gt; file using the experimental &lt;a href=&quot;https://pip.pypa.io/en/stable/cli/pip_lock/&quot;&gt;&lt;code&gt;pip lock&lt;/code&gt;&lt;/a&gt; command. At its core, the &lt;code&gt;pylock.toml&lt;/code&gt; will serve as a snapshot of every &lt;a href=&quot;/ref/glossary/dependency/&quot; class=&quot;ref-link&quot;&gt;dependency&lt;/a&gt; &lt;code&gt;pip&lt;/code&gt; would install.&lt;/p&gt;
&lt;p&gt;Before you can use &lt;code&gt;pip lock&lt;/code&gt;, you’ll need to define a small set of explicit dependencies in a standard requirements file:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pyreq&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python Requirements&lt;/span&gt;
    &lt;span class=&quot;me-2&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Filename: &lt;/span&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;requirements.txt&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;n&quot;&gt;pandas&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;scipy&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.769d3e9e5a0b.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 file expresses only the top-level &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;packages&lt;/a&gt; to be installed in your environment. It doesn’t describe how &lt;code&gt;pip&lt;/code&gt; resolves those packages or what additional dependencies they need to work.&lt;/p&gt;
&lt;p&gt;From here, you can have &lt;code&gt;pip&lt;/code&gt; produce a fully resolved lock file:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;lock&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;--requirement&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;requirements.txt
&lt;span class=&quot;go&quot;&gt;WARNING: pip lock is currently an experimental command. It may be&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;⮑ removed/changed in a future release without prior warning.&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Collecting pandas (from -r requirements.txt)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  Downloading pandas-3.0.2-cp314-cp314-manylinux_2_24_x86_64...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Collecting scipy (from -r requirements.txt)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  Downloading scipy-1.17.1-cp314-cp314-manylinux_2_27_x86_64...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Collecting numpy&amp;gt;=2.3.3 (from pandas-&amp;gt;-r requirements.txt)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  Downloading numpy-2.4.4-cp314-cp314-manylinux_2_27_x86_64...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Collecting python-dateutil&amp;gt;=2.8.2 (from pandas-&amp;gt;-r requirements.txt)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;Collecting six&amp;gt;=1.5 (from python-dateutil&amp;gt;=2.8.2-&amp;gt;pandas-&amp;gt;-r requirements.txt)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;  Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)&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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;This triggers the resolution process. &lt;code&gt;pip&lt;/code&gt; builds a complete dependency graph starting from the explicit packages (&lt;code&gt;pandas&lt;/code&gt;, &lt;code&gt;scipy&lt;/code&gt;), resolves all required &lt;a href=&quot;/ref/glossary/transitive-dependency/&quot; class=&quot;ref-link&quot;&gt;transitive dependencies&lt;/a&gt;, and downloads compatible versions for the current Python environment and platform.&lt;/p&gt;
&lt;p&gt;This means the result contains both:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Explicit dependencies:&lt;/strong&gt; What you specified directly, like &lt;code&gt;pandas&lt;/code&gt; and &lt;code&gt;scipy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transitive dependencies:&lt;/strong&gt; What those packages require to function, like &lt;code&gt;numpy&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can explore that split for yourself in the interactive graph below. Start with only &lt;code&gt;pandas&lt;/code&gt; declared to see the full set it resolves to, then toggle &lt;code&gt;scipy&lt;/code&gt; on and watch your two requested packages expand into a larger set of pinned dependencies:&lt;/p&gt;
&lt;div&gt;
  &lt;widget-embed src=&quot;/widgets/pylock-resolve-graph/1782413260/&quot; slug=&quot;pylock-resolve-graph&quot; class=&quot;border rounded&quot; title=&quot;Where a Lock File&#x27;s Packages Come From&quot;&gt;
    &lt;div class=&quot;widget-embed__fallback&quot; data-widget-fallback&gt;
      Interactive diagram — enable JavaScript to view.
    &lt;/div&gt;
  &lt;/widget-embed&gt;
&lt;/div&gt;

&lt;p&gt;Pay attention to &lt;code&gt;numpy&lt;/code&gt; as you toggle &lt;code&gt;scipy&lt;/code&gt; on and off. The install log above attributes &lt;code&gt;numpy&lt;/code&gt; to &lt;code&gt;pandas&lt;/code&gt;, but &lt;code&gt;scipy&lt;/code&gt; depends on it too, so the resolver doesn’t lock it twice—it records a single, shared &lt;code&gt;numpy&lt;/code&gt; entry that satisfies both. That’s exactly what a lock file does for you: it turns the short list of packages you asked for into the complete, deduplicated set that will actually be installed.&lt;/p&gt;
&lt;p&gt;By capturing the complete dependency graph, &lt;code&gt;pylock.toml&lt;/code&gt; enables reproducible and verifiable installations across environments.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-lock-file-pylock-toml/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-lock-file-pylock-toml/ »&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: Tool-Agnostic Python Lock Files With PEP 751 and pylock.toml</title>
      <id>https://realpython.com/quizzes/python-lock-file-pylock-toml/</id>
      <link href="https://realpython.com/quizzes/python-lock-file-pylock-toml/"/>
      <updated>2026-07-22T12:00:00+00:00</updated>
      <summary>Test your understanding of Python lock files and PEP 751, from generating a pylock.toml with pip to installing it across uv and pdm.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python-lock-file-pylock-toml/&quot;&gt;Tool-Agnostic Python Lock Files With PEP 751 and &lt;code&gt;pylock.toml&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through these questions, you&amp;rsquo;ll revisit how to generate a &lt;code&gt;pylock.toml&lt;/code&gt; with &lt;code&gt;pip&lt;/code&gt;, what its wheel metadata and hashes give you, how it compares to &lt;code&gt;requirements.txt&lt;/code&gt;, and how tools like &lt;code&gt;uv&lt;/code&gt; and &lt;code&gt;pdm&lt;/code&gt; share the same lock file.&lt;/p&gt;
&lt;p&gt;A solid grasp of reproducible, tool-agnostic installs will help you keep your projects consistent across machines and tools.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: FastAPI: Python API Development With Light Speed</title>
      <id>https://realpython.com/learning-paths/fastapi/</id>
      <link href="https://realpython.com/learning-paths/fastapi/"/>
      <updated>2026-07-22T12:00:00+00:00</updated>
      <summary>Learn FastAPI from the ground up. Build REST APIs, serve web pages with Jinja2 templates, and create a complete URL shortener project in Python.</summary>
      <content type="html">
        &lt;p&gt;Learn FastAPI from the ground up. Build REST APIs, serve web pages with Jinja2 templates, and create a complete URL shortener project in Python.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Exploring Python&#x27;s Built-in Functions</title>
      <id>https://realpython.com/courses/exploring-pythons-built-in-functions/</id>
      <link href="https://realpython.com/courses/exploring-pythons-built-in-functions/"/>
      <updated>2026-07-21T14:00:00+00:00</updated>
      <summary>Learn Python&#x27;s built-in functions for math, data types, iterables, and I/O, and when to use each to write more Pythonic code.</summary>
      <content type="html">
        &lt;p&gt;Python&amp;rsquo;s &lt;strong&gt;built-in functions&lt;/strong&gt; are predefined functions you can use anywhere in your code without any imports. They handle common tasks across math, data type creation, iterable processing, and input and output. Knowing which ones to reach for makes your code shorter and more &lt;strong&gt;Pythonic&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recognize Python&amp;rsquo;s &lt;strong&gt;built-in functions&lt;/strong&gt; and the &lt;strong&gt;built-in scope&lt;/strong&gt; they live in&lt;/li&gt;
&lt;li&gt;Use the right built-in for &lt;strong&gt;tasks&lt;/strong&gt; involving &lt;strong&gt;math&lt;/strong&gt;, &lt;strong&gt;data types&lt;/strong&gt;, &lt;strong&gt;iterables&lt;/strong&gt;, and &lt;strong&gt;I/O&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Distinguish &lt;strong&gt;real functions&lt;/strong&gt; from &lt;strong&gt;classes&lt;/strong&gt; that only look like them&lt;/li&gt;
&lt;li&gt;Apply built-ins to solve &lt;strong&gt;practical problems&lt;/strong&gt; with less code you have to write yourself&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this video course, you&amp;rsquo;ll need to be familiar with Python programming, including topics like working with built-in &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;data types&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/primer-on-python-decorators/&quot;&gt;decorators&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-scope-legb-rule/&quot;&gt;scopes&lt;/a&gt;, and the &lt;a href=&quot;https://realpython.com/python-import/&quot;&gt;import&lt;/a&gt; system.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: FastAPI: Python API Development With Light Speed</title>
      <id>https://realpython.com/quizzes/fastapi-python/</id>
      <link href="https://realpython.com/quizzes/fastapi-python/"/>
      <updated>2026-07-21T12:00:00+00:00</updated>
      <summary>Test your FastAPI skills across REST APIs, Pydantic models, async endpoints, Jinja2 templates, and more in this learning path wrap-up quiz.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll revisit the core concepts covered in the
&lt;a href=&quot;https://realpython.com/learning-paths/fastapi/&quot;&gt;FastAPI: Python API Development With Light Speed&lt;/a&gt; learning path:&lt;/p&gt;
&lt;div&gt;


&lt;learning-path-card data-path-id=&quot;fastapi&quot; class=&quot;resource-card border rounded overflow-hidden shadow-sm position-relative mb-4&quot; data-progress-card&gt;

    &lt;a class=&quot;resource-card__media&quot; href=&quot;/learning-paths/fastapi/&quot; aria-hidden=&quot;true&quot; tabindex=&quot;-1&quot; data-not-previewable&gt;

      &lt;img loading=&quot;lazy&quot; src=&quot;https://files.realpython.com/media/FastAPI-Web-Development.4ce25052915b.jpg&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/FastAPI-Web-Development.4ce25052915b.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/FastAPI-Web-Development.4ce25052915b.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/FastAPI-Web-Development.4ce25052915b.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/FastAPI-Web-Development.4ce25052915b.jpg 1920w&quot; alt=&quot;FastAPI Web Development Learning Path Artwork&quot; width=&quot;1920&quot; height=&quot;1080&quot; sizes=&quot;(min-width: 1200px) 172px, (min-width: 1000px) 152px, (min-width: 780px) 142px, (min-width: 580px) 166px, calc(100vw - 32px)&quot; style=&quot;background-color: #fe7e73;&quot;&gt;
    &lt;/a&gt;

  &lt;div class=&quot;resource-card__body&quot;&gt;
    &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Learning Path&lt;/strong&gt;&lt;/p&gt;
    &lt;a class=&quot;stretched-link&quot; href=&quot;/learning-paths/fastapi/&quot;&gt;&lt;h2 class=&quot;my-0 h3&quot;&gt;FastAPI: Python API Development With Light Speed&lt;/h2&gt;&lt;/a&gt;
    &lt;p class=&quot;text-muted mb-0 small&quot;&gt;6 Resources ⋅ &lt;strong&gt;Skills:&lt;/strong&gt; FastAPI, REST APIs, Web Development, Jinja2&lt;/p&gt;


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


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

&lt;p&gt;You&amp;rsquo;ll touch on installing and running FastAPI, defining routes and path parameters, validating input with Pydantic, mapping CRUD operations to HTTP methods, writing async endpoints, configuring CORS, and serving HTML pages with Jinja2 templates.&lt;/p&gt;
&lt;p&gt;Take your time and revisit any topics that feel rusty before moving on.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Exploring Python&#x27;s Built-in Functions</title>
      <id>https://realpython.com/quizzes/exploring-pythons-built-in-functions/</id>
      <link href="https://realpython.com/quizzes/exploring-pythons-built-in-functions/"/>
      <updated>2026-07-21T12:00:00+00:00</updated>
      <summary>Test your knowledge of Python&#x27;s built-in functions for math, data types, iterables, and I/O, and learn when to reach for each one.</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-pythons-built-in-functions/&quot;&gt;Exploring Python&amp;rsquo;s Built-in Functions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through these questions, you&amp;rsquo;ll revisit Python&amp;rsquo;s built-in functions for math, data types, iterables, and input and output, and you&amp;rsquo;ll sharpen your sense of when to reach for each one to write more Pythonic code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Using NumPy reshape() to Change the Shape of an Array</title>
      <id>https://realpython.com/numpy-reshape/</id>
      <link href="https://realpython.com/numpy-reshape/"/>
      <updated>2026-07-20T14:00:00+00:00</updated>
      <summary>Learn how to use NumPy reshape() in Python to change an array&#x27;s shape, add or remove dimensions, and control how the data is rearranged.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;The main data structure you’ll use in &lt;a href=&quot;https://realpython.com/numpy-tutorial/&quot;&gt;NumPy&lt;/a&gt;, Python’s core library for numerical computing, is the &lt;a href=&quot;https://numpy.org/doc/stable/reference/arrays.ndarray.html&quot;&gt;N-dimensional array&lt;/a&gt;. Sometimes you need to reorganize the values in a NumPy array into a different layout. That’s what NumPy’s &lt;strong&gt;&lt;code&gt;reshape()&lt;/code&gt;&lt;/strong&gt; is for. It changes an array’s shape without changing its data, so you can fit the same values into whatever configuration your program needs.&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;You &lt;strong&gt;reshape a NumPy array&lt;/strong&gt; by passing a compatible shape to &lt;code&gt;.reshape()&lt;/code&gt;, which rearranges the data without changing its values.&lt;/li&gt;
&lt;li&gt;A new shape is &lt;strong&gt;compatible&lt;/strong&gt; only when its total number of elements matches the original array.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;reshape()&lt;/code&gt; can &lt;strong&gt;add or remove dimensions&lt;/strong&gt;, so the new array doesn’t need the same number of dimensions as the original.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;order&lt;/code&gt; parameter&lt;/strong&gt; sets whether the data is read in row-major (&lt;code&gt;&quot;C&quot;&lt;/code&gt;) or column-major (&lt;code&gt;&quot;F&quot;&lt;/code&gt;) order.&lt;/li&gt;
&lt;li&gt;Passing &lt;strong&gt;&lt;code&gt;-1&lt;/code&gt;&lt;/strong&gt; for one dimension lets &lt;code&gt;reshape()&lt;/code&gt; infer that dimension’s length automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;a href=&quot;https://numpy.org/doc/stable/glossary.html#term-shape&quot;&gt;shape&lt;/a&gt; of an array describes the number of dimensions in the array and the length of each dimension. In this tutorial, you’ll learn how to reshape a NumPy array to place all its data in a different configuration. When you complete this tutorial, you’ll be able to alter the shape of any array to suit your application’s needs.&lt;/p&gt;
&lt;p&gt;For this tutorial, you should be familiar with the basics of NumPy and N-dimensional arrays. You can read &lt;a href=&quot;https://realpython.com/numpy-tutorial/&quot;&gt;NumPy Tutorial: Your First Steps Into Data Science in Python&lt;/a&gt; to learn more about NumPy before diving in.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Supplemental Material:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/numpy-reshape-repository/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-numpy-reshape-repository&quot; markdown&gt;Click here to download the supporting materials&lt;/a&gt; that you’ll use with NumPy &lt;code&gt;reshape()&lt;/code&gt;.&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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “Using NumPy reshape() to Change the Shape of an Array” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;Using NumPy reshape() to Change the Shape of an Array&quot; src=&quot;https://files.realpython.com/media/How-to-Use-NumPys-reshape_Watermarked.88dac560fd74.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-NumPys-reshape_Watermarked.88dac560fd74.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Use-NumPys-reshape_Watermarked.88dac560fd74.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Use-NumPys-reshape_Watermarked.88dac560fd74.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Use-NumPys-reshape_Watermarked.88dac560fd74.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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/numpy-reshape/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Using NumPy reshape() to Change the Shape of an Array&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Practice NumPy reshape() by changing an array&#x27;s shape, adding or removing dimensions, and controlling how the data gets rearranged.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;install-numpy&quot;&gt;Install NumPy&lt;a class=&quot;headerlink&quot; href=&quot;#install-numpy&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll need to install NumPy to your environment to run the code in this tutorial and explore &lt;code&gt;reshape()&lt;/code&gt;. You can install the package using &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt; within a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt;. Select either the Windows or Linux + macOS tab below to see instructions for your operating system:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




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

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Scripts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;activate&lt;/span&gt;
&lt;span class=&quot;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;n&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;numpy&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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv/bin/activate
&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;pip&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;numpy
&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.769d3e9e5a0b.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;It’s a convention to use the alias &lt;code&gt;np&lt;/code&gt; when you import NumPy. To get started, you can import NumPy in the &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python REPL&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;numpy&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;np&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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Now that you’ve installed NumPy and imported the package in a REPL environment, you’re ready to start working with NumPy arrays.&lt;/p&gt;
&lt;h2 id=&quot;understand-the-shape-of-numpy-arrays&quot;&gt;Understand the Shape of NumPy Arrays&lt;a class=&quot;headerlink&quot; href=&quot;#understand-the-shape-of-numpy-arrays&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll use NumPy’s &lt;a href=&quot;https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html&quot;&gt;&lt;code&gt;ndarray&lt;/code&gt;&lt;/a&gt; in this tutorial. In this section, you’ll review the key features of this data structure, including an array’s overall &lt;a href=&quot;https://numpy.org/doc/stable/glossary.html#term-shape&quot;&gt;shape&lt;/a&gt; and number of &lt;a href=&quot;https://numpy.org/doc/stable/glossary.html#term-axis&quot;&gt;dimensions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can create an array from a list of lists:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;numpy&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;np&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;numbers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&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;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;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;8&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;numbers&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;array([[1, 2, 3, 4],&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;       [5, 6, 7, 8]])&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.769d3e9e5a0b.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 function &lt;a href=&quot;https://numpy.org/doc/stable/reference/generated/numpy.array.html&quot;&gt;&lt;code&gt;np.array()&lt;/code&gt;&lt;/a&gt; returns an object of type &lt;a href=&quot;https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html&quot;&gt;&lt;code&gt;np.ndarray&lt;/code&gt;&lt;/a&gt;. This data structure is the main data type in NumPy.&lt;/p&gt;
&lt;p&gt;You can describe the shape of an array using the length of each dimension of the array. NumPy represents this as a tuple of integers. The array &lt;code&gt;numbers&lt;/code&gt; has two rows and four columns. Therefore, this array has a &lt;code&gt;(2, 4)&lt;/code&gt; shape:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;numbers&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;shape&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;(2, 4)&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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;You can represent the same data using a different shape:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.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/numpy-reshape-24-42.679add5e8d11.png&quot; width=&quot;800&quot; height=&quot;800&quot; srcset=&quot;/cdn-cgi/image/width=200,format=auto/https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png 200w, /cdn-cgi/image/width=266,format=auto/https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png 266w, /cdn-cgi/image/width=400,format=auto/https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png 400w, /cdn-cgi/image/width=800,format=auto/https://files.realpython.com/media/numpy-reshape-24-42.679add5e8d11.png 800w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Visual representation of NumPy arrays with different shapes&quot; data-asset=&quot;4894&quot;&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Both of these arrays contain the same data. The array with the shape &lt;code&gt;(2, 4)&lt;/code&gt; has two rows and four columns, and the array with the shape &lt;code&gt;(4, 2)&lt;/code&gt; has four rows and two columns. You can check the number of dimensions of an array using &lt;code&gt;.ndim&lt;/code&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;numbers&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ndim&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;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.769d3e9e5a0b.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/numpy-reshape/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/numpy-reshape/ »&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 NumPy reshape() to Change the Shape of an Array</title>
      <id>https://realpython.com/quizzes/numpy-reshape/</id>
      <link href="https://realpython.com/quizzes/numpy-reshape/"/>
      <updated>2026-07-20T12:00:00+00:00</updated>
      <summary>Practice NumPy reshape() by changing an array&#x27;s shape, adding or removing dimensions, and controlling how the data gets rearranged.</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/numpy-reshape/&quot;&gt;Using NumPy reshape() to Change the Shape of an Array&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through these questions, you&amp;rsquo;ll revisit how to reshape an array into a compatible shape, add or remove dimensions, and use the &lt;code&gt;order&lt;/code&gt; parameter to control how NumPy rearranges your data.&lt;/p&gt;
&lt;p&gt;Reshaping is a core skill when you work with &lt;a href=&quot;https://realpython.com/numpy-tutorial/&quot;&gt;NumPy&lt;/a&gt; for numerical computing 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>The Real Python Podcast – Episode #303: Free-Threaded Python&#x27;s History &amp; uv in Production</title>
      <id>https://realpython.com/podcasts/rpp/303/</id>
      <link href="https://realpython.com/podcasts/rpp/303/"/>
      <updated>2026-07-17T12:00:00+00:00</updated>
      <summary>How many attempts have been made to remove Python&#x27;s Global Interpreter Lock (GIL)? How do they compare to the current approach? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How many attempts have been made to remove Python&#x27;s Global Interpreter Lock (GIL)? How do they compare to the current approach? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Write a CLAUDE.md File for Claude Code</title>
      <id>https://realpython.com/python-claude-md/</id>
      <link href="https://realpython.com/python-claude-md/"/>
      <updated>2026-07-15T14:00:00+00:00</updated>
      <summary>Learn how to write a CLAUDE.md file for Claude Code, with global, project, and local examples that capture your Python commands and conventions.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;In this tutorial, you’ll write &lt;code&gt;CLAUDE.md&lt;/code&gt; files for Claude Code that capture your Python workflow, project commands, and coding rules. You’ll create a global file for personal defaults, a project-level file for repository guidance, and one for local notes that shouldn’t be committed to version control.&lt;/p&gt;
&lt;p&gt;To make these ideas concrete, you’ll work through a realistic example: steering Claude Code away from incorrect suggestions for AWS Bedrock global cross-region &lt;a href=&quot;/ref/ai-coding-glossary/inference/&quot; class=&quot;ref-link&quot;&gt;inference&lt;/a&gt;. You’ll turn that recurring correction into &lt;a href=&quot;https://code.claude.com/docs/en/best-practices#write-an-effective-claude-md&quot;&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/a&gt; guidance and learn how to apply the same pattern to your project-specific rules, commands, and preferences that matter in your own codebase:&lt;/p&gt;
&lt;figure&gt;





&lt;div class=&quot;ratio rounded overflow-hidden mb-3 bg-body-tertiary&quot; style=&quot;aspect-ratio: 1920/1080;&quot;&gt;
  &lt;video-animation data-src=&quot;https://stream.realpython.com/0a55ebb7-2486-4991-8ba5-aab6b74452d8/playlist.m3u8&quot;&gt;
    &lt;video muted loop playsinline preload=&quot;none&quot; poster=&quot;https://stream.realpython.com/0a55ebb7-2486-4991-8ba5-aab6b74452d8/thumbnail.jpg?width=1280&quot; disablepictureinpicture disableremoteplayback&gt;&lt;/video&gt;
  &lt;/video-animation&gt;
&lt;/div&gt;


  &lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Claude Code Making Changes With Access to CLAUDE.md Instructions&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;A good &lt;code&gt;CLAUDE.md&lt;/code&gt; file doesn’t document everything about your project. Instead, it records commands, constraints, and workflow preferences that &lt;a href=&quot;/ref/ai-coding-tools/claude-code/&quot; class=&quot;ref-link&quot;&gt;Claude Code&lt;/a&gt; can’t easily infer from the repository. The aim is to prevent repeated corrections. You’re &lt;em&gt;not&lt;/em&gt; trying to teach Claude Code every detail of Python or your codebase.&lt;/p&gt;
&lt;p&gt;You can always use the &lt;code&gt;/init&lt;/code&gt; command as a starting point, but &lt;a href=&quot;https://arxiv.org/abs/2602.11988&quot;&gt;recent research&lt;/a&gt; found that unnecessarily large and redundant &lt;a href=&quot;/ref/ai-coding-glossary/context-engineering/&quot; class=&quot;ref-link&quot;&gt;context&lt;/a&gt; files often hurt &lt;a href=&quot;/ref/ai-coding-glossary/agent/&quot; class=&quot;ref-link&quot;&gt;agent&lt;/a&gt; performance and recommended keeping them minimal. This means the auto-generated &lt;code&gt;CLAUDE.md&lt;/code&gt; should usually be trimmed as it tends to repeat what Claude Code can already discover from the repo and can waste &lt;a href=&quot;/ref/ai-coding-glossary/token/&quot; class=&quot;ref-link&quot;&gt;tokens&lt;/a&gt; without gain.&lt;/p&gt;
&lt;p&gt;With that in mind, you can now build your &lt;code&gt;CLAUDE.md&lt;/code&gt; files: first your global defaults, then the project-specific rules, and finally any local notes you may have. Before you start writing, review the prerequisites below to prepare your environment to follow along.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Cheat Sheet:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-claude-md-cheatsheet/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-claude-md-cheatsheet&quot; markdown&gt;Click here to download a free PDF&lt;/a&gt; summarizing the patterns, pitfalls, and prompts for writing CLAUDE.md files that steer Claude Code through your Python projects.&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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “How to Write a CLAUDE.md File for Claude Code” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #fe7e73;&quot; alt=&quot;A person and a robot beside a filing cabinet with drawers labeled GLOBAL, PROJECT, and LOCAL, next to a Python logo, a CLAUDE.md tag, and a screen labeled MEMORY with checklist items.&quot; src=&quot;https://files.realpython.com/media/How-to-Write-a-CLAUDE.md-File-for-Claude-Code_Watermarked.ea7aeffdb75e.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/How-to-Write-a-CLAUDE.md-File-for-Claude-Code_Watermarked.ea7aeffdb75e.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Write-a-CLAUDE.md-File-for-Claude-Code_Watermarked.ea7aeffdb75e.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Write-a-CLAUDE.md-File-for-Claude-Code_Watermarked.ea7aeffdb75e.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Write-a-CLAUDE.md-File-for-Claude-Code_Watermarked.ea7aeffdb75e.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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-claude-md/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Write a CLAUDE.md File for Claude Code&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Practice writing CLAUDE.md files for Claude Code across global, project, and local layers that capture your Python commands and conventions.&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 along, you’ll need &lt;a href=&quot;https://realpython.com/courses/getting-started-claude-code/&quot;&gt;Claude Code installed and configured&lt;/a&gt;, a &lt;a href=&quot;/ref/code-editors-ides/&quot; class=&quot;ref-link&quot;&gt;text editor&lt;/a&gt; for creating Markdown files, plus a Python project or script that you can safely modify. You should also be familiar with how that project handles dependencies, tests, and any &lt;a href=&quot;/ref/glossary/linter/&quot; class=&quot;ref-link&quot;&gt;linting&lt;/a&gt; or formatting it uses.&lt;/p&gt;
&lt;p&gt;A concrete Python project or script makes this tutorial more useful. If you don’t already have one, then you can download the sample script below before continuing:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/python-claude-md-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-python-claude-md-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; you’ll use to follow along as you write CLAUDE.md rules that steer Claude Code toward correct AWS Bedrock cross-region inference.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The example Python script uses &lt;a href=&quot;https://docs.aws.amazon.com/bedrock/&quot;&gt;AWS Bedrock&lt;/a&gt; with &lt;a href=&quot;https://docs.aws.amazon.com/boto3/latest/guide/quickstart.html&quot;&gt;&lt;code&gt;boto3&lt;/code&gt;&lt;/a&gt;, which requires Python 3.10 or higher. It also relies on &lt;a href=&quot;https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html&quot;&gt;configured AWS CLI credentials&lt;/a&gt; to generate output. That said, you don’t have to run the script to follow along. It’s enough to read the &lt;a href=&quot;/ref/ai-coding-glossary/prompt/&quot; class=&quot;ref-link&quot;&gt;prompt&lt;/a&gt; and Claude’s responses. Set up AWS only if you want to run it and play with it yourself.&lt;/p&gt;
&lt;p&gt;Later on in the tutorial, you’ll see a Bedrock-specific mistake made by Claude regarding the proper way to enable global cross-region inference for AWS Bedrock models. It’s a mistake where the code produced still works but isn’t entirely correct or what you intended. This type of error generalizes to any quirks or project-specific conventions in your own Python project or repo.&lt;/p&gt;
&lt;h2 id=&quot;step-1-audit-claude-codes-mistakes&quot;&gt;Step 1: Audit Claude Code’s Mistakes&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-audit-claude-codes-mistakes&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Start by observing where Claude actually needs guidance. Don’t write &lt;code&gt;CLAUDE.md&lt;/code&gt; from a long list of your favorite Python rules, as that’s mostly unnecessary context. Run Claude Code on a small task in your project and watch for the repeated mistakes it makes.&lt;/p&gt;
&lt;p&gt;A short audit can often give you better instructions than a long checklist of rules or directives you think Claude Code needs. Try using this workflow before creating any instruction file for Claude Code:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Temporarily move existing global and project-level &lt;code&gt;CLAUDE.md&lt;/code&gt; and &lt;code&gt;CLAUDE.local.md&lt;/code&gt; files out of the way. You can rename them or move them out of their respective directories so Claude Code doesn’t pick them up. You can verify Claude Code hasn’t loaded them with the &lt;code&gt;/memory&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;Ask Claude Code to make a small change to your project.&lt;/li&gt;
&lt;li&gt;Record each correction you have to give.&lt;/li&gt;
&lt;li&gt;Sort each correction into global, project-level, or local guidance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Look for knowledge that Claude Code can’t &lt;strong&gt;readily&lt;/strong&gt; and &lt;strong&gt;reliably&lt;/strong&gt; infer from reading your codebase. Build commands, test commands, environment variables, and team conventions are good starting points. Standard Python advice—apart from preferred defaults Claude may not follow—usually isn’t necessary because Anthropic models are already proficient at writing Python code, and such advice generally wastes tokens in a &lt;code&gt;CLAUDE.md&lt;/code&gt; file.&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; What does &lt;strong&gt;readily&lt;/strong&gt; mean in this context? If Claude has to read numerous &lt;a href=&quot;/ref/glossary/source-code/&quot; class=&quot;ref-link&quot;&gt;source code&lt;/a&gt; files to figure out how to run the project or understand a particular repo convention, this is typically not considered to be “readily” discoverable and could warrant a line in &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;It can still be beneficial to add your preferred Python defaults to &lt;code&gt;CLAUDE.md&lt;/code&gt;, but they should only be a small part of it.&lt;/p&gt;
&lt;p&gt;When auditing, note the correction, the scope, and the instruction you want Claude Code to follow. For example, you might notice the following corrections in a typical Python repo:&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;Repeated Correction&lt;/th&gt;
&lt;th&gt;Better Instruction&lt;/th&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code installed &lt;a href=&quot;/ref/glossary/package/&quot; class=&quot;ref-link&quot;&gt;packages&lt;/a&gt; imperatively with &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;code&gt;install&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Add project dependencies with &lt;code&gt;uv add&lt;/code&gt;; use &lt;code&gt;uv pip install&lt;/code&gt; only for ad hoc env installs&lt;/td&gt;
&lt;td&gt;Global or project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code skipped the test command&lt;/td&gt;
&lt;td&gt;Run &lt;code&gt;uv run pytest&lt;/code&gt; before finishing a task&lt;/td&gt;
&lt;td&gt;Project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code added &lt;code&gt;print()&lt;/code&gt; debugging&lt;/td&gt;
&lt;td&gt;Use the configured logger&lt;/td&gt;
&lt;td&gt;Project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code edited or created unrelated files&lt;/td&gt;
&lt;td&gt;Touch only files needed for the task&lt;/td&gt;
&lt;td&gt;Global&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code opened broad files too early&lt;/td&gt;
&lt;td&gt;Use &lt;code&gt;rg&lt;/code&gt; to find relevant files before opening source files&lt;/td&gt;
&lt;td&gt;Global&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;While doing this exercise, use the following flowchart to decide when and where to add a rule:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/v3-claude-md-flowchart11.75cd97ace1fa.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/v3-claude-md-flowchart11.75cd97ace1fa.jpg&quot; width=&quot;3440&quot; height=&quot;1489&quot; srcset=&quot;/cdn-cgi/image/width=860,format=auto/https://files.realpython.com/media/v3-claude-md-flowchart11.75cd97ace1fa.jpg 860w, /cdn-cgi/image/width=1146,format=auto/https://files.realpython.com/media/v3-claude-md-flowchart11.75cd97ace1fa.jpg 1146w, /cdn-cgi/image/width=1720,format=auto/https://files.realpython.com/media/v3-claude-md-flowchart11.75cd97ace1fa.jpg 1720w, /cdn-cgi/image/width=3440,format=auto/https://files.realpython.com/media/v3-claude-md-flowchart11.75cd97ace1fa.jpg 3440w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A flowchart showing whether or not to add a rule to CLAUDE.md&quot; data-asset=&quot;7065&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Decision Chart for Adding Rules&lt;/figcaption&gt;&lt;/figure&gt;

&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-claude-md/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-claude-md/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: How to Write a CLAUDE.md File for Claude Code</title>
      <id>https://realpython.com/quizzes/python-claude-md/</id>
      <link href="https://realpython.com/quizzes/python-claude-md/"/>
      <updated>2026-07-15T12:00:00+00:00</updated>
      <summary>Practice writing CLAUDE.md files for Claude Code across global, project, and local layers that capture your Python commands and conventions.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of &lt;a href=&quot;https://realpython.com/python-claude-md/&quot;&gt;How to Write a CLAUDE.md File for Claude Code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll revisit how to split guidance across global, project-level, and local files, audit Claude Code for repeated mistakes, and decide what belongs in a project-level &lt;code&gt;CLAUDE.md&lt;/code&gt; that captures the commands and conventions Claude Code can&amp;rsquo;t easily infer.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Understanding Mixin Classes in Python</title>
      <id>https://realpython.com/courses/understanding-mixin-classes-in-python/</id>
      <link href="https://realpython.com/courses/understanding-mixin-classes-in-python/"/>
      <updated>2026-07-14T14:00:00+00:00</updated>
      <summary>Learn how to write reusable Python mixin classes, distinguish them from abstract base classes, and steer clear of common pitfalls.</summary>
      <content type="html">
        &lt;p&gt;Mixins offer a powerful way to reuse code across multiple Python classes without forcing them into a rigid inheritance hierarchy. Instead of building deep and brittle class trees, you can use mixins to share common behaviors in a modular and flexible way. Learn when and how to implement mixin classes effectively in your Python projects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Mixins&lt;/strong&gt; allow you to add isolated, reusable functionalities to classes without enforcing a strict type hierarchy.&lt;/li&gt;
&lt;li&gt;Python has &lt;strong&gt;no dedicated syntax&lt;/strong&gt; for declaring mixins. You create mixins by defining &lt;strong&gt;classes&lt;/strong&gt; with specific behaviors that other classes can inherit without forming an &lt;em&gt;is-a&lt;/em&gt; relationship.&lt;/li&gt;
&lt;li&gt;Mixins rely on &lt;strong&gt;multiple inheritance&lt;/strong&gt; to combine features from different classes, enhancing flexibility and code reuse.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stateful mixins&lt;/strong&gt; require careful design to manage instance attributes and avoid conflicts with other classes.&lt;/li&gt;
&lt;li&gt;Python&amp;rsquo;s &lt;strong&gt;method resolution order (MRO)&lt;/strong&gt; determines the order in which classes are inherited, affecting how mixins are applied.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the most out of this video course, you should have a good understanding of &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming (OOP)&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/solid-principles-python/&quot;&gt;SOLID principles&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/inheritance-composition-python/&quot;&gt;inheritance&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;Python classes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, what is a Python mixin, and when should you use one?&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>LangGraph Tutorial: Build Stateful AI Agents in Python</title>
      <id>https://realpython.com/langgraph-python/</id>
      <link href="https://realpython.com/langgraph-python/"/>
      <updated>2026-07-13T14:00:00+00:00</updated>
      <summary>Learn LangGraph in Python with hands-on examples and build stateful, multi-agent AI agents that manage memory, cycles, and complex LLM workflows.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;LangGraph is a versatile Python framework designed for stateful, cyclic, and multi-actor Large Language Model (LLM) applications. LangGraph builds upon its parent library, LangChain, and allows you to build sophisticated workflows that can handle the complexities of real-world LLM applications. Throughout this LangGraph tutorial, you’ll build a complete email-processing agent from the ground up.&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;You can use LangGraph to build LLM workflows by &lt;strong&gt;defining state graphs with nodes and edges&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;LangGraph expands LangChain’s capabilities by providing tools to build complex LLM workflows with &lt;strong&gt;state, conditional edges, and cycles&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LLM agents&lt;/strong&gt; in LangGraph autonomously process tasks using state graphs to make decisions and interact with tools or APIs.&lt;/li&gt;
&lt;li&gt;You can use LangGraph independently of LangChain, although they’re often used together to complement each other.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Explore the full tutorial to gain hands-on experience with LangGraph, including setting up workflows and building a LangGraph agent that can autonomously parse emails, send emails, and interact with API services.&lt;/p&gt;
&lt;p&gt;While you’ll get a brief primer on &lt;a href=&quot;https://realpython.com/build-llm-rag-chatbot-with-langchain/&quot;&gt;LangChain&lt;/a&gt; in this tutorial, you’ll benefit from having prior knowledge of LangChain fundamentals. You’ll also want to ensure you have intermediate Python knowledge, specifically in &lt;a href=&quot;https://realpython.com/python3-object-oriented-programming/&quot;&gt;object-oriented programming&lt;/a&gt; concepts like classes and methods.&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/langgraph-python-code/&quot; class=&quot;alert-link&quot; data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#modal-langgraph-python-code&quot; markdown&gt;Click here to download the free sample code &lt;/a&gt; that you’ll use to build stateful AI agents with LangGraph 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.769d3e9e5a0b.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 “LangGraph: Build Stateful AI 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-12 col-sm-4 col-md-3 align-self-center&quot;&gt;

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

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #abe5b2;&quot; alt=&quot;LangGraph: Build Stateful AI Agents in Python&quot; src=&quot;https://files.realpython.com/media/Showcase-Langgraph_Watermarked.6435fda68bc4.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Showcase-Langgraph_Watermarked.6435fda68bc4.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Showcase-Langgraph_Watermarked.6435fda68bc4.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Showcase-Langgraph_Watermarked.6435fda68bc4.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Showcase-Langgraph_Watermarked.6435fda68bc4.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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

    &lt;div class=&quot;col position-relative&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/langgraph-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;LangGraph: Build Stateful AI Agents in Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your understanding of LangGraph, the Python library for building stateful, cyclic, and multi-actor LLM workflows and agents built on LangChain.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;what-is-langgraph&quot;&gt;What Is LangGraph?&lt;a class=&quot;headerlink&quot; href=&quot;#what-is-langgraph&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;LangGraph is an open-source Python framework for building &lt;strong&gt;stateful&lt;/strong&gt;, &lt;strong&gt;cyclic&lt;/strong&gt;, and &lt;strong&gt;multi-agent&lt;/strong&gt; applications powered by large language models (LLMs). It gives you a low-level orchestration layer that represents an LLM application as a &lt;strong&gt;graph&lt;/strong&gt;: each step is a node, and the connections between steps are edges. Because the graph can branch and loop, you can model decision-making and repeated actions that a simple, linear pipeline can’t express.&lt;/p&gt;
&lt;p&gt;LangGraph is part of the LangChain ecosystem and integrates closely with &lt;a href=&quot;https://realpython.com/build-llm-rag-chatbot-with-langchain/&quot;&gt;LangChain&lt;/a&gt;, but it’s a standalone framework that you can also use on its own.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is LangGraph used for?&lt;/strong&gt; It shines whenever an LLM application needs to do more than answer a single prompt, including tasks like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stateful workflows&lt;/strong&gt; that carry information forward from one step to the next&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conditional logic&lt;/strong&gt; that routes the application down different paths depending on the data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cycles&lt;/strong&gt; that repeat a step until some condition is met&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI agents&lt;/strong&gt; that decide which tools to call and act autonomously&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-agent systems&lt;/strong&gt; in which several agents coordinate to complete a larger task&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Throughout this tutorial, you’ll build these capabilities from the ground up as you create an email-processing agent. Before you start coding, you’ll install LangGraph and set up a few example emails to test your work.&lt;/p&gt;
&lt;h2 id=&quot;install-langgraph&quot;&gt;Install LangGraph&lt;a class=&quot;headerlink&quot; href=&quot;#install-langgraph&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;LangGraph is available on &lt;a href=&quot;https://pypi.org/&quot;&gt;PyPI&lt;/a&gt;, and you can install it with &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;. Open a terminal or command prompt, create a new virtual environment, and then run the following command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;langgraph
&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.769d3e9e5a0b.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 will install the latest version of LangGraph from PyPI onto your machine. This tutorial was written for LangGraph 1.2, and the graph-building API that you’ll use here has been stable since the 1.0 long-term support release. To verify that the installation was successful, start a &lt;a href=&quot;https://realpython.com/python-repl/&quot;&gt;Python REPL&lt;/a&gt; and import LangGraph:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;langgraph&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.769d3e9e5a0b.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 the import runs without error, then you’ve successfully installed LangGraph. You’ll also need a few more libraries for this tutorial:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; aria-label=&quot;Toggle prompts and output&quot; role=&quot;button&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;icon baseline js-codeblock-output-on codeblock__header--icon-lower&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.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;langchain-openai&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;pydantic[email]&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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;You’ll use &lt;code&gt;langchain-openai&lt;/code&gt; to interact with OpenAI LLMs, but keep in mind that you can use any LLM provider you like with LangGraph and LangChain. You’ll use &lt;a href=&quot;https://realpython.com/python-pydantic/&quot;&gt;&lt;code&gt;pydantic&lt;/code&gt;&lt;/a&gt; to validate the information your agent parses from emails.&lt;/p&gt;
&lt;p&gt;Before moving forward, if you choose to use OpenAI, make sure you’re signed up for an OpenAI account and that you have a valid &lt;a href=&quot;https://platform.openai.com/api-keys&quot;&gt;API key&lt;/a&gt;. You’ll need to set the following &lt;a href=&quot;https://en.wikipedia.org/wiki/Environment_variable&quot;&gt;environment variable&lt;/a&gt; before running any examples in this tutorial:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; data-syntax-language=&quot;dotenv&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--grey&quot;&gt;
    &lt;span class=&quot;me-2 noselect&quot;&gt;&lt;span class=&quot;visually-hidden&quot;&gt;Language: &lt;/span&gt;.env&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;na&quot;&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;lt;YOUR-OPENAI-API-KEY&amp;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.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Note that while LangGraph was made by the creators of LangChain and the two libraries are highly compatible, it’s possible to use LangGraph without LangChain. However, it’s more common to use LangChain and LangGraph together, and you’ll see throughout this tutorial how they complement each other.&lt;/p&gt;
&lt;p&gt;With that, you’ve installed all the dependencies you’ll need for this tutorial, and you’re ready to create your LangGraph email processor. Before diving in, you’ll take a brief detour to set up quick sanity tests for your app. Then, you’ll go through an overview of LangChain chains and explore LangGraph’s core concept, the state graph.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/langgraph-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/langgraph-python/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #302: Constructing and Judging Modern Agentic Workflows</title>
      <id>https://realpython.com/podcasts/rpp/302/</id>
      <link href="https://realpython.com/podcasts/rpp/302/"/>
      <updated>2026-07-10T12:00:00+00:00</updated>
      <summary>How can you improve your LLM agent systems through specification enrichment? What are the advantages of having an LLM act as a judge within an agent system? This week on the show, Senior IEEE Member and Quality Engineer Suneet Malhotra joins us to discuss building and evaluating agentic architecture.</summary>
      <content type="html">
        &lt;p&gt;How can you improve your LLM agent systems through specification enrichment? What are the advantages of having an LLM act as a judge within an agent system? This week on the show, Senior IEEE Member and Quality Engineer Suneet Malhotra joins us to discuss building and evaluating agentic architecture.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Use GitHub</title>
      <id>https://realpython.com/how-to-use-github/</id>
      <link href="https://realpython.com/how-to-use-github/"/>
      <updated>2026-07-08T14:00:00+00:00</updated>
      <summary>Learn how to use GitHub step by step to create a remote repository, push your local Python project, and collaborate with others using GitHub Issues.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;When you work on a local Python project, tracking your changes with Git is a great way to maintain a history of your code. However, keeping your repository only on your computer leaves your work vulnerable to hardware failures and makes collaboration difficult. By learning how to use GitHub, you can back up your work, share your code with the public, and work alongside other developers.&lt;/p&gt;
&lt;p&gt;By following this guide, you’ll learn how to create a GitHub repository, connect it to your local project, and collaborate with others online.&lt;/p&gt;
&lt;p&gt;Here’s a preview of what a successfully connected and active GitHub repository looks like:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png&quot; width=&quot;1371&quot; height=&quot;903&quot; srcset=&quot;/cdn-cgi/image/width=342,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 342w, /cdn-cgi/image/width=457,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 457w, /cdn-cgi/image/width=685,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 685w, /cdn-cgi/image/width=1371,format=auto/https://files.realpython.com/media/github-repository-added-screen.f0a878c30454.png 1371w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;GitHub repo pushed&quot; data-asset=&quot;6876&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;GitHub Repository Pushed&lt;/figcaption&gt;&lt;/figure&gt;

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

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

  &lt;hr&gt;

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

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

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


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

    &lt;/div&gt;

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

&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

No commits yet

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

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

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

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

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 rounded&quot; style=&quot;object-fit: contain; background: #e5c6aa;&quot; alt=&quot;A person points at a monitor showing a rising performance line chart, beside a machine with a JIT compiling screen, an upgrade arrow, a Python logo, and Trace and Register panels.&quot; src=&quot;https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.aa50af2d65f4.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.aa50af2d65f4.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.aa50af2d65f4.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.aa50af2d65f4.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-3.15-Preview-Upgraded-JIT-Compiler_Watermarked.aa50af2d65f4.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.769d3e9e5a0b.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;

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

&lt;/div&gt;

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

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

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

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

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

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

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

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

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

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

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

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

  &lt;hr&gt;

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

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

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


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

    &lt;/div&gt;

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

&lt;/div&gt;

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





&lt;video-player-next class=&quot;video-player-next rounded mb-3&quot; style=&quot;aspect-ratio: 720/832;&quot; data-src=&quot;https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/playlist.m3u8&quot; data-thumbnails-url=&quot;/video-thumbnails/7deb7f84-8f1f-4c6b-beed-a4221cfe0d85.vtt&quot; data-thumbnails-cols=&quot;6&quot; data-thumbnails-rows=&quot;6&quot; data-title=&quot;Sample Project: The Tic-Tac-Toe Game as a Tkinter App&quot;&gt;

    &lt;img class=&quot;video-player-next__poster&quot; src=&quot;https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/thumbnail.jpg?width=1280&quot; srcset=&quot;https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/thumbnail.jpg?width=480 480w, https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/thumbnail.jpg?width=640 640w, https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/thumbnail.jpg?width=960 960w, https://stream.realpython.com/920c7d98-94ac-4558-aa28-535bd70b8dd7/thumbnail.jpg?width=1920 1920w&quot; alt=&quot;Sample Project: The Tic-Tac-Toe Game as a Tkinter App&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot;&gt;

&lt;/video-player-next&gt;


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

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

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




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

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

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

&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# With Homebrew&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;brew&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;install&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;github/copilot/copilot-cli
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot; aria-label=&quot;Copy to clipboard&quot;&gt;&lt;span class=&quot;icon baseline&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.769d3e9e5a0b.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;GitHub also publishes a Windows installer and source bundles for macOS and Linux on the &lt;a href=&quot;https://github.com/github/copilot-cli/releases/&quot;&gt;Copilot CLI releases page&lt;/a&gt;. Use those if you need to pin a specific version or if your environment blocks the install commands above.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/github-copilot-cli/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/github-copilot-cli/ »&lt;/a&gt;&lt;/h2&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #300: Maintaining Your Python Developer Instincts While Using LLM Tools</title>
      <id>https://realpython.com/podcasts/rpp/300/</id>
      <link href="https://realpython.com/podcasts/rpp/300/"/>
      <updated>2026-06-26T12:00:00+00:00</updated>
      <summary>Do you feel like your Python skills are atrophying after using LLM coding tools? How do you add the right kind of friction into your coding routine to keep your developer instincts sharp? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;Do you feel like your Python skills are atrophying after using LLM coding tools? How do you add the right kind of friction into your coding routine to keep your developer instincts sharp? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Using LlamaIndex for RAG in Python</title>
      <id>https://realpython.com/courses/using-llamaindex-for-rag-in-python/</id>
      <link href="https://realpython.com/courses/using-llamaindex-for-rag-in-python/"/>
      <updated>2026-06-23T14:00:00+00:00</updated>
      <summary>Learn how to set up LlamaIndex, load your data, build and persist an index, and run queries to get grounded answers with RAG in Python.</summary>
      <content type="html">
        &lt;p&gt;Discover how to use LlamaIndex with practical examples. This framework helps you build retrieval-augmented generation (RAG) apps using Python. LlamaIndex lets you load your data and documents, create and persist searchable indexes, and query an LLM using your data as context.&lt;/p&gt;
&lt;p&gt;In this course, you&amp;rsquo;ll learn the basics of installing the package, setting AI providers, spinning up a query engine, and running queries against remote or local models.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You use &lt;strong&gt;LlamaIndex&lt;/strong&gt; to &lt;strong&gt;connect your data to LLMs&lt;/strong&gt;, allowing you to &lt;strong&gt;build AI agents&lt;/strong&gt;, &lt;strong&gt;workflows&lt;/strong&gt;, &lt;strong&gt;query engines&lt;/strong&gt;, and &lt;strong&gt;chat engines&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You can perform &lt;strong&gt;RAG&lt;/strong&gt; with LlamaIndex to retrieve relevant context at query time, helping the LLM generate &lt;strong&gt;grounded answers&lt;/strong&gt; and &lt;strong&gt;minimize hallucinations&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll start by preparing your environment and installing LlamaIndex. From there, you&amp;rsquo;ll learn how to load your own files, build and save an index, choose different AI providers, and run targeted queries over your data through a query engine.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Building Python Skills for the Job Market</title>
      <id>https://realpython.com/courses/building-python-skills-for-the-job-market/</id>
      <link href="https://realpython.com/courses/building-python-skills-for-the-job-market/"/>
      <updated>2026-06-16T14:00:00+00:00</updated>
      <summary>Learn which Python skills employers value most and how to build them, using a skill roadmap worksheet, weekly practice plan, and interview prep tips.</summary>
      <content type="html">
        &lt;p&gt;When you&amp;rsquo;re learning Python, the sheer volume of topics to explore can feel overwhelming because there&amp;rsquo;s &lt;em&gt;so much&lt;/em&gt; you could focus on. Should you dive into web frameworks before exploring data science? Is test-driven development something you need right away? And which skills actually matter to employers in the age of AI-assisted software development?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this course, you&amp;rsquo;ll have:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A clear understanding of which &lt;strong&gt;Python skills&lt;/strong&gt; employers consistently look for&lt;/li&gt;
&lt;li&gt;A personalized &lt;strong&gt;Python developer roadmap&lt;/strong&gt; showing where you are and where you need to go&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;weekly practice plan&lt;/strong&gt; that makes consistent progress feel achievable&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Python itself is relatively beginner-friendly, but its versatility makes it easy to wander without direction. Without a clear plan, you can spend months studying topics that won&amp;rsquo;t help you land your first developer job.&lt;/p&gt;
&lt;p&gt;This course will show you how to build a focused learning strategy that aligns with real job market demands. You&amp;rsquo;ll learn how to research what employers value, assess your current strengths and gaps, and structure a practice routine that turns scattered study sessions into steady progress.&lt;/p&gt;
&lt;p&gt;Instead of guessing what to learn next, you&amp;rsquo;ll have a concrete document that shows you exactly where to focus:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png&quot; target=&quot;_blank&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid mx-auto d-block border &quot; src=&quot;https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/python-skills-worksheet-link.4e0ad67920ee.png 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;The Python skills worksheet as a table with one row filled out and a link showing on hover&quot; data-asset=&quot;6692&quot;/&gt;&lt;/a&gt;&lt;/figure&gt;

&lt;p&gt;Work through this course to identify the skills you need and set yourself up for success.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #299: EuroPython 2026: Celebrating 25 Years</title>
      <id>https://realpython.com/podcasts/rpp/299/</id>
      <link href="https://realpython.com/podcasts/rpp/299/"/>
      <updated>2026-06-12T12:00:00+00:00</updated>
      <summary>What&#x27;s happening at EuroPython 2026? The conference celebrates its 25th anniversary this year in Kraków, Poland. This week on the show, organizers Mia Bajić and Daria Linhart Grudzien join me to discuss this year&#x27;s conference.</summary>
      <content type="html">
        &lt;p&gt;What&#x27;s happening at EuroPython 2026? The conference celebrates its 25th anniversary this year in Kraków, Poland. This week on the show, organizers Mia Bajić and Daria Linhart Grudzien join me to discuss this year&#x27;s conference.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Accessing Multiple AI Models With the OpenRouter API</title>
      <id>https://realpython.com/courses/multiple-ai-models-openrouter-api/</id>
      <link href="https://realpython.com/courses/multiple-ai-models-openrouter-api/"/>
      <updated>2026-06-09T14:00:00+00:00</updated>
      <summary>Access models from popular AI providers in Python through OpenRouter&#x27;s unified API with smart routing, fallbacks, and cost controls.</summary>
      <content type="html">
        &lt;p&gt;One of the quickest ways to call multiple AI models from a single Python script is to use OpenRouter&amp;rsquo;s API, which acts as a unified routing layer between your code and multiple AI providers. By the end of this course, you&amp;rsquo;ll be able to access models from several providers through one unified API.&lt;/p&gt;
&lt;p&gt;This convenience matters because the AI ecosystem is highly fragmented: each provider exposes its own API, authentication scheme, rate limits, and model lineup. Working with multiple providers often requires additional setup and integration effort, especially when you want to experiment with different models, compare outputs, or evaluate trade-offs for a specific task.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://openrouter.ai/&quot;&gt;OpenRouter&lt;/a&gt; gives you access to thousands of models from leading providers like OpenAI, Anthropic, Mistral, Google, and Meta. You can switch between them without changing your application code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #298: Reducing the Size of Python Docker Containers</title>
      <id>https://realpython.com/podcasts/rpp/298/</id>
      <link href="https://realpython.com/podcasts/rpp/298/"/>
      <updated>2026-06-05T12:00:00+00:00</updated>
      <summary>How can you easily reduce the size of a Python Docker container? What are the exceptions you should catch in your code? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How can you easily reduce the size of a Python Docker container? What are the exceptions you should catch in your code? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Structuring Your Python Script</title>
      <id>https://realpython.com/courses/structuring-your-python-script/</id>
      <link href="https://realpython.com/courses/structuring-your-python-script/"/>
      <updated>2026-06-02T14:00:00+00:00</updated>
      <summary>Master Python script structure with best practices for shebangs, ordered imports, formatting with Ruff, constants, and a clean entry point.</summary>
      <content type="html">
        &lt;p&gt;You may have begun your Python journey interactively, exploring ideas within Jupyter Notebooks or through the Python REPL. While that&amp;rsquo;s great for quick experimentation and immediate feedback, you&amp;rsquo;ll likely find yourself saving code into &lt;code&gt;.py&lt;/code&gt; files. However, as your codebase grows, knowing where things should go in your script becomes increasingly important.&lt;/p&gt;
&lt;p&gt;Transitioning from interactive environments to structured scripts helps promote readability, enabling better collaboration and more robust development practices. This video course shows you the foundations of organizing a Python script: where the runnable bits go, how to arrange your imports, and how to refactor with constants and a fixed entry point.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll know how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make a script &lt;strong&gt;directly executable&lt;/strong&gt; on Unix-like systems with a &lt;strong&gt;shebang line&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Organize your &lt;strong&gt;import statements&lt;/strong&gt; using standard grouping conventions&lt;/li&gt;
&lt;li&gt;Automatically sort imports and format your code with the &lt;strong&gt;&lt;code&gt;ruff&lt;/code&gt;&lt;/strong&gt; linter&lt;/li&gt;
&lt;li&gt;Replace hard-coded values with meaningful &lt;strong&gt;constants&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Define a clear script entry point using &lt;code&gt;if __name__ == &quot;__main__&quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Without further ado, it&amp;rsquo;s time to start working through a concrete script and progressively shape it into well-organized, shareable code.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #297: Improving Python Through PEPs and Protocols</title>
      <id>https://realpython.com/podcasts/rpp/297/</id>
      <link href="https://realpython.com/podcasts/rpp/297/"/>
      <updated>2026-05-29T12:00:00+00:00</updated>
      <summary>Have you ever been confused by the naming of modules you&#x27;re importing from a package? Is there a standard way to organize and name your Python virtual environments? This week on the show, Brett Cannon returns to discuss the Python Enhancement Proposals (PEPs) he&#x27;s been working on recently.</summary>
      <content type="html">
        &lt;p&gt;Have you ever been confused by the naming of modules you&#x27;re importing from a package? Is there a standard way to organize and name your Python virtual environments? This week on the show, Brett Cannon returns to discuss the Python Enhancement Proposals (PEPs) he&#x27;s been working on recently.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Connecting LLMs to Your Data With Python MCP Servers</title>
      <id>https://realpython.com/courses/connecting-llms-data-python-mcp-servers/</id>
      <link href="https://realpython.com/courses/connecting-llms-data-python-mcp-servers/"/>
      <updated>2026-05-26T14:00:00+00:00</updated>
      <summary>Build an MCP server in Python that exposes tools, resources, and prompts so AI agents like Cursor can interact with your data.</summary>
      <content type="html">
        &lt;p&gt;The Model Context Protocol (MCP) is a new open protocol that allows AI models to interact with external systems in a standardized, extensible way. In this video course, you&amp;rsquo;ll install MCP, explore its client-server architecture, and work with its core concepts: prompts, resources, and tools. You&amp;rsquo;ll then build and test a Python MCP server that queries e-commerce data and integrate it with an AI agent in Cursor to see real tool calls in action.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this video course, you&amp;rsquo;ll understand:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What &lt;strong&gt;MCP&lt;/strong&gt; is and why it was created&lt;/li&gt;
&lt;li&gt;What MCP &lt;strong&gt;prompts&lt;/strong&gt;, &lt;strong&gt;resources&lt;/strong&gt;, and &lt;strong&gt;tools&lt;/strong&gt; are&lt;/li&gt;
&lt;li&gt;How to build an &lt;strong&gt;MCP server&lt;/strong&gt; with customized tools&lt;/li&gt;
&lt;li&gt;How to integrate your MCP server with &lt;strong&gt;AI agents&lt;/strong&gt; like &lt;strong&gt;Cursor&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll get hands-on experience with Python MCP by creating and testing MCP servers and connecting your MCP to AI tools. To keep the focus on learning MCP rather than building a complex project, you&amp;rsquo;ll build a simple MCP server that interacts with a simulated e-commerce database. You&amp;rsquo;ll also use Cursor&amp;rsquo;s MCP client, which saves you from having to implement your own.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #296: Managing Polars Schema Issues &amp; Profiling GitHub Users</title>
      <id>https://realpython.com/podcasts/rpp/296/</id>
      <link href="https://realpython.com/podcasts/rpp/296/"/>
      <updated>2026-05-22T12:00:00+00:00</updated>
      <summary>How can you avoid schema problems in your Polars data pipeline when adding new columns? How can you quickly examine a GitHub user&#x27;s profile to decide how much to invest in their contributions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How can you avoid schema problems in your Polars data pipeline when adding new columns? How can you quickly examine a GitHub user&#x27;s profile to decide how much to invest in their contributions? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Game Development</title>
      <id>https://realpython.com/learning-paths/python-game-development/</id>
      <link href="https://realpython.com/learning-paths/python-game-development/"/>
      <updated>2026-04-16T12:00:00+00:00</updated>
      <summary>Build Python games from command-line projects to 2D graphical games with turtle, Tkinter, Pygame, and Arcade.</summary>
      <content type="html">
        &lt;p&gt;Build Python games from command-line projects to 2D graphical games with turtle, Tkinter, Pygame, and Arcade.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: LLM Application Development With Python</title>
      <id>https://realpython.com/learning-paths/llm-application-development-python/</id>
      <link href="https://realpython.com/learning-paths/llm-application-development-python/"/>
      <updated>2026-03-19T12:00:00+00:00</updated>
      <summary>Build LLM-powered applications in Python. Call model APIs, craft prompts, add retrieval-augmented generation, create AI agents, and connect via MCP.</summary>
      <content type="html">
        &lt;p&gt;Build LLM-powered applications in Python. Call model APIs, craft prompts, add retrieval-augmented generation, create AI agents, and connect via MCP.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Coding With AI</title>
      <id>https://realpython.com/learning-paths/coding-with-ai/</id>
      <link href="https://realpython.com/learning-paths/coding-with-ai/"/>
      <updated>2025-12-07T12:00:00+00:00</updated>
      <summary>Use AI coding assistants to write, review, and debug Python code faster. Choose an editor-based assistant like Cursor or a terminal-based one like Claude Code, then make it part of your daily workflow.</summary>
      <content type="html">
        &lt;p&gt;Use AI coding assistants to write, review, and debug Python code faster. Choose an editor-based assistant like Cursor or a terminal-based one like Claude Code, then make it part of your daily workflow.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Perfect Your Python Development Setup</title>
      <id>https://realpython.com/learning-paths/perfect-your-python-development-setup/</id>
      <link href="https://realpython.com/learning-paths/perfect-your-python-development-setup/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Set up a Python development environment with VS Code, PyCharm, virtual environments, Git, pyenv, Docker, and AI coding tools like Claude Code and Cursor.</summary>
      <content type="html">
        &lt;p&gt;Set up a Python development environment with VS Code, PyCharm, virtual environments, Git, pyenv, Docker, and AI coding tools like Claude Code and Cursor.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Important Standard Library Modules</title>
      <id>https://realpython.com/learning-paths/standard-library-modules-you-should-know/</id>
      <link href="https://realpython.com/learning-paths/standard-library-modules-you-should-know/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Explore Python standard library modules including math, datetime, JSON, CSV, regex, subprocess, and argparse through hands-on tutorials and courses.</summary>
      <content type="html">
        &lt;p&gt;Explore Python standard library modules including math, datetime, JSON, CSV, regex, subprocess, and argparse through hands-on tutorials and courses.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Network Programming and Security</title>
      <id>https://realpython.com/learning-paths/network-programming-and-security/</id>
      <link href="https://realpython.com/learning-paths/network-programming-and-security/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn network programming and security in Python. Work with CRUD operations, REST APIs, HTTPS, and socket programming to build networked apps.</summary>
      <content type="html">
        &lt;p&gt;Learn network programming and security in Python. Work with CRUD operations, REST APIs, HTTPS, and socket programming to build networked apps.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Functions and Scopes</title>
      <id>https://realpython.com/learning-paths/functions-and-scopes/</id>
      <link href="https://realpython.com/learning-paths/functions-and-scopes/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn to define Python functions, use parameters and return values, create inner functions, and understand namespaces and scope.</summary>
      <content type="html">
        &lt;p&gt;Learn to define Python functions, use parameters and return values, create inner functions, and understand namespaces and scope.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Create Graphical User Interfaces (GUI)</title>
      <id>https://realpython.com/learning-paths/python-gui-programming/</id>
      <link href="https://realpython.com/learning-paths/python-gui-programming/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Build Python GUI applications with Tkinter, PyQt, wxPython, and Kivy. Learn layouts, event handling, threading, and database integration.</summary>
      <content type="html">
        &lt;p&gt;Build Python GUI applications with Tkinter, PyQt, wxPython, and Kivy. Learn layouts, event handling, threading, and database integration.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learning Path: Python Control Flow and Loops</title>
      <id>https://realpython.com/learning-paths/python-control-flow-and-loops/</id>
      <link href="https://realpython.com/learning-paths/python-control-flow-and-loops/"/>
      <updated>2024-11-14T12:00:00+00:00</updated>
      <summary>Learn Python control flow and loops. Use conditional statements, Boolean operators, for and while loops, and keywords like break and continue.</summary>
      <content type="html">
        &lt;p&gt;Learn Python control flow and loops. Use conditional statements, Boolean operators, for and while loops, and keywords like break and continue.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
