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

  
    <entry>
      <title>The Real Python Podcast – Episode #282: Testing Python Code for Scalability &amp; What&#x27;s New in pandas 3.0</title>
      <id>https://realpython.com/podcasts/rpp/282/</id>
      <link href="https://realpython.com/podcasts/rpp/282/"/>
      <updated>2026-01-30T12:00:00+00:00</updated>
      <summary>How do you create automated tests to check your code for degraded performance as data sizes increase? What are the new features in pandas 3.0? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How do you create automated tests to check your code for degraded performance as data sizes increase? What are the new features in pandas 3.0? Christopher Trudeau is back on the show this week with another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How Long Does It Take to Learn Python?</title>
      <id>https://realpython.com/how-long-does-it-take-to-learn-python/</id>
      <link href="https://realpython.com/how-long-does-it-take-to-learn-python/"/>
      <updated>2026-01-28T14:00:00+00:00</updated>
      <summary>This guide breaks down how long it takes to learn Python with realistic timelines, weekly study plans, and strategies to speed up your progress.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Have you read blog posts that claim you can learn Python in &lt;em&gt;days&lt;/em&gt; and quickly secure a high-paying developer job? That’s an unlikely scenario and doesn’t help you prepare for a steady learning marathon. So, how long does it &lt;em&gt;really&lt;/em&gt; take to learn Python, and is it worth your time investment?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this guide, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Most beginners can learn core &lt;strong&gt;Python fundamentals in about 2 to 6 months&lt;/strong&gt; with consistent practice.&lt;/li&gt;
&lt;li&gt;You can write a tiny script in days or weeks, but real confidence comes from &lt;strong&gt;projects and feedback&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Becoming &lt;strong&gt;job-ready&lt;/strong&gt; often takes &lt;strong&gt;6 to 12 months&lt;/strong&gt;, depending on your background and target role.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mastery takes years&lt;/strong&gt; because the ecosystem and specializations keep growing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The short answer for how long it takes to learn Python depends on your goals, time budget, and the level you’re aiming for.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get the PDF Guide:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/how-long-does-it-take-to-learn-python-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-how-long-does-it-take-to-learn-python-cheatsheet&quot; markdown&gt;Click here to download&lt;/a&gt; a free PDF guide that breaks down how long it takes to learn Python and what factors affect your timeline.&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.4bb61f179293.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 Skill Test” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #f2f2f2;&quot; alt=&quot;Real Python Quizzes&quot; src=&quot;https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-skill-test/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python Skill Test&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your Python knowledge in a skills quiz with basic to advanced questions. Are you a Novice, Intermediate, Proficient, or Expert?&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;how-long-does-it-take-to-learn-python-basics&quot;&gt;How Long Does It Take to Learn Python Basics?&lt;a class=&quot;headerlink&quot; href=&quot;#how-long-does-it-take-to-learn-python-basics&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Python is beginner-friendly, and you can start writing simple programs in just a few days. But reaching the &lt;em&gt;basics&lt;/em&gt; stage still takes consistent practice because you’re learning both the language itself and how to think like a programmer.&lt;/p&gt;
&lt;p&gt;The following timeline shows how long it typically takes to learn Python basics based on how much time you can practice each week:&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;Weekly practice time&lt;/th&gt;
&lt;th&gt;Typical timeline for basics&lt;/th&gt;
&lt;th&gt;What that feels like&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2–3 hours/week&lt;/td&gt;
&lt;td&gt;8–12 months&lt;/td&gt;
&lt;td&gt;Slow but steady progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5–10 hours/week&lt;/td&gt;
&lt;td&gt;3–6 months&lt;/td&gt;
&lt;td&gt;Realistic pace for busy adults&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15–20 hours/week&lt;/td&gt;
&lt;td&gt;~2 months&lt;/td&gt;
&lt;td&gt;Consistent focus and fast feedback&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;40+ hours/week&lt;/td&gt;
&lt;td&gt;~1 month&lt;/td&gt;
&lt;td&gt;Full-time immersion&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;These ranges assume about &lt;strong&gt;five study days per week&lt;/strong&gt;. If you add a sixth day, you’ll likely land toward the faster end of each range.&lt;/p&gt;
&lt;p&gt;You’ll get better results if you use this table as a planning guide. Don’t think of it as rigid deadlines—your learning pace depends on &lt;a href=&quot;#what-factors-influence-your-learning-speed&quot;&gt;many factors&lt;/a&gt;. For example, if you already know another programming language, then you can usually move faster. If you’re brand-new to coding, then expect to be at the slower end of each range.&lt;/p&gt;
&lt;p&gt;As a general guideline, many beginners reach the basics in about 2 to 6 months with steady practice.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you’re ready to fast-track your learning with an expert-guided small cohort course that gives you live guidance and accountability, then check out &lt;a href=&quot;https://realpython.com/live/&quot;&gt;Real Python’s live courses&lt;/a&gt;!&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;With a focused schedule of around four hours per day, five days per week, you can often reach the basics stage in roughly 6 to 10 weeks, assuming you’re writing and debugging code most sessions. By then, you should be able to finish several small projects on your own.&lt;/p&gt;
&lt;p&gt;When you read online that someone learned Python quickly, they’re probably talking about this basics stage. And indeed, with the right mix of dedication, circumstances, and practice, learning Python basics can happen pretty fast!&lt;/p&gt;
&lt;p&gt;Before you go ahead and lock in a timeline, take a moment to clarify for yourself &lt;em&gt;why&lt;/em&gt; you want to learn Python. Understanding your motivation for learning Python will help along the way.&lt;/p&gt;
&lt;div class=&quot;card mb-3&quot; id=&quot;collapse_card811377&quot;&gt;
&lt;div class=&quot;card-header border-0&quot;&gt;
&lt;p class=&quot;m-0&quot;&gt;
    &lt;button class=&quot;btn w-100&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#collapse811377&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse811377&quot; markdown=&quot;1&quot;&gt;&lt;span class=&quot;float-left&quot; markdown=&quot;1&quot;&gt;What Does &quot;Learning Python&quot; Even Mean?&lt;/span&gt;&lt;span class=&quot;float-right text-muted&quot;&gt;Show/Hide&lt;/span&gt;&lt;/button&gt;
  &lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;collapse js-collapsible-section&quot; data-parent=&quot;#collapse_card811377&quot; id=&quot;collapse811377&quot;&gt;
&lt;div class=&quot;card-body&quot;&gt;
&lt;p&gt;Learning Python means &lt;em&gt;more&lt;/em&gt; than just learning the Python programming language. You need to know more than just the specifics of a single programming language to &lt;strong&gt;do something useful with your programming skills&lt;/strong&gt;. At the same time, you don’t need to understand every single aspect of Python to be productive.&lt;/p&gt;
&lt;p&gt;Learning Python is about learning how to accomplish practical tasks with Python programming. It’s about having a skill set that you can use to build projects for yourself or an employer.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;As your next step, write down your personal goal for learning Python. Always keep that goal in mind throughout your learning journey. Your goal shapes what you need to learn and how quickly you’ll progress.&lt;/p&gt;
&lt;h2 id=&quot;whats-a-practical-30-day-learning-plan-for-complete-beginners&quot;&gt;What’s a Practical 30-Day Learning Plan for Complete Beginners?&lt;a class=&quot;headerlink&quot; href=&quot;#whats-a-practical-30-day-learning-plan-for-complete-beginners&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you’re clear about your &lt;em&gt;why&lt;/em&gt;, you can start drafting your personal &lt;a href=&quot;https://realpython.com/build-python-learning-roadmap/&quot;&gt;Python learning roadmap&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you’re starting from zero and can spend about 5 to 10 hours per week, the following plan keeps you moving without becoming overwhelming:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Week 1&lt;/strong&gt;: &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;Install&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-coding-setup-windows/&quot;&gt;set up&lt;/a&gt; Python, learn about &lt;a href=&quot;https://realpython.com/python-first-steps/&quot;&gt;basic syntax&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-variables/&quot;&gt;variables&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-conditional-statements/&quot;&gt;conditional statements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 2&lt;/strong&gt;: Learn about &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;basic data types&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-for-loop/&quot;&gt;&lt;code&gt;for&lt;/code&gt;&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-while-loop/&quot;&gt;&lt;code&gt;while&lt;/code&gt; loops&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/defining-your-own-python-function/&quot;&gt;functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 3&lt;/strong&gt;: Work with &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;lists&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-dicts/&quot;&gt;dictionaries&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/working-with-files-in-python/&quot;&gt;file I/O&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-debug-idle/&quot;&gt;debugging basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 4&lt;/strong&gt;: Build a small &lt;a href=&quot;https://realpython.com/tutorials/projects/&quot;&gt;project&lt;/a&gt;, add simple &lt;a href=&quot;https://realpython.com/python-testing/&quot;&gt;tests&lt;/a&gt;, and polish it through &lt;a href=&quot;https://realpython.com/python-refactoring/&quot;&gt;refactoring&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Aim to finish at least one small project by the end of the month. The project matters more than completing every tutorial or task on your checklist.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/how-long-does-it-take-to-learn-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/how-long-does-it-take-to-learn-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>Create Callable Instances With Python&#x27;s .__call__()</title>
      <id>https://realpython.com/courses/create-callable-instances-dunder-call/</id>
      <link href="https://realpython.com/courses/create-callable-instances-dunder-call/"/>
      <updated>2026-01-27T14:00:00+00:00</updated>
      <summary>Learn Python callables: what &quot;callable&quot; means, how to use dunder call, and how to build callable objects with step-by-step examples.</summary>
      <content type="html">
        &lt;p&gt;In Python, a &lt;strong&gt;callable&lt;/strong&gt; is any object that you can call using a pair of parentheses and, optionally, a series of arguments. Functions, classes, and methods are all common examples of callables in Python. Besides these, you can also create custom classes that produce &lt;strong&gt;callable instances&lt;/strong&gt;. To do this, you can add the &lt;strong&gt;&lt;code&gt;.__call__()&lt;/code&gt;&lt;/strong&gt; special method to your class.&lt;/p&gt;
&lt;p&gt;Instances of a class with a &lt;code&gt;.__call__()&lt;/code&gt; method behave like functions, providing a flexible and handy way to add functionality to your objects. Understanding how to create and use callable instances is a valuable skill for any Python developer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand the concept of &lt;strong&gt;callable objects&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;Create &lt;strong&gt;callable instances&lt;/strong&gt; by adding a &lt;strong&gt;&lt;code&gt;.__call__()&lt;/code&gt;&lt;/strong&gt; method to your classes &lt;/li&gt;
&lt;li&gt;Compare &lt;strong&gt;&lt;code&gt;.__init__()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.__call__()&lt;/code&gt;&lt;/strong&gt; and understand their distinct roles&lt;/li&gt;
&lt;li&gt;Build practical examples that use callable instances to &lt;strong&gt;solve real-world problems&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>GeoPandas Basics: Maps, Projections, and Spatial Joins</title>
      <id>https://realpython.com/geopandas/</id>
      <link href="https://realpython.com/geopandas/"/>
      <updated>2026-01-26T14:00:00+00:00</updated>
      <summary>Dive into GeoPandas with this tutorial covering data loading, mapping, CRS concepts, projections, and spatial joins for intuitive analysis.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;GeoPandas extends pandas to make working with geospatial data in Python intuitive and powerful. If you’re looking to do geospatial tasks in Python and want a library with a pandas-like API, then GeoPandas is an excellent choice. This tutorial shows you how to accomplish four common geospatial tasks: reading in data, mapping it, applying a projection, and doing a spatial join.&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;GeoPandas extends pandas&lt;/strong&gt; with support for spatial data. This data typically lives in a &lt;code&gt;geometry&lt;/code&gt; column and allows &lt;strong&gt;spatial operations&lt;/strong&gt; such as projections and spatial joins, while &lt;strong&gt;Folium&lt;/strong&gt; focuses on richer interactive web maps after data preparation.&lt;/li&gt;
