Real Python Podcast E294 Title Image

Episode 294: Declarative Charts in Python & Discerning Iterators vs Iterables

The Real Python Podcast

What if you could build charts in Python by describing what your data means, instead of scripting every visual detail? Christopher Trudeau is back on the show this week with another batch of PyCoder’s Weekly articles and projects.

Episode Sponsor:

We cover a recent Real Python article about the data visualization library Altair. Most tools require you to write detailed boilerplate code to set up the axis and figure. Altair follows a declarative approach where you specify which columns go to which axis, the type of chart or plot, and what should be interactive.

We also share other articles and projects from the Python community, including recent releases, clarifying the differences between iterators and iterables, decoupling your business logic from the Django ORM, comparing an LLM-based tool for web scraping against Playwright, a neural network emulator for guitar amplifiers, and a CLI tool to generate ASCII art of the current moon phase.

This episode is sponsored by Build Your Own Coding Agent.

Topics:

  • 00:00:00 – Introduction
  • 00:02:38 – Read the Docs Now Supports uv Natively
  • 00:03:09 – Reverting the Incremental GC in Python 3.14 and 3.15
  • 00:04:51 – Altair: Declarative Charts With Python
  • 00:12:23 – Sponsor: Build Your Own Coding Agent
  • 00:13:17 – Decoupling Your Business Logic From the Django ORM
  • 00:19:51browser-use vs. Playwright: Which to Pick for Web Scraping?
  • 00:26:58 – 2048: iterators and iterables - Ned Batchelder
  • 00:31:31 – Video Course Spotlight
  • 00:33:00 – Discussion: Jumping back into solo developer mode
  • 00:46:59 – neural-amp-modeler: Neural network emulator for guitar amplifiers
  • 00:51:48 – ascii-moon-phase-python: CLI for ASCII art of the current moon phase
  • 00:53:11 – Thanks and goodbye
  • 00:54:43 – Appendix: Neural Amp Modeler - Demo

News:

Show Links:

  • Altair: Declarative Charts With Python – Build interactive Python charts the declarative way with Altair. Map data to visual properties and add linked selections. No JavaScript required.
  • Decoupling Your Business Logic From the Django ORM – Where should I keep my business logic? This is a perennial topic in Django. This article proposes a continuum of cases, each with increasing complexity.
  • browser-use vs. Playwright: Which to Pick for Web Scraping? – Follow along in this walk-through building a Hacker News synthesizer with browser-use, then see it fail on a harder Newegg scraping task. Includes a side-by-side comparison with Playwright and a breakdown of when each tool is the right call.
  • 2048: iterators and iterables - Ned Batchelder – Making a terminal based version of the 2048 game, Ned waded into a classic iterator/iterable confusion. This article shows you how they’re different and how confusing them can cause you problems in your code.

Projects:

Additional Links: