Python Bytes - #434 Most of OpenAI’s tech stack runs on Python

Topics covered in this episode:
Watch on YouTube

About the show

Sponsored by Digital Ocean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit

Connect with the hosts

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.

Brian #1: Making PyPI’s test suite 81% faster

  • Alexis Challande
  • The PyPI backend is a project called Warehouse
  • It’s tested with pytest, and it’s a large project, thousands of tests.
  • Steps for speedup
    • Parallelizing test execution with pytest-xdist
      • 67% time reduction
      • --numprocesses=auto allows for using all cores
      • DB isolation - cool example of how to config postgress to give each test worker it’s on db
      • They used pytest-sugar to help with visualization, as xdist defaults to quite terse output
    • Use Python 3.12’s sys.monitoring to speed up coverage instrumentation
      • 53% time reduction
      • Nice example of using COVERAGE_CORE=sysmon
    • Optimize test discovery
      • Always use testpaths
      • Sped up collection time. 66% reduction (collection was 10% of time)
      • Not a huge savings, but it’s 1 line of config
    • Eliminate unnecessary imports
      • Use python -X importtime
      • Examine dependencies not used in testing.
      • Their example: ddtrace
        • A tool they use in production, but it also has a couple pytest plugins included
        • Those plugins caused ddtrace to get imported
        • Using -p:no ddtrace turns off the plugin bits
  • Notes from Brian:
    • I often get questions about if pytest is useful for large projects.
    • Short answer: Yes!
    • Longer answer: But you’ll probably want to speed it up
    • I need to extend this article with a general purpose “speeding up pytest” post or series.
    • -p:no can also be used to turn off any plugin, even builtin ones.
      • Examples include
        • nice to have developer focused pytest plugins that may not be necessary in CI
        • CI reporting plugins that aren’t needed by devs running tests locally

Michael #2: People aren’t talking enough about how most of OpenAI’s tech stack runs on Python

  • Original article: Building, launching, and scaling ChatGPT Images
  • 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

Michael #3: PyCon Talks on YouTube

Brian #4: Optimizing Python Import Performance

  • Mostly pay attention to #'s 1-3
  • 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.
  • See also:

Extras

Brian:

  • PEPs & Co.
    • PEP is a ‘backronym”, an acronym where the words it stands for are filled in after the acronym is chosen. Barry Warsaw made this one up.
    • There are a lot of “enhancement proposal” and “improvement proposal” acronyms now from other communities
  • pythontest.com has a new theme
    • More colorful. Neat search feature
    • Now it’s excruciatingly obvious that I haven’t blogged regularly in a while
      • I gotta get on that
    • Code highlighting might need tweaked for dark mode

Michael:

Joke: There is hope.

Talk Python To Me - #507: Agentic AI Workflows with LangGraph

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.

Episode sponsors

Posit
Auth0
Talk Python Courses

Sydney Runkle: linkedin.com
LangGraph: github.com
LangChain: langchain.com
LangGraph Studio: github.com
LangGraph (Web): langchain.com
LangGraph Tutorials Introduction: langchain-ai.github.io
How to Think About Agent Frameworks: blog.langchain.dev
Human in the Loop Concept: langchain-ai.github.io
GPT-4 Prompting Guide: cookbook.openai.com
Watch this episode on YouTube: youtube.com
Episode #507 deep-dive: talkpython.fm/507
Episode transcripts: talkpython.fm

--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy

The Government Huddle with Brian Chidester - 185: The One with the Fortinet Global CISO

Jim Richberg, Head of Cyber Policy and Global Field CISO at Fortinet rejoins the show for a timely discussion on the fast-evolving landscape of artificial intelligence and we unpack AI’s unprecedented energy demands, its implications on national infrastructure, and the critical cybersecurity considerations government agencies must navigate in this new era. Jim also shares his "Three Rules for Government Technology Transformation," and we explore why education and clear procurement strategies are vital to responsible AI rollout in public sector programs.

array(3) { [0]=> string(67) "https://mcdn.podbean.com/mf/web/wdh82646weuawk5r/Richberg_Final.m4a" [1]=> string(0) "" [2]=> string(8) "26382661" }

Big Technology Podcast - Mass AI-Driven Unemployment, NVIDIA Surges, CEOs’ AI Avatars Unleashed

Ranjan Roy from Margins is back for our weekly discussion of the latest tech news. We cover: 1) Anthropic CEO Dario Amodei's prophesy that 50% of entry level work will disappear 2) Hype or true: Is mass AI-driven unemployment just marketing? 3) How Amodei's prediction could come true 4) How work might shift even before job loss, as in the case of Amazon's engineers 5) NVIDIA's business is booming 6) Are export restrictions on China working? 7) DeepSeek's updated R1 model is here 8) Meta's AI problems 9) Meta teams up with Anduril 10) Did Mark call Palmer? 11) Grammarly's unique funding model 12) Elon Musk gets out of DOGE 13) CEOs using AI avatars on earnings calls

---

Enjoying Big Technology Podcast? Please rate us five stars ⭐⭐⭐⭐⭐ in your podcast app of choice.

Want a discount for Big Technology on Substack? Here’s 25% off for the first year: https://www.bigtechnology.com/subscribe?coupon=0843016b

Questions? Feedback? Write to: bigtechnologypodcast@gmail.com

African Tech Roundup - Strategy Diaries: Wabo Majavu on Balancing Commercial Success with Digital Inclusion

