Python Bytes - #472 Monorepos

Topics covered in this episode:
Watch on YouTube

About the show

Sponsored by us! Support our work through:

Brian #1: Setting up a Python monorepo with uv workspaces

  • Dennis Traub
  • The 3 things
    • Give the Root a Distinct Name
    • Use workspace = true for Inter-Package Deps
    • Use importlib Mode for pytest

Michael #2: cattrs: Flexible Object Serialization and Validation

  • cattrs is a Swiss Army knife for (un)structuring and validating data in Python.
  • A natural alternative/follow on from DataClass Wizard
  • Converts to ←→ from dictionaries
  • cattrs also focuses on functional composition and not coupling your data model to its serialization and validation rules.
  • When you’re handed unstructured data (by your network, file system, database, …), cattrs helps to convert this data into trustworthy structured data.
  • Batteries Included: cattrs comes with pre-configured converters for a number of serialization libraries, including JSON (standard library, orjson, UltraJSON), msgpack, cbor2, bson, PyYAML, tomlkit and msgspec (supports only JSON at this time).

Brian #3: Learning to program in the AI age

  • Jose Blanca
  • “I teach a couple of introductory Python courses and I've been thinking about which advice to give to my students, that are studying how to program for the first time. I have collected my ideas in these blog posts”
    • Why learning to program is as useful as ever, even with powerful AI tools available.
    • How to use AI as a tutor rather than a shortcut, and why practice remains the key to real understanding.
    • What the real learning objectives are: mental models, managing complexity, and thinking like a software developer.

Michael #4: VS Code extension for FastAPI and friends

  • Enhances the FastAPI development experience in Visual Studio Code
  • Path Operation Explorer: Provides a hierarchical tree view of all FastAPI routes in your application.
  • Search for routes: Use the Command Palette and quickly search for routes by path, method, or name.
  • CodeLens links appear above HTTP client calls like client.get('/items'), letting you jump directly to the matching route definition.
  • Deploy your application directly to FastAPI Cloud from the status bar with zero config.
  • View real-time logs from your FastAPI Cloud deployed applications directly within VS Code.
  • Install from Marketplace.

Extras

Brian:

Joke: Saas is dead

What A Day - Can States Stop Trump’s Election Meddling?

President Donald Trump wants to dramatically change how Americans vote, and to make that happen he’s holding all other legislation hostage until Congress passes the SAVE America Act. The bill would require that Americans prove citizenship via a passport or a birth certificate to register to vote. Make no mistake: Trump wants America to pay the price for the election he lost to Joe Biden in 2020. Nevada Attorney General Aaron Ford joins us to explain how states are ready to fight Trump’s next moves to restrict voting.

And in headlines, Iran finds a new supreme leader in the son of the former one, a federal judge wants to reverse layoffs at the Voice of America, and the Trump administration threatens intervention in Cuba.

Show Notes:

Strict Scrutiny - A Court of Drugs and Guns

Kate, Leah, and Melissa break down the oral arguments in United States v. Hemani, a Second Amendment case which challenges a law prohibiting “unlawful users” of controlled substances from possessing a firearm. Then, they cover two truly heinous shadow docket rulings–a case out of New York where SCOTUS’s conservatives seem to have found an impermissible racial gerrymander they believe in, and another on the outing of transgender children–before speaking with California Attorney General Rob Bonta about standing up to the Trump administration on issues like tariffs, federal law enforcement overreach, and antitrust. They also pour one out for Krispy Gnome’s (née Kristi Noem) generationally awful tenure at the Department of Homeland Security. This episode was recorded live at the Herbst Theatre in San Francisco.

Favorite things:

Short Wave - What crocodile bones teach us about dinosaurs

Paleontologists have often determined how old a dinosaur was by counting the growth rings in its bones. Just like with trees, it was thought that each ring corresponded to a single year of age. But researchers who studied crocodiles at an outdoor recreation center near Cape Town appear to have poked a hole in that approach. In the crocodiles, which are some of the closest living relatives of dinosaurs, there was more than one growth ring laid down per year. The results contribute to a growing debate over the best way to age animals.

Read more of freelance science reporter Ari Daniel’s story here.

Interested in more on the future of science? Email us your question at shortwave@npr.org.

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.


To manage podcast ad preferences, review the links below:

See pcm.adswizz.com for information about our collection and use of personal data for sponsorship and to manage your podcast sponsorship preferences.

Learn more about sponsor message choices: podcastchoices.com/adchoices

NPR Privacy Policy

NPR's Book of the Day - In new memoir, Gavin Newsom reflects on his political rise

As California’s governor – and a topic of discussion among some as a possible 2028 presidential candidate – Gavin Newsom is an exceedingly public figure with a busy schedule to match. His new memoir, Young Man in a Hurry, provides a glimpse into Newsom’s rise to political prominence and his ongoing goal of self-discovery. In today’s episode, Newsom sits down with NPR’s Ailsa Chang to discuss his book, the question of his own relatability, and why he uses “playground insults”’ on social media to push back against the Trump administration.

To listen to Book of the Day sponsor-free and support NPR's book coverage, sign up for Book of the Day+ at plus.npr.org/bookoftheday


To manage podcast ad preferences, review the links below:

See pcm.adswizz.com for information about our collection and use of personal data for sponsorship and to manage your podcast sponsorship preferences.

Learn more about sponsor message choices: podcastchoices.com/adchoices

NPR Privacy Policy

What Next | Daily News and Analysis - The DOJ Is Trying Protesters As Terrorists. Will They Win?

A July ICE protest ended with a police lieutenant shot, 19 people arrested and nine people now on trial. For Trump’s Department of Justice, it’s a chance to see how calling groups “domestic terrorist organizations” performs in a courtroom.


Guest:  Leeja Miller, lawyer and YouTuber based in Minneapolis. 


Want more What Next? Subscribe to Slate Plus to access ad-free listening to the whole What Next family and across all your favorite Slate podcasts. Subscribe today on Apple Podcasts by clicking “Try Free” at the top of our show page. Sign up now at slate.com/whatnextplus to get access wherever you listen.


Podcast production by Elena Schwartz, Paige Osburn, Anna Phillips, Madeline Ducharme, and Rob Gunther.


Hosted on Acast. See acast.com/privacy for more information.

The Indicator from Planet Money - No healthcare premiums? In this economy?! Here’s how.

It turns out healthcare in America CAN be cheaper. If your employer wants it to be. Today on the show, we speak with a Canadian-founded startup that has unusually generous benefits for their employees. 

Come see Planet Money live on stage in April! 12 cities. Details and tix here: https://tix.to/pm-book-tour

Related episodes:
Health insurance premiums are going up next year — unless you work at these companies
Health care costs are soaring. Blame insurers, drug companies — and your employer
The hidden costs of healthcare churn

For sponsor-free episodes of The Indicator from Planet Money, subscribe to Planet Money+ via Apple Podcasts or at plus.npr.org. Fact-checking by Sierra Juarez. Music by Drop Electric. Find us: TikTok, Instagram, Facebook, Newsletter 

To manage podcast ad preferences, review the links below:

See pcm.adswizz.com for information about our collection and use of personal data for sponsorship and to manage your podcast sponsorship preferences.

Learn more about sponsor message choices: podcastchoices.com/adchoices

NPR Privacy Policy

The Best One Yet - 🔵 “$400M Latte” — Blue Bottle’s acquisition. Oil’s everything tax. Startup-maxxing surge. +Solo Dining Surge

Founder-Maxxing is the new trend… America is losing jobs, but gaining entrepreneurs.

Blue Bottle Coffee was just acquired by China’s Luckin for $400M… It’s a 9-digit latte.

Oil surged 14% in the biggest one-day pop we’ve ever seen… And it’s a tax on the whole economy.

Plus, did you go to that thing alone this weekend? It’s lonely leisure, and honestly, we’re big fans.


$NSRGY $XOM $OIL


Buy tickets to The IPO Tour (our In-Person Offering) TODAY

Arlington, VA (3/11): https://www.arlingtondrafthouse.com/shows/341317 

New York, NY (4/8): https://www.ticketmaster.com/event/0000637AE43ED0C2

Los Angeles, CA (6/3): SOLD OUT


Get your TBOY Yeti Doll gift here: https://tboypod.com/shop/product/economic-support-yeti-doll 


NEWSLETTER:

https://tboypod.com/newsletter 


OUR 2ND SHOW:

Want more business storytelling from us? Check our weekly deepdive show, The Best Idea Yet: The untold origin story of the products you're obsessed with. Listen for free to The Best Idea Yet: https://wondery.com/links/the-best-idea-yet/


NEW LISTENERS

Fill out our 2 minute survey: https://qualtricsxm88y5r986q.qualtrics.com/jfe/form/SV_dp1FDYiJgt6lHy6


GET ON THE POD: 

Submit a shoutout or fact: https://tboypod.com/shoutouts 


SOCIALS:

Instagram: https://www.instagram.com/tboypod 

TikTok: https://www.tiktok.com/@tboypod

YouTube: https://www.youtube.com/@tboypod 

Linkedin (Nick): https://www.linkedin.com/in/nicolas-martell/

Linkedin (Jack): https://www.linkedin.com/in/jack-crivici-kramer/

Anything else: https://tboypod.com/ 


About Us: The daily pop-biz news show making today’s top stories your business. Formerly known as Robinhood Snacks, The Best One Yet is hosted by Jack Crivici-Kramer & Nick Martell.




Hosted on Acast. See acast.com/privacy for more information.

African Tech Roundup Podcast - Seyi Ebenezer of Payaza Africa: Bookkeeping is the new black

Episode overview:

Seyi Ebenezer didn't come to fintech from a hackathon or an accelerator. He came from KPMG's audit desks and Access Bank's corporate finance floors. These are environments where the numbers had to add up before anyone was allowed to dream out loud. That training shows in everything about how he has built Payaza Africa, from claims of launching profitably with a single gas station client to rejecting six or seven VC approaches in favour of bootstrapping a business he could defend on paper.

In conversation with Andile Masuku, Ebenezer — who co-founded Payaza in 2020 and launched in March 2022 — lays out a philosophy that cuts against the grain of Africa's startup narrative. Where the dominant playbook says raise fast, grow faster, and worry about unit economics later, Ebenezer argues that African founders face a structural reality that makes that approach uniquely dangerous: a "natural prejudice rating" on the continent that means even Aliko Dangote isn't immune to credit downgrades. 

His conclusion: if the system is stacked against you, your books had better be immaculate.