&lt;li&gt;You &lt;strong&gt;inspect CRS&lt;/strong&gt; with &lt;code&gt;.crs&lt;/code&gt; and &lt;strong&gt;reproject&lt;/strong&gt; data using &lt;code&gt;.to_crs()&lt;/code&gt; with an authority code like &lt;code&gt;EPSG:4326&lt;/code&gt; or &lt;code&gt;ESRI:54009&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;geographic CRS&lt;/strong&gt; stores longitude and latitude in degrees, while a &lt;strong&gt;projected CRS&lt;/strong&gt; uses linear units like meters or feet for area and distance calculations.&lt;/li&gt;
&lt;li&gt;Spatial joins use &lt;code&gt;.sjoin()&lt;/code&gt; with predicates like &lt;code&gt;&quot;within&quot;&lt;/code&gt; or &lt;code&gt;&quot;intersects&quot;&lt;/code&gt;, and &lt;strong&gt;both inputs must share the same CRS&lt;/strong&gt; or the relationships will be computed incorrectly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s how GeoPandas compares with alternative libraries:&lt;/p&gt;
&lt;div class=&quot;table-responsive&quot;&gt;
&lt;table class=&quot;table table-hover&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Pick pandas&lt;/th&gt;
&lt;th&gt;Pick Folium&lt;/th&gt;
&lt;th&gt;Pick GeoPandas&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tabular data analysis&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mapping&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Projections, spatial joins&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;GeoPandas builds on pandas by adding support for geospatial data and operations like &lt;a href=&quot;https://en.wikipedia.org/wiki/Map_projection&quot;&gt;projections&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Spatial_join&quot;&gt;spatial joins&lt;/a&gt;. It also includes tools for creating maps. &lt;a href=&quot;https://realpython.com/python-folium-web-maps-from-data/&quot;&gt;Folium&lt;/a&gt; complements this by focusing on interactive, web-based maps that you can customize more deeply.&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/geopandas-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-geopandas-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; for learning how to work with GeoPandas maps, projections, and spatial joins.&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.4bb61f179293.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 “GeoPandas Basics: Maps, Projections, and Spatial Joins” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe0e6;&quot; alt=&quot;GeoPandas Basics: Maps, Projections, and Spatial Joins&quot; src=&quot;https://files.realpython.com/media/GeoPandas-for-Geospatial-Analysis-Spatial-Joins-Projections-and-Quick-Maps_Watermarked.1bd7d02f55cb.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/GeoPandas-for-Geospatial-Analysis-Spatial-Joins-Projections-and-Quick-Maps_Watermarked.1bd7d02f55cb.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/GeoPandas-for-Geospatial-Analysis-Spatial-Joins-Projections-and-Quick-Maps_Watermarked.1bd7d02f55cb.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/GeoPandas-for-Geospatial-Analysis-Spatial-Joins-Projections-and-Quick-Maps_Watermarked.1bd7d02f55cb.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/GeoPandas-for-Geospatial-Analysis-Spatial-Joins-Projections-and-Quick-Maps_Watermarked.1bd7d02f55cb.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/geopandas/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;GeoPandas Basics: Maps, Projections, and Spatial Joins&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test GeoPandas basics for reading, mapping, projecting, and spatial joins to handle geospatial data confidently.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;getting-started-with-geopandas&quot;&gt;Getting Started With GeoPandas&lt;a class=&quot;headerlink&quot; href=&quot;#getting-started-with-geopandas&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You’ll first prepare your environment and load a small dataset that you’ll use throughout the tutorial. In the next two subsections, you’ll install the necessary packages and read in a sample dataset of New York City borough boundaries. This gives you a concrete GeoDataFrame to explore as you learn the core concepts.&lt;/p&gt;
&lt;h3 id=&quot;installing-geopandas&quot;&gt;Installing GeoPandas&lt;a class=&quot;headerlink&quot; href=&quot;#installing-geopandas&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This tutorial uses two packages: &lt;code&gt;geopandas&lt;/code&gt; for working with geographic data and &lt;code&gt;geodatasets&lt;/code&gt; for loading sample data. It’s a good idea to install these packages inside a &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environment&lt;/a&gt; so your project stays isolated from the rest of your system and you can manage its &lt;a href=&quot;/ref/glossary/dependency/&quot; class=&quot;ref-link&quot;&gt;dependencies&lt;/a&gt; cleanly. &lt;/p&gt;
&lt;p&gt;Once your virtual environment is active, you can &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;install both packages with &lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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;s2&quot;&gt;&quot;geopandas[all]&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;geodatasets
&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;&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.4bb61f179293.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;Using the &lt;code&gt;[all]&lt;/code&gt; option ensures you have everything needed for reading data, transforming coordinate systems, and creating plots. For most readers, this will work out of the box.&lt;/p&gt;
&lt;p&gt;If you do run into installation issues, the project’s maintainers provide alternative installation options on the &lt;a href=&quot;https://geopandas.org/en/stable/getting_started/install.html&quot;&gt;official installation page&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;reading-in-data&quot;&gt;Reading in Data&lt;a class=&quot;headerlink&quot; href=&quot;#reading-in-data&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Most geospatial datasets come in &lt;a href=&quot;https://en.wikipedia.org/wiki/GeoJSON&quot;&gt;GeoJSON&lt;/a&gt; or &lt;a href=&quot;https://en.wikipedia.org/wiki/Shapefile&quot;&gt;shapefile&lt;/a&gt; format. The &lt;code&gt;read_file()&lt;/code&gt; function can read both, and it accepts either a local file path or a URL.&lt;/p&gt;
&lt;p&gt;In the example below, you’ll use &lt;code&gt;read_file()&lt;/code&gt; to load the New York City Borough Boundaries (NYBB) dataset. The &lt;code&gt;geodatasets&lt;/code&gt; package provides a convenient path to this dataset, so you don’t need to download anything manually. You’ll also drop unnecessary columns:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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;geopandas&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;gpd&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;matplotlib.pyplot&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;plt&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;geodatasets&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;get_path&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;path_to_data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;get_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;nybb&quot;&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;nybb&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;gpd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read_file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path_to_data&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;nybb&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nybb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BoroName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Shape_Area&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;geometry&quot;&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;nybb&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;    BoroName        Shape_Area      geometry&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;0   Staten Island   1.623820e+09    MULTIPOLYGON (((970217.022 145643.332, ....&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;1   Queens          3.045213e+09    MULTIPOLYGON (((1029606.077 156073.814, ...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;2   Brooklyn        1.937479e+09    MULTIPOLYGON (((1021176.479 151374.797, ...&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;3   Manhattan       6.364715e+08    MULTIPOLYGON (((981219.056 188655.316, ....&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;4   Bronx           1.186925e+09    MULTIPOLYGON (((1012821.806 229228.265, ...&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nybb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;class &#x27;geopandas.geodataframe.GeoDataFrame&#x27;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nybb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;geometry&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;&amp;lt;class &#x27;geopandas.geoseries.GeoSeries&#x27;&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;&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.4bb61f179293.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;&lt;code&gt;nybb&lt;/code&gt; is a &lt;strong&gt;GeoDataFrame&lt;/strong&gt;. A GeoDataFrame has rows, columns, and all the methods of a &lt;a href=&quot;https://realpython.com/pandas-dataframe/&quot;&gt;pandas DataFrame&lt;/a&gt;. The difference is that it typically includes a special &lt;code&gt;geometry&lt;/code&gt; column, which stores geographic shapes instead of plain numbers or text.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;geometry&lt;/code&gt; column is a &lt;code&gt;GeoSeries&lt;/code&gt;. It behaves like a normal pandas &lt;code&gt;Series&lt;/code&gt;, but its values are spatial objects that you can map and run spatial queries against. In the &lt;code&gt;nybb&lt;/code&gt; dataset, each borough’s geometry is a &lt;code&gt;MultiPolygon&lt;/code&gt;—a shape made of several polygons—because every borough consists of multiple islands. Soon you’ll use these geometries to make maps and run spatial operations, such as finding which borough a point falls inside.&lt;/p&gt;
&lt;h2 id=&quot;mapping-data&quot;&gt;Mapping Data&lt;a class=&quot;headerlink&quot; href=&quot;#mapping-data&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Once you’ve loaded a GeoDataFrame, one of the quickest ways to understand your data is to visualize it. In this section, you’ll learn how to create both static and interactive maps. This allows you to inspect shapes, spot patterns, and confirm that your geometries look the way you expect.&lt;/p&gt;
&lt;h3 id=&quot;creating-static-maps&quot;&gt;Creating Static Maps&lt;a class=&quot;headerlink&quot; href=&quot;#creating-static-maps&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/geopandas/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/geopandas/ »&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: GeoPandas Basics: Maps, Projections, and Spatial Joins</title>
      <id>https://realpython.com/quizzes/geopandas/</id>
      <link href="https://realpython.com/quizzes/geopandas/"/>
      <updated>2026-01-26T12:00:00+00:00</updated>
      <summary>Test GeoPandas basics for reading, mapping, projecting, and spatial joins to handle geospatial data confidently.</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/geopandas/&quot;&gt;GeoPandas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll review coordinate reference systems, GeoDataFrames, interactive maps, and spatial joins with &lt;code&gt;.sjoin()&lt;/code&gt;. You&amp;rsquo;ll also explore how projections affect maps and learn best practices for working with geospatial data.&lt;/p&gt;
&lt;p&gt;This quiz helps you confirm that you can prepare, visualize, and analyze geospatial data accurately using GeoPandas.&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 #281: Continuing to Improve the Learning Experience at Real Python</title>
      <id>https://realpython.com/podcasts/rpp/281/</id>
      <link href="https://realpython.com/podcasts/rpp/281/"/>
      <updated>2026-01-23T12:00:00+00:00</updated>
      <summary>If you haven&#x27;t visited the Real Python website lately, then it&#x27;s time to check out a great batch of updates on realpython.com! Dan Bader returns to the show this week to discuss improvements to the site and more ways to learn Python.</summary>
      <content type="html">
        &lt;p&gt;If you haven&#x27;t visited the Real Python website lately, then it&#x27;s time to check out a great batch of updates on realpython.com! Dan Bader returns to the show this week to discuss improvements to the site and more ways to learn Python.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Integrate Local LLMs With Ollama and Python</title>
      <id>https://realpython.com/ollama-python/</id>
      <link href="https://realpython.com/ollama-python/"/>
      <updated>2026-01-21T14:00:00+00:00</updated>
      <summary>Learn how to integrate your Python projects with local models (LLMs) using Ollama for enhanced privacy and cost efficiency.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Integrating local large language models (LLMs) into your Python projects using Ollama is a great strategy for improving privacy, reducing costs, and building offline-capable AI-powered apps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ollama&lt;/strong&gt; is an open-source platform that makes it straightforward to run modern LLMs locally on your machine. Once you’ve set up Ollama and pulled the models you want to use, you can connect to them from Python using the &lt;code&gt;ollama&lt;/code&gt; library.&lt;/p&gt;
&lt;p&gt;Here’s a quick demo:&lt;/p&gt;
&lt;figure&gt;
  &lt;div class=&quot;embed-responsive embed-responsive-16by9 rounded mb-3 &quot;&gt;
    &lt;iframe loading=&quot;lazy&quot; class=&quot;embed-responsive-item&quot; src=&quot;https://player.vimeo.com/video/1151859183?background=1&quot; frameborder=&quot;0&quot; allow=&quot;fullscreen&quot; allowfullscreen&gt;&lt;/iframe&gt;
  &lt;/div&gt;

&lt;/figure&gt;

&lt;p&gt;In this tutorial, you’ll integrate local LLMs into your Python projects using the Ollama platform and its Python SDK.&lt;/p&gt;
&lt;p&gt;You’ll first set up Ollama and pull a couple of LLMs. Then, you’ll learn how to use chat, text generation, and tool calling from your Python code. These skills will enable you to build AI-powered apps that run locally, improving privacy and cost efficiency.&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/ollama-python-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-ollama-python-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to integrate LLMs With Ollama and 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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “How to Integrate Local LLMs With Ollama and Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #e5c6aa;&quot; alt=&quot;How to Integrate Local LLMs With Ollama and Python&quot; src=&quot;https://files.realpython.com/media/How-to-Integrate-Local-LLMs-With-Ollama-and-Python_Watermarked.835ee5f2672d.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/How-to-Integrate-Local-LLMs-With-Ollama-and-Python_Watermarked.835ee5f2672d.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Integrate-Local-LLMs-With-Ollama-and-Python_Watermarked.835ee5f2672d.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Integrate-Local-LLMs-With-Ollama-and-Python_Watermarked.835ee5f2672d.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Integrate-Local-LLMs-With-Ollama-and-Python_Watermarked.835ee5f2672d.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/ollama-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Integrate Local LLMs With Ollama and Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check your understanding of using Ollama with Python to run local LLMs, generate text, chat, and call tools for private, offline apps.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To work through this tutorial, you’ll need the following resources and setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ollama installed and running&lt;/strong&gt;: You’ll need &lt;a href=&quot;/ref/ai-coding-tools/ollama/&quot; class=&quot;ref-link&quot;&gt;Ollama&lt;/a&gt; to use local LLMs. You’ll get to install it and set it up in the next section.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python 3.8 or higher&lt;/strong&gt;: You’ll be using Ollama’s Python software development kit (SDK), which requires Python 3.8 or higher. If you haven’t already, &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;install Python&lt;/a&gt; on your system to fulfill this requirement.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Models to use&lt;/strong&gt;: You’ll use &lt;code&gt;llama3.2:latest&lt;/code&gt; and &lt;code&gt;codellama:latest&lt;/code&gt; in this tutorial. You’ll download them in the next section.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Capable hardware&lt;/strong&gt;: You need relatively powerful hardware to run Ollama’s models locally, as they may require considerable resources, including memory, disk space, and CPU power. You may not need a GPU for this tutorial, but local models will run much faster if you have one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these prerequisites in place, you’re ready to connect local models to your Python code using Ollama. &lt;/p&gt;
&lt;h2 id=&quot;step-1-set-up-ollama-models-and-the-python-sdk&quot;&gt;Step 1: Set Up Ollama, Models, and the Python SDK&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-set-up-ollama-models-and-the-python-sdk&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you can talk to a local model from Python, you need Ollama running and at least one model downloaded. In this step, you’ll install Ollama, start its background service, and pull the models you’ll use throughout the tutorial.&lt;/p&gt;
&lt;h3 id=&quot;get-ollama-running&quot;&gt;Get Ollama Running&lt;a class=&quot;headerlink&quot; href=&quot;#get-ollama-running&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To get started, navigate to Ollama’s &lt;a href=&quot;https://ollama.com/download&quot;&gt;download page&lt;/a&gt; and grab the installer for your current operating system. You’ll find installers for Windows 10 or newer and macOS 14 Sonoma or newer. Run the appropriate installer and follow the on-screen instructions. For Linux users, the installation process differs slightly, as you’ll learn soon.&lt;/p&gt;
&lt;p&gt;On Windows, Ollama will run in the background after installation, and the CLI will be available for you. If this doesn’t happen automatically for you, then go to the &lt;em&gt;Start&lt;/em&gt; menu, search for Ollama, and run the app.&lt;/p&gt;
&lt;p&gt;On macOS, the app manages the CLI and setup details, so you just need to launch &lt;em&gt;Ollama.app&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;If you’re on Linux, install Ollama with the following command:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;curl&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-fsSL&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;https://ollama.com/install.sh&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.4bb61f179293.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;Once the process is complete, you can verify the installation by running:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;ollama&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-v
&lt;/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;&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.4bb61f179293.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;If this command works, then the installation was successful. Next, start Ollama’s service by running the command below:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;ollama&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.4bb61f179293.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;p&gt;That’s it! You’re now ready to start using Ollama on your local machine. In some Linux distributions, such as Ubuntu, this final command may not be necessary, as Ollama may start automatically when the installation is complete. In that case, running the command above will result in an error.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/ollama-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/ollama-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>Quiz: How to Integrate Local LLMs With Ollama and Python</title>
      <id>https://realpython.com/quizzes/ollama-python/</id>
      <link href="https://realpython.com/quizzes/ollama-python/"/>
      <updated>2026-01-21T12:00:00+00:00</updated>
      <summary>Check your understanding of using Ollama with Python to run local LLMs, generate text, chat, and call tools for private, offline apps.</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/ollama-python/&quot;&gt;How to Integrate Local LLMs With Ollama and Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to set up Ollama, pull models, and use chat, text generation, and tool calling from Python.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll connect to local models through the &lt;code&gt;ollama&lt;/code&gt; Python library and practice sending prompts and handling responses. You&amp;rsquo;ll also see how local inference can improve privacy and cost efficiency while keeping your apps offline-capable.&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>uv vs pip: Python Packaging and Dependency Management</title>
      <id>https://realpython.com/courses/uv-vs-pip-packaging-dependency-management/</id>
      <link href="https://realpython.com/courses/uv-vs-pip-packaging-dependency-management/"/>
      <updated>2026-01-20T14:00:00+00:00</updated>
      <summary>Choosing between uv vs pip? This video course compares speed, reproducible environments, compatibility, and dependency management to help you pick the right tool.</summary>
      <content type="html">
        &lt;p&gt;When it comes to Python package managers, the choice often comes down to &lt;code&gt;uv&lt;/code&gt; vs &lt;code&gt;pip&lt;/code&gt;. You may choose &lt;code&gt;pip&lt;/code&gt; for out-of-the-box availability, broad compatibility, and reliable ecosystem support. In contrast, &lt;code&gt;uv&lt;/code&gt; is worth considering if you prioritize fast installs, reproducible environments, and clean uninstall behavior, or if you want to streamline workflows for new projects.&lt;/p&gt;
&lt;p&gt;In this video course, you&amp;rsquo;ll compare both tools. To keep this comparison meaningful, you&amp;rsquo;ll focus on the overlapping features, primarily &lt;em&gt;package installation&lt;/em&gt; and &lt;em&gt;dependency management&lt;/em&gt;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Integrate ChatGPT&#x27;s API With Python Projects</title>
      <id>https://realpython.com/chatgpt-api-python/</id>
      <link href="https://realpython.com/chatgpt-api-python/"/>
      <updated>2026-01-19T14:00:00+00:00</updated>
      <summary>Learn how to use the ChatGPT Python API with the openai library to build AI-powered features in your Python applications.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Python’s &lt;code&gt;openai&lt;/code&gt; library provides the tools you need to integrate the ChatGPT API into your Python applications. With it, you can send text prompts to the API and receive AI-generated responses. You can also guide the AI’s behavior with &lt;code&gt;developer&lt;/code&gt; role messages and handle both simple text generation and more complex code creation tasks. Here’s an example:&lt;/p&gt;
&lt;figure class=&quot;js-lightbox&quot;&gt;&lt;a href=&quot;https://files.realpython.com/media/python_coding_assistant_output.a6e05c3f37e4.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/python_coding_assistant_output.a6e05c3f37e4.png&quot; width=&quot;1920&quot; height=&quot;618&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/python_coding_assistant_output.a6e05c3f37e4.png 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/python_coding_assistant_output.a6e05c3f37e4.png 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/python_coding_assistant_output.a6e05c3f37e4.png 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/python_coding_assistant_output.a6e05c3f37e4.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;ChatGPT Python API Example&quot; data-asset=&quot;6698&quot;&gt;&lt;/a&gt;&lt;figcaption class=&quot;figure-caption text-center&quot;&gt;Python Script Output from a ChatGPT API Call Using openai&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;After reading this tutorial, you’ll understand how examples like this work under the hood. You’ll learn the fundamentals of using the &lt;a href=&quot;/ref/ai-coding-tools/chatgpt/&quot; class=&quot;ref-link&quot;&gt;ChatGPT&lt;/a&gt; &lt;a href=&quot;/ref/glossary/api/&quot; class=&quot;ref-link&quot;&gt;API&lt;/a&gt; from Python and have code examples you can adapt for your own projects.&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/chatgpt-python-api-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-chatgpt-python-api-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that you’ll use to integrate ChatGPT’s API with 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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt; Take the Quiz:&lt;/strong&gt;&lt;/mark&gt; Test your knowledge with our interactive “How to Integrate ChatGPT&#x27;s API With Python Projects” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #ffc973;&quot; alt=&quot;How to Integrate ChatGPT&#x27;s API With Python Projects&quot; src=&quot;https://files.realpython.com/media/How-to-Integrate-ChatGPTs-API-with-Python-Projects_Watermarked.043c1909a080.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/How-to-Integrate-ChatGPTs-API-with-Python-Projects_Watermarked.043c1909a080.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/How-to-Integrate-ChatGPTs-API-with-Python-Projects_Watermarked.043c1909a080.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/How-to-Integrate-ChatGPTs-API-with-Python-Projects_Watermarked.043c1909a080.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/How-to-Integrate-ChatGPTs-API-with-Python-Projects_Watermarked.043c1909a080.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/chatgpt-api-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Integrate ChatGPT&#x27;s API With Python Projects&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your knowledge of the ChatGPT API in Python. Practice sending prompts with openai and handling text and code responses in this quick quiz.&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;Python Knowledge:&lt;/strong&gt; You should be familiar with Python concepts like &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/run-python-scripts/&quot;&gt;executing Python scripts&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;Python virtual environments&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Python Installation:&lt;/strong&gt; You’ll need Python installed on your system. If you haven’t already, &lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;install Python&lt;/a&gt; on your machine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenAI Account:&lt;/strong&gt; An &lt;a href=&quot;https://platform.openai.com/&quot;&gt;OpenAI account&lt;/a&gt; with API access and available credits is required to use the ChatGPT API. You’ll obtain your API key from the OpenAI platform in Step 1.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Don’t worry if you’re new to working with APIs. This tutorial will guide you through everything you need to know to get started with the ChatGPT API and implement AI features in your applications.&lt;/p&gt;
&lt;h2 id=&quot;step-1-obtain-your-api-key-and-install-the-openai-package&quot;&gt;Step 1: Obtain Your API Key and Install the OpenAI Package&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-obtain-your-api-key-and-install-the-openai-package&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you can start making calls to the ChatGPT Python API, you need to obtain an API key and install the OpenAI Python library. You’ll start by getting your API key from the OpenAI platform, then install the required package and verify that everything works.&lt;/p&gt;
&lt;h3 id=&quot;obtain-your-api-key&quot;&gt;Obtain Your API Key&lt;a class=&quot;headerlink&quot; href=&quot;#obtain-your-api-key&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You can obtain an API key from the OpenAI platform by following these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to &lt;a href=&quot;https://platform.openai.com/&quot;&gt;platform.openai.com&lt;/a&gt; and sign in to your account or create a new one if you don’t have an account yet.&lt;/li&gt;
&lt;li&gt;Click on the settings icon in the top-right corner and select &lt;em&gt;API keys&lt;/em&gt; from the left-hand menu.&lt;/li&gt;
&lt;li&gt;Click the &lt;em&gt;Create new secret key&lt;/em&gt; button to generate a new API key.&lt;/li&gt;
&lt;li&gt;In the dialog that appears, give your key a descriptive name like “Python Tutorial Key” to help you identify it later.&lt;/li&gt;
&lt;li&gt;For the &lt;em&gt;Project&lt;/em&gt; field, select your preferred project.&lt;/li&gt;
&lt;li&gt;Under &lt;em&gt;Permissions&lt;/em&gt;, select &lt;em&gt;All&lt;/em&gt; to give your key full access to the API for development purposes.&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Create secret key&lt;/em&gt; to generate your API key.&lt;/li&gt;
&lt;li&gt;Copy the generated key immediately, as you won’t be able to see it again after closing the dialog.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now that you have your API key, you need to store it securely.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; Never hard-code your API key directly in your Python scripts or commit it to version control. Always use environment variables or secure key management services to keep your credentials safe.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The OpenAI Python library automatically looks for an environment variable named &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; when creating a client connection. By setting this variable in your terminal session, you’ll authenticate your API requests without exposing your key in your code.&lt;/p&gt;
&lt;p&gt;Set the &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; environment variable in your &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; session:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




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

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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:OPENAI_API_KEY&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;your-api-key-here&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.4bb61f179293.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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;OPENAI_API_KEY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;your-api-key-here&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.4bb61f179293.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;Replace &lt;code&gt;your-api-key-here&lt;/code&gt; with the actual API key you copied from the OpenAI platform.&lt;/p&gt;
&lt;h3 id=&quot;install-the-openai-package&quot;&gt;Install the OpenAI Package&lt;a class=&quot;headerlink&quot; href=&quot;#install-the-openai-package&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;With your API key configured, you can now install the OpenAI Python library. The &lt;code&gt;openai&lt;/code&gt; package is available on the &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;Python Package Index (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;.&lt;/p&gt;
&lt;p&gt;Open a &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; or command prompt, create a new virtual environment, and then install the library:&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-2&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-2&quot; role=&quot;tab&quot; aria-controls=&quot;windows-2&quot; aria-selected=&quot;true&quot;&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.4bb61f179293.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-2&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-2&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-2&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.4bb61f179293.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.4bb61f179293.svg#v4--apple&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;Linux + macOS&lt;/a&gt;
  &lt;/li&gt;

&lt;/ul&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/chatgpt-api-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/chatgpt-api-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>Quiz: How to Integrate ChatGPT&#x27;s API With Python Projects</title>
      <id>https://realpython.com/quizzes/chatgpt-api-python/</id>
      <link href="https://realpython.com/quizzes/chatgpt-api-python/"/>
      <updated>2026-01-19T12:00:00+00:00</updated>
      <summary>Test your knowledge of the ChatGPT API in Python. Practice sending prompts with openai and handling text and code responses in this quick quiz.</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/chatgpt-api-python/&quot;&gt;How to Integrate ChatGPT&amp;rsquo;s API With Python Projects&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to send prompts with the &lt;code&gt;openai&lt;/code&gt; library, guide behavior with developer role messages, and handle text and code outputs. You&amp;rsquo;ll also see how to integrate AI responses into your Python scripts for practical tasks.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #280: Considering Fast and Slow in Python Programming</title>
      <id>https://realpython.com/podcasts/rpp/280/</id>
      <link href="https://realpython.com/podcasts/rpp/280/"/>
      <updated>2026-01-16T12:00:00+00:00</updated>
      <summary>How often have you heard about the speed of Python? What&#x27;s actually being measured, where are the bottlenecks---development time or run time---and which matters more for productivity? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;How often have you heard about the speed of Python? What&#x27;s actually being measured, where are the bottlenecks---development time or run time---and which matters more for productivity? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>How to Create a Django Project</title>
      <id>https://realpython.com/django-setup/</id>
      <link href="https://realpython.com/django-setup/"/>
      <updated>2026-01-14T14:00:00+00:00</updated>
      <summary>Learn how to create a Django project and app in clear, guided steps. Use it as a reference for any future Django project and tutorial you&#x27;ll work on.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;Before you can start &lt;a href=&quot;https://realpython.com/get-started-with-django-1/&quot;&gt;building your Django web application&lt;/a&gt;, you need to set up your Django project. In this guide you’ll learn how to create a new Django project in four straightforward steps and only six commands:&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;Step&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#step-1-prepare-your-environment&quot;&gt;1a&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Set up a virtual environment&lt;/td&gt;
&lt;td&gt;&lt;code&gt;python -m venv .venv&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#step-1-prepare-your-environment&quot;&gt;1b&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Activate the virtual environment&lt;/td&gt;
&lt;td&gt;&lt;code&gt;source .venv/bin/activate&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#step-2-install-django-and-pin-your-dependencies&quot;&gt;2a&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Install Django&lt;/td&gt;
&lt;td&gt;&lt;code&gt;python -m pip install django&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#step-2-install-django-and-pin-your-dependencies&quot;&gt;2b&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Pin your dependencies&lt;/td&gt;
&lt;td&gt;&lt;code&gt;python -m pip freeze &amp;gt; requirements.txt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#step-3-set-up-a-django-project&quot;&gt;3&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Set up a Django project&lt;/td&gt;
&lt;td&gt;&lt;code&gt;django-admin startproject &amp;lt;projectname&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;#step-4-start-a-django-app&quot;&gt;4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Start a Django app&lt;/td&gt;
&lt;td&gt;&lt;code&gt;python manage.py startapp &amp;lt;appname&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;The tutorial focuses on the initial steps you’ll always need to start a new web application.&lt;/p&gt;
&lt;p&gt;Use this tutorial as your go-to reference until you’ve built so many projects that the necessary commands become second nature. Until then, follow the steps outlined below and in the &lt;a href=&quot;#command-reference-how-to-create-a-django-project&quot;&gt;command reference&lt;/a&gt;, or download the PDF cheatsheet as a printable reference:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/django-project-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-django-project-cheatsheet&quot; markdown&gt;Click here to download the Django Project cheat sheet&lt;/a&gt; that assembles all important commands and tips on one page that’s easy to print.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;There are also a few exercises throughout the tutorial to help reinforce what you’re learning, and you can test your knowledge in the associated quiz:&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.4bb61f179293.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 Create a Django Project” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #abe0e6;&quot; alt=&quot;Django Setup Guide&quot; src=&quot;https://files.realpython.com/media/Django_Setup_Watermark.6c4def7c5b2f.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Django_Setup_Watermark.6c4def7c5b2f.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Django_Setup_Watermark.6c4def7c5b2f.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Django_Setup_Watermark.6c4def7c5b2f.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Django_Setup_Watermark.6c4def7c5b2f.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/django-setup/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;How to Create a Django Project&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Check your Django setup skills. Install safely and pin requirements, create a project and an app. Start building your first site.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Code:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/django-setup-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-django-setup-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to create a Django project.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;headerlink&quot; href=&quot;#prerequisites&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before you start creating your &lt;a href=&quot;https://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt; project, make sure you have the right tools and knowledge in place. This tutorial assumes you’re comfortable working with the &lt;a href=&quot;/ref/glossary/console/&quot; class=&quot;ref-link&quot;&gt;command line&lt;/a&gt;, but you don’t need to be an expert. Here’s what you’ll need to get started:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/installing-python/&quot;&gt;Python 3.12 or higher installed&lt;/a&gt; on your system&lt;/li&gt;
&lt;li&gt;Basic familiarity with &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;virtual environments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Understanding of Python’s package manager, &lt;a href=&quot;https://realpython.com/what-is-pip/&quot;&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Access to a &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;command-line interface&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You don’t need any prior Django experience to complete this guide. However, to build functionality beyond the basic scaffolding, you’ll need to know &lt;a href=&quot;https://realpython.com/products/python-basics-book/&quot;&gt;Python basics&lt;/a&gt; and at least some &lt;a href=&quot;https://realpython.com/learning-paths/django-web-development/&quot;&gt;Django&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;step-1-prepare-your-environment&quot;&gt;Step 1: Prepare Your Environment&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-prepare-your-environment&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you’re ready to start your new Django web application, create a new folder and navigate into it. In this folder, you’ll set up a new &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environment&lt;/a&gt; using your &lt;a href=&quot;/ref/glossary/console/&quot; class=&quot;ref-link&quot;&gt;terminal&lt;/a&gt;:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




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

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;venv&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;&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.4bb61f179293.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;python3&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;-m&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;venv&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;.venv
&lt;/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;&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.4bb61f179293.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;This command sets up a new virtual environment named &lt;code&gt;.venv&lt;/code&gt; in your current working directory. Once the process is complete, you also need to activate the virtual environment:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

  &lt;li class=&quot;nav-item mb-0 js-platform-widget-tab-windows&quot; role=&quot;presentation&quot;&gt;
    &lt;a class=&quot;nav-link link-unstyled text-body active small&quot; id=&quot;windows-tab-2&quot; data-toggle=&quot;tab&quot; href=&quot;#windows-2&quot; role=&quot;tab&quot; aria-controls=&quot;windows-2&quot; aria-selected=&quot;true&quot;&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.4bb61f179293.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-2&quot; data-toggle=&quot;tab&quot; href=&quot;#linux-macos-2&quot; role=&quot;tab&quot; aria-controls=&quot;linux-macos-2&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.4bb61f179293.svg#v4--linux&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span class=&quot;icon baseline text-muted mr-1&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot;&gt;&lt;use href=&quot;/static/icons.4bb61f179293.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-2&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-2&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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;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;/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;&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.4bb61f179293.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-2&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-2&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;.venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.4bb61f179293.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;If the activation was successful, then you’ll see the name of your virtual environment, &lt;code&gt;(.venv)&lt;/code&gt;, at the beginning of your command prompt. This means that your environment setup is complete.&lt;/p&gt;
&lt;p&gt;You can learn more about how to &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;work with virtual environments in Python&lt;/a&gt;, and how to &lt;a href=&quot;https://realpython.com/learning-paths/perfect-your-python-development-setup/&quot;&gt;perfect your Python development setup&lt;/a&gt;, but for your Django setup, you have all you need. You can continue with installing the &lt;code&gt;django&lt;/code&gt; package.&lt;/p&gt;
&lt;h2 id=&quot;step-2-install-django-and-pin-your-dependencies&quot;&gt;Step 2: Install Django and Pin Your Dependencies&lt;a class=&quot;headerlink&quot; href=&quot;#step-2-install-django-and-pin-your-dependencies&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/django-setup/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/django-setup/ »&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 Create a Django Project</title>
      <id>https://realpython.com/quizzes/django-setup/</id>
      <link href="https://realpython.com/quizzes/django-setup/"/>
      <updated>2026-01-14T12:00:00+00:00</updated>
      <summary>Check your Django setup skills. Install safely and pin requirements, create a project and an app. Start building your first site.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/django-setup/&quot;&gt;creating a Django project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to create and activate a virtual environment, install Django and pin your dependencies, start a Django project, and start a Django app. You will also see how isolating dependencies helps others reproduce your setup.&lt;/p&gt;
&lt;p&gt;To revisit and keep learning, watch the video course on
&lt;a href=&quot;https://realpython.com/courses/set-up-django-project/&quot;&gt;How to Set Up a Django Project&lt;/a&gt;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Intro to Object-Oriented Programming (OOP) in Python</title>
      <id>https://realpython.com/courses/intro-object-oriented-programming/</id>
      <link href="https://realpython.com/courses/intro-object-oriented-programming/"/>
      <updated>2026-01-13T14:00:00+00:00</updated>
      <summary>Learn Python OOP fundamentals fast: master classes, objects, and constructors with hands-on lessons in this beginner-friendly video course.</summary>
      <content type="html">
        &lt;p&gt;Object-oriented programming (OOP) is one of the most significant and essential topics in programming. This course will give you a foundational conceptual understanding of object-oriented programming to help you elevate your Python skills.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll learn how to define custom types using classes and how to instantiate those classes into Python objects that can be used throughout your program.&lt;/p&gt;
&lt;p&gt;Finally, you&amp;rsquo;ll discover how classes can inherit from one another, with a brief introduction to inheritance, enabling you to write maintainable and less redundant 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>Python&#x27;s deque: Implement Efficient Queues and Stacks</title>
      <id>https://realpython.com/python-deque/</id>
      <link href="https://realpython.com/python-deque/"/>
      <updated>2026-01-12T14:00:00+00:00</updated>
      <summary>Use a Python deque to efficiently append and pop elements from both ends of a sequence, build queues and stacks, and set maxlen for history buffers.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;You can use Python’s &lt;code&gt;deque&lt;/code&gt; for efficient appends and pops at both ends of a sequence-like data type. These capabilities are critical when you need to implement queue and stack data structures that operate efficiently even under heavy workloads.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll learn how &lt;code&gt;deque&lt;/code&gt; works, when to use it over a &lt;code&gt;list&lt;/code&gt;, and how to apply it in real code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;By the end of this tutorial, you’ll understand that:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;deque&lt;/code&gt; internally uses a &lt;strong&gt;doubly linked list&lt;/strong&gt;, so end operations are &lt;em&gt;O(1)&lt;/em&gt; while random indexing is &lt;em&gt;O(n)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;You can build a &lt;strong&gt;FIFO queue&lt;/strong&gt; with &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.popleft()&lt;/code&gt;&lt;/strong&gt;, and a &lt;strong&gt;LIFO stack&lt;/strong&gt; with &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.pop()&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;deque&lt;/code&gt; supports &lt;strong&gt;indexing&lt;/strong&gt; but doesn’t support &lt;strong&gt;slicing&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Passing a value to &lt;strong&gt;&lt;code&gt;maxlen&lt;/code&gt;&lt;/strong&gt; creates a bounded deque that &lt;strong&gt;drops items&lt;/strong&gt; from the opposite end when full.&lt;/li&gt;
&lt;li&gt;In CPython, &lt;strong&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.appendleft()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.pop()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;.popleft()&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;len()&lt;/code&gt;&lt;/strong&gt; are &lt;strong&gt;thread-safe&lt;/strong&gt; for multithreaded use.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Up next, you’ll get started with &lt;code&gt;deque&lt;/code&gt;, benchmark it against &lt;code&gt;list&lt;/code&gt;, and explore how it shines in real-world use cases, such as queues, stacks, history buffers, and thread-safe producer-consumer setups.&lt;/p&gt;
&lt;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-deque-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-deque-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to implement efficient queues and stacks with Python’s deque.&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.4bb61f179293.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&#x27;s deque: Implement Efficient Queues and Stacks” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #b9abe6;&quot; alt=&quot;Python&#x27;s deque: Implement Efficient Queues and Stacks&quot; src=&quot;https://files.realpython.com/media/Collections.deque_Watermarked.066fbf353cb4.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Collections.deque_Watermarked.066fbf353cb4.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Collections.deque_Watermarked.066fbf353cb4.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Collections.deque_Watermarked.066fbf353cb4.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Collections.deque_Watermarked.066fbf353cb4.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-deque/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python&#x27;s deque: Implement Efficient Queues and Stacks&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Use Python&#x27;s deque for fast queues and stacks. Refresh end operations, maxlen rollover, indexing limits, and thread-safe methods.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;get-started-with-pythons-deque&quot;&gt;Get Started With Python’s &lt;code&gt;deque&lt;/code&gt;&lt;a class=&quot;headerlink&quot; href=&quot;#get-started-with-pythons-deque&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Appending to and popping from the right end of a Python &lt;a href=&quot;https://realpython.com/python-list/&quot;&gt;&lt;code&gt;list&lt;/code&gt;&lt;/a&gt; are efficient operations most of the time. Using the &lt;a href=&quot;https://en.wikipedia.org/wiki/Big_O_notation&quot;&gt;Big &lt;em&gt;O&lt;/em&gt; notation&lt;/a&gt; for &lt;a href=&quot;https://wiki.python.org/moin/TimeComplexity&quot;&gt;time complexity&lt;/a&gt;, these operations are &lt;em&gt;O(1)&lt;/em&gt;. However, when Python needs to reallocate memory to &lt;em&gt;grow&lt;/em&gt; the underlying list to accept new items, these operations slow down and can become &lt;em&gt;O&lt;/em&gt;(&lt;em&gt;n&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;In contrast, appending and popping items from the left end of a Python list are always inefficient and have &lt;em&gt;O&lt;/em&gt;(&lt;em&gt;n&lt;/em&gt;) time complexity.&lt;/p&gt;
&lt;p&gt;Because Python lists provide both operations with the &lt;a href=&quot;https://realpython.com/python-append/&quot;&gt;&lt;code&gt;.append()&lt;/code&gt;&lt;/a&gt; and &lt;code&gt;.pop()&lt;/code&gt; &lt;a href=&quot;/ref/glossary/method/&quot; class=&quot;ref-link&quot;&gt;methods&lt;/a&gt;, you can use them as &lt;a href=&quot;https://en.wikipedia.org/wiki/Stack_(abstract_data_type)&quot;&gt;stacks&lt;/a&gt; and &lt;a href=&quot;https://en.wikipedia.org/wiki/Queue_(abstract_data_type)&quot;&gt;queues&lt;/a&gt;. However, the performance issues you saw before can significantly impact the overall performance of your applications.&lt;/p&gt;
&lt;p&gt;Python’s &lt;a href=&quot;https://docs.python.org/3/library/collections.html#collections.deque&quot;&gt;&lt;code&gt;deque&lt;/code&gt;&lt;/a&gt; was the first data type added to the &lt;a href=&quot;https://realpython.com/python-collections-module/&quot;&gt;&lt;code&gt;collections&lt;/code&gt;&lt;/a&gt; module back in &lt;a href=&quot;https://docs.python.org/3/whatsnew/2.4.html#new-improved-and-deprecated-modules&quot;&gt;Python 2.4&lt;/a&gt;. This data type was specially designed to overcome the efficiency problems of &lt;code&gt;.append()&lt;/code&gt; and &lt;code&gt;.pop()&lt;/code&gt; in Python lists.&lt;/p&gt;
&lt;p&gt;A deque is a &lt;a href=&quot;/ref/glossary/sequence/&quot; class=&quot;ref-link&quot;&gt;sequence&lt;/a&gt;-like &lt;a href=&quot;/ref/glossary/data-structure/&quot; class=&quot;ref-link&quot;&gt;data structure&lt;/a&gt; designed as a generalization of &lt;a href=&quot;/ref/glossary/stack/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;stacks&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&quot;/ref/glossary/queue/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;queues&lt;/strong&gt;&lt;/a&gt;. It supports memory-efficient and fast append and pop operations on both ends.&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 word &lt;code&gt;deque&lt;/code&gt; is pronounced as “deck.” The name stands for &lt;a href=&quot;https://en.wikipedia.org/wiki/Double-ended_queue&quot;&gt;&lt;strong&gt;d&lt;/strong&gt;ouble-&lt;strong&gt;e&lt;/strong&gt;nded &lt;strong&gt;que&lt;/strong&gt;ue&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Append and pop operations on both ends of a &lt;code&gt;deque&lt;/code&gt; object are stable and equally efficient because deques are &lt;a href=&quot;https://github.com/python/cpython/blob/23acadcc1c75eb74b2459304af70d97a35001b34/Modules/_collectionsmodule.c#L34&quot;&gt;implemented&lt;/a&gt; as a &lt;a href=&quot;https://realpython.com/linked-lists-python/#how-to-use-doubly-linked-lists&quot;&gt;doubly linked list&lt;/a&gt;. Additionally, append and pop operations on deques are &lt;a href=&quot;https://en.wikipedia.org/wiki/Thread_safety&quot;&gt;thread-safe&lt;/a&gt; and memory-efficient. These features make deques particularly useful for creating custom stacks and queues in Python.&lt;/p&gt;
&lt;p&gt;Deques are also a good choice when you need to keep a list of recently seen items, as you can restrict the maximum length of your deque. By setting a maximum length, once a deque is full, it automatically discards items from one end when you append new items to the opposite end.&lt;/p&gt;
&lt;p&gt;Here’s a summary of the main features of &lt;code&gt;deque&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stores items of any &lt;a href=&quot;https://realpython.com/python-data-types/&quot;&gt;data type&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Is a &lt;a href=&quot;/ref/glossary/mutable/&quot; class=&quot;ref-link&quot;&gt;mutable&lt;/a&gt; data type&lt;/li&gt;
&lt;li&gt;Supports &lt;a href=&quot;https://realpython.com/python-in-operator/&quot;&gt;membership operations&lt;/a&gt; with the &lt;a href=&quot;/ref/keywords/in/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;in&lt;/code&gt; operator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Supports &lt;a href=&quot;/ref/glossary/indexing/&quot; class=&quot;ref-link&quot;&gt;indexing&lt;/a&gt;, like in &lt;code&gt;a_deque[i]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Doesn’t support &lt;a href=&quot;/ref/glossary/slicing/&quot; class=&quot;ref-link&quot;&gt;slicing&lt;/a&gt;, like in &lt;code&gt;a_deque[0:2]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Supports &lt;a href=&quot;https://realpython.com/python-built-in-functions/&quot;&gt;built-in functions&lt;/a&gt; that operate on &lt;a href=&quot;https://realpython.com/python-sequences/&quot;&gt;sequences&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-iterators-iterables/&quot;&gt;iterables&lt;/a&gt;, such as &lt;a href=&quot;https://realpython.com/len-python-function/&quot;&gt;&lt;code&gt;len()&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-sort/&quot;&gt;&lt;code&gt;sorted()&lt;/code&gt;&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/python-reverse-list/&quot;&gt;&lt;code&gt;reversed()&lt;/code&gt;&lt;/a&gt;, and more&lt;/li&gt;
&lt;li&gt;Doesn’t support &lt;a href=&quot;https://en.wikipedia.org/wiki/In-place_algorithm&quot;&gt;in-place&lt;/a&gt; sorting&lt;/li&gt;
&lt;li&gt;Supports normal and reverse &lt;a href=&quot;/ref/glossary/iteration/&quot; class=&quot;ref-link&quot;&gt;iteration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Supports pickling with &lt;a href=&quot;https://realpython.com/python-pickle-module/&quot;&gt;&lt;code&gt;pickle&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Supports fast, memory-efficient, and &lt;a href=&quot;https://realpython.com/python-thread-lock/&quot;&gt;thread-safe&lt;/a&gt; pop and append operations on both ends&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To create deques, you just need to import &lt;code&gt;deque&lt;/code&gt; from &lt;code&gt;collections&lt;/code&gt; and call it with an optional &lt;a href=&quot;/ref/glossary/iterable/&quot; class=&quot;ref-link&quot;&gt;iterable&lt;/a&gt; as an &lt;a href=&quot;/ref/glossary/argument/&quot; class=&quot;ref-link&quot;&gt;argument&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pycon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;collections&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;deque&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Create an empty deque&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;deque&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;deque([])&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Use different iterables to create deques&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;deque&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;go&quot;&gt;deque([1, 2, 3, 4])&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;deque&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;go&quot;&gt;deque([1, 2, 3, 4])&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;deque&lt;/span&gt;&lt;span class=&quot;p&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;1&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;go&quot;&gt;deque([1, 2, 3, 4])&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;deque&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;abcd&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;deque([&#x27;a&#x27;, &#x27;b&#x27;, &#x27;c&#x27;, &#x27;d&#x27;])&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numbers&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;one&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;two&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;three&quot;&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;s2&quot;&gt;&quot;four&quot;&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;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;deque&lt;/span&gt;&lt;span class=&quot;p&quot;&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;keys&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;deque([&#x27;one&#x27;, &#x27;two&#x27;, &#x27;three&#x27;, &#x27;four&#x27;])&lt;/span&gt;

&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;deque&lt;/span&gt;&lt;span class=&quot;p&quot;&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;values&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;deque([1, 2, 3, 4])&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;deque&lt;/span&gt;&lt;span class=&quot;p&quot;&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;items&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
&lt;span class=&quot;go&quot;&gt;deque([(&#x27;one&#x27;, 1), (&#x27;two&#x27;, 2), (&#x27;three&#x27;, 3), (&#x27;four&#x27;, 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;&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.4bb61f179293.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 instantiate &lt;code&gt;deque&lt;/code&gt; without providing an &lt;code&gt;iterable&lt;/code&gt; as an argument, then you get an empty deque. If you provide an &lt;code&gt;iterable&lt;/code&gt;, then &lt;code&gt;deque&lt;/code&gt; initializes the new instance with data from it. The initialization goes from left to right using &lt;code&gt;deque.append()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;deque&lt;/code&gt; initializer takes the following two &lt;a href=&quot;https://realpython.com/python-optional-arguments/&quot;&gt;optional arguments&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;iterable&lt;/code&gt;&lt;/strong&gt; holds an iterable that provides the initialization data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;maxlen&lt;/code&gt;&lt;/strong&gt; holds an integer &lt;a href=&quot;https://realpython.com/python-numbers/&quot;&gt;number&lt;/a&gt; that specifies the maximum length of the deque.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As mentioned previously, if you don’t supply an &lt;code&gt;iterable&lt;/code&gt;, then you get an empty deque. If you provide a value to &lt;a href=&quot;https://docs.python.org/3/library/collections.html#collections.deque.maxlen&quot;&gt;&lt;code&gt;maxlen&lt;/code&gt;&lt;/a&gt;, then your deque will only store up to &lt;code&gt;maxlen&lt;/code&gt; items.&lt;/p&gt;
&lt;p&gt;Finally, you can also use unordered iterables, such as &lt;a href=&quot;https://realpython.com/python-sets/&quot;&gt;sets&lt;/a&gt;, to initialize your deques. In those cases, you won’t have a predefined order for the items in the final deque.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/python-deque/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/python-deque/ »&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 #279: Coding Python With Confidence: Beginners Live Course Participants</title>
      <id>https://realpython.com/podcasts/rpp/279/</id>
      <link href="https://realpython.com/podcasts/rpp/279/"/>
      <updated>2026-01-09T12:00:00+00:00</updated>
      <summary>Are you looking for that solid foundation to begin your Python journey? Would the accountability of scheduled group classes help you get through the basics and start building something? This week, two members of the Python for Beginners live course discuss their experiences.</summary>
      <content type="html">
        &lt;p&gt;Are you looking for that solid foundation to begin your Python journey? Would the accountability of scheduled group classes help you get through the basics and start building something? This week, two members of the Python for Beginners live course discuss their experiences.&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 Build a Personal Python Learning Roadmap</title>
      <id>https://realpython.com/build-python-learning-roadmap/</id>
      <link href="https://realpython.com/build-python-learning-roadmap/"/>
      <updated>2026-01-07T14:00:00+00:00</updated>
      <summary>Learn how to create a personalized Python learning roadmap. Set goals, choose resources, and build a plan to track your progress and stay motivated.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;If you want to learn Python or improve your skills, a detailed plan can help you gauge your current status and navigate toward a target goal. This tutorial will help you craft a personal Python learning roadmap so you can track your progress and stay accountable to your goals and timeline:&lt;/p&gt;
&lt;figure class=&quot;&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-learning-roadmap.9959fcebdb42.jpg&quot; width=&quot;1329&quot; height=&quot;1033&quot; srcset=&quot;/cdn-cgi/image/width=332,format=auto/https://files.realpython.com/media/python-learning-roadmap.9959fcebdb42.jpg 332w, /cdn-cgi/image/width=443,format=auto/https://files.realpython.com/media/python-learning-roadmap.9959fcebdb42.jpg 443w, /cdn-cgi/image/width=664,format=auto/https://files.realpython.com/media/python-learning-roadmap.9959fcebdb42.jpg 664w, /cdn-cgi/image/width=1329,format=auto/https://files.realpython.com/media/python-learning-roadmap.9959fcebdb42.jpg 1329w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;A Python Learning Roadmap Sheet that you can fill and print&quot; data-asset=&quot;6721&quot;&gt;&lt;/figure&gt;

&lt;p&gt;The steps in this tutorial are useful for Python developers and learners of all experience levels. While you may be eager to start learning, you might want to set aside an hour or two to outline a plan, especially if you already know your learning goals. If you don’t yet have clear goals, consider spreading that reflection over a few shorter sessions across several days to clarify your direction.&lt;/p&gt;
&lt;p&gt;Before you start, gather a few practical tools to support building your plan. This might include a notebook, a calendar or planner (digital or physical), a list of projects or goals you want to work toward, and any Python books or online resources you plan to use.&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 learn best with structure and accountability, you can also follow your roadmap inside a &lt;a href=&quot;https://realpython.com/live/&quot;&gt;cohort-based live course&lt;/a&gt; delivered by Real Python experts, with weekly live classes and live Q&amp;amp;A.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You can download a &lt;strong&gt;Personal Python Learning Roadmap&lt;/strong&gt; worksheet to help you create your plan by clicking the link below:&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Get Your Python Learning Roadmap:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/build-python-learning-roadmap-cheatsheet/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-build-python-learning-roadmap-cheatsheet&quot; markdown&gt;Click here to download&lt;/a&gt; a free, fillable Python learning roadmap PDF to help you set your aims and track your progress.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This tutorial will guide you through the planning process, starting with clarifying what you want to achieve and why. From there, you’ll map out the practical steps that will turn your goals into a realistic, actionable roadmap.&lt;/p&gt;
&lt;h2 id=&quot;step-1-define-your-goals-and-motivation&quot;&gt;Step 1: Define Your Goals and Motivation&lt;a class=&quot;headerlink&quot; href=&quot;#step-1-define-your-goals-and-motivation&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To create an effective learning roadmap, you first need to know what you want to achieve and what your motivation is. For this step, you’ll consider the following reflection prompt: &lt;/p&gt;
&lt;p&gt;&lt;em&gt;What do I want to accomplish with Python, and why?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Taking the time to answer this question sets the foundation for every decision you’ll make as you build your roadmap.&lt;/p&gt;
&lt;h3 id=&quot;define-your-goals&quot;&gt;Define Your Goals&lt;a class=&quot;headerlink&quot; href=&quot;#define-your-goals&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Start by deciding &lt;em&gt;what&lt;/em&gt; you want to accomplish with Python, then write it down. Research shows that this small step can make a meaningful difference. &lt;a href=&quot;https://scholar.dominican.edu/psychology-faculty-conference-presentations/3/?utm_source=scholar.dominican.edu%2Fpsychology-faculty-conference-presentations%2F3&amp;amp;utm_medium=PDF&amp;amp;utm_campaign=PDFCoverPages&quot;&gt;In a study&lt;/a&gt; conducted by psychology researcher Dr. Gail Matthews at Dominican University of California, participants who wrote down their goals were significantly more likely to achieve them than those who didn’t.&lt;/p&gt;
&lt;p&gt;If you’re not sure yet about your goals, here are some questions for you to consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Are there specific projects—or types of projects—that you’d like to work on? For example, data analysis, game development, or building a web app.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In what context or setting would you like to use your &lt;a href=&quot;https://realpython.com/python-skills/&quot;&gt;Python skills&lt;/a&gt;? For example, at work, in school, or as part of a personal interest or side project.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Remember to write these answers down either in your notebook or on the &lt;strong&gt;Personal Python Learning Roadmap&lt;/strong&gt; worksheet included in this tutorial’s downloads. Having them written down will provide helpful context as you continue formulating your roadmap.&lt;/p&gt;
&lt;h3 id=&quot;determine-your-motivation&quot;&gt;Determine Your Motivation&lt;a class=&quot;headerlink&quot; href=&quot;#determine-your-motivation&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Once you have a general goal in mind, think about &lt;em&gt;why&lt;/em&gt; you want to achieve it. Your motivation plays a key role in whether you’ll stick with your plan over time.
As clinical psychology professor Dr. Jennifer Crawford &lt;a href=&quot;https://hscnews.unm.edu/news/setting-successful-goals&quot;&gt;explains&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If we don’t care about why we’re doing [a goal], then it makes it really difficult to stick with that new behavior.&lt;/p&gt;
&lt;p&gt;— &lt;em&gt;Dr. Jennifer Crawford&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;She also encourages goal-setters to ask how their goals connect with something that’s important to them.&lt;/p&gt;
&lt;p&gt;This idea is echoed by psychology professor Angela Duckworth in her book &lt;em&gt;Grit&lt;/em&gt;, where she emphasizes that a strong sense of purpose helps you persevere when you encounter obstacles that might otherwise derail your progress.&lt;/p&gt;
&lt;p&gt;Some possible reasons behind your “why” might include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A personal interest or a love of learning&lt;/li&gt;
&lt;li&gt;A desire to start or advance a career in software development&lt;/li&gt;
&lt;li&gt;A goal of earning a computer science degree&lt;/li&gt;
&lt;li&gt;An interest in volunteering your skills—for example, creating a Python application that supports a cause you care about&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you consider your motivation, see if you can dive deeper into the root of your reasons. A deeper look can add even more meaning and staying power to your goals. For example:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/build-python-learning-roadmap/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/build-python-learning-roadmap/ »&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>Tips for Using the AI Coding Editor Cursor</title>
      <id>https://realpython.com/courses/tips-using-ai-coding-editor-cursor/</id>
      <link href="https://realpython.com/courses/tips-using-ai-coding-editor-cursor/"/>
      <updated>2026-01-06T14:00:00+00:00</updated>
      <summary>Learn Cursor fast: AI powered coding with agents, project aware chat, and inline edits for a VS Code workflow that ships smarter, sooner.</summary>
      <content type="html">
        &lt;p&gt;Cursor is an AI-powered integrated development environment (IDE) based on the Visual Studio Code codebase. It comes with a multi-agent interface and the Composer model for fast, agentic coding while keeping a familiar editor workflow with project-aware chat, code completion, and inline edits.&lt;/p&gt;
&lt;p&gt;In this course, you will: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand why Cursor might work for you&lt;/li&gt;
&lt;li&gt;Learn how to use different modes &amp;amp; models&lt;/li&gt;
&lt;li&gt;See how to run multiple agents at a time&lt;/li&gt;
&lt;li&gt;Resolve a tiny merge conflict&lt;/li&gt;
&lt;li&gt;Run a project and fix a bug&lt;/li&gt;
&lt;li&gt;Learn commands and practice with the terminal&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Learn From 2025&#x27;s Most Popular Python Tutorials and Courses</title>
      <id>https://realpython.com/popular-python-tutorials-2025/</id>
      <link href="https://realpython.com/popular-python-tutorials-2025/"/>
      <updated>2026-01-05T14:00:00+00:00</updated>
      <summary>Pick from the best Python tutorials and courses of 2025. Revisit core skills, 3.14 updates, AI coding tools, and project walkthroughs. Kickstart your 2026!</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;As we welcome 2026, it’s time to look back on an exciting year for Python. &lt;a href=&quot;https://realpython.com/python314-new-features/&quot;&gt;Python 3.14&lt;/a&gt; arrived with a wave of developer-focused improvements, from lazy annotations that finally resolve long-standing type hinting quirks to clever new t-strings that give you more control over string interpolation.&lt;/p&gt;
&lt;p&gt;Meanwhile, 2025 was the year &lt;a href=&quot;/ref/ai-coding-tools/&quot; class=&quot;ref-link&quot;&gt;AI tools&lt;/a&gt; truly became part of everyday Python development. From agentic coding with LangGraph to connecting &lt;a href=&quot;/ref/ai-coding-glossary/llm/&quot; class=&quot;ref-link&quot;&gt;LLMs&lt;/a&gt; to your data via &lt;a href=&quot;/ref/ai-coding-glossary/mcp/&quot; class=&quot;ref-link&quot;&gt;MCP&lt;/a&gt; servers, Python solidified its position as the language of choice for AI-powered workflows.&lt;/p&gt;
&lt;p&gt;Here at &lt;a href=&quot;https://realpython.com/team/&quot;&gt;Real Python&lt;/a&gt;, we’re excited to showcase the tutorials and video courses that resonated most with our community throughout 2025. Whether you’re just starting out with Python, leveling up your skills, or diving into advanced topics, this collection has something for you.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Join Now:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/newsletter/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-newsletter&quot; markdown&gt;Click here to join the Real Python Newsletter&lt;/a&gt; and you’ll never miss another Python tutorial, course, or news update.&lt;/p&gt;
&lt;/div&gt;
&lt;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.4bb61f179293.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 Skill Test” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #f2f2f2;&quot; alt=&quot;Real Python Quizzes&quot; src=&quot;https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Real-Python-Quizzes-Page_Watermarked.0a38006fcf1a.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/python-skill-test/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;Python Skill Test&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your Python knowledge in a skills quiz with basic to advanced questions. Are you a Novice, Intermediate, Proficient, or Expert?&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;strengthen-your-python-foundations&quot;&gt;Strengthen Your Python Foundations&lt;a class=&quot;headerlink&quot; href=&quot;#strengthen-your-python-foundations&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-33 float-right ml-3 mt-3 mb-3 rounded&quot; src=&quot;https://files.realpython.com/media/Operators-and-Expressions-in-Python_Watermarked.651045da4031.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/Operators-and-Expressions-in-Python_Watermarked.651045da4031.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Operators-and-Expressions-in-Python_Watermarked.651045da4031.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Operators-and-Expressions-in-Python_Watermarked.651045da4031.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Operators-and-Expressions-in-Python_Watermarked.651045da4031.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Operators and Expressions in Python&quot; data-asset=&quot;3457&quot;&gt;&lt;/figure&gt;

&lt;p&gt;If you’re just getting started with Python, &lt;a href=&quot;https://realpython.com/learning-paths/python-basics/&quot;&gt;building a solid foundation&lt;/a&gt; is the best investment you can make. The fundamentals you learn now will support everything you do later, from &lt;a href=&quot;https://realpython.com/learning-paths/pandas-data-science/&quot;&gt;data analysis&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/learning-paths/become-python-web-developer/&quot;&gt;web development&lt;/a&gt; to &lt;a href=&quot;https://realpython.com/learning-paths/coding-with-ai/&quot;&gt;AI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These beginner-friendly tutorials and courses help you sharpen the core skills you’ll use every day in Python, including loops, operators, lists, and functional techniques:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-join-string/&quot;&gt;How to Join Strings in Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-continue/&quot;&gt;Skip Ahead in Loops With Python’s continue Keyword&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/nested-loops-python/&quot;&gt;Nested Loops in Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/python-operators-expressions/&quot;&gt;Python Operators and Expressions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/list-data-type-with-examples/&quot;&gt;Exploring Python’s list Data Type With Examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/courses/using-functional-programming/&quot;&gt;Using Functional Programming in Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’re looking to accelerate your learning with live instruction, then check out our &lt;a href=&quot;https://realpython.com/workshops/python-for-beginners/&quot;&gt;Python for Beginners Live Course&lt;/a&gt;, where you can learn alongside other students and get real-time feedback from experienced instructors.&lt;/p&gt;
&lt;p&gt;And don’t forget to grab our downloadable &lt;a href=&quot;https://realpython.com/python-cheat-sheet/&quot;&gt;Python 3 Cheat Sheet&lt;/a&gt; to keep essential syntax and concepts at your fingertips:&lt;/p&gt;
&lt;!-- Slim Inline Banner --&gt;
&lt;div class=&quot;card my-4 alert alert-warning&quot;&gt;
  &lt;div class=&quot;card-body py-2&quot;&gt;
    &lt;div class=&quot;d-flex align-items-center&quot;&gt;
      &lt;img src=&quot;https://files.realpython.com/media/cheat_sheets_stacked.34027e654084.png&quot; alt=&quot;Preview of the Python Cheat Sheet PDF&quot; class=&quot;mr-3&quot; style=&quot;width:120px;height:auto;flex:0 0 auto;&quot;&gt;

      &lt;div class=&quot;flex-grow-1&quot;&gt;
        &lt;div class=&quot;small mb-2&quot;&gt;
          &lt;strong&gt;Get Your Free Python Cheat Sheet (PDF):&lt;/strong&gt; Learn the basics, fast.
        &lt;/div&gt;

        &lt;form action=&quot;/optins/process/&quot; method=&quot;post&quot; class=&quot;mb-0&quot;&gt;

          &lt;input type=&quot;hidden&quot; name=&quot;slug&quot; value=&quot;cheat-sheet-slim-inline&quot;&gt;
          &lt;div class=&quot;input-group input-group-sm&quot;&gt;
            &lt;input name=&quot;email&quot; type=&quot;email&quot; class=&quot;form-control&quot; placeholder=&quot;Email address&quot; aria-label=&quot;Email address&quot; required&gt;
            &lt;div class=&quot;input-group-append&quot;&gt;
              &lt;button name=&quot;submit&quot; type=&quot;submit&quot; class=&quot;btn btn-success&quot;&gt;Get »&lt;/button&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&quot;explore-whats-new-in-python-314&quot;&gt;Explore What’s New in Python 3.14&lt;a class=&quot;headerlink&quot; href=&quot;#explore-whats-new-in-python-314&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;figure class=&quot;&quot;&gt;&lt;img loading=&quot;lazy&quot; class=&quot;img-fluid w-33 float-right ml-3 mt-3 mb-3 rounded&quot; src=&quot;https://files.realpython.com/media/Python-3.14-Cool-New-Features_Watermarked.1f256aff1d4b.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.14-Cool-New-Features_Watermarked.1f256aff1d4b.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/Python-3.14-Cool-New-Features_Watermarked.1f256aff1d4b.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/Python-3.14-Cool-New-Features_Watermarked.1f256aff1d4b.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/Python-3.14-Cool-New-Features_Watermarked.1f256aff1d4b.jpg 1920w&quot; sizes=&quot;(min-width: 1200px) 690px, (min-width: 780px) calc(-5vw + 669px), (min-width: 580px) 510px, calc(100vw - 30px)&quot; alt=&quot;Python 3.14: Cool New Features for You to Try&quot; data-asset=&quot;6592&quot;&gt;&lt;/figure&gt;

&lt;p&gt;Python 3.14 brought a collection of thoughtful improvements that make writing and debugging code more enjoyable. The REPL now feels like a proper modern shell, making third-party REPLs like &lt;a href=&quot;https://realpython.com/ipython-interactive-python-shell/&quot;&gt;IPython&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/ptpython-shell/&quot;&gt;ptpython&lt;/a&gt;, and &lt;a href=&quot;https://realpython.com/bpython-alternative-python-repl/&quot;&gt;bpython&lt;/a&gt; less necessary. Type hints behave more intuitively, error messages point you in the right direction faster, and t-strings open up new possibilities for string processing.&lt;/p&gt;
&lt;p&gt;These tutorials walk you through the updates you’ll want to start using right away:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python314-new-features/&quot;&gt;Python 3.14: Cool New Features for You to Try&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-annotations/&quot;&gt;Python 3.14: Lazy Annotations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-repl-autocompletion-highlighting/&quot;&gt;Python 3.14: REPL Autocompletion and Highlighting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python314-error-messages/&quot;&gt;Python 3.14: Better Syntax Error Messages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://realpython.com/python-t-strings/&quot;&gt;Python 3.14: Template Strings (T-Strings)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’re curious about any other new features, you can also read the &lt;a href=&quot;https://docs.python.org/3.14/whatsnew/3.14.html&quot;&gt;3.14 release notes&lt;/a&gt;. Staying current with new Python releases helps you write cleaner code and take advantage of performance improvements as they land.&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/popular-python-tutorials-2025/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/popular-python-tutorials-2025/ »&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 Properly Indent Python Code</title>
      <id>https://realpython.com/quizzes/how-to-indent-in-python/</id>
      <link href="https://realpython.com/quizzes/how-to-indent-in-python/"/>
      <updated>2026-01-05T12:00:00+00:00</updated>
      <summary>Practice proper Python indentation. Take a quiz on using spaces, editor settings, and autoformatting correctly.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of
&lt;a href=&quot;https://realpython.com/how-to-indent-in-python/&quot;&gt;How to Indent in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to properly indent Python code, choose helpful editor settings, use spaces properly, apply code formatters, and explain why indentation is required.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: How to Convert Bytes to Strings in Python</title>
      <id>https://realpython.com/quizzes/convert-python-bytes-to-strings/</id>
      <link href="https://realpython.com/quizzes/convert-python-bytes-to-strings/"/>
      <updated>2026-01-05T12:00:00+00:00</updated>
      <summary>Decode bytes into readable strings in Python. Test your skills working with data from files, APIs, and databases.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the
&lt;a href=&quot;https://realpython.com/convert-python-bytes-to-strings/&quot;&gt;Convert Python Bytes to Strings&lt;/a&gt; tutorial.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to decode bytes, choose an encoding, and turn binary data into readable text.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll also see how encodings map byte values to characters so you can handle data from files, databases, and APIs with confidence. For a deeper dive, check out &lt;a href=&quot;https://realpython.com/python-encodings-guide/&quot;&gt;Python Encodings: A Guide&lt;/a&gt; and &lt;a href=&quot;https://realpython.com/python-bytes/&quot;&gt;Python Bytes&lt;/a&gt;.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #278: PyCoder&#x27;s Weekly 2025 Top Articles &amp; Hidden Gems</title>
      <id>https://realpython.com/podcasts/rpp/278/</id>
      <link href="https://realpython.com/podcasts/rpp/278/"/>
      <updated>2026-01-02T12:00:00+00:00</updated>
      <summary>PyCoder&#x27;s Weekly included over 1,500 links to articles, blog posts, tutorials, and projects in 2025. Christopher Trudeau is back on the show this week to help wrap up everything by sharing some highlights and uncovering a few hidden gems from the pile.</summary>
      <content type="html">
        &lt;p&gt;PyCoder&#x27;s Weekly included over 1,500 links to articles, blog posts, tutorials, and projects in 2025. Christopher Trudeau is back on the show this week to help wrap up everything by sharing some highlights and uncovering a few hidden gems from the pile.&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>LlamaIndex in Python: A RAG Guide With Examples</title>
      <id>https://realpython.com/llamaindex-examples/</id>
      <link href="https://realpython.com/llamaindex-examples/"/>
      <updated>2025-12-24T14:00:00+00:00</updated>
      <summary>Learn how to set up LlamaIndex, choose an LLM, load your data, build and persist an index, and run queries to get grounded, reliable answers with examples.</summary>
      <content type="html">
        &lt;div&gt;&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 tutorial, you’ll learn the basics of installing the package, setting AI providers, spinning up a query engine, and running synchronous or asynchronous queries against remote or local models.&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 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’ll start by preparing your environment and installing LlamaIndex. From there, you’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;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-llamaindex-examples-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-python-llamaindex-examples-code&quot; markdown&gt;Click here to download the free sample code&lt;/a&gt; that shows you how to use LlamaIndex 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.4bb61f179293.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 “LlamaIndex in Python: A RAG Guide With Examples” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #e5c6aa;&quot; alt=&quot;Python LlamaIndex: Step by Step RAG With Examples&quot; src=&quot;https://files.realpython.com/media/LlamaIndex-Example_Watermarked.de4698fa8a9b.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/LlamaIndex-Example_Watermarked.de4698fa8a9b.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/LlamaIndex-Example_Watermarked.de4698fa8a9b.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/LlamaIndex-Example_Watermarked.de4698fa8a9b.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/LlamaIndex-Example_Watermarked.de4698fa8a9b.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/llamaindex-examples/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;LlamaIndex in Python: A RAG Guide With Examples&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Take this Python LlamaIndex quiz to test your understanding of index persistence, reloading, and performance gains in RAG applications.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;start-using-llamaindex&quot;&gt;Start Using LlamaIndex&lt;a class=&quot;headerlink&quot; href=&quot;#start-using-llamaindex&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;/ref/ai-coding-glossary/training/&quot; class=&quot;ref-link&quot;&gt;Training&lt;/a&gt; or fine-tuning an &lt;a href=&quot;/ref/ai-coding-glossary/ai/&quot; class=&quot;ref-link&quot;&gt;AI&lt;/a&gt; model—like a &lt;a href=&quot;/ref/ai-coding-glossary/llm/&quot; class=&quot;ref-link&quot;&gt;large language model (LLM)&lt;/a&gt;—on your own data can be a complex and resource-intensive process. Instead of modifying the model itself, you can rely on a pattern called &lt;a href=&quot;/ref/ai-coding-glossary/retrieval-augmented-generation/&quot; class=&quot;ref-link&quot;&gt;&lt;strong&gt;retrieval-augmented generation (RAG)&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;RAG is a technique where the system, at query time, first retrieves relevant external documents or data and then passes them to the LLM as additional context. The model uses this context as a source of truth when generating its answer, which typically makes the response more accurate, up to date, and on topic.&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; RAG can help reduce hallucinations and prevent models from giving wrong answers. However, recent LLMs are much better at admitting when they don’t know something rather than making up an answer.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This technique also allows LLMs to provide answers to questions that they wouldn’t have been able to answer otherwise—for example, questions about your internal company information, email history, and similar private data.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://developers.llamaindex.ai/python/framework/&quot;&gt;LlamaIndex&lt;/a&gt; is a Python framework that enables you to build AI-powered apps capable of performing RAG. It helps you feed LLMs with your own data through indexing and retrieval tools. Next, you’ll learn the basics of installing, setting up, and using LlamaIndex in your Python projects.&lt;/p&gt;
&lt;h3 id=&quot;install-and-set-up-llamaindex&quot;&gt;Install and Set Up LlamaIndex&lt;a class=&quot;headerlink&quot; href=&quot;#install-and-set-up-llamaindex&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Before installing &lt;a href=&quot;/ref/ai-coding-tools/llamaindex/&quot; class=&quot;ref-link&quot;&gt;LlamaIndex&lt;/a&gt;, you should create and activate a Python &lt;a href=&quot;/ref/glossary/virtual-environment/&quot; class=&quot;ref-link&quot;&gt;virtual environment&lt;/a&gt;. Refer to &lt;a href=&quot;https://realpython.com/python-virtual-environments-a-primer/&quot;&gt;Python Virtual Environments: A Primer&lt;/a&gt; for detailed instructions on how to do this.&lt;/p&gt;
&lt;p&gt;Once you have the virtual environment ready, you can install LlamaIndex from the &lt;a href=&quot;/ref/glossary/pypi/&quot; class=&quot;ref-link&quot;&gt;Python Package Index (PyPI)&lt;/a&gt;:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.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;llama-index
&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;&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.4bb61f179293.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 downloads the framework from PyPI and installs it in your current Python environment. In practice, &lt;a href=&quot;https://pypi.org/project/llama-index/&quot;&gt;&lt;code&gt;llama-index&lt;/code&gt;&lt;/a&gt; is a &lt;a href=&quot;https://developers.llamaindex.ai/python/framework/getting_started/installation/#quickstart-installation-from-pip&quot;&gt;core starter bundle&lt;/a&gt; of packages containing the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;llama-index-core&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;llama-index-llms-openai&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;llama-index-embeddings-openai&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;llama-index-readers-file&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you can see, OpenAI is the default LLM provider for LlamaIndex. In this tutorial, you’ll rely on this default setting, so after installation, you must set up an environment variable called &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; that points to a valid OpenAI &lt;a href=&quot;https://platform.openai.com/api-keys&quot;&gt;API key&lt;/a&gt;:&lt;/p&gt;
&lt;ul class=&quot;nav nav-tabs justify-content-end js-platform-widget-tabs&quot; role=&quot;tablist&quot;&gt;

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




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

&lt;/ul&gt;
&lt;div class=&quot;tab-content mt-2 mb-0 js-platform-widget-content&quot;&gt;
&lt;div aria-labelledby=&quot;windows-tab-1&quot; class=&quot;tab-pane fade show active&quot; id=&quot;windows-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;pscon&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Windows PowerShell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(.venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;PS&amp;gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ENV:OPENAI_API_KEY&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;your-api-key-here&amp;gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.4bb61f179293.svg#@copy&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/button&gt;
    
  &lt;/div&gt;
&lt;/code-block&gt;
&lt;/div&gt;
&lt;div aria-labelledby=&quot;linux-macos-tab-1&quot; class=&quot;tab-pane fade &quot; id=&quot;linux-macos-1&quot; role=&quot;tabpanel&quot;&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;console&quot; data-is-repl=&quot;true&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--yellow&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Shell&lt;/span&gt;
    
    &lt;div class=&quot;noselect&quot;&gt;
      
        &lt;span class=&quot;codeblock__output-toggle&quot; title=&quot;Toggle prompts and output&quot; role=&quot;button&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.4bb61f179293.svg#regular--rectangle-terminal&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;gp gp-VirtualEnv&quot;&gt;(.venv)&lt;/span&gt; &lt;span class=&quot;gp&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;your-api-key-here&amp;gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
    
    &lt;button class=&quot;codeblock__copy btn btn-outline-secondary border m-1 px-1 d-hover-only&quot; title=&quot;Copy to clipboard&quot;&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.4bb61f179293.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 this command, you make the API key accessible under the environment variable &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; in your current &lt;a href=&quot;https://realpython.com/terminal-commands/&quot;&gt;terminal&lt;/a&gt; session. Note that you’ll lose it when you close your terminal. To persist this variable, add the &lt;code&gt;export&lt;/code&gt; command to your shell’s configuration file—typically &lt;code&gt;~/.bashrc&lt;/code&gt; or &lt;code&gt;~/.zshrc&lt;/code&gt; on Linux and macOS—or use the &lt;em&gt;System Properties&lt;/em&gt; dialog on Windows.&lt;/p&gt;
&lt;p&gt;LlamaIndex also supports many other LLMs. For a complete list of models, visit the &lt;a href=&quot;https://developers.llamaindex.ai/python/framework/module_guides/models/llms/modules&quot;&gt;Available LLM integrations&lt;/a&gt; section in the official &lt;a href=&quot;https://developers.llamaindex.ai/python/framework/&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;run-a-quick-llamaindex-rag-example&quot;&gt;Run a Quick LlamaIndex RAG Example&lt;a class=&quot;headerlink&quot; href=&quot;#run-a-quick-llamaindex-rag-example&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/llamaindex-examples/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/llamaindex-examples/ »&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: LlamaIndex in Python: A RAG Guide With Examples</title>
      <id>https://realpython.com/quizzes/llamaindex-examples/</id>
      <link href="https://realpython.com/quizzes/llamaindex-examples/"/>
      <updated>2025-12-24T12:00:00+00:00</updated>
      <summary>Take this Python LlamaIndex quiz to test your understanding of index persistence, reloading, and performance gains in RAG applications.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the &lt;a href=&quot;https://realpython.com/llamaindex-examples/&quot;&gt;LlamaIndex in Python: A RAG Guide With Examples&lt;/a&gt; tutorial.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit how to create and persist an index to disk, review how to reload it, and see why persistence improves performance, lowers costs, saves time, and keeps results consistent.&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>Reading User Input From the Keyboard With Python</title>
      <id>https://realpython.com/courses/reading-user-input-from-keyboard/</id>
      <link href="https://realpython.com/courses/reading-user-input-from-keyboard/"/>
      <updated>2025-12-23T14:00:00+00:00</updated>
      <summary>Master taking user input in Python to build interactive terminal apps with clear prompts, solid error handling, and smooth multi-step flows.</summary>
      <content type="html">
        &lt;p&gt;You may often want to make your Python programs more interactive by responding dynamically to input from the user. Learning how to read user input from the keyboard unlocks exciting possibilities and can make your code far more useful.&lt;/p&gt;
&lt;p&gt;The ability to gather input from the keyboard with Python allows you to build programs that can respond uniquely based on the preferences, decisions, or data provided by different users. By fetching input and assigning it to variables, your code can react to adjustable conditions rather than just executing static logic flows. This personalizes programs to individual users.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;input()&lt;/code&gt; function is the simplest way to get keyboard data from the user in Python. When called, it asks the user for input with a prompt that you specify, and it waits for the user to type a response and press the &lt;span class=&quot;keys&quot;&gt;&lt;kbd class=&quot;key-enter&quot;&gt;Enter&lt;/kbd&gt;&lt;/span&gt; key before continuing. This response string is returned by &lt;code&gt;input()&lt;/code&gt; so you can save it to a variable or use it directly.&lt;/p&gt;
&lt;p&gt;Using only Python, you can start building interactive programs that accept customizable data from the user right within the terminal. Taking user input is an essential skill that unlocks more dynamic Python coding and allows you to elevate simple scripts into personalized 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: Recursion in Python: An Introduction</title>
      <id>https://realpython.com/quizzes/python-recursion/</id>
      <link href="https://realpython.com/quizzes/python-recursion/"/>
      <updated>2025-12-23T12:00:00+00:00</updated>
      <summary>Test your understanding of recursion in Python, including base cases, recursive structure, performance considerations, and common use cases.</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-recursion/&quot;&gt;Recursion in Python&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit what recursion is, how base and recursive cases work, when recursion is a good fit for a problem, and when an iterative approach fits.&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>SOLID Design Principles: Improve Object-Oriented Code in Python</title>
      <id>https://realpython.com/solid-principles-python/</id>
      <link href="https://realpython.com/solid-principles-python/"/>
      <updated>2025-12-22T14:00:00+00:00</updated>
      <summary>Learn how to apply SOLID design principles in Python and build maintainable, reusable, and testable object-oriented code.</summary>
      <content type="html">
        &lt;div&gt;&lt;p&gt;A great approach to writing high-quality object-oriented Python code is to consistently apply the SOLID design principles. SOLID is a set of five object-oriented design principles that can help you write maintainable, flexible, and scalable code based on well-designed, cleanly structured classes. These principles are foundational best practices in object-oriented design.&lt;/p&gt;
&lt;p&gt;In this tutorial, you’ll explore each of these principles with concrete examples and refactor your code so that it adheres to the principle at hand.&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 apply the &lt;strong&gt;SOLID&lt;/strong&gt; design principles to write classes that you can confidently maintain, extend, test, and reason about.&lt;/li&gt;
&lt;li&gt;You can apply SOLID principles to split &lt;strong&gt;responsibilities&lt;/strong&gt;, extend via &lt;strong&gt;abstractions&lt;/strong&gt;, honor &lt;strong&gt;subtype contracts&lt;/strong&gt;, keep &lt;strong&gt;interfaces&lt;/strong&gt; small, and &lt;strong&gt;invert dependencies&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You enforce the &lt;strong&gt;Single-Responsibility Principle&lt;/strong&gt; by separating tasks into specialized classes, giving each class only &lt;strong&gt;one reason to change&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You satisfy the &lt;strong&gt;Open-Closed Principle&lt;/strong&gt; by defining an abstract class with the required interface and adding new &lt;strong&gt;subclasses&lt;/strong&gt; without modifying existing code.&lt;/li&gt;
&lt;li&gt;You honor the &lt;strong&gt;Liskov Substitution Principle&lt;/strong&gt; by making the subtypes preserve their &lt;strong&gt;expected behaviors&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You implement &lt;strong&gt;Dependency Inversion&lt;/strong&gt; by making your classes depend on &lt;strong&gt;abstractions&lt;/strong&gt; rather than on details.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Follow the examples to refactor each design, verify behaviors, and internalize how each SOLID design principle can improve your code.&lt;/p&gt;
&lt;div class=&quot;alert alert-warning&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong markdown&gt;Free Bonus:&lt;/strong&gt; &lt;a href=&quot;https://realpython.com/bonus/solid-principles-python-code/&quot; class=&quot;alert-link&quot; data-toggle=&quot;modal&quot; data-target=&quot;#modal-solid-principles-python-code&quot; markdown&gt;Click here to download sample code&lt;/a&gt; so you can build clean, maintainable classes with the SOLID Principles 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.4bb61f179293.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 “SOLID Design Principles: Improve Object-Oriented Code in Python” quiz. You’ll receive a score upon completion to help you track your learning progress:&lt;/p&gt;

  &lt;hr&gt;

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

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

            &lt;img class=&quot;card-img-top m-0 p-0 embed-responsive-item rounded&quot; style=&quot;object-fit: contain; background: #ffc873;&quot; alt=&quot;SOLID Principles: Improve Object-Oriented Design in Python&quot; src=&quot;https://files.realpython.com/media/The-SOLID-Principles-in-Python-Improve-Your-OOP-Design_Watermarked.a70bbae152e8.jpg&quot; width=&quot;1920&quot; height=&quot;1080&quot; srcset=&quot;/cdn-cgi/image/width=480,format=auto/https://files.realpython.com/media/The-SOLID-Principles-in-Python-Improve-Your-OOP-Design_Watermarked.a70bbae152e8.jpg 480w, /cdn-cgi/image/width=640,format=auto/https://files.realpython.com/media/The-SOLID-Principles-in-Python-Improve-Your-OOP-Design_Watermarked.a70bbae152e8.jpg 640w, /cdn-cgi/image/width=960,format=auto/https://files.realpython.com/media/The-SOLID-Principles-in-Python-Improve-Your-OOP-Design_Watermarked.a70bbae152e8.jpg 960w, /cdn-cgi/image/width=1920,format=auto/https://files.realpython.com/media/The-SOLID-Principles-in-Python-Improve-Your-OOP-Design_Watermarked.a70bbae152e8.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.4bb61f179293.svg#@quiz&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;col&quot;&gt;
      &lt;div class=&quot;mt-3 d-md-none&quot;&gt;&lt;/div&gt; 
      &lt;p class=&quot;small text-muted mb-0&quot;&gt;&lt;strong&gt;Interactive Quiz&lt;/strong&gt;&lt;/p&gt;
      &lt;a href=&quot;/quizzes/solid-principles-python/&quot; class=&quot;stretched-link&quot;&gt;&lt;span class=&quot;my-0 h4&quot;&gt;SOLID Design Principles: Improve Object-Oriented Code in Python&lt;/span&gt;&lt;/a&gt; 
      &lt;p class=&quot;text-muted mb-0 small&quot;&gt;Test your Python understanding of Liskov substitution, Square–Rectangle pitfalls, and safer API design with polymorphism.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;/div&gt;

&lt;h2 id=&quot;the-solid-design-principles-in-python&quot;&gt;The SOLID Design Principles in Python&lt;a class=&quot;headerlink&quot; href=&quot;#the-solid-design-principles-in-python&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When it comes to writing &lt;a href=&quot;https://realpython.com/python-classes/&quot;&gt;classes&lt;/a&gt; and designing their interactions in Python, you can follow a series of principles that will help you build better object-oriented code. One of the most popular and widely accepted sets of standards for &lt;a href=&quot;https://en.wikipedia.org/wiki/Object-oriented_design&quot;&gt;object-oriented design (OOD)&lt;/a&gt; is known as the &lt;a href=&quot;https://en.wikipedia.org/wiki/SOLID&quot;&gt;SOLID&lt;/a&gt; design principles.&lt;/p&gt;
&lt;p&gt;If you’re coming from &lt;a href=&quot;https://realpython.com/python-vs-cpp/&quot;&gt;C++&lt;/a&gt; or &lt;a href=&quot;https://realpython.com/oop-in-python-vs-java/&quot;&gt;Java&lt;/a&gt;, you may already be familiar with these principles. Maybe you’re wondering if the SOLID principles also apply to Python code. The answer to that question is a resounding &lt;em&gt;yes&lt;/em&gt;. If you’re writing object-oriented code, then you should consider applying these principles to your OOD.&lt;/p&gt;
&lt;p&gt;But what are these SOLID design principles? SOLID is an acronym that encompasses five core principles applicable to object-oriented design. These principles are the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Single-responsibility_principle&quot;&gt;&lt;strong&gt;S&lt;/strong&gt;ingle-responsibility principle (SRP)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle&quot;&gt;&lt;strong&gt;O&lt;/strong&gt;pen–closed principle (OCP)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Liskov_substitution_principle&quot;&gt;&lt;strong&gt;L&lt;/strong&gt;iskov substitution principle (LSP)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Interface_segregation_principle&quot;&gt;&lt;strong&gt;I&lt;/strong&gt;nterface segregation principle (ISP)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Dependency_inversion_principle&quot;&gt;&lt;strong&gt;D&lt;/strong&gt;ependency inversion principle (DIP)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You’ll explore each of these principles in detail and code real-world examples of how to apply them in Python. In the process, you’ll gain a strong understanding of how to write more straightforward, organized, scalable, and reusable object-oriented code by applying the SOLID design principles. To kick things off, you’ll start with the first principle on the list.&lt;/p&gt;
&lt;h2 id=&quot;single-responsibility-principle-srp&quot;&gt;Single-Responsibility Principle (SRP)&lt;a class=&quot;headerlink&quot; href=&quot;#single-responsibility-principle-srp&quot; title=&quot;Permanent link&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;single-responsibility principle (SRP)&lt;/strong&gt; comes from &lt;a href=&quot;https://en.wikipedia.org/wiki/Robert_C._Martin&quot;&gt;Robert C. Martin&lt;/a&gt;, more commonly known by his nickname Uncle Bob. Martin is a well-respected figure in software engineering and one of the original signatories of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Agile_software_development#The_Agile_Manifesto&quot;&gt;Agile Manifesto&lt;/a&gt;. He coined the term &lt;strong&gt;SOLID&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The single-responsibility principle states that:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A class should have only one reason to change.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This means that a class should have only one &lt;strong&gt;responsibility&lt;/strong&gt;, as expressed through its &lt;a href=&quot;/ref/glossary/method/&quot; class=&quot;ref-link&quot;&gt;methods&lt;/a&gt;. If a class takes care of more than one task, then you should separate those tasks into dedicated classes with descriptive names. Note that SRP isn’t only about &lt;em&gt;responsibility&lt;/em&gt; but also about the &lt;em&gt;reasons for changing&lt;/em&gt; the class implementation.&lt;/p&gt;
&lt;div class=&quot;alert alert-primary&quot; role=&quot;alert&quot;&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You’ll find the SOLID design principles worded in various ways out there. In this tutorial, you’ll refer to them following the wording that Uncle Bob uses in his book &lt;a href=&quot;https://realpython.com/asins/0131857258/&quot;&gt;Agile Software Development: Principles, Patterns, and Practices&lt;/a&gt;. So, all the direct quotes come from this book.&lt;/p&gt;
&lt;p&gt;If you want to read alternate wordings in a quick roundup of these and related principles, then check out Uncle Bob’s &lt;a href=&quot;http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod&quot;&gt;The Principles of OOD&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This principle is closely related to the concept of &lt;a href=&quot;https://en.wikipedia.org/wiki/Separation_of_concerns&quot;&gt;separation of concerns&lt;/a&gt;, which suggests that you should divide your programs into components, each addressing a separate concern.&lt;/p&gt;
&lt;p&gt;To illustrate the single-responsibility principle and how it can help you improve your object-oriented design, say that you have the following &lt;code&gt;FileManager&lt;/code&gt; class:&lt;/p&gt;
&lt;code-block class=&quot;mb-3&quot; aria-label=&quot;Code block&quot; data-syntax-language=&quot;python&quot;&gt;
  &lt;div class=&quot;codeblock__header codeblock--blue&quot;&gt;
    &lt;span class=&quot;mr-2 noselect&quot; aria-label=&quot;Language&quot;&gt;Python&lt;/span&gt;
    &lt;span class=&quot;mr-2&quot; aria-label=&quot;Filename&quot;&gt;&lt;code style=&quot;color: inherit; background: inherit;&quot;&gt;file_manager_srp.py&lt;/code&gt;&lt;/span&gt;
    &lt;div class=&quot;noselect&quot;&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;codeblock__contents&quot;&gt;
    &lt;div class=&quot;highlight highlight--with-header&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;pathlib&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Path&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;zipfile&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;ZipFile&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;FileManager&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;fm&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&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&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;encoding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;utf-8&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;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;encoding&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;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;encoding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write_text&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;n&quot;&gt;encoding&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;compress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ZipFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;with_suffix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;.zip&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;w&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;archive&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;archive&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;decompress&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ZipFile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;with_suffix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;.zip&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;r&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;archive&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;archive&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;extractall&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;&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.4bb61f179293.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, your &lt;code&gt;FileManager&lt;/code&gt; class has two different responsibilities. It manages files using the &lt;code&gt;.read()&lt;/code&gt; and &lt;code&gt;.write()&lt;/code&gt; methods. It also deals with &lt;a href=&quot;https://realpython.com/python-zipfile/&quot;&gt;ZIP archives&lt;/a&gt; by providing the &lt;code&gt;.compress()&lt;/code&gt; and &lt;code&gt;.decompress()&lt;/code&gt; methods.&lt;/p&gt;
&lt;p&gt;This class violates the single-responsibility principle because there is more than one reason for changing its implementation (file &lt;a href=&quot;/ref/glossary/input-output/&quot; class=&quot;ref-link&quot;&gt;I/O&lt;/a&gt; and ZIP handling). This implementation also makes code testing and code reuse harder.&lt;/p&gt;
&lt;p&gt;To fix this issue and make your design more robust, you can split the class into two smaller, more focused classes, each with its own specific concern:&lt;/p&gt;
&lt;/div&gt;&lt;h2&gt;&lt;a href=&quot;https://realpython.com/solid-principles-python/?utm_source=realpython&amp;utm_medium=rss&quot;&gt;Read the full article at https://realpython.com/solid-principles-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>Quiz: SOLID Design Principles: Improve Object-Oriented Code in Python</title>
      <id>https://realpython.com/quizzes/solid-principles-python/</id>
      <link href="https://realpython.com/quizzes/solid-principles-python/"/>
      <updated>2025-12-22T12:00:00+00:00</updated>
      <summary>Test your Python understanding of Liskov substitution, Square–Rectangle pitfalls, and safer API design with polymorphism.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of the &lt;a href=&quot;https://realpython.com/solid-principles-python/&quot;&gt;SOLID Design Principles: Improve Object-Oriented Code in Python&lt;/a&gt; tutorial.&lt;/p&gt;
&lt;p&gt;You will reason about behavior contracts, attribute invariants, and choosing composition or separate types over inheritance. For a refresher, you can watch the &lt;a href=&quot;https://realpython.com/courses/solid-principles-python/&quot;&gt;Design and Guidance: Object-Oriented Programming in Python&lt;/a&gt; course.&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 #277: Moving Towards Spec-Driven Development</title>
      <id>https://realpython.com/podcasts/rpp/277/</id>
      <link href="https://realpython.com/podcasts/rpp/277/"/>
      <updated>2025-12-19T12:00:00+00:00</updated>
      <summary>What are the advantages of spec-driven development compared to vibe coding with an LLM? Are these recent trends a move toward declarative programming? This week on the show, Marc Brooker, VP and Distinguished Engineer at AWS, joins us to discuss specification-driven development and Kiro.</summary>
      <content type="html">
        &lt;p&gt;What are the advantages of spec-driven development compared to vibe coding with an LLM? Are these recent trends a move toward declarative programming? This week on the show, Marc Brooker, VP and Distinguished Engineer at AWS, joins us to discuss specification-driven development and Kiro.&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 Asynchronous Iterators and Iterables</title>
      <id>https://realpython.com/courses/asynchronous-iterators-iterables/</id>
      <link href="https://realpython.com/courses/asynchronous-iterators-iterables/"/>
      <updated>2025-12-16T14:00:00+00:00</updated>
      <summary>Learn to build async iterators and iterables in Python to handle async operations efficiently and write cleaner, faster code.</summary>
      <content type="html">
        &lt;p&gt;When you write asynchronous code in Python, you&amp;rsquo;ll likely need to create asynchronous iterators and iterables at some point. Asynchronous iterators are what Python uses to control &lt;code&gt;async for&lt;/code&gt; loops, while asynchronous iterables are objects that you can iterate over using &lt;code&gt;async for&lt;/code&gt; loops.&lt;/p&gt;
&lt;p&gt;Both tools allow you to iterate over awaitable objects without blocking your code. This way, you can perform different tasks asynchronously.&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;Learn what &lt;strong&gt;async iterators&lt;/strong&gt; and &lt;strong&gt;iterables&lt;/strong&gt; are in Python&lt;/li&gt;
&lt;li&gt;Create async &lt;strong&gt;generator expressions&lt;/strong&gt; and &lt;strong&gt;generator iterators&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Code async iterators and iterables with the &lt;strong&gt;&lt;code&gt;.__aiter__()&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;.__anext__()&lt;/code&gt;&lt;/strong&gt; methods&lt;/li&gt;
&lt;li&gt;Use async iterators in &lt;strong&gt;async loops&lt;/strong&gt; and &lt;strong&gt;comprehensions&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Quiz: Writing DataFrame-Agnostic Python Code With Narwhals</title>
      <id>https://realpython.com/quizzes/narwhals-python/</id>
      <link href="https://realpython.com/quizzes/narwhals-python/"/>
      <updated>2025-12-15T12:00:00+00:00</updated>
      <summary>If you&#x27;re a Python library developer wondering how to write DataFrame-agnostic code, the Narwhals library is the solution you&#x27;re looking for.</summary>
      <content type="html">
        &lt;p&gt;In this quiz, you&amp;rsquo;ll test your understanding of what the Narwhals library offers you.&lt;/p&gt;
&lt;p&gt;By working through this quiz, you&amp;rsquo;ll revisit many of the concepts presented in the &lt;a href=&quot;https://realpython.com/narwhals-python/&quot;&gt;Writing DataFrame-Agnostic Code With Narwhals &lt;/a&gt; tutorial.&lt;/p&gt;
&lt;p&gt;Remember, also, the &lt;a href=&quot;https://narwhals-dev.github.io/narwhals/&quot;&gt;official documentation&lt;/a&gt; is a great reference source for the latest Narwhals developments.&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 Functional Programming in Python</title>
      <id>https://realpython.com/courses/using-functional-programming/</id>
      <link href="https://realpython.com/courses/using-functional-programming/"/>
      <updated>2025-12-09T14:00:00+00:00</updated>
      <summary>Boost your Python skills with a quick dive into functional programming: what it is, how Python supports it, and why it matters.</summary>
      <content type="html">
        &lt;p&gt;&lt;strong&gt;Functional programming&lt;/strong&gt; is a programming paradigm in which the primary method of computation is the evaluation of functions. But how does Python support functional programming?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What the &lt;strong&gt;functional programming&lt;/strong&gt; paradigm entails&lt;/li&gt;
&lt;li&gt;What it means to say that &lt;strong&gt;functions&lt;/strong&gt; are &lt;strong&gt;first-class citizens&lt;/strong&gt; in Python&lt;/li&gt;
&lt;li&gt;How to define &lt;strong&gt;anonymous functions&lt;/strong&gt; with the &lt;strong&gt;&lt;code&gt;lambda&lt;/code&gt;&lt;/strong&gt; keyword&lt;/li&gt;
&lt;li&gt;How to implement functional code using &lt;strong&gt;&lt;code&gt;map()&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;filter()&lt;/code&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;reduce()&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #276: Exploring Quantum Computing &amp; Python Frameworks</title>
      <id>https://realpython.com/podcasts/rpp/276/</id>
      <link href="https://realpython.com/podcasts/rpp/276/"/>
      <updated>2025-12-05T12:00:00+00:00</updated>
      <summary>What are the recent advances in the field of quantum computing and high-performance computing? And what Python tools can you use to develop programs that run on quantum computers? This week on the show, Real Python author Negar Vahid discusses her tutorial, &quot;Quantum Computing Basics With Qiskit.&quot;</summary>
      <content type="html">
        &lt;p&gt;What are the recent advances in the field of quantum computing and high-performance computing? And what Python tools can you use to develop programs that run on quantum computers? This week on the show, Real Python author Negar Vahid discusses her tutorial, &quot;Quantum Computing Basics With Qiskit.&quot;&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Introduction to pandas</title>
      <id>https://realpython.com/courses/introduction-pandas/</id>
      <link href="https://realpython.com/courses/introduction-pandas/"/>
      <updated>2025-12-02T14:00:00+00:00</updated>
      <summary>Learn pandas DataFrames: explore, clean, and visualize data with powerful tools for analysis. Delete unneeded data, import data from a CSV file, and more.</summary>
      <content type="html">
        &lt;p&gt;The &lt;a href=&quot;https://pandas.pydata.org/pandas-docs/stable/reference/frame.html&quot;&gt;pandas DataFrame&lt;/a&gt; is a &lt;a href=&quot;https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html&quot;&gt;structure&lt;/a&gt; that contains &lt;strong&gt;two-dimensional data&lt;/strong&gt; and its corresponding &lt;strong&gt;labels&lt;/strong&gt;. DataFrames are widely used in &lt;a href=&quot;https://realpython.com/tutorials/data-science/&quot;&gt;data science&lt;/a&gt;, &lt;a href=&quot;https://realpython.com/tutorials/machine-learning/&quot;&gt;machine learning&lt;/a&gt;, scientific computing, and many other data-intensive fields.&lt;/p&gt;
&lt;p&gt;DataFrames are similar to &lt;a href=&quot;https://realpython.com/python-sql-libraries/&quot;&gt;SQL tables&lt;/a&gt; or the spreadsheets that you work with in Excel or Calc. In many cases, DataFrames are faster, easier to use, and more powerful than tables or spreadsheets because they&amp;rsquo;re an integral part of the &lt;a href=&quot;https://www.python.org/about/&quot;&gt;Python&lt;/a&gt; and &lt;a href=&quot;https://numpy.org/&quot;&gt;NumPy&lt;/a&gt; ecosystems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this video course, you&amp;rsquo;ll learn:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What a &lt;strong&gt;pandas DataFrame&lt;/strong&gt; is and how to create one&lt;/li&gt;
&lt;li&gt;How to &lt;strong&gt;access, modify, add, sort, filter, and delete&lt;/strong&gt; data&lt;/li&gt;
&lt;li&gt;How to handle &lt;strong&gt;missing values&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to work with &lt;strong&gt;time-series data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;How to quickly &lt;strong&gt;visualize&lt;/strong&gt; data&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Getting Started With Claude Code</title>
      <id>https://realpython.com/courses/getting-started-claude-code/</id>
      <link href="https://realpython.com/courses/getting-started-claude-code/"/>
      <updated>2025-11-25T14:00:00+00:00</updated>
      <summary>Learn to set up and use Claude Code for Python projects: install, run commands, and integrate with Git.</summary>
      <content type="html">
        &lt;p&gt;Learn how to set up and start using Claude Code to boost your Python workflow. Learn how it differs from Claude Chat and how to use it effectively in your development setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You’ll learn how to:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install and configure Claude Code&lt;/li&gt;
&lt;li&gt;Run it safely inside project directories&lt;/li&gt;
&lt;li&gt;Work with CLAUDE.md for task context&lt;/li&gt;
&lt;li&gt;Use Git integration for smoother coding workflows&lt;/li&gt;
&lt;li&gt;Apply Claude Code to automate real programming tasks&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #275: Building a FastAPI Application &amp; Exploring Python Concurrency</title>
      <id>https://realpython.com/podcasts/rpp/275/</id>
      <link href="https://realpython.com/podcasts/rpp/275/"/>
      <updated>2025-11-21T12:00:00+00:00</updated>
      <summary>What are the steps to get started building a FastAPI application? What are the different types of concurrency available in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What are the steps to get started building a FastAPI application? What are the different types of concurrency available in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>Break Out of Loops With Python&#x27;s break Keyword</title>
      <id>https://realpython.com/courses/break-out-of-loops-break-keyword/</id>
      <link href="https://realpython.com/courses/break-out-of-loops-break-keyword/"/>
      <updated>2025-11-18T14:00:00+00:00</updated>
      <summary>Learn how Python’s break lets you exit for and while loops early, with practical demos from simple games to everyday data tasks.</summary>
      <content type="html">
        &lt;p&gt;In Python, the &lt;a href=&quot;/ref/keywords/break/&quot; class=&quot;ref-link&quot;&gt;&lt;code&gt;break&lt;/code&gt; statement&lt;/a&gt; lets you exit a loop prematurely, transferring control to the code that follows the loop. This tutorial guides you through using &lt;code&gt;break&lt;/code&gt; in both &lt;code&gt;for&lt;/code&gt; and &lt;code&gt;while&lt;/code&gt; loops. You&amp;rsquo;ll also briefly explore the &lt;code&gt;continue&lt;/code&gt; keyword, which complements &lt;code&gt;break&lt;/code&gt; by skipping the current loop iteration.&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;A &lt;code&gt;break&lt;/code&gt; in Python&lt;/strong&gt; is a keyword that lets you exit a loop immediately, stopping further iterations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Using &lt;code&gt;break&lt;/code&gt; outside of loops&lt;/strong&gt; doesn&amp;rsquo;t make sense because it&amp;rsquo;s specifically designed to exit loops early.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The &lt;code&gt;break&lt;/code&gt; doesn&amp;rsquo;t exit all loops&lt;/strong&gt;, only the innermost loop that contains it.&lt;/li&gt;
&lt;/ul&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #274: Preparing Data Science Projects for Production</title>
      <id>https://realpython.com/podcasts/rpp/274/</id>
      <link href="https://realpython.com/podcasts/rpp/274/"/>
      <updated>2025-11-14T12:00:00+00:00</updated>
      <summary>How do you prepare your Python data science projects for production? What are the essential tools and techniques to make your code reproducible, organized, and testable? This week on the show, Khuyen Tran from CodeCut discusses her new book, &quot;Production Ready Data Science.&quot;</summary>
      <content type="html">
        &lt;p&gt;How do you prepare your Python data science projects for production? What are the essential tools and techniques to make your code reproducible, organized, and testable? This week on the show, Khuyen Tran from CodeCut discusses her new book, &quot;Production Ready Data Science.&quot;&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  
    <entry>
      <title>The Real Python Podcast – Episode #273: Advice for Writing Maintainable Python Code</title>
      <id>https://realpython.com/podcasts/rpp/273/</id>
      <link href="https://realpython.com/podcasts/rpp/273/"/>
      <updated>2025-11-07T12:00:00+00:00</updated>
      <summary>What are techniques for writing maintainable Python code? How do you make your Python more readable and easier to refactor? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.</summary>
      <content type="html">
        &lt;p&gt;What are techniques for writing maintainable Python code? How do you make your Python more readable and easier to refactor? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder&#x27;s Weekly articles and projects.&lt;/p&gt;
        &lt;hr /&gt;
        &lt;p&gt;&lt;em&gt;[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &amp;amp; sweet Python Trick delivered to your inbox every couple of days. &lt;a href=&quot;https://realpython.com/python-tricks/?utm_source=realpython&amp;amp;utm_medium=rss&amp;amp;utm_campaign=footer&quot;&gt;&amp;gt;&amp;gt; Click here to learn more and see examples&lt;/a&gt; ]&lt;/em&gt;&lt;/p&gt;
      </content>
    </entry>
  

</feed>