Episode overview: In this conversation, South African strategist Wabo Majavu, executive strategy and business operations leader at Africa Data Centres, unpacks how technical expertise at organisations like MTN and Intelsat laid the foundation for her distinctive approach to strategic leadership and digital activism. From building radar applications at the CSIR to optimising cellular networks through late-night, township-sourced sheep's head dinners with seasoned veteran technicians, Majavu's journey illustrates how hands-on technical experience and savvy adaptation becomes the bedrock of strategic thinking. She discusses navigating workplace discrimination, helping transform organisational culture at state-owned Sentech, and her prescient work in AI before it became a global phenomenon. Andile Masuku explores with Majavu how strategists shape a company's future direction, the delicate balance between commercial viability and digital inclusion, and her current mission to democratise coding through native African languages. Key topics: - From radar systems at CSIR to RF optimisation at MTN: building the technical foundation for strategic leadership - How experiences at Intelsat shaped her understanding of managed services and market transformation - The Sentech years: leading digital transformation while learning that culture can eat even the best strategy for breakfast - Studying AI and signal processing before the global AI boom, and formative educational experiences in Malaysia that shaped future vision - Strategic stakeholder management: converting union leaders into product managers and building collaborative ecosystems - Balancing commercial imperatives with digital inclusion through long-term strategic thinking - Where to start learning AI: practical advice for breaking into the field Notable points: 1. Majavu's radar applications work at CSIR and cellular network optimisation at MTN provided the technical depth that informs her strategic decision-making today 2. At MTN, she overcame racial barriers by building relationships with Network Operations Centre (NOC) technicians through after-hours learning sessions, bringing sheep's head delicacies from Mamelodi township to earn their trust and knowledge 3. At Sentech, she learned firsthand that "culture can eat strategy for breakfast," successfully converting a well-respected, highly influential union leader into a turnkey product manager spearheading the roll-out of new digital services 4. Majavu studied signal processing and then AI before it became mainstream, building web crawlers and predictive systems 5. Her approach to change management involves understanding each stakeholder's agenda and finding areas of alignment, demonstrated through her successful transformation of adversaries into collaborators Listen for Majavu's insights on how strategists inform a company's trajectory, why patient capital and technical depth are essential for Africa's digital transformation, and how past experiences become the lens through which strategic leaders view future possibilities. Image credit: Konecta

Code Story: Insights from Startup Tech Leaders - S11 Bonus: Arnab Deka, Metacast

Arnab Deka lives in Vancouver and loves the Pacific Northwest. He was never formally educated in computer science or software engineering - in fact, while he was studying civil engineering, he fell in love with building things and eventually, building software. Outside of tech, he is a family man and loves to sup with them and his dog. He also enjoys astronomy, and is known to attend a star party or 2, with his telescope in hand.

Arnab took a sabbatical from work, and on this journey, he realized that he liked deep work and interacting with customers directly - as opposed to high level strategy and planning. He met with his now co-founder in 2022, walking then Seattle lake front, and realized what podcast junkies they both were - and they decided to build something for it.

This is the creation story of Metacast.

Sponsors


Links



Our Sponsors:
* Check out Vanta: https://vanta.com/CODESTORY


Support this podcast at — https://redcircle.com/code-story/donations

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

The Stack Overflow Podcast - Understanding the limitations of AI is crucial for enterprise success

The discussion also:

  • Touches on the role, evolution, and adoption of AI agents, emphasizing their growing integration into systems, while addressing key safeguarding measures to ensure AI agents can accurately use data to reason effectively.
  • Explores how Abnormal AI utilizes AI to detect and protect against cybersecurity threats, and how Dan and his team are leveraging AI to drive compounding productivity within their organization.

Connect with Dan Shiebler on LinkedIn and learn more about Abnormal AI.

Big Technology Podcast - She Wants AI To Help You Thrive, Not Just Keep You Company — Y-Lan Boureau

Y-Lan Boureau is the founder & CEO of ThrivePal, an OpenAI-funded AI startup, and a former Meta AI researcher. Boureau joins Big Technology Podcast to discuss why the next frontier for AI should be science‑backed coaching that nudges us toward healthier habits and deeper real‑world relationships. Tune in to hear how large‑language models can push users to lift weights, regulate emotions, and support their friends’ growth.

---

---

Enjoying Big Technology Podcast? Please rate us five stars ⭐⭐⭐⭐⭐ in your podcast app of choice.

Want a discount for Big Technology on Substack? Here’s 25% off for the first year: https://www.bigtechnology.com/subscribe?coupon=0843016b

Questions? Feedback? Write to: bigtechnologypodcast@gmail.com

Security Unlocked - Protecting AI at the Edge with David Weston

In this episode of The BlueHat Podcast, host Nic Fillingham and Wendy Zenone share David Weston’s keynote from BlueHat India 2025. David explores the growing role of on-device AI in Windows, the security risks it introduces, and how Microsoft is rethinking architecture to defend against new threats like model tampering, data exfiltration, and AI-powered malware. He also shares insights on innovations like Windows Recall, biometric protection, and the future of secure, agentic operating systems. 


 

In This Episode You Will Learn:  

 

  • How AI integration in Windows (like Windows Recall and MS Paint) is evolving 
  • Emerging threats from protocols like MCP and CUAs 
  • What a “confused deputy” attack is, and how Microsoft is protecting users 

 

Some Questions We Ask: 

 

  • What are the biggest security threats in on-device AI—data, model, or runtime? 
  • Can AI be used to accelerate post-compromise attacks? 
  • What will it take to bring Azure-level confidential computing to the consumer device? 

     

Resources:      

View David Weston on LinkedIn   

View Wendy Zenone on LinkedIn   

View Nic Fillingham on LinkedIn  

 

  

Related Microsoft Podcasts:   

  

  

  

Discover and follow other Microsoft podcasts at microsoft.com/podcasts   


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