If you want to leverage the power of LLMs in your Python apps, you would be wise to consider an agentic framework. Agentic empowers the LLMs to use tools and take further action based on what it has learned at that point. And frameworks provide all the necessary building blocks to weave these into your apps with features like long-term memory and durable resumability. I'm excited to have Sydney Runkle back on the podcast to dive into building Python apps with LangChain and LangGraph.
Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.
Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.
Tech stack: The technology choices behind the product are surprisingly simple; dare I say, pragmatic!
Python: most of the product’s code is written in this language.
FastAPI: the Python framework used for building APIs quickly, using standard Python type hints. As the name suggests, FastAPI’s strength is that it takes less effort to create functional, production-ready APIs to be consumed by other services.
C: for parts of the code that need to be highly optimized, the team uses the lower-level C programming language
Temporal: used for asynchronous workflows and operations inside OpenAI. Temporal is a neat workflow solution that makes multi-step workflows reliable even when individual steps crash, without much effort by developers. It’s particularly useful for longer-running workflows like image generation at scale
This is related to speeding up a test suite, speeding up necessary imports.
Finding what’s slow
Use python -X importtime <the reset of the command
Ex: python -X importtime ptyest
Techniques
Lazy imports
move slow-to-import imports into functions/methods
Avoiding circular imports
hopefully you’re doing that already
Optimize __init__.py files
Avoid unnecessary imports, heavy computations, complex logic
Notes from Brian
Some questions remain open for me
Does module aliasing really help much?
This applies to testing in a big way
Test collection imports your test suite, so anything imported at the top level of a file gets imported at test collection time, even if you only are running a subset of tests using filtering like -x or -m or other filter methods.
Run -X importtime on test collection.
Move slow imports into fixtures, so they get imported when needed, but NOT at collection.
A lively story of death, What to Expect When You're Dead: An Ancient Tour of Death and the Afterlife (Princeton University Press, 2025) by Dr. Robert Garland explores the fascinating death-related beliefs and practices of a wide range of ancient cultures and traditions—Mesopotamian, Egyptian, Hindu, Jewish, Zoroastrian, Etruscan, Greek, Roman, Early Christian, and Islamic. By drawing on the latest scholarship on ancient archaeology, art, literature, and funerary inscriptions, Dr. Garland invites readers to put themselves in the sandals of ancient peoples and to imagine their mental state moment by moment as they sought—in ways that turn out to be remarkably similar to ours—to assist the dead on their journey to the next world and to understand life’s greatest mystery. What to Expect When You’re Dead chronicles the ways ancient peoples answered questions such as: How to achieve a good death and afterlife? What’s the best way to dispose of a body? Do the dead face a postmortem judgement—and where do they end up? Do the dead have bodies in the afterlife—and can they eat, drink, and have sex? And what can the living do to stay on good terms with the nonliving? Filled with intriguing stories and frequent humor, What to Expect When You’re Dead will be a morbidly delicious treat for every reader alive.
This interview was conducted by Dr. Miranda Melcher whose new book focuses on post-conflict military integration, understanding treaty negotiation and implementation in civil war contexts, with qualitative analysis of the Angolan and Mozambican civil wars.
Live from Capital Turnaround in Washington, D.C., Leah, Kate, and Melissa wade right into the swamp, breaking down the (very weird, very disturbing) sexual harassment claims against Texas’s ex-solicitor general, Judd Stone and holding their noses to read Coach Brett Kavanaugh’s opinion on the National Environmental Policy Act. Then, the hosts welcome special guests Ambassador Norm Eisen and Emily Amick, author of the Substack, Emily in Your Phone, to talk about the avalanche of litigation against the Trump administration and reproductive rights (and wrongs), respectively.
Can you believe it’s already June? So much has happened since President Donald Trump returned to the White House four and a half months ago, it’s hard to process. In that short amount of time, Trump has unilaterally thrown the global trading system into chaos and tried to end the constitutional right of birthright citizenship. His administration has stripped billions in federal grants from universities, arrested international students, and put tens of thousands of federal workers out of jobs. The constant din of chaos is exhausting, and it’s easy to grow numb to it, to normalize it. New York Times opinion columnist M. Gessen explains the parallels they see with early 2000s Russia, when President Vladimir Putin consolidated power, and what we can — and can’t — learn from that period.
And in headlines: Ukraine said it destroyed dozens of Russian military bombers in a massive drone attack deep inside Russian territory, the Supreme Court allowed the Trump Administration to temporarily lift deportation protections for around half a million migrants, and Iowa Republican Sen. Joni Ernst told constituents worried about proposed Medicaid cuts that ‘we all are going to die.’
We'll tell you about more targeted violence in the U.S. against supporters of Israeli hostages, and we're talking about President Trump's latest tariff announcement.
Also, air quality concerns are impacting millions of Americans.
Plus, a high school sporting event happened under the shadow of protests (and a warning from the White House), a new Covid-19 vaccine was (somewhat) approved, and Taylor Swift shared some big news about her music...
Those stories and even more news to know in about 10 minutes!
Join us every Mon-Fri for more daily news roundups!
Condominium owners saddled with rising HOA fees and special assessments are having a hard time selling their properties. Wall Street Journal personal finance reporter Veronica Dagher and recent condo buyer Gordon Miller join host Callum Borchers to discuss how real estate hunters can find bargains.
About Us: The daily pop-biz news show making today’s top stories your business. Formerly known as Robinhood Snacks, TBOY Lite is hosted by Jack Crivici-Kramer & Nick Martell.
For hundreds of years sailors have told stories about miles of glowing ocean during moonless nights. This phenomenon is known as "milky seas," but the only scientific sample was collected in 1985. So atmospheric scientist Justin Hudson, a PhD candidate at Colorado State University, used accounts spanning 400 years to create a database of milky seas. By also using satellite images to visually confirm the tales, Justin hopes his research brings us one step closer to unraveling this maritime mystery.
Listen to every episode of Short Wave sponsor-free and support our work at NPR by signing up for Short Wave+ at plus.npr.org/shortwave.
Got a question about a scientific mystery? Let us know at shortwave@npr.org.