PLAY PODCASTS
Running Local LLMs With Ollama and Connecting With Python
Episode 284

Running Local LLMs With Ollama and Connecting With Python

The Real Python Podcast · Real Python

February 13, 202645m 27s

Audio is streamed directly from the publisher (dts.podtrac.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.

Show Notes

<p>Would you like to learn how to work with LLMs locally on your own computer? How do you integrate your Python projects with a local model? Christopher Trudeau is back on the show this week with another batch of PyCoder&rsquo;s Weekly articles and projects.</p> <p>We cover a recent Real Python step-by-step tutorial on installing local LLMs with Ollama and connecting them to Python. It begins by outlining the advantages this strategy offers, including reducing costs, improving privacy, and enabling offline-capable AI-powered apps. We talk through the steps of setting things up, generating text and code, and calling tools.</p> <p>We also share other articles and projects from the Python community, including the 2026 Python Developers Survey, creating callable instances with Python&rsquo;s <code>.__call__()</code>, creating maps and projections with GeoPandas, ending 15 years of <code>subprocess</code> polling, discussing backseat software, a retry library that classifies errors, and a peer-to-peer encrypted CLI chat project.</p> <p>This episode is sponsored by Honeybadger.</p> <div class="alert alert-primary" role="alert"> <p><strong>Course Spotlight:</strong> <a href="https://realpython.com/courses/tips-using-ai-coding-editor-cursor/">Tips for Using the AI Coding Editor Cursor</a></p> <p>Learn Cursor fast: Use AI-powered coding with agents, project-aware chat, and inline edits to supercharge your VS Code workflow.</p> </div> <p>Topics:</p> <ul> <li>00:00:00 &ndash; Introduction</li> <li>00:02:37 &ndash; Take the Python Developers Survey 2026</li> <li>00:03:07 &ndash; How to Integrate Local LLMs With Ollama and Python</li> <li>00:08:15 &ndash; Sponsor: Honeybadger</li> <li>00:09:01 &ndash; Create Callable Instances With Python&rsquo;s <code>.__call__()</code></li> <li>00:12:13 &ndash; GeoPandas Basics: Maps, Projections, and Spatial Joins</li> <li>00:16:03 &ndash; Ending 15 Years of <code>subprocess</code> Polling</li> <li>00:18:57 &ndash; Video Course Spotlight</li> <li>00:20:23 &ndash; Backseat Software – Mike Swanson</li> <li>00:39:06 &ndash; cmd-chat: Peer-to-Peer Encrypted CLI Chat</li> <li>00:41:58 &ndash; redress: A Retry Library That Classifies Errors</li> <li>00:43:56 &ndash; Thanks and goodbye</li> </ul> <p>News:</p> <ul> <li><a href="https://pyfound.blogspot.com/2026/01/your-python-your-voice-join-python.html">Take the Python Developers Survey 2026</a></li> <li><a href="https://blog.jetbrains.com/pycharm/2025/08/the-state-of-python-2025/">The State of Python 2025: Trends and Survey Insights - The PyCharm Blog</a></li> </ul> <p>Topics:</p> <ul> <li><a href="https://realpython.com/ollama-python/">How to Integrate Local LLMs With Ollama and Python</a> &ndash; Learn how to integrate your Python projects with local models (LLMs) using Ollama for enhanced privacy and cost efficiency.</li> <li><a href="https://realpython.com/courses/create-callable-instances-dunder-call/">Create Callable Instances With Python&rsquo;s <code>.__call__()</code></a> &ndash; Learn about Python callables, including what &ldquo;callable&rdquo; means, how to use dunder call, and how to build callable objects with step-by-step examples.</li> <li><a href="https://realpython.com/geopandas/">GeoPandas Basics: Maps, Projections, and Spatial Joins</a> &ndash; Dive into GeoPandas with this tutorial covering data loading, mapping, CRS concepts, projections, and spatial joins for intuitive analysis.</li> <li><a href="https://gmpy.dev/blog/2026/event-driven-process-waiting">Ending 15 Years of <code>subprocess</code> Polling</a> &ndash; Python&rsquo;s standard library <code>subprocess</code> module relies on busy-loop polling to determine whether a process has completed yet. Modern operating systems have callback mechanisms to do this, and Python 3.15 will now take advantage of these.</li> </ul> <p>Discussion:</p> <ul> <li><a href="https://blog.mikeswanson.com/backseat-software/">Backseat Software – Mike Swanson&rsquo;s Blog</a></li> <li><a href="https://news.ycombinator.com/item?id=46817452">Backseat Software – Hacker News</a></li> </ul> <p>Projects:</p> <ul> <li><a href="https://github.com/diorwave/cmd-chat">cmd-chat: Peer-to-Peer Encrypted CLI Chat</a></li> <li><a href="https://github.com/aponysus/redress">redress: A Retry Library That Classifies Errors</a></li> </ul> <p>Additional Links:</p> <ul> <li><a href="https://ollama.com/">Ollama</a></li> <li><a href="https://realpython.com/python-callable-instances/">Python&rsquo;s .<strong>call</strong>() Method: Creating Callable Instances – Real Python</a></li> <li><a href="https://realpython.com/quizzes/geopandas/">Quiz: GeoPandas Basics: Maps, Projections, and Spatial Joins</a></li> </ul> <p>Level up your Python skills with our expert-led courses:</p> <ul> <li><a href="https://realpython.com/courses/customize-vscode-settings/">Customize VS Code Settings</a></li> <li><a href="https://realpython.com/courses/getting-started-google-gemini-cli/">Getting Started With Google Gemini CLI</a></li> <li><a href="https://realpython.com/courses/tips-using-ai-coding-editor-cursor/">Tips for Using the AI Coding Editor Cursor</a></li> </ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast &amp; join our community of Pythonistas</a></p>