The conversation covers Payaza's origins solving payment reconciliation for Nigerian fuel stations, why Ebenezer treats every product that isn't profitable within six months as a candidate for shutdown, and how securing investment-grade credit ratings from Augusto & Co, DataPro, and GCR (with a Moody's rating to boot) has transformed the company from price taker to price giver in investor conversations. 


Along the way, Ebenezer draws a direct line from the 2008 financial crisis to the recent VC funding winter in African tech, and argues that the founders who built structure survived both.

But the conversation's most striking moment comes near the end with Ebenezer's call for the creation of a pan-African credit rating agency; one that uses community-based risk models suited to how African business actually works, rather than importing Western frameworks wholesale. 

Key insights:

  • On why debt creates discipline: Ebenezer's central thesis is that debt financing forces founders to confront profitability from day one. Unlike equity, where capital can mask weak fundamentals, debt has interest that "does not sleep on Saturday, does not sleep on Sunday." He argues this constraint is a feature, not a bug, particularly for African founders who face structural disadvantages in how the market perceives their businesses.

  • On building from the books outward: At Payaza, corporate governance came before scale. Ebenezer engaged Deloitte as an auditor from the company's earliest days. It's a decision he says he initially regretted when the first audit surfaced over sixty exceptions. But those painful early investments in structure are what enabled Payaza to access capital markets, raise commercial paper without collateral, and achieve investment-grade credit ratings — outcomes virtually unheard of for a Nigerian fintech.

  • On the "prejudice rating" African businesses carry: Ebenezer points to World Bank data showing that Africa's default rate on infrastructure funding is just 1.9 per cent (second only to the Middle East at 0.9 per cent) while Western Europe sits at 9.1 per cent. Yet a business headquartered in Western Europe would still receive a higher credit rating. His response: African founders must over-prepare, building the kind of documentation and governance that neutralises bias before they walk into any room.

  • On rejecting the VC playbook — without rejecting VC: Ebenezer is careful not to demonise venture capital. His argument is about sequencing: build structure first, demonstrate profitability, then engage equity investors from a position of strength. He turned down six or seven approaches during the VC boom, telling his team to trust the longer game. The result: when he now sits across from potential investors, he sets the terms. "Evidence dominates argument," he says.

  • On why African businesses can't emulate Amazon's playbook: When pressed on whether his conservative approach stifles ambition, Ebenezer invokes the Dangote example. If Fitch can withdraw the credit rating of Africa's wealthiest industrialist, and downgrade Afrexim Bank, then no African founder can afford to assume the market will extend them the patience it gave Jeff Bezos. "If they could touch Dangote," he asks, "who are we?"

  • On Payaza's efficiency-first growth model: Rather than competing on price — a "race to the bottom" — Payaza competed on settlement speed, offering same-day payouts to merchants using its own capital while competitors operated on T+1 or T+2 cycles. This earned trust and referrals, creating organic growth with thin but real margins. Every merchant is evaluated against an activity-based costing model: if onboarding them isn't profitable, the relationship doesn't proceed.

Notable moments:
1. The Petrocam origin story:
Payaza's first client was Petrocam, a Nigerian fuel retailer with 57 filling stations. The problem: reconciliation chaos and shrinkage across distributed locations. Payaza built "Branches," a product that gave the group CFO a centralised, real-time view of collections across every station — eliminating accounting discrepancies, reducing theft, and cutting the finance headcount needed at each site. The product was profitable from day one. "We are solving a problem for them and then we're charging them fairly," Ebenezer recalls. That first deal set the template for everything that followed.

2. The credit rating upgrade that broke the rules: After raising commercial paper on the Nigerian capital market and making an early repayment, Payaza received a credit rating upgrade from BBB- to BBB+ in a matter of months. The norm is a 24-month cycle between upgrades. The rating agency told them they had "a very good case" — a vindication, Ebenezer argues, of prioritising fundamentals over flash.

3. The SME Tribe experiment yielding zero bad debt: When Instagram went down for several days, Payaza saw an opportunity. It built SME Tribe, a web-based marketplace that mirrored what small traders were selling on Instagram, then layered on "Payaza Boost": uncollateralised working capital advances of 25 per cent of a merchant's three-month average collections. The result: zero non-performing loans. Ebenezer uses this as evidence that African credit risk models need to account for community-based accountability, not Western-style board structures.

4. The pan-African credit rating pitch: In the episode's most charged exchange, Ebenezer pivots from discussing his own business to issuing a direct challenge: Africa needs its own credit rating infrastructure, potentially housed under Afrexim Bank or the African Union's APRM framework. He argues that the global rating oligopoly (agencies built "200 or 400 years ago" that keep acquiring regional competitors) cannot adequately assess African risk because Africa is "community-based." His proposed model would incorporate social accountability mechanisms alongside financial metrics. And then, live on the podcast, he nominates Andile Masuku to lead the convening.

Connect and engage:

Connect and engage:

Opening Arguments - The Sketchy and Incredibly Recent Origins of the Major Questions Doctrine

OA1242 - Ever heard of the “major questions doctrine”? Most lawyers sure hadn’t until a few years ago. So how did it get that important-sounding name? Where did it come from? What even is it? How can we call something a “doctrine” or a rule if we don’t have a clear rule statement to cite to? (Hint: You can’t). If you’ve been feeling like maybe this is all made up and the points don’t matter, you can get your vindication here as we trace back the history of this ever-changing heavily-politicized increasingly-disputed amorphous blob. Jenessa read way too many cases and law review articles to tolerate this nonsense today.

Timeline, each citing the one below it:

1. “Major questions doctrine” first appearance in any court case: West Virginia v. Environmental Protection Agency, 597 U.S. 697 (2022)

2. “Major question doctrine” [not plural] in an EPA statement on deregulations: Repeal of the Clean Power Plan, 84 Fed. Reg. 32520, 32529 (proposed Jul. 8, 2019) (to be codified at 40 C.F.R. pt. 60).

3. “Major rules doctrine”: U.S. Telecom Association v. F.C.C., 855 F.3d 381, 422-423 (D.C. Cir 2017), Kavanaugh dissent. (Note: There are many decisions by this name, including one from the D.C. Circuit in 2016, all of which are more prevalent online. Only this exact citation, minus the “422-23” pincite, will get you to the right case. Unfortunately I cannot find it outside the paywall to provide a link).

4. “Economic and political significance” allegedly the first unnamed use of the concept: F.D.A. v. Brown & Williamson Tobacco Co. 529 U.S. 120 (2000)

5. “Major questions” first appears in any legal scholarship… well those words appear in that order, at least: Stephen Breyer, Judicial Review of Questions of Law and Policy, 38 Admin. L. Rev. 363 (1986).

Meanwhile, in another timeline:

  1. Cass R. Sunstein, There are two “Major Questions” Doctrines, 73 Admin. L. Rev. 475, (2021).

  2. First ever use of “major questions rule/exception” in a positive light in legal scholarship. Would become more mainstream around 2013-2016: Abigail Moncrieff, Reincarnating the "Major Questions" Exception to Chevron Deference as a Doctrine of Non-Interference as a Doctrine of Non-Interference (Or Why Massachusetts v. EPA Got It Wrong), 60 Admin L. Rev. 593 (2008).

  3. Moncrieff, above, cites this as the original coining of “major questions”, not Breyer’s 1986 paper: Cass R. Sunstein, Chevron Step Zero, 92 VA. L. Rev. 187 (2006).

Other definitions from legal scholarship:

Other relevant cases:

Check out the OA Linktree for all the places to go and things to do!