The Real Python Podcast: Recent Episodes

Real Python

A weekly Python podcast hosted by Christopher Bailey with interviews, coding tips, and conversation with guests from the Python community.

The show covers a wide range of topics including Python programming best practices, career tips, and related software development topics.

Join us every Friday morning to hear what's new in the world of Python programming and become a more effective Pythonista.

View Details

Should you use a Python virtual environment in a Docker container? What are the advantages of using the same development practices locally and inside a container? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We share a recent post by Hynek Schlawack about building Python projects using Docker containers. Hynek argues for using virtual environments for these projects, like developing a local one. He’s found that keeping your code in an isolated, well-defined location and structure avoids confusion and complexity.

We also discuss our development setups, including Python versions, code editors, virtual environment practices, terminals, and customizations. We dig into how your programming history affects the tools you use.

We share several other articles and projects from the Python community, including a group of new releases, addressing the “why” in comments, comparing a data science workflow in Python and R, removing common problems from CSV files, and a project for creating HTML tables in Django.

This episode is sponsored by InfluxData.

Course Spotlight: Advanced Python import Techniques

The Python import system is as powerful as it is useful. In this in-depth video course, you’ll learn how to harness this power to improve the structure and maintainability of your code.

Topics:

  • 00:00:00 – Introduction
  • 00:02:55 – Python Releases 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20
  • 00:03:26 – Python Release Python 3.13.0rc2
  • 00:04:07 – Django Security Releases Issued: 5.1.1, 5.0.9, and 4.2.16
  • 00:04:36 – Polars Has a New Lightweight Plotting Backend
  • 00:05:49 – Why I Still Use Python Virtual Environments in Docker
  • 00:11:37 – How to Use Conditional Expressions With NumPy where()
  • 00:15:55 – Sponsor: InfluxData
  • 00:16:39 – PythonistR: A Match Made in Data Heaven
  • 00:23:44 – Why Not Comments
  • 00:26:48 – Video Course Spotlight
  • 00:28:10 – Discussion: Personal development setups
  • 00:51:01 – csv_trimming: Remove Common Ugliness From CSV Files
  • 00:53:01 – django-tables2: Create HTML Tables in Django
  • 00:54:39 – Thanks and goodbye

News:

  • Python Releases 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20
  • Python Release Python 3.13.0rc2
  • Django Security Releases Issued: 5.1.1, 5.0.9, and 4.2.16

Show Links:

  • Polars Has a New Lightweight Plotting Backend – Polars 1.6 allows you to natively create beautiful plots without pandas, NumPy, or PyArrow. This is enabled by Narwhals, a lightweight compatibility layer between dataframe libraries.
  • Why I Still Use Python Virtual Environments in Docker – Hynek often gets challenged when he suggests the use of virtual environments within Docker containers, and this post explains why he still does.
  • How to Use Conditional Expressions With NumPy where() – This tutorial teaches you how to use the where() function to select elements from your NumPy arrays based on a condition. You’ll learn how to perform various operations on those elements and even replace them with elements from a separate array or arrays.
  • PythonistR: A Match Made in Data Heaven – In data science you’ll sometimes hear a debate between R and Python. Cosima says ‘why not choose both?’ She outlines a data pipeline that uses the best tool for each job.
  • Why Not Comments – This post talks about why you might want to include information in your code comments about why you didn’t take a particular approach.

Discussion:

  • Editors & IDEs – Real Python
  • Visual Studio Code - Code Editing. Redefined
  • Project Jupyter - Home
  • vim online: welcome home
  • iTerm2 - macOS Terminal Replacement

Projects:

  • csv_trimming: Remove Common Ugliness From CSV Files
  • django-tables2: Create HTML Tables in Django

Additional Links:

  • virtualenv Lives! - Hynek Schlawack - 2014
  • Production-ready Python Docker Containers with uv - Hynek Schlawack
  • r-python-talk: 🦸🏼‍♀️ Contains material for talk on how to use Python and R together
  • Download RStudio - Posit
  • Logic for Programmers by Hillel Wayne - Leanpub

Level up your Python skills with our expert-led courses:

  • Using Jupyter Notebooks
  • Absolute vs Relative Imports in Python
  • Advanced Python import Techniques

Support the podcast & join our community of Pythonistas

View Details

What are strategies for being a productive developer with ADHD? How can you help your team members with ADHD to succeed and complete projects? This week on the show, we speak with Chris Ferdinandi about his website and podcast “ADHD For the Win!”

Chris struggled with productivity early in his career as a developer. He shares systems and strategies he’s discovered to harness the focusing power of ADHD.

We discuss time management, meetings, and maintaining productivity in a hectic world. Chris also shares resources for learning more about defining ADHD, self-evaluation, and how to keep getting things done.

This episode is sponsored by InfluxData.

Course Spotlight: Build a GUI Calculator With PyQt and Python

In this video course, you’ll learn how to create graphical user interface (GUI) applications with Python and PyQt. Once you’ve covered the basics, you’ll build a fully functional desktop calculator that can respond to user events with concrete actions.

Topics:

  • 00:00:00 – Introduction
  • 00:02:30 – Defining ADHD and how it aligns with coding
  • 00:05:47 – Analogy for focus
  • 00:06:51 – Can you sense the change in focus?
  • 00:07:46 – The challenge of meetings
  • 00:11:45 – Tips for managing time
  • 00:15:44 – Capturing notes and defragging
  • 00:18:48 – Sponsor: InfluxData
  • 00:19:33 – Downtime and interruptions
  • 00:25:26 – Remote work and focus
  • 00:33:16 – Sitting still and meetings
  • 00:37:39 – Video Course Spotlight
  • 00:39:13 – Anything worth doing is worth doing poorly
  • 00:47:36 – Prototypes and working on interesting things
  • 00:50:26 – Deadlines and pomodoro timers
  • 00:54:21 – Have your symptoms changed over time?
  • 00:56:18 – Starting ADHDftw.com
  • 00:59:12 – Decision to keep podcast episodes short
  • 01:00:01 – Deciding on medication
  • 01:02:02 – Resources available
  • 01:03:29 – What motivates you to continue to learn programming?
  • 01:04:06 – What do you want to learn next?
  • 01:04:55 – What are other ways to follow your work online?
  • 01:05:28 – Thanks and goodbye

Show Links:

  • ADHD ftw! - Resources
  • ADHD isn’t a deficit of attention (and doesn’t necessarily mean you’re hyperactive)
  • Do I have ADHD?
  • Snoot - Wikipedia
  • Anything worth doing is worth doing poorly
  • Getting stuff done with ADHD: defrag your notebook - ADHD ftw!
  • Go Make Things - About
  • Chris Ferdinandi ⚓️ (@cferdinandi@mastodon.social) - Fosstodon

Level up your Python skills with our expert-led courses:

  • Creating PyQt Layouts for GUI Applications
  • Build a GUI Calculator With PyQt and Python
  • HTML and CSS Foundations for Python Developers

Support the podcast & join our community of Pythonistas

View Details

How do you take advantage of Git pre-commit hooks? How do you build custom software checks and rules that run every time you commit your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We share a trio of articles by previous guest Stefanie Molin about Git pre-commit hooks. Across the series, she provides step-by-step instructions for building your own hooks, managing them, and learning how they operate.

We discuss the process of estimating software development projects. We dig into the art of “guesstimation,” rough calculation, and napkin math. Christopher shares his experience in agile scenarios and measuring projects by story counts.

We share several other articles and projects from the Python community, including a news roundup, 10 Python programming optimization techniques, and building a blog in Django using GraphQL & Vue. We also explore experimenting with Python’s preprocessor, a toolkit for writing UIs in PyScript, and a couple of projects for working with Django Admin.

This episode is sponsored by InfluxData.

Course Spotlight: Python mmap: Doing File I/O With Memory Mapping

In this video course, you’ll learn how to use Python’s mmap module to improve your code’s performance when you’re working with files. You’ll get a quick overview of the different types of memory before diving into how and why memory mapping with mmap can make your file I/O operations faster.

Topics:

  • 00:00:00 – Introduction
  • 00:02:28 – Python Top Language of 2024
  • 00:02:59 – Python Developers Survey 2023 Results
  • 00:03:46 – How Pre-Commit Works
  • 00:10:00 – Build a Blog Using Django, GraphQL, and Vue
  • 00:13:38 – Sponsor: InfluxData
  • 00:14:23 – 10 Python Programming Optimization Techniques
  • 00:22:45 – Python’s Preprocessor
  • 00:26:42 – Video Course Spotlight
  • 00:28:16 – You don’t have to guess to estimate
  • 00:44:18 – LTK is a little toolkit for writing UIs in PyScript
  • 00:49:06 – django-admin-action-forms: Forms for Django Admin
  • 00:52:09 – django-public-admin: A Public and Read-Only Django Admin
  • 00:53:24 – Thanks and goodbye

News:

  • Python Top Language of 2024 – “Python continues to cement its overall dominance, buoyed by things like popular libraries for hot fields such as A.I.” Read the article to see where other languages have placed.
  • Python Developers Survey 2023 Results – Official Python Developers Survey 2023 Results by Python Software Foundation and JetBrains: more than 25k responses from almost 200 countries.

Show Links:

  • How Pre-Commit Works – As a user of pre-commit hooks, do you know what happens when you run pre-commit install or why you have to run it in the first place? How does pre-commit actually work with Git? In this article, Stefanie takes you behind the scenes of how your pre-commit setup works.
  • How to Set Up Pre-Commit Hooks - Stefanie Molin
  • How to Create a Pre-Commit Hook - Stefanie Molin
  • Build a Blog Using Django, GraphQL, and Vue – In this step-by-step project, you’ll build a blog from the ground up. You’ll turn your Django blog data models into a GraphQL API and consume it in a Vue application for users to read. You’ll end up with an admin site and a user-facing site you can continue to refine for your own use.
  • 10 Python Programming Optimization Techniques – Optimization should be your last step, but once you’re there, just what can you do? This article covers ten different techniques that address memory size and code performance.
  • Python’s Preprocessor – Every now and then you hear outrageous claims such as “Python has no preprocessor,” well it is there if you’re willing to dig deep enough. Learn how to hack Python’s compile step.

Discussion

  • You Don’t Have to Guess to Estimate
  • Habits of Great Software Engineers

Projects:

  • pyscript/ltk: LTK Is a Little Toolkit for Writing UIs in PyScript
  • django-admin-action-forms: Forms for Django Admin
  • django-public-admin: A Public and Read-Only Django Admin

Additional Links:

  • Python mmap: Doing File I/O With Memory Mapping – Real Python
  • Caching in Python With lru_cache – Real Python
  • Episode #128: Using a Memory Profiler in Python & What It Can Teach You
  • Episode #172: Measuring Multiple Facets of Python Performance With Scalene – The Real Python Podcast
  • software development - Why are estimates treated like deadlines? - Project Management Stack Exchange
  • Software Estimation Without Guessing: Effective Planning in an Imperfect World by George Dinwiddie
  • Guesstimation - Princeton University Press
  • Anaconda Toolbox for Excel — Anaconda documentation
  • Anaconda Code — Anaconda documentation
  • PySheets - Spreadsheet UI for Python

Level up your Python skills with our expert-led courses:

  • Python mmap: Doing File I/O With Memory Mapping
  • Caching in Python With lru_cache
  • How Python Manages Memory

Support the podcast & join our community of Pythonistas

View Details

Are you interested in practicing your Python skills while learning how to solve astrophysics and astronomy problems? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher shares a pair of his recent Real Python video courses about exploring astronomy and astrophysics with Python. Throughout the courses, you’ll get to practice using a variety of data science libraries, such as NumPy, Matplotlib, pandas, pint, and Astropy.

We speak with Mannie Young who is the Organizing Committee Chair of PyCon Africa. Real Python is excited to be a contributing sponsor of this year’s conference. Mannie discusses reinvigorating a continent-spanning conference after a multiyear hiatus. He also talks about introducing Python to students and new developers across Africa through PyClubs, PyLadies, and PyData programs.

We share several other articles and projects from the Python community, including a news roundup, logging in Python, understanding operator precedence, reconciling why it only works on your machine, a fast way to create an HTML app, and a tool for deep inspection of Python objects.

This episode is sponsored by InfluxData.

Course Spotlight: Sorting Dictionaries in Python: Keys, Values, and More

In this video course, you’ll learn how to sort Python dictionaries. By the end, you’ll be able to sort by key, value, or even nested attributes. But you won’t stop there, you’ll also measure the performance of variations when sorting and compare different key-value data structures.

Topics:

  • 00:00:00 – Introduction
  • 00:03:05 – PEP 750: Tag Strings for Domain-Specific Languages
  • 00:05:19 – PEP 752: Package Repository Namespaces
  • 00:07:32 – PyCon US 2024 Recap and Recording Release
  • 00:08:01 – Logging in Python
  • 00:14:57 – It Works on My Machine. Why?
  • 00:17:33 – Python’s Operator Precedence
  • 00:20:54 – Exploring Astrophysics in Python With pandas and Matplotlib
  • 00:24:03 – Using Astropy for Astronomy With Python
  • 00:26:37 – Sponsor: InfluxData
  • 00:27:22 – fasthtml: The Fastest Way to Create an HTML App
  • 00:32:50 – wat: Deep Inspection of Python Objects
  • 00:38:08 – PyCon Africa 2024
  • 00:40:47 – What goes into re-energizing a conference?
  • 00:44:20 – Talks and speakers
  • 00:46:58 – Video Course Spotlight
  • 00:48:29 – How did you get involved?
  • 00:52:19 – PyClubs and growing Python education
  • 00:58:41 – What industries are using Python in Ghana?
  • 01:00:20 – Sponsorship and support
  • 01:01:51 – Travel in and outside the continent
  • 01:04:23 – Call to action
  • 01:05:05 – Thanks and goodbye

News:

  • PEP 750: Tag Strings for Domain-Specific Languages (Added)
  • PEP 752: Package Repository Namespaces (Added)
  • PyCon US 2024 Recap and Recording Release – PyCon US 2024 had a record breaking attendance with over 2,700 in-person tickets sold. This article is a recap from the conference runners and links to all the available recordings.

Show Links:

  • Logging in Python – If you use Python’s print() function to get information about the flow of your programs, then logging is the natural next step for you. This tutorial will guide you through creating your first logs and show you ways to curate them to grow with your projects.
  • It Works on My Machine. Why? – A list of things to check when something works on your computer but not on someone else’s.
  • Python’s Operator Precedence – Stephen uses a story-telling style to explain how operator precedence works in Python.
  • Exploring Astrophysics in Python With pandas and Matplotlib – This course uses three problems often covered in introductory astro-physics courses to play in Python. Along the way you’ll learn some astronomy and how to use a variety of datascience libraries like NumPy, Matplotlib, pandas, and pint.
  • Using Astropy for Astronomy With Python – This course covers two problems from introductory astronomy to help you play with some Python libraries. You’ll use NumPy, Matplotlib, and pandas to find planet conjunctions, and graph the best viewing times for a star.

Projects:

  • fasthtml: The Fastest Way to Create an HTML App
  • wat: Deep Inspection of Python Objects

Additional Links:

  • PyCon Africa 2024 - Home
  • Announcing PyCon Africa 2024 Blog: A Return to Accra and a Look Ahead
  • Episode #65: Expanding the International Python Community With the PSF
  • Django Girls - Start your journey with programming
  • PyLadies Ghana - Python Ghana’s Blog
  • PyData Ghana - Python Ghana’s Blog
  • PyClubs - Home
  • Quiz: Logging in Python
  • Mannie Young - LinkedIn
  • Mannie Young (@mawy_7) - X

Level up your Python skills with our expert-led courses:

  • Using Astropy for Astronomy With Python
  • Sorting Dictionaries in Python: Keys, Values, and More
  • Exploring Astrophysics in Python With pandas and Matplotlib

Support the podcast & join our community of Pythonistas

View Details

Are you interested in learning robotics with Python? Can physical electronics-based projects grow a child’s interest in coding? This week on the show, we speak with author Marwan Alsabbagh about his book “Build Your Own Robot - Using Python, CRICKIT, and Raspberry Pi.”

Marwan discusses his two conferences talks about building electronics projects with his children. He provides advice on equipment and techniques to make learning Python engaging.

We explore his robotics project and the literal balancing act of designing a robot around the Raspberry Pi. Marwan shares his successes and disappointments while working to incorporate computer vision, joystick controls, and voice commands.

This episode is sponsored by Mailtrap.

Course Spotlight: Python Debugging With pdb

In this hands-on course, you’ll learn the basics of using pdb, Python’s interactive source code debugger. pdb is a great tool for tracking down hard-to-find bugs, and it allows you to fix faulty code more quickly.

Topics:

  • 00:00:00 – Introduction
  • 00:02:14 – How did you get started with Python and electronics?
  • 00:04:27 – Snow globe intruder alert system
  • 00:06:57 – Things to keep in mind with a child
  • 00:12:50 – Challenges in teaching a child Python
  • 00:16:34 – Sponsor: Mailtrap
  • 00:17:11 – What are other projects you’ve tried?
  • 00:21:12 – Powering the robot project
  • 00:24:56 – Putting together the robot librarian talk
  • 00:29:47 – Was there any friction teaching kids robotics?
  • 00:32:47 – Adding the complexity of a Raspberry Pi
  • 00:38:27 – Video Course Spotlight
  • 00:39:48 – Hardware components of the robot
  • 00:41:51 – Thinking about access to the equipment
  • 00:45:37 – Assembling the robot project?
  • 00:49:14 – Various control systems
  • 00:54:42 – What experience level is required with Python?
  • 00:55:40 – What concepts were you excited to share?
  • 00:57:59 – Do you think Python is a good language for robotics?
  • 00:59:21 – MicroPython Cookbook
  • 01:00:07 – What are projects you tried that didn’t work out?
  • 01:03:01 – What are you excited about in the world of Python?
  • 01:04:04 – What do you want to learn next?
  • 01:04:56 – How can people follow your work online?
  • 01:05:19 – Thanks and goodbye

Show Links:

  • Build Your Own Robot - Using Python, CRICKIT, and Raspberry PI
  • Snow globe intruder alert system
  • Snow globe intruder alert system - Marwan Alsabbagh - PyLondinium18 - YouTube
  • Adafruit Industries, Unique & fun DIY electronics and kits
  • Nina Zakharenko - Keynote - PyCon 2019 - YouTube
  • Episode #86: The Legacy of OLPC and Charismatic Pitfalls in Teaching Programming
  • Episode #161: Resources and Advice for Building CircuitPython Projects
  • Episode #75: Building With CircuitPython & Constraints of Python for Microcontrollers
  • MicroPython Cookbook: Marwan Alsabbagh - Amazon.com: Books
  • WebAssembly
  • htmx - high power tools for html
  • Marwan Alsabbagh - personal website
  • marwano (Marwan Alsabbagh) - GitHub

Level up your Python skills with our expert-led courses:

  • Using Pygame to Build an Asteroids Game in Python
  • Python Debugging With pdb
  • Using Python's assert to Debug and Test Your Code

Support the podcast & join our community of Pythonistas

View Details

What are the best practices for organizing data analysis projects in Python? What are the advantages of a more package-centric approach to data science? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss Joshua Cook’s recent article “How I Use Python to Organize My Data Analyses.” The article covers how his process for building data analysis projects has evolved and now incorporates modern Python packaging techniques.

Christopher shares his recent video course on grouping real-world data with pandas. The course offers a quick refresher before digging into how to use pandas GroupBy to manipulate, transform, and summarize data.

We also share several other articles and projects from the Python community, including a news roundup, working with JSON data in Python, running an Asyncio event loop in a separate thread, knowing the why behind a system’s code, a retro game engine for Python, and a project for vendorizing packages from PyPI.

This episode is sponsored by Mailtrap.

Course Spotlight: pandas GroupBy: Grouping Real World Data in Python

In this course, you’ll learn how to work adeptly with the pandas GroupBy while mastering ways to manipulate, transform, and summarize data. You’ll work with real-world datasets and chain GroupBy methods together to get data into an output that suits your needs.

Topics:

  • 00:00:00 – Introduction
  • 00:02:18 – Setuptools Breaks Things, Then Fixes Them
  • 00:04:57 – PEP 751: A File Format to List Python Dependencies
  • 00:07:04 – Python 3.13.0 Release Candidate 1 Released
  • 00:07:15 – Python Insider: Python 3.12.5 released
  • 00:07:22 – Django 5.1 released - Django Weblog
  • 00:07:27 – Django security releases issued: 5.0.8 and 4.2.15
  • 00:07:49 – How I Use Python to Organize My Data Analyses
  • 00:13:45 – Sponsor: Mailtrap
  • 00:14:21 – pandas GroupBy: Grouping Real World Data in Python
  • 00:20:33 – Working With JSON Data in Python
  • 00:25:01 – Asyncio Event Loop in Separate Thread
  • 00:30:33 – Video Course Spotlight
  • 00:31:47 – Habits of great software engineers
  • 00:49:17 – pyxel: A Retro Game Engine for Python
  • 00:52:36 – python-vendorize: Vendorize Packages From PyPI
  • 00:54:18 – Thanks and goodbye

News:

  • Setuptools Breaks Things, Then Fixes Them – This post is Bite Code’s monthly summary, but the lead story happened just days ago. In line with a 7 year old deprecation, setuptools finally removed the ability to call its test command. Many packages promptly broke. The following day the change was undone.
  • PEP 751: A File Format to List Python Dependencies for Installation Reproducibility (New) – This PEP proposes a new file format for dependency specification to enable reproducible installation in a Python environment.
  • Python 3.13.0 Release Candidate 1 Released
  • Python Insider: Python 3.12.5 released
  • Django 5.1 released - Django Weblog
  • Django security releases issued: 5.0.8 and 4.2.15 - Django Weblog

Show Links:

  • How I Use Python to Organize My Data Analyses – This is a description of how Joshua uses Python in a package-centric way to organize his approach to data analyses. This is a system he has evolved while working on his computational biology Ph.D. and working in industry.
  • pandas GroupBy: Grouping Real World Data in Python – In this course, you’ll learn how to work adeptly with the pandas GroupBy while mastering ways to manipulate, transform, and summarize data. You’ll work with real-world datasets and chain GroupBy methods together to get data into an output that suits your needs.
  • Working With JSON Data in Python – In this tutorial, you’ll learn how to read and write JSON-encoded data in Python. You’ll begin with practical examples that show how to use Python’s built-in “json” module and then move on to learn how to serialize and deserialize custom data.
  • Asyncio Event Loop in Separate Thread – Typically, the asyncio event loop runs in the main thread, but as that is the one used by the interpreter, sometimes you want the event loop to run in a separate thread. This article talks about why and how to do just that.

Discussion:

  • Habits of great software engineers

Projects:

  • pyxel: A Retro Game Engine for Python
  • python-vendorize: Vendorize Packages From PyPI

Additional Links:

  • Everyday Project Packaging With pyproject.toml – Real Python
  • Packaging Your Python Code With pyproject.toml - Complete Code Conversation - YouTube
  • Episode #197: Using Python in Bioinformatics and the Laboratory – The Real Python Podcast

Level up your Python skills with our expert-led courses:

  • Everyday Project Packaging With pyproject.toml
  • Working With JSON Data in Python
  • pandas GroupBy: Grouping Real World Data in Python

Support the podcast & join our community of Pythonistas

View Details

What hurdles must be cleared when starting an international organization? How do you empower others in a community by sharing responsibilities? This week on the show, we speak with Jay Miller about Black Python Devs.

Jay shares how the idea of forming a community began through attending conferences. They wanted to welcome more black developers into the Python community. We discuss the introduction of Black Python Devs as part of their PyCon 2024 keynote presentation.

Jay explains working with a few key people to build the group’s foundations. They talk about the difficulty of letting other people share in the responsibilities and ownership as the membership grew. We also discuss the advantages of partnering with a non-profit organization.

This episode is sponsored by InfluxData.

Course Spotlight: Interacting With REST APIs and Python

In this video course, you’ll learn how to use Python to communicate with REST APIs. You’ll learn about REST architecture and how to use the requests library to get data from a REST API. You’ll also explore different Python tools you can use to build REST APIs.

Topics:

  • 00:00:00 – Introduction
  • 00:02:50 – PyCon 2024 Keynote
  • 00:06:02 – New role at Aiven
  • 00:11:32 – Nobody knows what Dev Rel is
  • 00:19:43 – Podcasting about productivity
  • 00:24:12 – Sponsor: InfluxData
  • 00:24:57 – Starting Black Python Devs
  • 00:33:11 – Distinct perspectives and problems
  • 00:37:10 – Partnering with Gnome Foundation
  • 00:40:31 – What were hurdles in starting Black Python Devs?
  • 00:45:31 – Video Course Spotlight
  • 00:47:01 – What do you wish you knew before you started?
  • 00:50:56 – What’s your latest win?
  • 00:53:28 – Helping people prepare for jobs and new roles
  • 00:58:03 – What’s your call to action?
  • 01:00:26 – What are you excited about in the world of Python?
  • 01:03:48 – How do you stay motivated to keep learning Python?
  • 01:06:19 – What do you want to learn next?
  • 01:09:02 – How can people follow your work online?
  • 01:11:02 – Thanks and goodbye

Show Links:

  • Black Python Devs - Home
  • PyCon 2024 Keynote Speaker - Jay Miller - YouTube
  • PyCon 2024 Keynote Speaker - Sumana Harihareswara - YouTube
  • Conduit - Relay FM
  • Aiven - Your Trusted Data & AI Platform
  • Abigail Mesrenyame Dogbe Honored with Inaugural Outstanding PyLady Award
  • Episode #86: The Legacy of OLPC and Charismatic Pitfalls in Teaching Programming – The Real Python Podcast
  • Black Python Devs Join the GNOME Foundation Nonprofit Umbrella – The GNOME Foundation
  • Applying for a Hacker Initiative Grant With Bill Pollock of No Starch Press – The Real Python Podcast
  • Jay Miller - Personal Website
  • kjaymiller - Jay Miller’s GitHub
  • Jay Miller (@kjaymiller@mastodon.social) - Fosstodon
  • Jay Miller - LinkedIn
  • Render Engine - read the docs

Level up your Python skills with our expert-led courses:

  • Sneaky REST APIs With Django Ninja
  • Unleashing the Power of the Console With Rich
  • Interacting With REST APIs and Python

Support the podcast & join our community of Pythonistas

View Details

How do you integrate GraphQL into your Python web development? How about quickly building graph-based APIs inside Django’s battery-included framework? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher shares a recent tutorial for building GraphQL APIs in Django using the Python library Strawberry. The tutorial digs into creating a project, defining models, and creating GraphQL queries and mutations using Strawberry.

We discuss a blog post from Nat Bennet titled “Why do prototypes suck?” We dig into the common pitfalls of building prototypes and the misconceptions between developers and end users.

We also share several other articles and projects from the Python community, including a news roundup, using HTMX with FastAPI, creating an unbelievably stupid airline Wi-Fi package, extracting wisdom from conference videos, writing pixel images to the terminal, and a macOS app for Jupyter Notebooks.

This episode is sponsored by Mailtrap.

Course Spotlight: Building a URL Shortener With FastAPI and Python

In this video course, you’ll build an app to create and manage shortened URLs. Your Python URL shortener can receive a full target URL and return a shortened URL. You’ll also use the automatically created documentation of FastAPI to try out your API endpoints.

Topics:

  • 00:00:00 – Introduction
  • 00:02:27 – Python 3.13.0 Beta 4 Released
  • 00:03:15 – Using HTMX With FastAPI
  • 00:09:51 – Free, Unbelievably Stupid Wi-Fi on Long-Haul Flights
  • 00:13:37 – Sponsor: Mailtrap
  • 00:14:13 – “Extracting Wisdom” From Conference Videos
  • 00:22:34 – Developing GraphQL APIs in Django With Strawberry
  • 00:30:01 – Video Course Spotlight
  • 00:31:33 – Why do prototypes suck?
  • 00:42:53 – Satyrn: macOS App for Jupyter Notebooks
  • 00:46:41 – rich-pixels: A Rich-compatible library for writing pixel images
  • 00:48:23 – Thanks and goodbye

News:

  • Python 3.13.0 Beta 4 Released

Topics:

  • Using HTMX With FastAPI – This tutorial looks at how use HTMX with FastAPI by creating a simple todo web app and deploying it on Render.
  • Free, Unbelievably Stupid Wi-Fi on Long-Haul Flights – Deep in a need to procrastinate on a flight between London and San Francisco, Robert discovered that changing his name on an airline’s frequent flyer account was free over the plane’s WiFi. What’s a developer to do? Work on their tickets? No, create an entire TCP/IP protocol using this loophole. The result is the PySkyWiFi package.
  • “Extracting Wisdom” From Conference Videos – There are so many conferences and so many videos, you can’t possibly watch them all. This post shows you how to extract information to summarize a talk so you can quickly decide what you want to watch.
  • Developing GraphQL APIs in Django With Strawberry – This tutorial details how to integrate GraphQL with Django using Strawberry.

Discussion:

  • Why do prototypes suck?

Project:

  • Satyrn: macOS App for Jupyter Notebooks
  • darrenburns/rich-pixels: A Rich-compatible library for writing pixel images and ASCII art to the terminal.

Additional Links:

  • htmx - high power tools for html
  • Using FastAPI to Build Python Web APIs – Real Python
  • Ollama
  • fabric: An open-source framework for augmenting humans using AI
  • A modern GraphQL library for Python - 🍓 Strawberry GraphQL
  • Satyrn Discord

Level up your Python skills with our expert-led courses:

  • Sneaky REST APIs With Django Ninja
  • Building a URL Shortener With FastAPI and Python
  • Python REST APIs With FastAPI

Support the podcast & join our community of Pythonistas

View Details

Do you need help making data tables in Python look interesting and attractive? How can you create beautiful display-ready tables as easily as charts and graphs in Python? This week on the show, we speak with Richard Iannone and Michael Chow from Posit about the Great Tables Python library.

Michael and Richard discuss the design philosophy and history behind creating display tables. We dig into the grammar of tables, the background of the project, and an ingenious way to build a collection of examples for a library.

We briefly cover how Richard and Michael started contributing to open source. We also discuss practicing data skills with challenges and resources like Tidy Tuesday.

This episode is sponsored by Mailtrap.

Course Spotlight: Graph Your Data With Python and ggplot

In this course, you’ll learn how to use ggplot in Python to build data visualizations with plotnine. You’ll discover what a grammar of graphics is and how it can help you create plots in a very concise and consistent way.

Topics:

  • 00:00:00 – Introduction
  • 00:02:00 – Michael’s background in open source
  • 00:04:07 – Rich’s background in open source
  • 00:05:27 – Advice for someone starting out
  • 00:08:55 – What do you mean by the term “display” table
  • 00:11:32 – What components were missing from other tables?
  • 00:13:31 – Using examples to explain features
  • 00:16:09 – Why was there an absence of this functionality in Python?
  • 00:19:35 – A progressive approach and the grammar of tables
  • 00:21:26 – Sponsor: Mailtrap
  • 00:22:01 – The design philosophy of great tables
  • 00:25:31 – Nanoplots, spark lines, and column spanners
  • 00:27:06 – Building a gallery of examples
  • 00:28:56 – Heat mapping cells and automatically adjusting text color
  • 00:32:54 – Output formats for the tables
  • 00:34:46 – Building in accessibility
  • 00:36:55 – Dependencies
  • 00:37:42 – What is the common workflow?
  • 00:41:39 – Video Course Spotlight
  • 00:43:15 – Adding graphics
  • 00:46:41 – Using a table contest to get examples
  • 00:49:47 – quartodoc and documenting the project
  • 00:55:00 – Tidy Tuesday and data science community
  • 01:00:29 – What are you excited about in the world of Python?
  • 01:03:46 – What do you want to learn next?
  • 01:08:05 – How can people follow the work you do online?
  • 01:09:57 – Thanks and goodbye

Show Links:

  • Great Tables - Intro
  • Examples – great_tables
  • great-tables: Make awesome display tables using Python. - GitHub
  • siuba: Python library for using dplyr like syntax with pandas and SQL
  • The Design Philosophy of Great Tables – great_tables
  • Richard Iannone - Using Great Tables to Make Presentable Tables in Python - YouTube
  • Evaluation of the players of #LigaEndesa this week in Europe - Great Tables Example - X
  • quartodoc: Generate API documentation with quarto
  • Tidy Tuesday R Screencasts - YouTube
  • Polars — DataFrames for the new era
  • narwhals-dev/narwhals: Lightweight and extensible compatibility layer between dataframe libraries!
  • A Grammar of Graphics for Python – plotnine 0.13.6
  • Richard Iannone - GitHub
  • Michael Chow - GitHub)
  • Richard Iannone - LinkedIn
  • Michael Chow - LinkedIn

Level up your Python skills with our expert-led courses:

  • Using Jupyter Notebooks
  • pandas GroupBy: Grouping Real World Data in Python
  • Graph Your Data With Python and ggplot

Support the podcast & join our community of Pythonistas

View Details

What are discrete optimization problems? How do you solve them with constraint programming in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects

Christopher discusses an article about constraint programming using Python. He describes the fundamentals and how the problems resemble logic problems you may have experienced in school. The article shows how to solve a weekly work scheduling problem using the open-source CP-SAT package.

We discuss Leodanis Pozo Ramos’s recent tutorial, “Python’s Built-in Functions: A Complete Exploration.” These functions are available for use directly in your code without importing.

We also share several other articles and projects from the Python community, including a news roundup, spotting ships with satellites, grappling with Apple’s App Store rejecting Python applications, considering changes to Python’s security model, discussing pivoting from one development path to another, prettifying Jinja and Django templates, and generating static sites with Python.

This episode is sponsored by Sentry.

Course Spotlight: Parallel Iteration With Python’s zip() Function

In this course, you’ll learn how to use the Python zip() function to solve common programming problems. You’ll learn how to traverse multiple iterables in parallel and create dictionaries with just a few lines of code.

Topics:

  • 00:00:00 – Introduction
  • 00:02:35 – Polars 1.0 Released
  • 00:03:26 – Psycopg 3.2 Released
  • 00:04:06 – Django security releases issued: 5.0.7 and 4.2.14
  • 00:04:40 – PyBay 2024 Call for Proposals
  • 00:05:16 – Python’s Built-in Functions: A Complete Exploration
  • 00:12:10 – Satellites Spotting Ships
  • 00:16:02 – Sponsor: Sentry
  • 00:17:09 – Python Grapples With Apple App Store Rejections
  • 00:20:27 – Python’s Security Model After the xz-utils Backdoor
  • 00:25:38 – Video Course Spotlight
  • 00:26:56 – Constraint Programming Using CP-SAT and Python
  • 00:31:40 – Any Web Devs Successfully Pivoted to AI/ML Development?
  • 00:43:12 – aurora: Static Site Generator Implemented in Python
  • 00:45:14 – Running Prettier Against Django or Jinja Templates
  • 00:46:58 – Thanks and goodbye

News:

  • Polars 1.0 Released
  • Psycopg 3.2 Released
  • Django security releases issued: 5.0.7 and 4.2.14
  • PyBay 2024 Call for Proposals

Show Links:

  • Python’s Built-in Functions: A Complete Exploration – In this tutorial, you’ll learn the basics of working with Python’s numerous built-in functions. You’ll explore how you can use these predefined functions to perform common tasks and operations, such as mathematical calculations, data type conversions, and string manipulations.
  • Satellites Spotting Ships – Umbra Space has released a data set consisting of satellite based radar images of shipping. This article from Mark shows you how to grab the data, visualize, and annotate it.
  • Python Grapples With Apple App Store Rejections – A string that is part of the urllib parser module in Python references a scheme for apps that use the iTunes feature to install other apps, which is disallowed. Auto scanning by Apple is rejecting any app that uses Python 3.12 underneath. A solution has been proposed for Python 3.13.
  • Python’s Security Model After the xz-utils Backdoor – The backdoor introduced to the xz-utils compression project through social engineering was one of the topics at the Python Language Summit. Participants discussed what can be done to prevent similar social engineering attacks on the Python source.
  • Constraint Programming Using CP-SAT and Python – Constraint programming is the process of looking for solutions based on a series of restrictions, like employees over 18 who have worked the cash before. This article introduces the concept and shows you how to use open source libraries to write constraint solving code.

Discussion:

  • Any Web Devs Successfully Pivoted to AI/ML Development?

Projects:

  • aurora: Static Site Generator Implemented in Python
  • Running Prettier Against Django or Jinja Templates – “Prettier” is a JavaScript based linting tool for templates. For folks not familiar with the world of npm, it can be a bit daunting to get it going. Simon fiddled with it so you don’t have to and posted how he got it working on his system.

Additional Links:

  • Episode #209: Python’s Command-Line Utilities & Music Information Retrieval Tools – The Real Python Podcast
  • Python Module Index — Python 3.12.4 documentation
  • Built-in Functions — Python 3.12.4 documentation
  • Briefcase— BeeWare
  • Ask HN: What’s Prolog like in 2024? - Hacker News
  • Episode #199: Leveraging Documents and Data to Create a Custom LLM Chatbot – The Real Python Podcast
  • PEP 730 – Adding iOS as a supported platform | peps.python.org

Level up your Python skills with our expert-led courses:

  • Parallel Iteration With Python's zip() Function
  • Python Inner Functions
  • Jinja Templating

Support the podcast & join our community of Pythonistas

View Details

Have you wondered about graph theory and how to start exploring it in Python? What resources and Python libraries can you use to experiment and learn more? This week on the show, former co-host David Amos returns to talk about what he’s been up to and share his knowledge about graph theory in Python.

David started a Ph.D. program studying mathematics, with a focus on graph theory. Though life interrupted his pursuit after three years, he is still passionate about the subject. He’s been using these skills to create documentation and teach users as part of RelationalAI’s education team.

David has also been exploring the Julia programming language. He wrote about it on his blog, created videos, and started a podcast on the topic. He shares his excitement about learning new techniques from different languages and how these ideas can enhance your coding in Python.

This episode is sponsored by Sentry.

Course Spotlight: Defining Python Constants for Code Maintainability

In this video course, you’ll learn how to properly define constants in Python. By coding a bunch of practical example, you’ll also learn how Python constants can improve your code’s readability, reusability, and maintainability.

Topics:

  • 00:00:00 – Introduction
  • 00:02:09 – What have you been up to?
  • 00:03:31 – Exploring the Julia language
  • 00:07:24 – Where do you see Julia being used?
  • 00:10:17 – Cross pollination of languages
  • 00:12:45 – Connecting with RelationalAI
  • 00:16:33 – Sponsor: Sentry
  • 00:17:42 – Digging into graph theory
  • 00:21:54 – Edges as connections
  • 00:24:55 – Defining terms
  • 00:31:30 – Storing graph information
  • 00:41:55 – Applications once the graph is built
  • 00:49:07 – Video Course Spotlight
  • 00:50:40 – Additional resources to learn more
  • 00:53:59 – What are you excited about in the world of Python?
  • 00:58:05 – What do you want to learn next?
  • 01:00:25 – How can people follow your work online?
  • 01:02:55 – Thanks and goodbye

Show Links:

  • RelationalAI - a knowledge graph coprocessor for your data cloud.
  • The Julia Programming Language
  • Talk Julia - YouTube
  • Five Minutes To Julia. David Amos - Medium Member Link
  • Five Minutes To Julia. David Amos - Medium Friend Link
  • Getting Started with RelationalAI - RelationalAI Docs
  • Example Notebooks - RelationalAI Docs
  • The Hunt for the Missing Data Type - Hillel Wayne
  • Introduction to Graph Theory: Richard J Trudeau
  • The Fascinating World of Graph Theory: Arthur Benjamin, Gary Chartrand, Ping Zhang
  • NetworkX — NetworkX documentation
  • Embeddings and Vector Databases With ChromaDB – Real Python
  • Episode #199: Leveraging Documents and Data to Create a Custom LLM Chatbot – The Real Python Podcast
  • Graph Theory With Python - David’s YouTube Playlist
  • David Amos (@somacdivad@hachyderm.io) - Hachyderm.io
  • David Amos - LinkedIn
  • David Amos – Medium

Level up your Python skills with our expert-led courses:

  • Using Jupyter Notebooks
  • Defining Python Constants for Code Maintainability
  • Python Basics: Setting Up Python

Support the podcast & join our community of Pythonistas

View Details

Does Python round numbers the same way you learned back in math class? You might be surprised by the default method Python uses and the variety of ways to round numbers in Python. Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher discusses his recent video course, “Rounding Numbers in Python.” He covers rounding bias and how to avoid introducing it into your dataset. We dig into the various rounding strategies and how to implement them in Python.

We also share several other articles and projects from the Python community, including a news roundup, a fast Python linter for error-free and maintainable code, the decline of the user interface, more thoughts on Python in Excel, a discussion about calendar versioning for Python, a financial database as a Python module, and a project to prettify the colors of your terminal user interfaces.

This episode is sponsored by Sentry.

Course Spotlight: Rounding Numbers in Python

In this video course, you’ll learn about the mistakes you might make when rounding numbers and how to best manage or avoid them. It’s a great place to start for the early to intermediate Python developer who’s interested in using Python for finance, data science, or scientific computing.

Topics:

  • 00:00:00 – Introduction
  • 00:02:06 – NumPy 2.0.0 Release Notes
  • 00:02:52 – Python 3.13.0 beta 3 released
  • 00:03:05 – Announcing the PSF Board Candidates for 2024!
  • 00:03:27 – Prohibiting Outlook Email Domains
  • 00:04:31 – Ruff: A Python Linter for Error-Free and Maintainable Code
  • 00:09:31 – Sponsor: Sentry
  • 00:10:35 – The Decline of the User Interface
  • 00:19:14 – My Thoughts on Python in Excel
  • 00:26:30 – Rounding Numbers in Python
  • 00:30:53 – Video Course Spotlight
  • 00:32:13 – PEP 2026: Calendar Versioning for Python
  • 00:42:37 – Financial Database as a Python Module
  • 00:45:34 – prettypretty: Build Awesome Terminal User Interfaces
  • 00:47:48 – Thanks and goodbye

News:

  • NumPy 2.0.0 Release Notes — NumPy v2.0 Manual – The long awaited 2.0 release of NumPy landed this week. Not all the docs are up to date yet, but this final draft of the release notes shows you what is included.
  • Python Insider: Python 3.13.0 beta 3 released
  • Python Software Foundation News: Announcing the PSF Board Candidates for 2024!
  • Prohibiting Outlook Email Domains – Due to an inordinate amount of bot accounts coming from outlook.com and hotmail.com, PyPI has disallowed new account sign-ups with email addresses from these domains.

Show Links:

  • Ruff: A Python Linter for Error-Free and Maintainable Code – Ruff is an extremely fast, modern linter with a simple interface, making it straightforward to use. It also aims to be a drop-in replacement for other linting and formatting tools, like Pylint, isort, and Black. It’s no surprise it’s quickly becoming one of the most popular Python linters.
  • The Decline of the User Interface – “Software has never looked cooler, but user interface design and user experience have taken a sharp turn for the worse.”
  • My Thoughts on Python in Excel – Microsoft’s new Python in Excel functionality was released almost a year ago. Having now had time to play with it, Felix gives his take.
  • Rounding Numbers in Python – In this video course, you’ll learn about the mistakes you might make when rounding numbers and how to best manage or avoid them. It’s a great place to start for the early to intermediate Python developer who’s interested in using Python for finance, data science, or scientific computing.

Discussion:

  • PEP 2026: Calendar Versioning for Python – This PEP proposes updating the versioning scheme for Python to include the calendar year. This aims to make the support lifecycle clear by making it easy to see when a version was first released, and easier to work out when it will reach end of life (EOL).
  • Associated discussion
  • Semantic Versioning 2.0.0 - Semantic Versioning
  • Calendar Versioning — CalVer

Projects:

  • FinanceDatabase: Financial Database as a Python Module
  • prettypretty: Build Awesome Terminal User Interfaces

Additional Links:

  • The Humane Interface - Wikipedia
  • Python Resources for working with Excel - Working with Excel Files in Python
  • Episode #186: Exploring Python in Excel – The Real Python Podcast
  • Cash rounding - Wikipedia

Level up your Python skills with our expert-led courses:

  • Python Basics: Numbers and Math
  • Rounding Numbers in Python
  • Editing Excel Spreadsheets in Python With openpyxl

Support the podcast & join our community of Pythonistas

View Details

What techniques go into synthesizing a guitar sound in Python? What higher-level programming and Python concepts can you practice while building advanced projects? This week on the show, we talk with Real Python author and core team member Bartosz Zaczyński about his recent step-by-step project, Build a Guitar Synthesizer: Play Musical Tablature in Python.

Bartosz shares how he had built an early prototype of the guitar synth using a different language. He describes recreating the Karplus-Strong algorithm in Python to create the plucked guitar sounds. We discuss teaching advanced Python concepts while guiding readers through constructing a complete project.

We also dig into reading and writing WAV files in Python, using Spotify’s pedalboard library, implementing Poetry in a project, and designing a file format for guitar tablature.

This episode is sponsored by Mailtrap.

Course Spotlight: Playing and Recording Sound in Python

In this course, you’ll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. You’ll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats.

Topics:

  • 00:00:00 – Introduction
  • 00:02:04 – Reading and writing WAV files in Python
  • 00:04:48 – What did you want to learn about the topic?
  • 00:08:02 – Finding new ways to explain Python concepts
  • 00:09:52 – Turning audio into plots and visualizations
  • 00:12:11 – Using Python for synthesis and the guitar synth project
  • 00:13:19 – What is your music background?
  • 00:18:36 – Sponsor: Mailtrap
  • 00:19:11 – First prototype of the project
  • 00:22:23 – What does the project cover?
  • 00:25:08 – Audio examples of the output
  • 00:26:31 – Digging into the algorithm
  • 00:31:40 – Convolution reverb
  • 00:34:15 – Physical modeling and pedalboard
  • 00:38:08 – Video Course Spotlight
  • 00:39:31 – What Python concepts are you practicing?
  • 00:41:11 – Using Python poetry
  • 00:43:00 – Why use YAML for the TAB files?
  • 00:46:13 – What does it mean to be a polyglot programmer?
  • 00:48:37 – Potential upcoming Real Python resources
  • 00:52:10 – How can people follow your work online?
  • 00:52:30 – What do you want to learn next?
  • 00:54:56 – Thanks and goodbye

Show Links:

  • Build a Guitar Synthesizer: Play Musical Tablature in Python – Real Python
  • Reading and Writing WAV Files in Python – Real Python
  • Episode #200: Avoiding Error Culture and Getting Help Inside Python – The Real Python Podcast
  • ActionScript - Wikipedia
  • Apache Flex® - Home Page
  • Too Many Zooz - Official Website
  • Watch Reverb - Watch the Sound With Mark Ronson (Season 1, Episode 3) - Apple TV+
  • Longest Reverb In the World - Inchindown - YouTube
  • Karplus–Strong string synthesis - Wikipedia
  • Physical modeling synthesis - Wikipedia
  • pedalboard: 🎛 🔊 A Python library for audio - Spotify
  • Poetry - Python dependency management and packaging made easy
  • Dependency Management With Python Poetry – Real Python
  • YAML: The Missing Battery in Python – Real Python
  • Guitar Tabs with Rhythm - Songsterr
  • It Starts with Food - The Whole30® Program
  • Bartosz Zaczyński - LinkedIn

Level up your Python skills with our expert-led courses:

  • Simulating Real-World Processes in Python With SimPy
  • Python Histogram Plotting: NumPy, Matplotlib, Pandas & Seaborn
  • Playing and Recording Sound in Python

Support the podcast & join our community of Pythonistas

View Details

What are the built-in Python modules that can work as useful command-line tools? How can these tools add more functionality to Windows machines? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher shares an article by Trey Hunner about Python’s extensive collection of command-line utilities? The piece digs into general-purpose tools that format JSON data or start a simple web server and additional utilities for working with your Python code from the terminal.

We cover a set of Jupyter Notebooks for teaching and learning the art of music processing and Music Information Retrieval (MIR). The notebooks are resources for working through the textbook, “Fundamentals of Music Processing: Audio, Analysis, Algorithms, Applications.”

We also share several other articles and projects from the Python community, including a news roundup, a discussion of CRUD operations, a description of Python’s built-in bytes sequence, favorite essays on development and programming, Python resources for working with Excel, and a project for creating finite state machines in Python.

This episode is sponsored by APILayer.

Course Spotlight: Binary, Bytes, and Bitwise Operators in Python

In this course, you’ll learn how to use Python’s bitwise operators to manipulate individual bits of data at the most granular level. With the help of hands-on examples, you’ll see how you can apply bitmasks and overload bitwise operators to control binary data in your code.

Topics:

  • 00:00:00 – Introduction
  • 00:02:21 – Python 3.12.4 Released
  • 00:02:52 – Python 3.13.0 Beta 2 Released
  • 00:03:01 – PEP 712 Rejected
  • 00:04:18 – Django in Action - Mr. Trudeau’s Book has Launched!
  • 00:06:23 – What Are CRUD Operations?
  • 00:10:12 – Python’s Many Command-Line Utilities
  • 00:14:04 – Sponsor: APILayer
  • 00:14:55 – Notebooks for Fundamentals of Music Processing
  • 00:22:55 – bytes: The Lesser-Known Python Built-in Sequence
  • 00:26:57 – Video Course Spotlight
  • 00:28:34 – Essays on Programming I Think About a Lot
  • 00:41:28 – Python Resources for Working With Excel
  • 00:46:13 – Python Finite State Machines Made Easy
  • 00:50:10 – Thanks and goodbye

News:

  • Python 3.12.4 Released – See the full list of changes in this release
  • Python 3.13.0 Beta 2 Released
  • PEP 712 Rejected – This Python Enhancement Proposal “Adding a ‘converter’ parameter to dataclasses.field” was determined to have an insufficient number of use cases.
  • Django in Action

Show Links:

  • What Are CRUD Operations? – CRUD operations are the cornerstone of application functionality. Whether you access a database or interact with a REST API, you usually want to create, retrieve, update, and delete data. In this tutorial, you’ll explore how CRUD operations work in practice.
  • Python’s Many Command-Line Utilities – This article describes every command-line tool included with Python, each of which can be run with python -m module_name.
  • Notebooks for Fundamentals of Music Processing – This is a collection of Python Notebooks for teaching and learning the fundamentals of music processing. Examples include illustrations, sound samples, math, and more.
  • bytes: The Lesser-Known Python Built-in Sequence – The bytes data type looks a bit like a string, but it isn’t a string. This article explores it and also looks at the main Unicode encoding, UTF-8

Discussion:

  • Essays on Programming I Think About a Lot – A collection of essays on software from a variety of sources. Content includes how to choose your tech stack, products, abstractions, and more.
  • Falsehoods programmers believe about time - Infinite Undo
  • Falsehoods programmers believe about email
  • Falsehoods programmers believe about geography – Thias の blog
  • awesome-falsehood: 😱 Falsehoods Programmers Believe In

Projects:

  • Python Resources for Working With Excel
  • Python Finite State Machines Made Easy

Additional Links:

  • SQLite and SQLAlchemy in Python: Move Your Data Beyond Flat Files – Real Python
  • Unicode in Python: Working With Character Encodings – Real Python
  • Fundamentals of Music Processing - Editions of the Book
  • Editing Excel Spreadsheets in Python With openpyxl – Real Python
  • My thoughts on Python in Excel
  • The Microsoft Excel superstars throw down in Vegas

Level up your Python skills with our expert-led courses:

  • Playing and Recording Sound in Python
  • Binary, Bytes, and Bitwise Operators in Python
  • Unicode in Python: Working With Character Encodings

Support the podcast & join our community of Pythonistas

View Details

How do you find the most interesting or suspicious points within your data? What libraries and techniques can you use to detect these anomalies with Python? This week on the show, we speak with author Brett Kennedy about his book “Outlier Detection in Python.”

Brett describes initially getting involved with detecting outliers in financial data. He discusses various applications and techniques in security, manufacturing, quality assurance, and fraud. We also dig into the concept of explainable AI and the differences between supervised and unsupervised learning.

This episode is sponsored by APILayer.

Course Spotlight: Using k-Nearest Neighbors (kNN) in Python

In this video course, you’ll learn all about the k-nearest neighbors (kNN) algorithm in Python, including how to implement kNN from scratch. Once you understand how kNN works, you’ll use scikit-learn to facilitate your coding process.

Topics:

  • 00:00:00 – Introduction
  • 00:01:56 – Describing the book
  • 00:03:22 – How did you get involved in outlier detection?
  • 00:06:50 – Initially looking at the data to spot errors
  • 00:08:22 – Amount of fraud and financial errors
  • 00:09:50 – Understanding the nature of the outliers
  • 00:12:15 – Industries that would be interested in detection
  • 00:18:21 – Sponsor: APILayer.com
  • 00:19:15 – Who is the intended audience for the book?
  • 00:22:16 – Differences between supervised vs unsupervised learning
  • 00:25:48 – Autonomous vehicles detecting anomalous imagery
  • 00:29:08 – What is explainable AI?
  • 00:36:21 – Video Course Spotlight
  • 00:37:43 – Detecting an outlier across multiple columns
  • 00:44:32 – Detection of LLM and bot activity
  • 00:49:49 – Proving you are a human checkbox
  • 00:52:25 – What are Python libraries for outlier detection?
  • 00:53:57 – Creating synthetic data to work through examples
  • 00:57:10 – Tools developed and described in the book
  • 01:01:29 – How to find the book
  • 01:02:27 – What are you excited about in the world of Python?
  • 01:04:55 – What do you want to learn next?
  • 01:05:52 – How can people follow your work online?
  • 01:06:16 – Thanks and goodbye

Show Links:

  • Outlier Detection in Python
  • Episode #169: Improving Classification Models With XGBoost – The Real Python Podcast
  • XGBoost Documentation — xgboost 1.7.6 documentation
  • SHAP (SHapley Additive exPlanations) Documentation
  • I’m a teacher and this is the simple way I can tell if students have used AI to cheat in their essays - Daily Mail Online
  • pyod: A Comprehensive and Scalable Python Library for Outlier Detection (Anomaly Detection)
  • DeepOD: Deep learning-based outlier/anomaly detection
  • scikit-learn: machine learning in Python — scikit-learn 1.5.0 documentation
  • DataConsistencyChecker: A Python tool to examine datasets for consistency
  • Brett Kennedy - LinkedIn
  • Brett-Kennedy - GitHub

Level up your Python skills with our expert-led courses:

  • Data Cleaning With pandas and NumPy
  • Using k-Nearest Neighbors (kNN) in Python
  • Starting With Linear Regression in Python

Support the podcast & join our community of Pythonistas

View Details

How do you effectively break a software problem into individual steps? What are signs you’re writing overly clever code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss an article about de-warping images of book pages. We both found the piece a good study on decomposing a complex software problem.

Christopher discusses an article titled “Clever code is probably the worst code you could write.” Early in a programming career, it’s easier to write complex and difficult-to-read code. The real challenge is progressing towards writing clearer and readable code.

We also share several other articles and projects from the Python community, including a news roundup, what the __pycache__ folder is for in Python, what’s new in Django 5.1, a discussion about software engineering hiring and firing, a project for setting up repeated tasks, and a simple way to create reusable template components in Django.

This episode is sponsored by Sentry.

Course Spotlight: Efficient Iterations With Python Iterators and Iterables

In this video course, you’ll learn what iterators and iterables are in Python. You’ll learn how they differ and when to use them in your code. You’ll also learn how to create your own iterators and iterables to make data processing more efficient.

Topics:

  • 00:00:00 – Introduction
  • 00:02:18 – PEP 667: Consistent Views of Namespaces (Accepted)
  • 00:03:08 – PEP 649 Re-targeted to 3.14
  • 00:03:50 – Untold Stories From 6 Years Working on Python Packaging
  • 00:04:38 – What Is the __pycache__ Folder in Python?
  • 00:09:57 – Sponsor: Sentry
  • 00:11:04 – What’s New in Django 5.1
  • 00:17:48 – Page Dewarping
  • 00:26:55 – Video Course Spotlight
  • 00:28:26 – Clever Code Is Probably the Worst Code You Could Write
  • 00:33:19 – Software Engineering Hiring and Firing
  • 00:51:22 – Metronomes: An Easy Way to Set Up Regular Tasks
  • 00:52:26 – django-web-components: Create reusable template components in Django
  • 00:54:03 – Thanks and goodbye

News:

  • PEP 667: Consistent Views of Namespaces (Accepted)
  • PEP 649 Re-targeted to 3.14 – Python Enhancement Proposal 649: Deferred Evaluation Of Annotations Using Descriptors has been re-targeted to the Python 3.14 release
  • Untold Stories From 6 Years Working on Python Packaging – Sumana gave the closing keynote address at PyCon US this year and this posting shares all the links and references from the talk.

Show Links:

  • What Is the __pycache__ Folder in Python? – In this tutorial, you’ll explore Python’s __pycache__ folder. You’ll learn about when and why the interpreter creates these folders, and you’ll customize their default behavior. Finally, you’ll take a look under the hood of the cached .pyc files.
  • What’s New in Django 5.1 – Django 5.1 has gone alpha so the list of features targeting this release has more or less solidified. This article introduces you to what is coming in Django 5.1.
  • Page Dewarping – This article shows the techniques behind a page flattening algorithm. It starts with images of a book’s page which are curled from the spine of the book, and creates a resulting PDF that is a flat version.
  • Clever Code Is Probably the Worst Code You Could Write – When you come across a clever bit of code, it is hard not to admire it, but often times, clear, readable code is the hardest code to write.

Discussion:

  • Software Engineering Hiring and Firing – This article is a deep dive on the hiring and firing practices in the software field, and unlike most articles focuses on senior engineering roles. It isn’t a “first job” post, but a “how the decision process works” article.

Projects:

  • Metronomes: An Easy Way to Set Up Regular Tasks
  • django-web-components: A simple way to create reusable template components in Django

Level up your Python skills with our expert-led courses:

  • Get Started With Django: Build a Portfolio App
  • Efficient Iterations With Python Iterators and Iterables
  • For Loops in Python (Definite Iteration)

Support the podcast & join our community of Pythonistas

View Details

How do you start adding unit tests to your Python code? Can the built-in unittest framework cover most or all of your needs? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We dig into a recent tutorial by Leodanis Pozo Ramos about writing unit tests using Python’s unittest. The tutorial covers organizing your tests, exploring assert methods, creating test fixtures, and debugging failing tests.

We explore a collection of Python data visualizations and tutorials from the Python Graph Gallery. The website features hundreds of charts and graphs built using popular plotting libraries. Each chart type features a foundational tutorial that introduces the structure and application.

We also share several other articles and projects from the Python community, including a news roundup, the new REPL coming in Python 3.13, a pytest daemon to 10X test iteration speed, a discussion about software friction, a Raspberry Pi document scanner, and a project for controlling time per iteration loop.

Course Spotlight: Building a Python GUI Application With Tkinter

In this video course, you’ll learn the basics of GUI programming with Tkinter, the de facto Python GUI framework. Master GUI programming concepts such as widgets, geometry managers, and event handlers. Then, put it all together by building two applications: a temperature converter and a text editor.

Topics:

  • 00:00:00 - Introduction
  • 00:02:08 - Python Software Foundation Board Election Dates for 2024
  • 00:02:35 - 2023 PSF Annual Impact Report
  • 00:03:03 - Python’s unittest: Writing Unit Tests for Your Code
  • 00:09:41 - What’s New in Python 3.13
  • 00:10:38 - The New REPL in Python 3.13
  • 00:13:39 - Best Python Chart Examples
  • 00:15:27 - Animation with text that highlights important events
  • 00:16:39 - Sankey Diagram with Python and Plotly
  • 00:18:55 - Video Course Spotlight
  • 00:20:25 - Pytest Daemon: 10X Local Test Iteration Speed
  • 00:23:58 - Software Friction
  • 00:35:41 - A Raspberry Pi Document Scanner
  • 00:39:00 - pacemaker: For Controlling Time Per Iteration Loop in Python
  • 00:41:55 - Thanks and goodbye

News:

  • Python Software Foundation Board Election Dates for 2024
  • 2023 PSF Annual Impact Report

Show Links:

  • Python’s unittest: Writing Unit Tests for Your Code – In this tutorial, you’ll learn how to use the unittest framework to create unit tests for your Python code. Along the way, you’ll also learn how to create test cases, fixtures, test suites, and more.
  • What’s New in Python 3.13 – Python 3.13 has gone into beta, which means the feature freeze is now in place. This is the official listing of the new features in 3.13. This release includes changes to the REPL, new typing features, experimental support for disabling the GIL, dead battery removal, and more.
  • The New REPL in Python 3.13 – Python 3.13 just hit feature freeze with the first beta release, and it includes a host of improvements to the REPL. Automatic indenting, block-level editing, and more make the built-in REPL more powerful and easier to use.
  • Best Python Chart Examples
  • Animation with text that highlights important events - Python Graph Gallery
  • Sankey Diagram with Python and Plotly - Python Graph Gallery
  • Pytest Daemon: 10X Local Test Iteration Speed – Discord has a large Python monolith with lots of imports, which now takes 13 seconds to start up. On the server that’s not a problem but to run a test it is. Ruby’s solution is to have a daemon that hot loads a test on a process that already has the imports completed.

Discussion:

  • Software Friction – Friction is everywhere in software development. Two setbacks are more than twice as bad as one setback. This article discusses the sources of software friction and what you can do about it.

Projects:

  • A Raspberry Pi Document Scanner
  • pacemaker: For Controlling Time Per Iteration Loop in Python

Additional Links:

  • unittest — Unit testing framework — Python 3.12.3 documentation
  • Testing with Python (part 1): the basics - Bite code!
  • Sankey Diagrams – A Sankey diagram says more than 1000 pie charts
  • tidytuesday: Official repo for the #tidytuesday project
  • tidytuesday - dataset_announcements
  • Chaos Monkey
  • OpenCV: OpenCV modules
  • How to Train Your Robot

Level up your Python skills with our expert-led courses:

  • Building a Python GUI Application With Tkinter
  • Testing Your Code With pytest
  • Creating PyQt Layouts for GUI Applications

Support the podcast & join our community of Pythonistas

View Details

What’s it like to learn Python as a visually impaired or blind developer? How can you improve the accessibility of your Python web applications and learn current guidelines? This week on the show, Real Python community member Audrey van Breederode discusses her programming journey, web accessibility, and assistive technology.

Audrey shares her background as a system administrator and instructor. While she was learning Python, she discovered Real Python. Audrey provided some feedback about the built-in video player’s accessibility. Dan reached out and worked with Audrey on some website improvements for the visually impaired.

We discuss navigating modern websites and using assistive technology. Audrey also provides resources Python developers can use to improve the accessibility of their applications.

Course Spotlight: HTML and CSS Foundations for Python Developers

There’s no way around HTML and CSS when you want to build web apps. Even if you’re not aiming to become a web developer, knowing the basics of HTML and CSS will help you understand the Web better. In this video course, you’ll get an introduction to HTML and CSS for Python programmers.

Topics:

  • 00:00:00 – Introduction
  • 00:03:12 – Work background
  • 00:08:30 – Language for assistive tools and programming
  • 00:10:30 – What led you to learning Python?
  • 00:13:48 – Screen readers, braille display, and white space
  • 00:17:22 – Discovering Real Python
  • 00:22:41 – Accessibility survey and navigating websites
  • 00:30:04 – Digging deeper into learning Python
  • 00:35:42 – Video Course Spotlight
  • 00:37:03 – Navigating changes in code
  • 00:39:53 – Working with the terminal
  • 00:42:14 – Accessibility of Python GUI libraries
  • 00:44:22 – Django framework
  • 00:47:11 – Screen readers and JAWS
  • 00:53:19 – What are you excited about in the world of assistive technology?
  • 00:57:03 – What are you excited about in the world of Python?
  • 00:59:11 – What do you want to learn next?
  • 01:00:09 – Thanks and goodbye

Show Links:

  • JAWS® – Freedom Scientific
  • What is JAWS? - YouTube
  • Retinal detachment - Wikipedia
  • Focus 80 Blue 5th Gen – Freedom Scientific
  • WebAIM: Screen Reader User Survey #10 Results
  • Web Content Accessibility Guidelines (WCAG) 2.2
  • SecureCRT - The rock-solid Telnet and SSH client for Windows, macOS, and Linux
  • P1 Monitor docker container for smart meters - Marcel Claassen
  • Python Basics: Introduction to Python (Learning Path) – Real Python
  • The web framework for perfectionists with deadlines - Django
  • Surf’s Up! Surfing the Internet with JAWS
  • NV Access - Download NVDA
  • Picture Smart Challenges – Freedom Scientific

Level up your Python skills with our expert-led courses:

  • Get Started With Django: Build a Portfolio App
  • Python Basics: Dictionaries
  • HTML and CSS Foundations for Python Developers

Support the podcast & join our community of Pythonistas

View Details

Would you like to get more practice working with APIs in Python? How about exploring the globe using the data from OpenStreetMap? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We share an article from the Pybites blog about building queries using the Overpass API for OpenStreetMap. The post explores the data structures, tags, query formats, and how to use Overpass in Python.

Christopher discusses a Real Python article by recent guest Stephen Gruppetta about lazy evaluation in Python. The piece covers the advantages of generator expressions or functions and the potential disadvantages of using lazy versus eager evaluation methods.

We also share several other articles and projects from the Python community, including a news roundup, handling control-c in asyncio, preventing data leakage in pandas and scikit-learn, discussing the Django developer survey results, asking developers why they aren’t shipping faster, using UV to install into isolated environments, and a couple of tools for retrying in Python.

This episode is sponsored by Sentry.

Course Spotlight: How to Set Up a Django Project

In this course, you’ll learn the necessary steps that you’ll need to take to set up a new Django project. You’ll learn the basic setup for any new Django project, which needs to happen before programming the specific functionality of your project.

Topics:

  • 00:00:00 – Introduction
  • 00:02:33 – PyPy v7.3.16 Release
  • 00:02:54 – PEP 745: Python 3.14 Release Schedule
  • 00:03:31 – The BASIC programming language turns 60
  • 00:05:24 – Asyncio Handle Control-C (SIGINT)
  • 00:07:37 – OpenStreetMaps, Overpass API and Python
  • 00:11:53 – What’s Lazy Evaluation in Python?
  • 00:16:10 – Sponsor: Sentry
  • 00:17:17 – How to Prevent Data Leakage in pandas & scikit-learn
  • 00:24:09 – Django Developers Survey 2023 Results
  • 00:33:07 – Video Course Spotlight
  • 00:34:21 – I Asked 100 Devs Why They Aren’t Shipping Faster?
  • 00:47:03 – pipxu: Install in Isolated Environments Using UV
  • 00:49:05 – tenacity: Retrying Library for Python
  • 00:50:04 – stamina: Production-Grade Retries for Python
  • 00:52:00 – Thanks and goodbye

News:

  • PyPy v7.3.16 Release
  • PEP 745: Python 3.14 Release Schedule
  • The BASIC programming language turns 60 - Ars Technica

Show Links:

  • Asyncio Handle Control-C (SIGINT) – When the user presses CTRL-C on the keyboard, the OS raises an interrupt signal to your program. When writing concurrent code this can get complicated as the signal goes to the process. This article shows you how to handle capturing CTRL-C elegantly when using asyncio.
  • OpenStreetMaps, Overpass API and Python – OpenStreetMaps (OSM) is an open source mapping project that allows people to browse the world map and to plan routes. Not only does it have the expected web interface, but it also has an API known as Overpass. This article shows you two ways to use Python to query Overpass.
  • What’s Lazy Evaluation in Python? – This tutorial explores lazy evaluation in Python and looks at the advantages and disadvantages of using lazy and eager evaluation methods. By the end of this tutorial, you’ll clearly understand which approach is best for you, depending on your needs.
  • How to Prevent Data Leakage in pandas & scikit-learn – How you impute missing values in machine learning data sets can affect the quality of your training. This article teaches you what data leakage is and what steps you should take to avoid it.

Discussion

  • Django Developers Survey 2023 Results
  • I Asked 100 Devs Why They Aren’t Shipping Faster? – Daksh asked 100 developers why they aren’t shipping faster and this blog post shares what he learned. Problems include dependency bugs, overly complicated code bases, waiting on requirements, and more.

Projects:

  • pipxu: Install in Isolated Environments Using UV
  • tenacity: Retrying Library for Python
  • stamina: Production-Grade Retries for Python

Additional Links:

  • NASA’s Voyager 1 spacecraft finally phones home after 5 months of no contact - Space
  • Python & APIs: A Winning Combo for Reading Public Data – Real Python
  • Loading Data from OpenStreetMap with Python and the Overpass API - Nikolai Janakiev
  • Leakage (machine learning) - Wikipedia
  • Djangonaut Space - Where Contributors launch!
  • Debris That Fell Off a Boeing 767 Found Outside the House of Lawyer

Level up your Python skills with our expert-led courses:

  • Get Started With Django: Build a Portfolio App
  • Python Generators 101
  • How to Set Up a Django Project

Support the podcast & join our community of Pythonistas

View Details

Do you get stressed while trying to learn Python? Do you prefer to build small programs or projects as you continue your coding journey? This week on the show, Real Python author Stephen Gruppetta is here to talk about his new book, “The Python Coding Book.”

Stephen has been teaching Python to adults and children for many years. With his new book, he wants to share the relaxed and friendly learning environment he’s developed. We discuss using analogies to explain programming concepts and constructing complete programs as chapter goals.

Over the last year, Stephen focused on writing. He started his newsletter, The Python Coding Stack, wrote more tutorials for Real Python and authored the book.

This episode is sponsored by Mailtrap.

Course Spotlight: Python Basics: Code Your First Python Program

In this video course, you’ll write your first Python program. Along the way, you’ll learn about errors, declare variables and inspect their values, and try your hand at writing comments.

Topics:

  • 00:00:00 – Introduction
  • 00:02:32 – Education and programming background
  • 00:05:50 – Developing a teaching style
  • 00:10:36 – A friendly and relaxed programming book
  • 00:14:31 – Making mistakes
  • 00:18:29 – Sponsor: Mailtrap
  • 00:19:03 – What was your curation process like?
  • 00:21:22 – First chapter building an actual program
  • 00:25:08 – Glossary terms and exercises
  • 00:27:48 – Why feature an IDE?
  • 00:34:07 – Monty and the White Room analogy
  • 00:37:46 – What, no turtle?
  • 00:42:21 – Video Course Spotlight
  • 00:44:00 – Shift toward teaching
  • 00:46:50 – Teaching adults and children
  • 00:51:23 – Python sequences tutorial
  • 00:53:48 – Building community and social media
  • 00:58:12 – What are you excited about in the world of Python?
  • 01:00:49 – What do you want to learn next?
  • 01:03:07 – Thanks and goodbye

Show Links:

  • Learn Python Coding - The Python Coding Book
  • Rambling Reflections - Twelve Months of The Python Coding Stack
  • On Writing: A Memoir of the Craft - Stephen King - Wikipedia
  • Episode #4: Learning Python Through Errors – The Real Python Podcast
  • Build a Python Turtle Game: Space Invaders Clone – Real Python
  • Python Sequences: A Comprehensive Guide – Real Python
  • Django in Action
  • The Python Coding Place – The Place to Learn Python
  • Stephen Gruppetta (@s_gruppetta_ct) / X

Level up your Python skills with our expert-led courses:

  • Python Basics: Setting Up Python
  • Python Turtle for Beginners
  • Python Basics: Code Your First Python Program

Support the podcast & join our community of Pythonistas

View Details

How do you verify and validate the data coming into your Python web application? What tools and security best practices should you consider as a developer? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss the recent Real Python tutorial “Pydantic: Simplifying Data Validation in Python.” The piece covers installing the library with optional dependencies, working with base models, validating functions, and managing environment variables.

We continue our conversation about web development with another article about Python security best practices. This article covers several Python libraries and crucial steps you can take to help make your web-based applications more secure.

We also share several other articles and projects from the Python community, including a news roundup, why Python lists multiply oddly, inline run dependencies in pipx, a discussion about open-source contribution assignments, playing sounds in Python, and a Python library to access ISO country definitions.

This episode is sponsored by Mailtrap.

Course Spotlight: Using raise for Effective Exceptions

In this video course, you’ll learn how to raise exceptions in Python, which will improve your ability to efficiently handle errors and exceptional situations in your code. This way, you’ll write more reliable, robust, and maintainable code.

Topics:

  • 00:00:00 – Introduction
  • 00:02:40 – Python 3.12.3, Python 3.11.9, and 3.13.0a6 Released
  • 00:03:43 – Django Bugfix Release Issued: 5.0.4
  • 00:04:48 – PEP 738 Accepted: Adding Android as a Supported Platform
  • 00:05:53 – EuroPython Tickets on Sale: Prague/Remote July 8-14
  • 00:06:38 – PyCon Portugal 2024
  • 00:07:17 – Pydantic: Simplifying Data Validation in Python
  • 00:15:24 – Sponsor: Mailtrap
  • 00:15:58 – Why Do Python Lists Multiply Oddly?
  • 00:22:21 – Best Python Security Practices for Web Developers
  • 00:34:13 – Video Course Spotlight
  • 00:35:38 – Inline Run Dependencies in pipx 1.4.2
  • 00:40:16 – So Your Teacher Wants You to Do Open Source
  • 00:54:49 – nava: Play Sounds in Python
  • 00:56:25 – pycountry: A Python library to access ISO country definitions
  • 00:58:18 – Thanks and goodbye

News:

  • Python 3.12.3 and 3.13.0a6 Released
  • Python 3.11.9 Released
  • Django Bugfix Release Issued: 5.0.4
  • PEP 738 Accepted: Adding Android as a Supported Platform
  • PEP 742 Accepted: Narrowing Types With TypeIs
  • EuroPython Tickets on Sale: Prague/Remote July 8-14
  • PyCon Portugal 2024

Show Links:

  • Pydantic: Simplifying Data Validation in Python – Discover the power of Pydantic, Python’s most popular data parsing, validation, and serialization library. In this hands-on tutorial, you’ll learn how to make your code more robust, trustworthy, and easier to debug with Pydantic.
  • Why Do Python Lists Multiply Oddly? – In Python you can use the multiplication operator on sequences to return a repeated version of the value. When you do this with a list containing an empty list you get what might be unexpected behavior. This article explains what happens and why.
  • Best Python Security Practices for Web Developers – Coding on the web means you have to be more security conscious as everyone has access to your software. This article discusses key steps you can take to help make your code more secure.
  • Inline Run Dependencies in pipx 1.4.2 – PEP 723 adds the ability to specify dependencies within a Python script itself. The folks who write pipx have added an experimental feature that takes advantage of this future language change. This article shows you how the new feature looks and what pipx does with it.
  • Install and Execute Python Applications Using pipx – In this tutorial, you’ll learn about a tool called pipx, which lets you conveniently install and run Python packages as standalone command-line applications in isolated environments. In a way, pipx turns the Python Package Index (PyPI) into an app marketplace for Python programmers.

Discussion:

  • So Your Teacher Wants You to Do Open Source – Sometimes teachers or mentors ask students to contribute to an open source project, without the context of what that entails. This opinion piece covers just how much noise that causes for the projects and why you shouldn’t do it unless you truly mean to contribute.
  • 503 Days Working Full-Time on FOSS: Lessons Learned – For a year and a half, Rodrigo worked at Textualize the company behind the popular open source Python projects Rich and Textual. This blog post talks about what he learned while he was there.

Projects:

  • nava: Play Sounds in Python
  • pycountry: A Python library to access ISO country, subdivision, language, currency and script definitions and their translations

Additional Links:

  • Pydantic
  • François Fleuret on X: “2h of debugging. Whatever you say, that’s counter intuitive.”
  • bandit: Security oriented static analyzer for Python code - PyPI
  • Dependency Management With Python Poetry – Real Python
  • OWASP Top Ten - OWASP Foundation
  • pipx
  • Governance - The Pallets Projects
  • Textual
  • How to Contribute to Open Source - Open Source Guides
  • Djangonaut Space - Where contributors launch!

Level up your Python skills with our expert-led courses:

  • Lists and Tuples in Python
  • Using raise for Effective Exceptions
  • Sorting Data in Python With pandas

Support the podcast & join our community of Pythonistas

View Details

What are the benefits of using a decoupled data processing system? How do you write reusable queries for a variety of backend data platforms? This week on the show, Phillip Cloud, the lead maintainer of Ibis, will discuss this portable Python dataframe library.

Phillip contrasts Ibis’s workflow with other Python dataframe libraries. We discuss how “getting close to the data” speeds things up and conserves memory.

He describes the different approaches Ibis provides for querying data and how to select a specific backend. We discuss ways to get started with the library and how to access example data sets to experiment with the platform.

Phillip discovered Ibis while looking for a tool that allowed him to reuse SQL queries written for a specific data platform on a different one. He recounts how he got involved with the Ibis project, sharing his background in open source and learning how to contribute to a first project.

This episode is sponsored by Mailtrap.

Course Spotlight: Creating Web Maps From Your Data With Python Folium

You’ll learn how to create web maps from data using Folium. The package combines Python’s data-wrangling strengths with the data-visualization power of the JavaScript library Leaflet. In this video course, you’ll create and style a choropleth world map showing the ecological footprint per country.

Topics:

  • 00:00:00 – Introduction
  • 00:02:18 – How did you get started with Ibis?
  • 00:08:10 – First contribution to open source
  • 00:13:46 – Comparing Ibis to other dataframe libraries
  • 00:20:09 – Sponsor: Mailtrap
  • 00:20:43 – What goes into the selection of backend?
  • 00:27:07 – Database connections vs SQL compilers
  • 00:30:03 – Raw SQL approach
  • 00:34:06 – Dataframe approach
  • 00:38:31 – What does “getting close to the data” mean?
  • 00:41:52 – Video Course Spotlight
  • 00:43:24 – Phillip in the cloud - YouTube channel
  • 00:44:56 – Access to sample data sets
  • 00:50:11 – Additional resources
  • 00:52:50 – What are some of the backends Ibis supports?
  • 00:54:13 – Entry points to the platform
  • 00:55:00 – How are you supported?
  • 00:57:10 – Exporting a SQL query
  • 00:59:23 – What are you excited about in the world of Python?
  • 01:04:28 – What do you want to learn next?
  • 01:07:12 – How can people follow your work online?
  • 01:08:00 – Thanks and goodbye

Show Links:

  • Ibis - the portable Python dataframe library
  • The Leading Designer and Builder of Enterprise Data Systems - Voltron Data
  • PEP 249 – Python Database API Specification v2.0
  • sqlglot: Python SQL Parser and Transpiler - GitHub
  • Ibis – getting_started
  • ibis-examples: A repository of runnable examples using ibis
  • Ibis – Reference Documentation
  • PyScript - Run Python in your HTML
  • pixi - Prefix.dev
  • uv: An extremely fast Python package installer and resolver, written in Rust
  • PyCon US 2024
  • LearnCraft Spanish – Fluency for Serious Learners
  • ibis: the portable Python dataframe library - GitHub
  • Ibis – Blog Posts
  • Phillip in the Cloud - YouTube
  • Phillip Cloud (@cpcloudy) / X
  • cpcloud (Phillip Cloud) · GitHub

Level up your Python skills with our expert-led courses:

  • Building Python Project Documentation With MkDocs
  • Creating Web Maps From Your Data With Python Folium
  • Using raise for Effective Exceptions

Support the podcast & join our community of Pythonistas

View Details

What is error culture, and how do you avoid it within your organization? How do you navigate alert and notification fatigue? Hey, it’s episode #200! Real Python’s editor-in-chief, Dan Bader, joins us this week to celebrate. Christopher Trudeau also returns to bring another batch of PyCoder’s Weekly articles and projects.

We discuss an article series about error culture. We dig into false positives, hero culture, and the tendency to start ignoring alerts. We contrast our personal experiences and propose possible remedies. Dan describes configuring Real Python’s alert system.

We also share several other articles and projects from the Python community, including a news roundup, reading and writing WAV files in Python, moving beyond flat files toward SQLite and SQLAlchemy, getting help in Python, exploring four kinds of optimization, a framework for building web scrapers, and a project to simply subprocesses.

This week’s episode is brought to you by Sentry.

Course Spotlight: SQLite and SQLAlchemy in Python: Move Your Data Beyond Flat Files

In this video course, you’ll learn how to store and retrieve data using Python, SQLite, and SQLAlchemy as well as with flat files. Using SQLite with Python brings with it the additional benefit of accessing data with SQL. By adding SQLAlchemy, you can work with data in terms of objects and methods.

Topics:

  • 00:00:00 – Introduction
  • 00:02:42 – PyPI Hiring a Support Specialist
  • 00:03:19 – PyPI Temporarily Halted New Users and Projects
  • 00:04:14 – What we know about the xz Utils backdoor
  • 00:05:38 – CPython, PyPI, and the backdoor of xz
  • 00:07:18 – Episode 200 appreciation and the journey
  • 00:09:18 – A visit from Dan
  • 00:14:14 – Reading and Writing WAV Files in Python
  • 00:19:56 – Sponsor: Sentry
  • 00:21:03 – SQLite and SQLAlchemy in Python
  • 00:27:36 – Getting Help (In Python)
  • 00:32:49 – Laurence Tratt: Four Kinds of Optimization
  • 00:40:54 – Video Course Spotlight
  • 00:42:26 – Discussion: Error Culture
  • 00:58:03 – botasaurus: The All in One Framework to Build Awesome Scrapers
  • 01:01:04 – suby: Slightly Simplified Subprocesses
  • 01:02:50 – Thanks and goodbye

News:

  • PyPI Hiring a Support Specialist (Remote)
  • PyPI Temporarily Halted New Users and Projects – To fend off a supply-chain attack, PyPI temporarily halted new users and projects for about 10 hours last week. This article discusses why, and the scourge of supply-chain attacks.
  • What we know about the xz Utils backdoor that almost infected the world - Ars Technica
  • CPython, PyPI, and many Python packages are not affected by the backdoor of xz - Core Development - Discussions on Python.org

Topics:

  • Reading and Writing WAV Files in Python – In this tutorial, you’ll learn how to work with WAV audio files in Python using the standard-library wave module. Along the way, you’ll synthesize sounds from scratch, visualize waveforms in the time domain, animate real-time spectrograms, and apply special effects to widen the stereo field.
  • SQLite and SQLAlchemy in Python: Beyond Flat Files – In this video course, you’ll learn how to store and retrieve data using Python, SQLite, and SQLAlchemy as well as with flat files. Using SQLite with Python brings with it the additional benefit of accessing data with SQL. By adding SQLAlchemy, you can work with data in terms of objects and methods.
  • How SQLite Is Tested – The page describes how SQLite is rigorously tested using four test harnesses, fuzz testing, anomaly testing like crash and I/O error simulations, and other techniques to ensure reliability.
  • Getting Help (In Python) – When trying to remember just where sleep() was in the Python standard library, Ishaan stumbled through the built-in help and learned how to use it to answer just these kinds of questions.
  • Laurence Tratt: Four Kinds of Optimization – “Premature optimization might be the root of all evil, but overdue optimization is the root of all frustration. No matter how fast hardware becomes, we find it easy to write programs which run too slow.” Read on to learn what to do about it.

Discussion:

  • Error Culture
  • Error Culture Part II
  • Error Culture Part III

Projects:

  • botasaurus: The All in One Framework to Build Awesome Scrapers
  • suby: Slightly Simplified Subprocesses

Additional Links:

  • xkcd: Exploits of a Mom
  • How SQLite Is Tested
  • SettingWithCopyWarning in pandas: Views vs Copies – Real Python
  • 99% Invisible - Mini-Stories: Volume 4

Level up your Python skills with our expert-led courses:

  • Playing and Recording Sound in Python
  • Exploring Scopes and Closures in Python
  • SQLite and SQLAlchemy in Python: Move Your Data Beyond Flat Files

Support the podcast & join our community of Pythonistas

View Details

How do you customize a LLM chatbot to address a collection of documents and data? What tools and techniques can you use to build embeddings into a vector database? This week on the show, Calvin Hendryx-Parker is back to discuss developing an AI-powered, Large Language Model-driven chat interface.

Calvin is the co-founder and CTO of Six Feet Up, a Python and AI consultancy. He shares a recent project for a family-owned seed company that wanted to build a tool for customers to access years of farm research. These documents were stored as brochure-style PDFs and spanned 50 years.

We discuss several of the tools used to augment a LLM. Calvin covers working with LangChain and vectorizing data with ChromaDB. We talk about the obstacles and limitations of capturing documentation.

Calvin also shares a smaller project that you can try out yourself. It takes the information from a conference website and creates a chatbot using Django and Python prompt-toolkit.

This episode is sponsored by Mailtrap.

Course Spotlight: Command Line Interfaces in Python

Command line arguments are the key to converting your programs into useful and enticing tools that are ready to be used in the terminal of your operating system. In this course, you’ll learn their origins, standards, and basics, and how to implement them in your program.

Topics:

  • 00:00:00 – Introduction
  • 00:02:21 – Background on the project
  • 00:03:51 – Complexity of adding documents
  • 00:09:01 – Retrieval-augmented generation and providing links
  • 00:13:46 – Updating information and larger conversation context
  • 00:18:08 – Sponsor: Mailtrap
  • 00:18:43 – Working with context
  • 00:21:02 – Temperature adjustment
  • 00:22:07 – Rally Conference Chatbot Project
  • 00:26:20 – Vectorization using ChromaDB
  • 00:32:49 – Employing Python prompt-toolkit
  • 00:35:07 – Learning libraries on the fly
  • 00:37:38 – Video Course Spotlight
  • 00:39:00 – Problems with tables in documents
  • 00:42:30 – Everything looks like a chat box
  • 00:44:26 – Finding the right fit for a client and customer
  • 00:49:05 – What are questions you ask a new client now?
  • 00:51:54 – Canada Air anecdote
  • 00:56:20 – How do you stay up to date on these topics?
  • 01:01:03 – What are you excited about in the world of Python?
  • 01:03:22 – What do you want to learn next?
  • 01:04:58 – How can people follow your work online?
  • 01:05:31 – IndyPy
  • 01:07:13 – Thanks and goodbye

Show Links:

  • Transforming Agricultural Data with AI — Six Feet Up
  • Build ChatGPT-like Apps with AI — Six Feet Up
  • Innovate with AI: Build ChatGPT-like Apps - YouTube
  • What is retrieval-augmented generation? - IBM Research Blog
  • rally-llm-presentation - sixfeetup - GitHub
  • Python Prompt Toolkit 3.0 — Documentation
  • Chroma - the AI-native open-source embedding database
  • Embeddings and Vector Databases With ChromaDB – Real Python
  • LangChain
  • Build an LLM RAG Chatbot With LangChain – Real Python
  • Air Canada must pay after chatbot lies to grieving passenger - The Register
  • I’d Buy That for a Dollar: Chevy Dealership’s AI Chatbot Goes Rogue
  • Omnivore
  • TLDR AI - Get smarter about AI in 5 minutes
  • Tech Brew
  • Simon Willison’s Weblog
  • llm: Access large language models from the command-line - simonw - GitHub
  • PyCon US 2024
  • Syntorial: The Ultimate Synthesizer Tutorial
  • Blog — Six Feet Up
  • Calvin Hendryx-Parker - LinkedIn
  • Eclipse Insights: How AI is Transforming Solar Astronomy - YouTube

Level up your Python skills with our expert-led courses:

  • Sneaky REST APIs With Django Ninja
  • How to Work With a PDF in Python
  • Command Line Interfaces in Python

Support the podcast & join our community of Pythonistas

View Details

Can you build a Space Invaders clone using Python’s built-in turtle module? What advantages does the Seaborn data visualization library provide compared to Matplotlib? Christopher Trudeau is back on the show this week, along with special guest Real Python core team member Bartosz Zaczyński. We’re sharing another batch of PyCoder’s Weekly articles and projects.

Bartosz shares a Real Python step-by-step project for building a video game using the Python turtle module. The turtle module provides an interactive environment that lets users create pictures and shapes on a virtual canvas. The project takes you through game design concepts such as animating sprites, detecting a collision, and building a game loop.

We discuss another Real Python resource, “Visualizing Data in Python With Seaborn.” Seaborn is a significant next step if you’ve already been working with Matplotlib. It produces impressive visualizations and offers a functional or object-based approach to designing plots.

We also share several other articles and projects from the Python community, including a news roundup, finding Python Easter eggs, exploring whether Python has pointers, styling Excel cells with OpenPyXL, using weird tests to capture tacit knowledge, inspecting and running Django commands in a TUI, building reactive web UIs in Python, and a project for predictable Python datetimes.

This week’s episode is brought to you by Posit.

Course Spotlight: Python Turtle for Beginners

In this step-by-step course, you’ll learn the basics of Python programming with the help of a simple and interactive Python library called turtle. If you’re a beginner to Python, then this tutorial will definitely help you on your journey as you take your first steps into the world of programming.

Topics:

  • 00:00:00 – Introduction
  • 00:03:06 – Python 3.13.0 alpha 5 is now available
  • 00:03:38 – Allow disabling the GIL with flags
  • 00:04:17 – Django security releases issued: 5.0.3, 4.2.11, and 3.2.25
  • 00:04:32 – The Python Coding Book
  • 00:05:03 – Finding Python Easter Eggs – Code Conversation
  • 00:12:48 – Sponsor: Posit
  • 00:13:34 – Visualizing Data in Python With Seaborn
  • 00:18:18 – Does Python have pointers?
  • 00:21:43 – Build a Python Turtle Game: Space Invaders Clone
  • 00:30:42 – Video Course Spotlight
  • 00:32:04 – Styling Excel Cells with OpenPyXL and Python
  • 00:35:22 – Use weird tests to capture tacit knowledge
  • 00:37:09 – whenever: Strict, predictable, and typed datetimes
  • 00:42:25 – hyperdiv: Build Reactive Web UIs in Python
  • 00:46:19 – django-tui: Inspect and run Django Commands in a TUI
  • 00:48:40 – Thanks and goodbye

News:

  • Python Insider: Python 3.13.0 alpha 5 is now available
  • Allow disabling the GIL with Flags - cpython - GitHub
  • Django security releases issued: 5.0.3, 4.2.11, and 3.2.25 - Weblog - Django
  • The Python Coding Book – The Python Coding Place

Show Links:

  • Finding Python Easter Eggs – Code Conversation - Video Course – Python has its fair share of hidden surprises, commonly known as Easter eggs. From clever jokes to secret messages, these little mysteries are often meant to be discovered by curious developers like you!
  • Visualizing Data in Python With Seaborn – In this tutorial, you’ll learn how to use the Python seaborn library to produce statistical data analysis plots to allow you to better visualize your data. You’ll learn how to use both its traditional classic interface and more modern objects interface.
  • Does Python have pointers? - Ned Batchelder – Depending on how you’re using the term “pointer” changes the answer to the question. Read on to better understand the programming terminology and whether Python has pointers.
  • Build a Python Turtle Game: Space Invaders Clone – In this step-by-step tutorial, you’ll use Python’s turtle module to write a Space Invaders clone. You’ll learn about techniques used in animations and games, and consolidate your knowledge of key Python topics.
  • Styling Excel Cells with OpenPyXL and Python - Many Python libraries that deal with Excel only handle data, but OpenPyXL gives you the ability to style your cells in many different ways. Learn how to give your spreadsheets pizazz!
  • Use weird tests to capture tacit knowledge - Applied Cartography – Sometimes adding code in one place means configuration elsewhere also needs to be updated. One way of ensuring this is happening properly in a large project is to use unit tests. This post covers a few examples, complete with pytest code.

Projects:

  • whenever: ⏰ Strict, predictable, and typed datetimes
  • hyperdiv: Build Reactive Web UIs in Python
  • django-tui: Inspect and run Django Commands in a text-based user interface (TUI)

Additional Links:

  • What’s the Zen of Python? – Real Python
  • Using Python for Data Analysis – Real Python
  • The Beginner’s Guide to Python Turtle – Real Python
  • Roamer - The History of Turtle Robots
  • Tutorial — openpyxl 3.1.2 documentation
  • Ten Python datetime pitfalls, and what libraries are (not) doing about it - Arie Bovenberg
  • The science behind why people hate Daylight Saving Time so much - Ars Technica
  • Textual

Level up your Python skills with our expert-led courses:

  • Python Histogram Plotting: NumPy, Matplotlib, Pandas & Seaborn
  • Python Turtle for Beginners
  • Pointers and Objects in Python

Support the podcast & join our community of Pythonistas

View Details

How is Python being used to automate processes in the laboratory? How can it speed up scientific work with DNA sequencing? This week on the show, Chemical Engineering PhD Student Parsa Ghadermazi is here to discuss Python in bioinformatics.

Parsa provides background on his research and the bioinformatic techniques used to discover gut microbes’ role in human health and diseases. We talk about automating lab experiments with liquid handling robots and Python.

We dig into libraries to shatter and reassemble DNA sequences. Parsa also shares current projects from the Chan Lab at Colorado State University and his GitHub repository.

Course Spotlight: Building Python Project Documentation With MkDocs

In this video course, you’ll learn how to build professional documentation for a Python package using MkDocs and mkdocstrings. These tools allow you to generate nice-looking and modern documentation from Markdown files and, more importantly, from your code’s docstrings.

Topics:

  • 00:00:00 – Introduction
  • 00:01:51 – Engineering Background and Current PhD Program
  • 00:05:52 – What is Bioinformatics?
  • 00:08:11 – Where do you use Python in the lab?
  • 00:10:35 – Using lab robotics
  • 00:15:22 – Python development environment
  • 00:16:33 – Lab robotics allow for precision
  • 00:19:03 – How are using these tools for research?
  • 00:22:14 – What are the techniques for measurements?
  • 00:26:17 – Video Course Spotlight
  • 00:27:33 – How is the data output from the machine?
  • 00:29:20 – Moving into DNA sequencing and extraction
  • 00:32:08 – Shattering to work with smaller DNA sequences
  • 00:34:34 – Python libraries for DNA re-assembly
  • 00:36:28 – Building ADToolbox
  • 00:40:24 – How do you store the data?
  • 00:41:32 – Inferring microbial interactions
  • 00:44:02 – Types of hardware used for these projects
  • 00:47:07 – What are you excited about in the world of Python?
  • 00:48:09 – What do you want to learn next?
  • 00:49:16 – How can people follow your work online?
  • 00:50:00 – Thanks and goodbye

Show Links:

  • ParsaGhadermazi - GitHub
  • Bioinformatics - Wikipedia
  • Opentrons - Lab Automation - Lab Robots for Life Scientists
  • Tutorial — Opentrons Python API V2 Documentation
  • Serial Dilutions and Plating: Microbial Enumeration - Microbiology - JoVE
  • What is Chromatogram & How to Read a Chromatogram?
  • Episode #186: Exploring Python in Excel
  • megahit: Ultra-fast and memory-efficient (meta-)genome assembler
  • DRAM: Distilled and Refined Annotation of Metabolism - GitHub
  • humann: HUMAnN 3.0 - HMP Unified Metabolic Analysis Network
  • MetaPhlAn4 – The Huttenhower Lab
  • ADToolbox - Tools for modeling and optimizing the anaerobic digestion process
  • SPAM-DFBA - Algoritm for inferring microbial interactions
  • Microbial interactions from a new perspective - Bioinformatics - Oxford Academic
  • Alpine — Research Computing University of Colorado Boulder documentation
  • MkDocs
  • Build Your Python Project Documentation With MkDocs
  • scikit-bio
  • Episode #190: Great Starting Points for Contributing to Open Source
  • Chan Lab at Colorado State University - GitHub
  • ParsaGhadermazi - GitHub
  • Parsa Ghadermazi - LinkedIn

Level up your Python skills with our expert-led courses:

  • Building Python Project Documentation With MkDocs
  • Data Cleaning With pandas and NumPy
  • Reading and Writing CSV Files

Support the podcast & join our community of Pythonistas

View Details

What are the advantages of determining the type of an object by how it behaves? What coding circumstances are not a good fit for duck typing? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher covers a recent Real Python tutorial by Leodanis Pozo Ramos titled Duck Typing in Python: Writing Flexible and Decoupled Code. The tutorial explains the concepts of duck typing within object-oriented programming and its use within Python’s built-in tools.

We discuss a recent article on monkey patching in Python. This practice of dynamically modifying a class or module’s behavior at runtime allows for testing, debugging, and experimentation.

We also share several other articles and projects from the Python community, including a news roundup, why names are not the same as objects in Python, using IPython Jupyter magic commands, a discussion about becoming a senior developer, a data exploration challenge, a Python evaluation game, and a terminal UI for regex testing.

This week’s episode is brought to you by Sentry.

Course Spotlight: Pointers and Objects in Python

In this video course, you’ll learn about Python’s object model and see why pointers don’t really exist in Python. You’ll also cover ways to simulate pointers in Python without managing memory.

Topics:

  • 00:00:00 – Introduction
  • 00:02:38 – Listener feedback
  • 00:04:02 – DjangoCon US Call for Proposals
  • 00:04:38 – White House Recommends Use of Python
  • 00:05:41 – JupyterLab 4.1 and Notebook 7.1 Released
  • 00:06:05 – What’s in a Name?
  • 00:11:52 – Duck Typing in Python: Writing Flexible and Decoupled Code
  • 00:15:07 – Sponsor: Sentry
  • 00:16:11 – Using IPython Jupyter Magic Commands
  • 00:22:31 – A Guide to Monkey Patching
  • 00:25:27 – Falsehoods Junior Developers Believe About Becoming Senior
  • 00:33:01 – Video Course Spotlight
  • 00:34:11 – Falsehoods continued
  • 00:43:43 – Where in the data?
  • 00:46:55 – the eval game
  • 00:48:03 – rexi: Terminal UI for Regex Testing
  • 00:49:43 – Thanks and goodbye

News:

  • DjangoCon US Call for Proposals
  • White House Recommends Use of Python
  • JupyterLab 4.1 and Notebook 7.1 Released

Show Links:

  • What’s in a Name? – An article about names in Python, and why they’re not the same as objects. The article discusses reference counts and namespaces.
  • Duck Typing in Python: Writing Flexible and Decoupled Code – In this tutorial, you’ll learn about duck typing in Python. It’s a typing system based on objects’ behaviors rather than on inheritance. By taking advantage of duck typing, you can create flexible and decoupled sets of Python classes that you can use together or individually.
  • Using IPython Jupyter Magic Commands – “IPython Jupyter Magic commands (e.g. lines in notebook cells starting with % or %%) can decorate a notebook cell, or line, to modify its behavior.” This article shows you how to define them and where they can be useful.
  • Monkeying Around With Python: A Guide to Monkey Patching – Monkey patching is the practice of modifying live code. This article shows you how it’s done and why and when to use the practice.

Discussion:

  • Falsehoods Junior Developers Believe About Becoming Senior – This opinion piece by Vadim discusses how newer developers perceive what it means to be a senior developer, and how they’re often wrong.

Projects:

  • Where in the data?
  • the eval game
  • rexi: Terminal UI for Regex Testing

Additional Links:

  • Pointers in Python: What’s the Point? – Real Python
  • Unlock IPython’s Magical Toolbox for Your Coding Journey – Real Python
  • Episode #88: Discussing Type Hints, Protocols, and Ducks in Python – The Real Python Podcast
  • saul.pw
  • BlueBird Shell

Level up your Python skills with our expert-led courses:

  • Python Type Checking
  • Testing Your Code With pytest
  • Pointers and Objects in Python

Support the podcast & join our community of Pythonistas

View Details

How do you get yourself unstuck when facing a programming problem? How do you develop a positive developer mindset while learning Python? This week on the show, Bob Belderbos from Pybites is here to talk about learning Python and building healthy developer habits.

Bob created the Pybites learning platform with his friend Julian Sequeira. They initially focused on exercises and coding challenges to motivate new Python students. As they grew their community, they created a podcast and moved into coaching.

They noticed that most new developers share common struggles of tutorial paralysis, imposter syndrome, and motivation. Bob discusses techniques for developing a positive mindset, overcoming coding blocks, and delivering projects.

Course Spotlight: Grow Your Python Portfolio With 13 Intermediate Project Ideas

Get started on 13 Python project ideas that are just right for intermediate Python developers. They’ll challenge you enough to help you become a better Pythonista.

Topics:

  • 0:00:00 – Introduction
  • 0:02:06 – How did you start Pybites?
  • 0:04:32 – Building a community through challenges
  • 0:06:17 – When did you start your podcast?
  • 0:08:22 – Defining developer mindset
  • 0:11:31 – Learning Python outside of a classroom
  • 0:16:15 – Podcast is a good place to discuss mindset
  • 0:19:37 – Video Course Spotlight
  • 0:20:56 – Sharing Python tips
  • 0:30:14 – Sharing content as a creator
  • 0:35:03 – Writing cleaner code
  • 0:40:20 – Moving from challenges to projects
  • 0:47:08 – Helping yourself when you’re stuck
  • 0:51:31 – Dealing with imposter syndrome
  • 0:55:50 – What are you excited about in the world of Python?
  • 0:57:43 – What do you want to learn next?
  • 0:59:15 – How can people follow your work online?
  • 0:59:51 – Thanks and goodbye

Show Links:

  • Pybites - We Create Python Developers
  • Pybites Podcast
  • PyBites Platform - Real World Python Exercises
  • Pybites Community
  • Pybites Python Tips Book - Pybites
  • itertools — Functions creating iterators for efficient looping - Python documentation
  • string — Common string operations - Python documentation
  • Python enumerate(): Simplify Loops That Need Counters – Real Python
  • ast — Abstract Syntax Trees - Python documentation
  • Building Maintainable Software, Java Edition
  • Refactoring - Improving the Design of Existing Code by Martin Fowler
  • A Mind For Numbers - Barbara Oakley
  • Real Imposters Don’t Experience Imposter Syndrome
  • Rust Programming Language
  • Bob Belderbos (@bbelderbos) - X
  • Bob Belderbos - LinkedIn

Level up your Python skills with our expert-led courses:

  • Grow Your Python Portfolio With 13 Intermediate Project Ideas
  • Python Basics: Code Your First Python Program
  • Building Python Project Documentation With MkDocs

Support the podcast & join our community of Pythonistas

View Details

What are the typical computer tasks you do manually every week? Could you automate those tasks with a Python script? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a recent Hacker News thread about frequently used automation scripts. We share the kinds of tasks we’ve automated with Python in our work and personal lives.

Christopher shares a tutorial about building a micro-search engine from scratch using Python. The post takes you through coding the components of a crawler, index, and ranker. The finished engine is designed to search the posts of the blogs you follow.

We also share several other articles and projects from the Python community, including a news roundup, how a Polars query works under the hood, using Python for data analysis, understanding open-source licensing, summarizing the significant changes between Python versions, a robust TUI hex editor, and a lightweight dataframe library with a universal interface for data wrangling.

This week’s episode is brought to you by Intel.

Course Spotlight: Building Command Line Interfaces With argparse

In this step-by-step Python video course, you’ll learn how to take your command line Python scripts to the next level by adding a convenient command line interface that you can write with argparse.

Topics:

  • 00:00:00 – Introduction
  • 00:02:23 – uv: Python Packaging in Rust
  • 00:02:43 – Rye Grows With uv
  • 00:03:20 – Python 3.13.0 Alpha 4 Is Now Available
  • 00:03:45 – A Bird’s Eye View of Polars
  • 00:07:28 – Polars: Why We Have Rewritten the String Data Type
  • 00:09:33 – A Search Engine in 80 Lines of Python
  • 00:13:14 – Using Python for Data Analysis
  • 00:18:22 – Sponsor: Intel
  • 00:18:53 – Understanding Open Source Licensing
  • 00:21:54 – Summary of Major Changes Between Python Versions
  • 00:23:19 – What Python automation scripts do you reuse frequently at work?
  • 00:34:21 – Video Course Spotlight
  • 00:35:52 – hexabyte: A modern, modular, and robust TUI hex editor
  • 00:39:56 – ibis: The Flexibility of Python With the Scale of Modern SQL
  • 00:43:31 – Thanks and goodbye

News:

  • uv: Python Packaging in Rust – uv is an extremely fast Python package installer and resolver, designed as a drop-in alternative to pip and pip-tools. This post introduces you to uv and shows some of its performance numbers.
  • Rye Grows With uv - Armin Ronacher’s Thoughts and Writings
  • Python 3.13.0 Alpha 4 Is Now Available

Show Links:

  • A Bird’s Eye View of Polars – This post on the Polars blog introduces you to how Polars works, showing the steps from queries, plans, optimizations, and then the final execution.
  • Polars: Why We Have Rewritten the String Data Type – A large refactor on the string data type is underway in Polars. This deep dive explains why and what is changing.
  • A Search Engine in 80 Lines of Python – In this post Alex explains how he built a micro-search engine from scratch using Python. The resulting search engine is used to search in the posts of the blogs he follows.
  • Using Python for Data Analysis – In this tutorial, you’ll learn the importance of having a structured data analysis workflow, and you’ll get the opportunity to practice using Python for data analysis while following a common workflow process.
  • Understanding Open Source Licensing – This article discusses the importance of open-source licensing in software development and its implications for stakeholders.
  • Summary of Major Changes Between Python Versions – This article is a quick reference covering the major changes introduced with each new version of Python. Can’t remember when the walrus operator was introduced? This is the place to look that up.

Discussion:

  • What Python automation scripts do you reuse frequently at work? - Hacker News

Projects

  • hexabyte: A modern, modular, and robust TUI hex editor
  • ibis: The Flexibility of Python With the Scale of Modern SQL

Additional Links:

  • Episode #193: Wes McKinney on Improving the Data Stack & Composable Systems – The Real Python Podcast
  • Open Source Licensing: Software Freedom and Intellectual Property Law
  • What’s in which Python - Ned Batchelder
  • Automate the Boring Stuff with Python - Al Sweigart
  • Working With Files in Python – Real Python
  • Build Command-Line Interfaces With Python’s argparse – Real Python

Level up your Python skills with our expert-led courses:

  • Defining Python Functions With Optional Arguments
  • Practical Recipes for Working With Files in Python
  • Building Command Line Interfaces With argparse

Support the podcast & join our community of Pythonistas

View Details

How do you avoid the bottlenecks of data processing systems? Is it possible to build tools that decouple storage and computation? This week on the show, creator of the pandas library Wes McKinney is here to discuss Apache Arrow, composable data systems, and community collaboration.

Wes briefly describes the humble beginnings of the pandas project in 2008 and moving the project to open source in 2011. Since then, he’s been thinking about improvements across the data processing ecosystem.

Wes collaborated with members of the broader data science community to build the in-memory analytics infrastructure of Apache Arrow. Arrow avoids the bottlenecks of repeated data serialization and format conversion. He shares examples of Arrow’s use across the spectrum in tools like Polars and DuckDB.

Wes advocates moving from vertically integrated tools toward composable data systems. We discuss his work on Ibis, a portable dataframe API for data manipulation and exploration in Python. Ibis supports multiple backends by decoupling the API from the execution engine.

This week’s episode is brought to you by Posit Connect.

Course Spotlight: Unleashing the Power of the Console With Rich

Rich is a powerful library for creating text-based user interfaces (TUIs) in Python. It enhances code readability by pretty-printing complex data structures and adds visual appeal with colored text, tables, animations, and more.

Topics:

  • 00:00:00 – Introduction
  • 00:02:26 – Dealing with limitations in early data science
  • 00:04:53 – Making pandas open source
  • 00:07:10 – Making changes to an existing platform
  • 00:12:34 – Decoupling storage and computation
  • 00:23:04 – Sponsor: Posit Connect
  • 00:23:54 – Apache Arrow solving multiple issues
  • 00:27:40 – DuckDB efficient analytic SQL database
  • 00:30:24 – Polars dataframe library
  • 00:31:04 – pandas 2.0 adding Arrow
  • 00:35:56 – Video Course Spotlight
  • 00:37:20 – Apache Software Foundation background
  • 00:41:29 – Shifting from developer to organizer and collaborator
  • 00:45:56 – Creating a portable query layer with Ibis
  • 00:55:34 – Casualties of the language wars
  • 00:57:57 – What’s your role at Posit?
  • 01:01:23 – What are you excited about in the world of Python?
  • 01:04:52 – What do you want to learn next?
  • 01:06:21 – How can people follow your work online?
  • 01:08:20 – Thanks and goodbye

Show Links:

  • Wes McKinney - Personal Website
  • Wes McKinney - The Road to Composable Data Systems: Thoughts on the Last 15 Years and the Future
  • Wes McKinney - Leveling Up the Data Stack: Thoughts on the Last 15 Years - YouTube
  • Apache Hadoop
  • Cloudera - The hybrid data company
  • Wes McKinney - Apache Arrow and the “10 Things I Hate About pandas”
  • Voltron Data - The Leading Designer and Builder of Enterprise Data Systems
  • Apache Arrow
  • DuckDB - An in-process SQL OLAP database management system
  • DuckDB-Wasm - Efficient Analytical SQL in the Browser
  • Polars - Dataframes for the new era
  • pandas 2.2.0 documentation
  • Episode #167: Exploring pandas 2.0 & Targets for Apache Arrow – The Real Python Podcast
  • ASF - Welcome to The Apache Software Foundation!
  • Ursa Labs Blog
  • Ibis - The Portable Python dataframe Library
  • Python dataframe interchange protocol
  • Hadley Wickham
  • Rust Programming Language
  • italki - Best language learning app with certificated tutors
  • Wes McKinney - LinkedIn
  • Wes McKinney (@wesmckinn) - X
  • Posit - The Open-Source Data Science Company

Level up your Python skills with our expert-led courses:

  • Data Cleaning With pandas and NumPy
  • Unleashing the Power of the Console With Rich
  • The pandas DataFrame: Working With Data Efficiently

Support the podcast & join our community of Pythonistas

View Details

What are real-life examples of using Python decorators? How can you harness their power in your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a recent article series that digs into Python decorators. The first two articles discuss the basics of constructing decorators. The third part describes how popular Python libraries use decorators with call interception, function registration, and enriching the behavior of a function.

Christopher shares a piece about the common pitfalls of working with the Pythondatetime library. The article considers how current third-party libraries don’t address most of these quirks and offers a potential solution with a new library.

We also share several other articles and projects from the Python community, including a couple of news items, a discussion about the popularity of the Rust language, handling unset values in FastAPI with Pydantic, working with Python’s mini-language for formatting strings, mocking Django queryset functions, and a modern replacement for the Requests library.

This week’s episode is brought to you by Sentry.

Course Spotlight: Python Decorators 101

In this course on Python decorators, you’ll learn what they are and how to create and use them. Decorators provide a simple syntax for calling higher-order functions in Python. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it.

Topics:

  • 00:00:00 – Introduction
  • 00:02:53 – Django security releases issued: 5.0.2, 4.2.10, and 3.2.24
  • 00:03:10 – Python 3.12.2 and 3.11.8 are now available
  • 00:03:21 – Introducing PSF Grants Program Office Hours
  • 00:04:19 – Python’s Format Mini-Language for Tidy Strings
  • 00:12:22 – Ten Python datetime Pitfalls
  • 00:18:34 – Sponsor: Sentry
  • 00:19:37 – Real Life Use of Decorators
  • 00:29:18 – Handling Unset Values in FastAPI With Pydantic
  • 00:35:43 – Video Course Spotlight
  • 00:37:06 – The Python Rust-Aissance
  • 00:50:19 – django-mock-queries: Mock Django Queryset Functions
  • 00:53:09 – niquests: Requests but Multiplexed
  • 00:55:55 – Thanks and goodbye

News:

  • Django security releases issued: 5.0.2, 4.2.10, and 3.2.24
  • Python 3.12.2 and 3.11.8 are now available
  • Introducing PSF Grants Program Office Hours

Show Links:

  • Python’s Format Mini-Language for Tidy Strings – In this tutorial, you’ll learn about Python’s format mini-language. See how to use it for creating working format specifiers and build nicely formatted strings and messages in your code.
  • Ten Python datetime Pitfalls – It’s no secret that the Python datetime library has its quirks. Not only are there probably more than you think, but third-party libraries don’t address most of them! Arie created a new library to explore what a better datetime library could look like.
  • Real Life Use of Decorators – Part 3 in a series on how Python decorators are used. This part covers real-life use cases including call interception, function registration, and behavioral enrichment.
  • Handling Unset Values in FastAPI With Pydantic – When using the HTTP PATCH method only those fields that got changed are updated. Pydantic sets fields not given as arguments as None so there is no way to distinguish between an explicit None value and an unset field. This post explains how you process this scenario.

Discussion:

  • The Python Rust-Aissance – Companies like Polars are showing how with Rust, Python developers now have a better, smoother path towards building high-performance libraries.
  • Rye: A Python Developer Experience Vision Continued
  • PyO3: Rust bindings for the Python interpreter
  • Rust in Linux: Where we are and where we’re going next
  • RustPython: OSS CPython Written in Rust
  • granian: Rust HTTP Server for Python Applications

Projects:

  • django-mock-queries: Mock Django Queryset Functions for Testing
  • niquests: Requests but Multiplexed

Additional Links:

  • Backus–Naur form - Wikipedia
  • ANTLR - (ANother Tool for Language Recognition) A Powerful Parser Generator
  • Xmas Decoration, Part 1 - Bite code!
  • Xmas Decoration, Part 2 - Bite code!
  • Falsehoods programmers believe about time - @noahsussman - Infinite Undo
  • 10 Reasons You Should Quit Your HTTP Client - Ahmed TAHRI - Dev Genius
  • HTTPX - Fully Featured HTTP Client for Python 3

Level up your Python skills with our expert-led courses:

  • Using Python's datetime Module
  • Python Decorators 101
  • Python 3's F-Strings: An Improved String Formatting Syntax

Support the podcast & join our community of Pythonistas

View Details

How do you manage the dependencies of a large-scale data science project? How do you migrate that project from a laptop to cloud infrastructure or utilize GPUs and multiple instances in parallel? This week on the show, Savin Goyal returns to discuss the updates to the open-source framework Metaflow.

Savin briefly describes the Metaflow platform and the goal of simplifying engineering overhead for data scientists and programmers. We discuss how the platform captures snapshots of a project as you work, allowing you to go back in time or share the state of your project with another team member.

We dig into the complicated process of managing dependencies for machine learning and data science projects. Savin describes how the required external libraries can be specified within a flow with the new @pypi or @conda decorators. This allows a project to scale from a local machine to the cloud or multiple instances with all dependencies included.

He talks about starting a new company, Outerbounds, with fellow co-workers from Netflix. Their vision is to continue to build the Metaflow open-source platform and offer customers scalable enterprise-grade infrastructure.

This week’s episode is brought to you by Intel.

Course Spotlight: Everyday Project Packaging With pyproject.toml

In this Code Conversation video course, you’ll learn how to package your everyday projects with pyproject.toml. Playing on the same team as the import system means you can call your project from anywhere, ensure consistent imports, and have one file that’ll work for many build systems.

Topics:

  • 00:00:00 – Introduction
  • 00:02:25 – Update on Metaflow
  • 00:04:13 – What is Outerbounds?
  • 00:07:26 – An ML platform to serve data scientists needs
  • 00:13:02 – Dependency reproducibility via @conda and @pypi decorators
  • 00:26:18 – Sponsor: Intel
  • 00:27:10 – Storing lock files along with snapshots
  • 00:29:17 – Working alongside code and dependency management systems
  • 00:34:03 – Scaling a project from laptop to the cloud
  • 00:40:13 – Video Course Spotlight
  • 00:41:41 – Getting visibility on processes
  • 00:47:23 – Adjusting your project due to GPU availability
  • 00:52:27 – Example of jumping back into a project one year later
  • 00:55:54 – What are you excited about in the world of Python?
  • 00:57:39 – What do you want to learn next?
  • 00:59:35 – How can people follow your work online?
  • 01:00:19 – Thanks and goodbye

Show Links:

  • Metaflow - a framework for real-life ML, AI, and data science
  • Infrastructure for ML, AI, and Data Science - Outerbounds
  • Human-Friendly, Production-Ready Data Science with Metaflow- Savin Goyal | SciPy 2022 - YouTube
  • Episode #61: Scaling Data Science and Machine Learning Infrastructure Like Netflix – The Real Python Podcast
  • New in Metaflow: The Long-Awaited @pypi Decorator - Outerbounds
  • Managing Dependencies - Metaflow Docs
  • Secure ML with Secure Software Dependencies - Outerbounds
  • Directed acyclic graph (DAG) - Wikipedia article
  • Visualizing Results - Metaflow Docs
  • Seamless Data and ML Pipelines with Airflow and Metaflow - Outerbounds
  • Episode #142: Orchestrating Large and Small Projects With Apache Airflow – The Real Python Podcast
  • Savin (@SavinGoyal) - X
  • Savin Goyal - LinkedIn
  • Building the ML-driven future - Outerbounds Blog

Level up your Python skills with our expert-led courses:

  • Everyday Project Packaging With pyproject.toml
  • Combining Data in pandas With concat() and merge()
  • Python Histogram Plotting: NumPy, Matplotlib, Pandas & Seaborn

Support the podcast & join our community of Pythonistas

View Details

What’s it like to sit down for your first developer sprint at a conference? How do you find an appropriate issue to work on as a new open-source contributor? This week on the show, author and software engineer Stefanie Molin is here to discuss starting to contribute to open-source projects.

Stefanie is a data scientist and software engineer on Bloomberg’s Security Data Science team. She recently wrote an article titled “5 Ways to Get Started in Open Source.” We discuss finding ways to contribute that fit your interests and developer skills. We dig into the experience of participating in community sprints at a conference.

Stefanie is the author of Hands-On Data Analysis with Pandas. We also discuss the different processes between writing technical articles and authoring a book.

This week’s episode is brought to you by Intel.

Course Spotlight: Documenting Python Projects With Sphinx and Read the Docs

In this video series, you’ll create project documentation from scratch using Sphinx, the de facto standard for Python. You’ll also hook your code repository up to Read The Docs to automatically build and publish your code documentation.

Topics:

  • 00:00:00 – Introduction
  • 00:02:55 – Being asked about how to get started
  • 00:07:13 – Differences in short vs long form writing
  • 00:09:03 – What was your introduction to contributing?
  • 00:17:52 – What are additional benefits of contributing?
  • 00:22:32 – Sponsor: Intel
  • 00:23:22 – Sprints as an entry point
  • 00:34:36 – Other requirements of a sprint
  • 00:36:05 – Differences in conferences
  • 00:41:52 – Other sprint experiences
  • 00:42:50 – Contributing examples to documentation
  • 00:45:59 – Video Course Spotlight
  • 00:47:11 – Looking for good first issues
  • 00:52:04 – Is this a bug?
  • 00:54:10 – Proposing a new feature
  • 00:56:36 – Data Morph and working on personal projects
  • 01:07:29 – Showing up in the Python community
  • 01:12:14 – What are you excited about in the world of Python?
  • 01:14:59 – How can people follow the work you do online?
  • 01:15:28 – What do you want to learn next?
  • 01:18:23 – Thanks and goodbye

Show Links:

  • 5 Ways to Get Started in Open Source - by Stefanie Molin - Level Up Coding
  • seaborn: Statistical Data Visualization - Documentation
  • Docstring Validation using Pre-Commit Hook - numpydoc
  • Hands-On Data Analysis with Pandas: A Python data science handbook for data collection, wrangling, analysis, and visualization, 2nd Edition - Amazon.com
  • Episode #173: Getting Involved in Open Source & Generating QR Codes With Python – The Real Python Podcast
  • Episode #8: Docker + Python for Data Science and Machine Learning With Tania Allard – The Real Python Podcast
  • Mentored Sprints for Diverse Beginners - PyCon US 2023
  • Episode #177: Welcoming PyPI’s Safety & Security Engineer Mike Fiedler – The Real Python Podcast
  • Data Morph: Moving Beyond the Datasaurus Dozen - Level Up Coding
  • Data Morph: A Cautionary Tale of Summary Statistics – Slides
  • Anscombe’s quartet - Wikipedia
  • How to Set Up Pre-Commit Hooks - Stefanie Molin
  • Dog Speaks In Italian Accent To Sound Like His Owner - Bored Panda
  • Stefanie Molin (@StefanieMolin) / X
  • Stefanie Molin - Personal Website

Level up your Python skills with our expert-led courses:

  • Building Python Project Documentation With MkDocs
  • Data Cleaning With pandas and NumPy
  • Documenting Python Projects With Sphinx and Read the Docs

Support the podcast & join our community of Pythonistas

View Details

How does a debugger work? What can you learn about Python by building one from scratch? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher shares a two-part tutorial on building a debugger in Python? Creating a simple one requires less code than you might think.

We also talk about an article from Itamar Turner-Trauring about how to prepare for the upcoming changes to NumPy. The new version is not backward compatible and will require some inspection of your project dependencies. Itamar includes advice, techniques, and tools for updating your code.

We also share several other articles and projects from the Python community, including a couple of news items, a discussion about managing advice as a new developer, moving to Python as a former R developer, building a Markov chain to generate readable nonsense, optimizing fonts to individual glyphs on your website, and a project for working with units of measurement in Python.

This week’s episode is brought to you by Posit Connect.

Course Spotlight: Create a Tic-Tac-Toe Python Game Engine With an AI Player

In this video course, you’ll create a universal game engine in Python for tic-tac-toe with two computer players, one of which will be an AI player using the powerful minimax algorithm. You’ll give your game library a text-based graphical interface and explore two front ends.

Topics:

  • 00:00:00 – Introduction
  • 00:02:18 – DjangoCon Europe 2024 CFP Now Open
  • 00:02:38 – Python Insider: Python 3.13.0 alpha 3 is now available
  • 00:03:04 – NumPy 2 Is Coming: Preventing Breakage, Updating Your Code
  • 00:07:37 – Using a Markov Chain to Generate Readable Nonsense
  • 00:12:53 – Sponsor: Posit Connect
  • 00:13:43 – Python Rgonomics
  • 00:20:10 – Let’s Create a Python Debugger Together
  • 00:23:49 – Video Course Spotlight
  • 00:25:08 – Advice for New Devs Who’ve Read Other Advice Essays
  • 00:42:44 – Fontimize: Optimize Fonts to the Glyphs on Your Site
  • 00:44:57 – Pint: Units for Python
  • 00:46:55 – Thanks and Goodbye

News:

  • DjangoCon Europe 2024 CFP Now Open
  • Python Insider: Python 3.13.0 alpha 3 is now available

Show Links:

  • NumPy 2 Is Coming: Preventing Breakage, Updating Your Code – NumPy 2 is coming, and it’s backwards incompatible. Learn how to keep your code from breaking, and how to upgrade.
  • Using a Markov Chain to Generate Readable Nonsense – Describes a simple Markov chain algorithm to generate reasonable-sounding but utterly nonsensical text, and presents some example outputs as well as a Python implementation in only 20 lines of code.
  • Python Rgonomics – If you’re coming to Python from R, this article outlines some libraries that have an R-like feel, helping you make the transition to Pythonic workflows.
  • Let’s Create a Python Debugger Together – Ever wondered how a debugger works? Implementing a simple one requires less code than you might think. Read on to find out how.

Discussion:

  • Advice for New Devs Who’ve Read Other Advice Essays – After reading some programming advice posts, this author decided a lot of them concentrated on the wrong things. Here is his own take.
  • Associated Hacker News Discussion

Projects:

  • Fontimize: Optimize Fonts to the Glyphs on Your Site
  • Pint: Units for Python

Additional Links:

  • Let’s create a Python Debugger together: Part 2 - Mostly nerdless
  • “Making Hard Things Easy” by Julia Evans (Strange Loop 2023) - YouTube
  • Episode #71: Start Using a Debugger With Your Python Code – The Real Python Podcast
  • Debugging Rules! – Find out what’s wrong with anything, fast.

Level up your Python skills with our expert-led courses:

  • Python Debugging With pdb
  • Using Python's assert to Debug and Test Your Code
  • Create a Tic-Tac-Toe Python Game Engine With an AI Player

Support the podcast & join our community of Pythonistas

View Details

How can you measure the quality of a large language model? What tools can measure bias, toxicity, and truthfulness levels in a model using Python? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to discuss techniques and tools for evaluating LLMs With Python.

Jodie provides some background on large language models and how they can absorb vast amounts of information about the relationship between words using a type of neural network called a transformer. We discuss training datasets and the potential quality issues with crawling uncurated sources.

We dig into ways to measure levels of bias, toxicity, and hallucinations using Python. Jodie shares three benchmarking datasets and links to resources to get you started. We also discuss ways to augment models using agents or plugins, which can access search engine results or other authoritative sources.

This week’s episode is brought to you by Intel.

Course Spotlight: Learn Text Classification With Python and Keras

In this course, you’ll learn about Python text classification with Keras, working your way from a bag-of-words model with logistic regression to more advanced methods, such as convolutional neural networks. You’ll see how you can use pretrained word embeddings, and you’ll squeeze more performance out of your model through hyperparameter optimization.

Topics:

  • 00:00:00 – Introduction
  • 00:02:19 – Testing characteristics of LLMs with Python
  • 00:04:18 – Background on LLMs
  • 00:08:35 – Training of models
  • 00:14:23 – Uncurated sources of training
  • 00:16:12 – Safeguards and prompt engineering
  • 00:21:19 – TruthfulQA and creating a more strict prompt
  • 00:23:20 – Information that is out of date
  • 00:26:07 – WinoBias for evaluating gender stereotypes
  • 00:28:30 – BOLD dataset for evaluating bias
  • 00:30:28 – Sponsor: Intel
  • 00:31:18 – Using Hugging Face to start testing with Python
  • 00:35:25 – Using the transformers package
  • 00:37:34 – Using langchain for proprietary models
  • 00:43:04 – Putting the tools together and evaluating
  • 00:47:19 – Video Course Spotlight
  • 00:48:29 – Assessing toxicity
  • 00:50:21 – Measuring bias
  • 00:54:40 – Checking the hallucination rate
  • 00:56:22 – LLM leaderboards
  • 00:58:17 – What helped ChatGPT leap forward?
  • 01:06:01 – Improvements of what is being crawled
  • 01:07:32 – Revisiting agents and RAG
  • 01:11:03 – ChatGPT plugins and Wolfram-Alpha
  • 01:13:06 – How can people follow your work online?
  • 01:14:33 – Thanks and goodbye

Background Links:

  • A Beginner’s Guide to Language Models - Built In
  • ChatGPT - Explained! - YouTube

Dataset Links:

  • truthful_qa - Datasets at Hugging Face
  • wino_bias - Datasets at Hugging Face
  • bold - Datasets at Hugging Face

Tutorials and Documentation for Python Packages:

  • Evaluating Language Model Bias with 🤗 Evaluate
  • Hugging Face - HF_bias_evaluation - Google Colab
  • General Usage - Load a Dataset - Hugging Face
  • What is Text Generation? - Hugging Face
  • 🤗 Evaluate - Library Evaluating ML Models
  • Python Quickstart - 🦜️🔗 Langchain

Measurement Links:

  • Toxicity - a Hugging Face Space by evaluate-measurement
  • Regard - a Hugging Face Space by evaluate-measurement
  • Open LLM Leaderboard - a Hugging Face Space

Training Data for LLMs:

  • Common Crawl - Open Repository of Web Crawl Data
  • The Pile
  • The RefinedWeb Dataset for Falcon LLM: Outperforming Curated Corpora

Agents and Plugin Links:

  • Transformers Agents - Hugging Face
  • Agents - 🦜️🔗 Langchain
  • ChatGPT Gets Its “Wolfram Superpowers”! - Stephen Wolfram

Additional Links:

  • Inside the AI Factory: The Humans that Make Tech Seem Human - The Verge
  • Jodie Burchell - The JetBrains Blog
  • Jodie Burchell’s Blog - Standard error
  • Jodie Burchell 🇦🇺🇩🇪 (@t_redactyl) - Twitter
  • Jodie Burchell 🇦🇺🇩🇪 (@t_redactyl@fosstodon.org) - Fosstodon
  • JetBrains: Essential tools for software developers and teams

Level up your Python skills with our expert-led courses:

  • Data Cleaning With pandas and NumPy
  • Creating Web Maps From Your Data With Python Folium
  • Learn Text Classification With Python and Keras

Support the podcast & join our community of Pythonistas

View Details

Do you need to transfer an extensive data collection for a science project? What’s the best way to send executable code over the wire for distributed processing? What are the different ways to serialize data in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher shares a tutorial by Real Python author Bartosz Zaczyński called “Serialize Your Data With Python.” This comprehensive guide moves beyond XML and JSON to explore multiple data formats and their potential use cases. It’s a deep dive into the topic and provides a thorough resource for future reference.

We also discuss a Real Python tutorial about naming conventions in Python that use single and double underscores. The piece covers differentiating between public and non-public names in APIs, writing safe classes for subclassing purposes, and avoiding name clashes with keywords.

We also share several other articles and projects from the Python community, including a couple of release announcements and news items, a discussion about never being taught how to construct quality software, building a small REPL in Python, using the key parameter in Python functions and methods, a framework for RESTful APIs using Flask and SQLAlchemy, and a Rust-based HTML sanitizer for your Python projects.

Course Spotlight: Writing Beautiful Pythonic Code With PEP 8

Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators. This course outlines the key guidelines laid out in PEP 8. It’s aimed at beginner to intermediate programmers.

Topics:

  • 00:00:00 – Introduction
  • 00:02:47 – JIT Coming to Python 3.13
  • 00:03:13 – A copy-and-patch JIT compiler - Pull Request #113465
  • 00:03:54 – Django bugfix releases issued: 4.2.9 and 5.0.1
  • 00:04:24 – Single and Double Underscores in Python Names
  • 00:16:42 – Building a Small REPL in Python
  • 00:20:07 – The Key to the key Parameter in Python
  • 00:25:23 – Video Course Spotlight
  • 00:26:44 – Serialize Your Data With Python
  • 00:30:23 – You Are Never Taught How to Build Quality Software
  • 00:48:43 – flask-muck: RESTful APIs Using Flask and SQLAlchemy
  • 00:51:26 – nh3: Python binding to Ammonia HTML sanitizer Rust crate
  • 00:53:33 – Thanks and goodbye

News:

  • JIT Coming to Python 3.13 – Slides related to the upcoming JIT commit for Python 3.13. Note that GitHub paginates the slides if you don’t download them, so click the More Pages button to keep reading.
  • A copy-and-patch JIT compiler by brandtbucher - Pull Request #113465
  • Django bugfix releases issued: 4.2.9 and 5.0.1 - Weblog Django

Show Links:

  • Single and Double Underscores in Python Names – In this tutorial, you’ll learn a few Python naming conventions involving single and double underscores (_). You’ll learn how to use this character to differentiate between public and non-public names in APIs, write safe classes for subclassing purposes, avoid name clashes, and more.
  • Building a Small REPL in Python – Learn how to write your own REPL by building on top of the one that comes with Python. With a few lines of code, you can customize Python’s REPL environment as your own.
  • The Key to the key Parameter in Python – A parameter named key is present in several Python functions, such as sorted(). This article explores what it is and how to use it.
  • Serialize Your Data With Python – In this in-depth tutorial, you’ll explore the world of data serialization in Python. You’ll compare and use different data serialization formats, serialize Python objects and executable code, and handle HTTP message payloads.

Discussion:

  • You Are Never Taught How to Build Quality Software – Learning how to build quality software isn’t part of computer science education. How do we learn it?
  • Hacker News discussion about the article

Projects:

  • flask-muck: RESTful APIs Using Flask and SqlAlchemy
  • nh3: Python binding to Ammonia HTML sanitizer Rust crate

Additional Links:

  • PEP 8: The Style Guide for Python Code
  • Python’s Magic Methods: Leverage Their Power in Your Classes – Real Python
  • A Philosophy of Software Design Book - John Ousterhout
  • A Philosophy of Software Design - John Ousterhout - Talks at Google - YouTube
  • Episode #49: The Challenges of Developing Into a Python Professional – The Real Python Podcast
  • Django: Sanitize Incoming HTML Fragments With nh3 – Allowing users to input HTML in comments or blog posts is problematic and can lead to exploits on your site. For years, the Django community used django-bleach, but since its deprecation, Adam has been using nh3, a Rust-based HTML sanitizer.
  • nh3 · PyPI

Level up your Python skills with our expert-led courses:

  • Working With JSON Data in Python
  • Writing Beautiful Pythonic Code With PEP 8
  • Serializing Objects With the Python pickle Module

Support the podcast & join our community of Pythonistas

View Details

Are you interested in using your Python skills within Excel? Would you like to share a data science project or visualization as a single Office file? This week on the show, we speak with Principal Architect John Lam and Sr. Cloud Developer Advocate Sarah Kaiser from Microsoft about Python in Excel.

John shares the multi-year journey of adding Python to Excel. He describes how the project moved beyond writing user functions in Python to something much more elaborate. He details assembling a team with diverse skills in interface design, languages, and security.

Sarah discusses the instant convenience of having familiar Python and pandas techniques at your fingertips inside Excel. We cover typical data science workflows and the potential of interactive visualizations within a spreadsheet. We also share multiple resources for you to learn more.

Note: Python in Excel is currently a preview accessible by joining the Microsoft 365 Insider Program and selecting the Beta Channel.

Course Spotlight: Data Cleaning With pandas and NumPy

In this video course, you’ll learn how to clean up messy data using pandas and NumPy. You’ll become equipped to deal with a range of problems, such as missing values, inconsistent formatting, malformed records, and nonsensical outliers.

Topics:

  • 00:00:00 – Introduction
  • 00:01:53 – Sr. Cloud Developer Advocate Sarah Kaiser
  • 00:02:46 – Principal Architect John Lam
  • 00:04:08 – What is Dev Div?
  • 00:04:33 – Python data science inside Excel
  • 00:09:05 – Designing features with a focus on sharing
  • 00:14:28 – Moving between Excel and Python objects
  • 00:18:20 – What libraries are imported by default?
  • 00:23:11 – Sharing a workbook with others
  • 00:26:12 – Recalculating data workflow
  • 00:30:07 – Working in Jupyter Notebook vs Excel
  • 00:33:03 – Creating a Python object
  • 00:33:38 – Video Course Spotlight
  • 00:35:02 – More history and project team
  • 00:40:19 – Immediate wins of having Python in Excel
  • 00:42:28 – Interactive visualizations
  • 00:44:34 – Answering security concerns
  • 00:49:17 – Limitations and potential
  • 00:54:34 – Creating demo projects
  • 01:00:25 – Resources to learn more
  • 01:02:59 – What are you excited about in the world of Python?
  • 01:10:41 – What do you want to learn next?
  • 01:12:09 – How can people follow your work online?
  • 01:13:26 – Thanks and goodbye

Show Links:

  • Python in Excel – Python to Excel - Microsoft 365
  • Get started with Python in Excel - Microsoft Support
  • Python in Excel DataFrames - Microsoft Support
  • Open-source libraries and Python in Excel - Microsoft Support
  • User guide and tutorial - seaborn 0.13.1 documentation
  • Assessing and Restoring Reproducibility of Jupyter Notebooks - IEEE Conference Publication - IEEE Xplore
  • Book of Python in Excel - John Lam’s Website
  • GitHub - microsoft/python-in-excel - Python in Microsoft Excel
  • Use Python in Excel to enhance your data science - Python Day - YouTube
  • Introducing Python in Excel: The Best of Both Worlds for Data Analysis and Visualization - Microsoft Community Hub
  • PEP 703 – Making the Global Interpreter Lock Optional in CPython - peps.python.org
  • Dr. Sarah Kaiser (@crazy4pi314@mathstodon.xyz) - Fosstodon
  • John Lam (@john_lam) - X

Level up your Python skills with our expert-led courses:

  • Data Cleaning With pandas and NumPy
  • Python Histogram Plotting: NumPy, Matplotlib, Pandas & Seaborn
  • The pandas DataFrame: Working With Data Efficiently

Support the podcast & join our community of Pythonistas

View Details

Three members of the Real Python team are joining us this week: Kate Finegan, Tappan Moore, and Philipp Acsany. We wanted to share a year-end wrap-up with tutorials, step-by-step projects, code conversations, and video courses that showcase what our team created this year.

Kate helps to shepherd articles through the multi-stage editing process. She and the rest of the team ensure these resources impart crucial Python knowledge and provide a thorough didactic experience. Kate was also instrumental in helping introduce a new group of tutorial authors to the Real Python editorial process and house style.

Philipp returns to the podcast after our conversation earlier this year, and it was great to talk to him about onboarding new video instructors. Tappan edits all our video courses and ensures that the sound, picture, and animations are just right. He also helped provide feedback to the new instructors on our video creation process.

We hope you enjoy this review! We look forward to bringing you another year full of great guests, articles, and topics.

Course Spotlight: Recursion in Python

A recursive function is one that calls itself. In this video course, you’ll see what recursion is, how it works in Python, and under what circumstances you should use it.

Topics:

  • 00:00:00 – Introduction
  • 00:02:50 – New Video Instructors
  • 00:05:31 – New Tutorial Authors
  • 00:07:37 – Shout-out to Aldren Santos
  • 00:09:27 – Build a Wordle Clone With Python and Rich
  • 00:11:37 – Python Classes: The Power of Object-Oriented Programming
  • 00:13:43 – SOLID Principles: Improve Object-Oriented Design in Python
  • 00:14:47 – Using the NumPy Random Number Generator
  • 00:17:58 – Recursion in Python
  • 00:19:44 – Filtering Iterables With Python
  • 00:21:04 – Creating Web Maps From Your Data With Python Folium
  • 00:24:51 – Video Course Spotlight
  • 00:26:13 – Python Basics Exercises: Building Systems With Classes
  • 00:31:00 – Real Python Quizzes
  • 00:33:53 – Process Images Using the Pillow Library and Python
  • 00:36:00 – How to Sort Unicode Strings Alphabetically in Python
  • 00:38:36 – The Python Rich Package: Unleash the Power of Console Text
  • 00:42:31 – Embeddings and Vector Databases With ChromaDB
  • 00:46:41 – Advent of Code: Solving Puzzles With Python
  • 00:51:07 – Thanks and goodbye

Show Links:

  • Build a Wordle Clone With Python and Rich – Step-by-Step Project
  • Python Classes: The Power of Object-Oriented Programming – Tutorial
  • SOLID Principles: Improve Object-Oriented Design in Python – Tutorial
  • Using the NumPy Random Number Generator – Tutorial
  • Recursion in Python – Video Course
  • Filtering Iterables With Python – Video Course
  • Creating Web Maps From Your Data With Python Folium – Video Course
  • Python Basics Exercises: Building Systems With Classes – Video Course
  • Process Images Using the Pillow Library and Python – Video Course
  • How to Sort Unicode Strings Alphabetically in Python – Tutorial
  • The Python Rich Package: Unleash the Power of Console Text – Showcase
  • Embeddings and Vector Databases With ChromaDB – Tutorial
  • Advent of Code: Solving Puzzles With Python – Code Conversation

Additional Links:

  • Create a Python Wordle Clone With Rich – Video Course
  • Class Concepts: Object-Oriented Programming in Python – Video Course
  • Inheritance and Internals: Object-Oriented Programming in Python – Video Course
  • Design and Guidance: Object-Oriented Programming in Python – Video Course
  • FTX Python code ‘allowed’ Alameda Research to spend deposits - The Register
  • Recursion in Python: An Introduction – Tutorial
  • Python’s filter(): Extract Values From Iterables – Tutorial
  • Python Folium: Create Web Maps From Your Data – Step-by-Step Project
  • Episode #12: Web Scraping in Python: Tools, Techniques, and Legality – The Real Python Podcast
  • Python Basics: Building Systems With Classes – Video Course
  • Image Processing With the Python Pillow Library – Tutorial
  • Episode #80: Make Your Python App Interactive With a Text User Interface (TUI) – The Real Python Podcast

Level up your Python skills with our expert-led courses:

  • Python Basics Exercises: Building Systems With Classes
  • Process Images Using the Pillow Library and Python
  • Recursion in Python

Support the podcast & join our community of Pythonistas

View Details

It’s been a fascinating year for the Python language and community. PyCoder’s Weekly included over 1,500 links to articles, blog posts, tutorials, and projects in 2023. Christopher Trudeau is back on the show this week to help wrap up everything by sharing some highlights and Python trends from across the year.

Christopher shares the top five links explored by PyCoder’s readers. We also dig into trends we noticed across all the articles and stories this year, including removing dead batteries from the standard library, continuing the effort to speed up Python, using Rust code in libraries, and moving away from microservices.

We hope you enjoy this review! We look forward to bringing you an upcoming year full of great Python news, articles, topics, and projects.

Course Spotlight: Python Basics: Building Systems With Classes

In this video course, you’ll learn how to work with classes to build complex systems in Python. By composing classes, inheriting from other classes, and overriding class behavior, you’ll harness the power of object-oriented programming (OOP).

Topics:

  • 00:00:00 – Introduction
  • 00:02:21 – Python 3.13.0 Alpha 2 Is Now Available
  • 00:02:46 – Welcoming the Supporting Developer in Residence
  • 00:03:25 – Django 5.0 Released
  • 00:03:34 – Django Ninja 1.0 Released
  • 00:04:11 – Top Five PyCoder Links
  • 00:05:00 – Python 3.12: Cool New Features for You to Try
  • 00:05:27 – Speeding Up Your Code When Multiple Cores Aren’t an Option
  • 00:05:46 – Learning About Code Metrics in Python With Radon
  • 00:06:07 – Python 3.12 Preview: More Intuitive and Consistent F-Strings
  • 00:06:28 – Design and Guidance: Object-Oriented Programming in Python
  • 00:07:49 – Python 3.12: What Didn’t Make the Headlines
  • 00:11:34 – Python 3.13 Removes 20 Stdlib Modules
  • 00:13:32 – Missing Batteries: Essential Libraries You’re Missing Out On
  • 00:16:21 – More Batteries Please
  • 00:19:19 – Three Python Trends in 2023
  • 00:24:36 – Video Course Spotlight
  • 00:26:23 – Mojo, a Superset of Python
  • 00:27:54 – Why Mojo?
  • 00:28:14 – Mojo SDK Released for Linux
  • 00:28:19 – Mojo: Head-to-Head With Python and Numba
  • 00:29:22 – How We Organize Our Very Large Python Monolith
  • 00:34:11 – Python and Folium to Visualize My Outdoor Activities
  • 00:37:13 – Thanks and goodbye

News:

  • Python 3.13.0 Alpha 2 Is Now Available
  • Welcoming the Supporting Developer in Residence
  • Django 5.0 Released
  • Django Ninja 1.0 Released

Top Five PyCoder Links:

  • Python 3.12: Cool New Features for You to Try – In this tutorial, you’ll learn about the new features in Python 3.12. You’ll explore how the new release extends the better error messages and faster code execution found in the previous version, and you’ll try out the improvements to f-strings and type variable syntax.
  • Speeding Up Your Code When Multiple Cores Aren’t an Option – Parallelism isn’t the only answer: often you can optimize low-level code to get significant performance improvements.
  • Learning About Code Metrics in Python With Radon – Radon is a code metrics tool. This article introduces you to it and explains how you can improve your code based on its measurements.
  • Python 3.12 Preview: More Intuitive and Consistent F-Strings – In this tutorial, you’ll preview one of the upcoming features of Python 3.12, which introduces a new f-string syntax formalization and implementation. The new implementation lifts some restrictions and limitations that affect f-string literals in Python versions lower than 3.12.
  • Design and Guidance: Object-Oriented Programming in Python – In this video course, you’ll learn about the SOLID principles, which are five well-established standards for improving your object-oriented design in Python. By applying these principles, you can create object-oriented code that is more maintainable, extensible, scalable, and testable.

Topics and 2023 Trends:

  • Python 3.12: What Didn’t Make the Headlines – There’s been plenty of coverage about the changes in Python 3.12. This article highlights what fell through the cracks. It talks about performance, pathlib improvements, and a few other changes.
  • Python 3.13 Removes 20 Stdlib Modules – Core developers are busy working on PEP 594, removing dead batteries from Python 3.13. This long post in the discussion forum highlights what work has been completed so far.
  • Missing Batteries: Essential Libraries You’re Missing Out On – Even though Python’s standard library comes with batteries included, it’s still missing some essentials. This article covers libraries for debugging, testing, CLI, and more.
  • More Batteries Please – This brief opinion piece from Carlton Gibson states why he thinks we need more functionality in the Python standard library rather than less.
  • Three Python Trends in 2023 – An opinion piece on three trends likely to attract attention in the Python world in 2023: Python/Rust co-projects, web apps, and more typing. Read on for examples in each category.
  • Mojo, a Superset of Python – Mojo is a new programming language that’s a superset of Python. It aims to fix Python’s performance and deployment problems. Jeremy Howard - from fast.ai.
  • Why Mojo? – “A backstory and rationale for why we created the Mojo language.” Chris Lattner - from Modular.
  • Mojo SDK Released for Linux
  • Mojo: Head-to-Head With Python and Numba – This article covers a Mandelbrot-based benchmark of Python, variations of Numba, and the newly available Mojo. Although Mojo is fast, it takes a lot more work than the author expected to translate Python to it, and with the right parameters, Numba still beats it.
  • How We Organize Our Very Large Python Monolith – Kraken Technologies is an environmental tech company that does a lot of Python development. One of their applications is a monolith with over 27,000 modules. This article outlines how they keep all of this organized and running.

Project:

  • Python and Folium to Visualize My Outdoor Activities – Embark on an expedition of exploration and mapping! Learn how to breathe life into your GPX files and create interactive maps using Python and Folium.
  • Python Folium: Create Web Maps From Your Data – Real Python
  • Creating Web Maps From Your Data With Python Folium – Real Python

Additional Links:

  • Sneaky REST APIs With Django Ninja – Real Python Video Course
  • Episode #175: Exploring the New Features of Python 3.12 – The Real Python Podcast
  • Python 3 Module of the Week - PyMOTW 3
  • Episode #171: Making Each Line of Code Efficient & Python In Excel – The Real Python Podcast
  • psf/requests: A simple, yet elegant, HTTP library.
  • htmx - high power tools for html

Level up your Python skills with our expert-led courses:

  • Python Basics Exercises: Building Systems With Classes
  • Creating Web Maps From Your Data With Python Folium
  • Python Basics: Building Systems With Classes

Support the podcast & join our community of Pythonistas

View Details

What goes into a code review in Python? Is there a difference in how a large organization practices code review compared to a smaller one? What do you do if you’re a solo developer? This week on the show, Brendan Maginnis and Nick Thapen from Sourcery return to talk about code review and automated code assistance.

Nick and Brendan discuss their personal experiences with code reviews. From working together at a large company to starting Sourcery as a pair of developers to growing a team, they’ve experienced how various organizations review code.

We discuss the importance of keeping code reviews positive and maintaining developer momentum. Nick and Brendan share techniques for automating organizational code rules and retaining institutional developer knowledge.

They’ve been busy developing new features for Sourcery, moving beyond the current refactoring features. Their team is leveraging LLMs to build an automated code assistant that can perform code reviews, write tests, and answer questions about your codebase. The goal is for it to act as a personalized computer pair programmer.

Course Spotlight: Using the bpython Enhanced REPL

In this video course, you’ll learn about bpython, an alternative Python REPL that brings code suggestions and many other IDE-like features to the terminal. Once you discover how much bpython can improve your productivity, you’ll never want to return to using the vanilla Python REPL again.

Topics:

  • 00:00:00 – Introduction
  • 00:02:41 – Why discuss code reviewing?
  • 00:04:16 – What were your first code reviews like?
  • 00:06:31 – Developing positive techniques as a team
  • 00:14:07 – Time between reviews
  • 00:17:04 – Will the techniques vary based on the organization size?
  • 00:18:43 – Things to standardize and remove from code review
  • 00:20:06 – Video Course Spotlight
  • 00:22:06 – Creating a tool that goes beyond refactoring
  • 00:23:42 – Do newer models provide better context for code review?
  • 00:25:52 – Working toward an automated pair programmer
  • 00:33:42 – Creating rules for an organization’s code standards
  • 00:42:55 – Comparing completion tools with code assistance
  • 00:48:18 – Working on an existing codebase vs a new project
  • 00:52:11 – Current state of Sourcery
  • 00:56:19 – What are you excited about in the world of Python?
  • 01:00:12 – What do you want to learn next?
  • 01:03:41 – How can people follow your work online?
  • 01:05:17 – Thanks and goodbye

Show Links:

  • Sourcery 1000x Faster Code Review
  • Sourcery - GitHub Bot Install
  • Sourcery - VSCode Extension - Visual Studio Marketplace
  • Sourcery - IntelliJ IDEs Plugin
  • Episode #55: Getting Started With Refactoring Your Python Code – The Real Python Podcast
  • How to do a code review - eng-practices - Google GitHub
  • Generating Code without Generating Technical Debt?
  • Episode #117: Measuring Python Code Quality, Simplicity, and Maintainability – The Real Python Podcast
  • Writing Custom Rules - Sourcery Documentation
  • Nuitka the Python Compiler - Documentation
  • Episode #154: Targeting WebAssembly Platforms & Distilling a Minimum Viable Python – The Real Python Podcast
  • Rust Programming Language
  • Speedsolving the cube : easy-to-follow, step-by-step instructions for many popular 3-D puzzles in SearchWorks catalog
  • My Arcade Releases the Atari Gamestation Pro with 200+ Games

Level up your Python skills with our expert-led courses:

  • Using the bpython Enhanced REPL
  • Testing Your Code With pytest
  • Python Basics Exercises: Strings and String Methods

Support the podcast & join our community of Pythonistas

View Details

Have you thought of a way to improve the Python language? How do you share your idea with core developers and start a discussion in the Python community? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We consider a couple of Python syntax and functional ideas posted to the discussions on python.org. The first idea is for simplifying the syntax of a function’s keyword arguments, and the second is for the ability to return a NamedTuple from a function. The threads reveal steps within the Python Enhancement Proposal (PEP) process and the goal of finding a sponsor.

Christopher covers a tutorial on building a JSON-like parser in Python. The project is a solid place to start if you want to learn about parsing and developing rules for recognizing syntax and extracting data.

We also share several other articles and projects from the Python community, including a couple of release announcements and news items, a step-by-step guide to building a hangman game for the command line in Python, the reasons why the Django admin is supposedly ugly and ways to customize it to differentiate admin environments, an explanation of confusing git terminology, a project to extract links from a remote HTML resource, and a regex crossword game.

Course Spotlight: Advent of Code: Solving Puzzles With Python

Advent of Code is an online advent calendar that shares new programming puzzles each day from December 1 to the 25. In this Code Conversation, you’ll learn why solving programming puzzles can be beneficial and how you can get started with Advent of Code using Python.

Topics:

  • 00:00:00 – Introduction
  • 00:02:46 – PyPI has completed its first security audit
  • 00:03:55 – Python Developers Survey 2023
  • 00:04:45 – Wagtail 5.2 (LTS) Released
  • 00:05:02 – How many Python core devs use typing?
  • 00:07:51 – Build a Hangman Game for the Command Line in Python
  • 00:17:30 – Why Is the Django Admin “Ugly”?
  • 00:20:37 – Customize the Django Admin to Differentiate Environments
  • 00:22:48 – Confusing git Terminology
  • 00:30:01 – Video Course Spotlight
  • 00:31:31 – Let’s Make a Silly JSON-like Parser
  • 00:34:31 – Idea: Return a NamedTuple
  • 00:45:08 – Idea: Syntactic Sugar to Encourage Use of Named Arguments
  • 00:50:31 – grablinks: Extract Links From a Remote HTML Resource
  • 00:52:43 – Regex Crossword
  • 00:55:46 – Thanks and goodbye

News:

  • PyPI has completed its first security audit - The Python Package Index
  • Python Developers Survey 2023
  • Wagtail 5.2 (LTS) Released
  • How many Python core devs use typing? - Gram Publishing v2

Show Links:

  • Build a Hangman Game for the Command Line in Python – In this step-by-step project, you’ll learn how to write the game of hangman in Python for the command line. You’ll learn how to structure the game as a text-based interface (TUI) application.
  • Why Is the Django Admin “Ugly”? – When Vince was talking with people at DjangoCon US, one question kept coming up: Why is the Django admin so “ugly”?
  • Customize the Django Admin to Differentiate Environments – A quick post about changing the color scheme of the Django admin depending on what environment the code is deployed within. Although Django specific, this is a great idea—visually reminding your admins and developers whether they’re in dev, staging, or production.
  • Confusing git Terminology – Julia is working on a doc that explains git and, in doing so, polled some people about what git terminology they found confusing. This post covers the most common responses and attempts to clear up the confusion.
  • Let’s Make a Silly JSON-like Parser – This article goes into deep detail on how you would construct a JSON parser in Python. If you’re new to parsing, then this is a great place to start.

Discussion:

  • Idea: Return a NamedTuple
  • Idea: Syntactic Sugar to Encourage Use of Named Arguments

Projects:

  • grablinks: Extract Links From a Remote HTML Resource
  • Regex Crossword
  • Regex Crossword Mobile

Additional Links:

  • Episode #2: Learn Python Skills While Creating Games – The Real Python Podcast
  • Episode #179: Improving Your Git Developer Experience in Python – The Real Python Podcast
  • Write Pythonic and Clean Code With namedtuple – Real Python

Level up your Python skills with our expert-led courses:

  • Advent of Code: Solving Puzzles With Python
  • Everyday Project Packaging With pyproject.toml
  • Writing Clean, Pythonic Code With namedtuple

Support the podcast & join our community of Pythonistas

View Details

Has the current growth of artificial intelligence (AI) systems made you wonder what the future holds for Python developers? What are the hidden benefits of learning to program in Python and practicing computational thinking? This week on the show, we speak with author Lawrence Gray about his upcoming book “Mastering Python: A Problem Solving Approach.”

Lawrence shares how learning Python helped him through a dark and trying time. He developed lifelong skills that he wants to pass along through teaching and authoring a book.

We discuss what you can do to prepare for a future where coding jobs are automated through AI. He shares ways that Python can help build the higher-order thinking skills required by future careers. We also talk about how Python can help with computational thinking and promote cognitive development.

This week’s episode is brought to you by Site24x7.

Course Spotlight: Looping With Python enumerate()

Once you learn about for loops in Python, you know that using an index to access items in a sequence isn’t very Pythonic. So what do you do when you need that index value? In this course, you’ll learn all about Python’s built-in enumerate(), where it’s used, and how you can emulate its behavior.

Topics:

  • 00:00:00 – Introduction
  • 00:02:29 – Learning Python and changing how you think
  • 00:05:07 – What is the goal of the book?
  • 00:05:59 – Discovering Python during a dark period
  • 00:10:32 – What is unique to Python that helped you?
  • 00:12:43 – How did you start teaching Python?
  • 00:14:40 – Teaching Python to art students
  • 00:18:52 – Sponsor: Site24x7.com
  • 00:19:48 – Why write about computational thinking?
  • 00:21:55 – Why learn Python now?
  • 00:25:18 – Multiple modalities for Python
  • 00:29:32 – Other optimistic thoughts on the future
  • 00:34:15 – Reskilling a workforce
  • 00:37:16 – What skills can be developed?
  • 00:41:13 – Video Course Spotlight
  • 00:42:40 – Bloom’s taxonomy
  • 00:48:00 – Sharing the positive impact of Python
  • 00:50:26 – What are you excited about in the world of Python?
  • 00:51:32 – What do you want to learn next?
  • 00:52:45 – How can people follow your work online?
  • 00:52:47 – Thanks and goodbye

Show Links:

  • The Future of Jobs Report 2023 - World Economic Forum
  • Mastering Python: Get Access to Chapter 1
  • Computational thinking - Wikipedia
  • Bloom’s taxonomy - Wikipedia
  • Probably Overthinking It – Data science, Bayesian Statistics, and other ideas
  • scikit-learn: machine learning in Python - documentation
  • Yellowbrick: Machine Learning Visualization - documentation
  • PyCon US 2024 - PyCon US 2024
  • Education Summit - PyCon US 2023
  • PyTorch - Get Started
  • Lawrence Gray Personal Site

Level up your Python skills with our expert-led courses:

  • Using k-Nearest Neighbors (kNN) in Python
  • How to Write Pythonic Loops
  • Looping With Python enumerate()

Support the podcast & join our community of Pythonistas

View Details

Have you moved through the fundamentals of Python, and are you now considering building a more extensive project or complete application? Where can you study the architecture of existing Python projects and learn best practices? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a set of resources that developers can study to learn how to structure projects. The collection was shared in a blog post titled “Great Resources a Beginner Might Not Find So Easily.” It includes a pair of books on the architecture of large software applications and another aimed at more modest projects.

We consider when you should use lambda expressions in your Python code. These one-line expressions create anonymous functions. How do they differ from standard functions, and where is it appropriate to use them?

We also share several other articles and projects from the Python community, including a couple of release announcements, an explanation of Python as a compiled language, a discussion covering the controversy about the recent Flask release, a project for writing less Selenium code, and a project to create ASCII art with Python.

This week’s episode is brought to you by Site24x7.

Course Spotlight: Design and Guidance: Object-Oriented Programming in Python

In this video course, you’ll learn about the SOLID principles, which are five well-established standards for improving your object-oriented design in Python. By applying these principles, you can create object-oriented code that is more maintainable, extensible, scalable, and testable.

Topics:

  • 00:00:00 – Introduction
  • 00:02:50 – PyCon US 2024 Call for Proposals
  • 00:03:18 – Django 5.0 Beta 1 Released
  • 00:03:29 – Django security releases issued: 4.2.7, 4.1.13, and 3.2.23
  • 00:03:51 – The Ruff Formatter: Python’s Fastest Formatter
  • 00:04:50 – What Are Lambda Expressions?
  • 00:12:01 – Sponsor: Site24x7.com
  • 00:12:56 – Python Is a Compiled Language
  • 00:16:01 – Great Resources a Beginner Might Not Find So Easily
  • 00:27:01 – Video Course Spotlight
  • 00:28:32 – We Have to Talk About Flask
  • 00:41:46 – selenium-python-helium: Write Less Selenium Code
  • 00:45:23 – pyfiglet: An implementation of figlet written in Python
  • 00:47:17 – Thanks and goodbye

News:

  • PyCon US 2024 Call for Proposals
  • Django 5.0 Beta 1 Released
  • Django security releases issued: 4.2.7, 4.1.13, and 3.2.23 | Weblog | Django
  • The Ruff Formatter: Python’s Fastest Formatter – You may have come across Ruff, a linter that’s been on the scene for about a year. Well, it recently added formatting to its features. This article shows you how, including the configuration option to allow single-quote style.

Show Links:

  • What Are Lambda Expressions? – This post teaches you what lambda expressions are and how they get used in Python. It shows several examples and also covers when to avoid lambda expressions.
  • Python Is a Compiled Language – Python is interpreted, but it interprets compiled code. This distinction can be confusing to students, and this instructor does a deep dive on where the line between the concepts sits.
  • Great Resources a Beginner Might Not Find So Easily – Are you having trouble making the modules work together in a larger project? Have you tried looking at popular projects as models, but did their size and scope put you off? Did you find it hard to see why they did what they did? Resources about this do exist, but they’re scattered all over…unless you know where to look.
  • We Have to Talk About Flask – The most recent release of Flask and Werkzeug have introduced backward incompatible changes that are affecting popular add-ons. Miguel writes about how this is a common occurrence and why it keeps happening.

Discussion:

  • Armin Ronacher on X: Flask today is a different framework than the one I have created
  • Some More To Talk About Flask - miguelgrinberg.com
  • We Have to Talk About Flask - Hacker News
  • Episode #18: Ten Years of Flask: Conversation With Creator Armin Ronacher - The Real Python Podcast

Projects:

  • selenium-python-helium: Write Less Selenium Code
  • pyfiglet: An implementation of figlet written in Python - PyPI

Additional Links:

  • Lambdas - Expressions - Python 3.12.0 documentation
  • How to Use Python Lambda Functions - Real Python
  • The Architecture of Open Source Applications
  • Episode #9: Leveling Up Your Python Literacy and Finding Python Projects to Study - The Real Python Podcast
  • Episode #62: Selecting the Ideal Data Structure & Unravelling Python’s “pass” and “with” - The Real Python Podcast
  • asciimatics - PyPI

Level up your Python skills with our expert-led courses:

  • Class Concepts: Object-Oriented Programming in Python
  • Design and Guidance: Object-Oriented Programming in Python
  • Inheritance and Internals: Object-Oriented Programming in Python

Support the podcast & join our community of Pythonistas

View Details

Are you getting by with a few fundamental commands for Git when building your Python projects? Would you like to improve your version control techniques and become more efficient with the Git command line? This week on the show, Adam Johnson is back to talk about his new book, “Boost Your Git DX.”

Adam brings advice about creating a Git configuration, enabling autocorrect, and customizing a global ignore file. He combed through the cryptic documentation and found the valuable developer settings, so you won’t have to.

Adam also shares tools and settings to speed up your terminal workflows. We discuss configuring Zsh, creating aliases, and comparing diffs. We briefly dig into the most recent update to Django and his work on the project.

This week’s episode is brought to you by Taipy.

Course Spotlight: Introduction to Git and GitHub for Python Developers

What is Git, what is GitHub, and what’s the difference? Learn the basics of Git and GitHub from the perspective of a Pythonista in this step-by-step video course.

Topics:

  • 00:00:00 – Introduction
  • 00:02:13 – When did you start working on this book?
  • 00:06:11 – Git’s tendency to be inscrutable
  • 00:08:57 – Audience for the book
  • 00:09:47 – What have you learned about writing?
  • 00:13:41 – What were you most excited to share?
  • 00:14:34 – Global Git ignore
  • 00:19:53 – Sponsor: Taipy
  • 00:20:58 – Backing up configuration
  • 00:22:37 – Git autocorrect
  • 00:24:48 – Recovering from mistakes
  • 00:27:58 – Creating terminal aliases in Zsh
  • 00:31:59 – Using a Colemak keyboard layout
  • 00:34:33 – Changing the diff-options to histogram
  • 00:37:22 – Altering the global configuration file
  • 00:39:36 – Video Course Spotlight
  • 00:41:05 – Brief history of the Git project
  • 00:44:27 – delta - syntax-highlighting pager for git, diff, and grep output
  • 00:45:22 – pygments-git - Pygments lexers for Git output and files
  • 00:46:56 – What are you excited about in the world of Git?
  • 00:49:17 – What are you excited about in the world of Python?
  • 00:52:51 – What do you want to learn next?
  • 00:53:50 – How can people follow your work online?
  • 00:55:23 – Thanks and goodbye

Show Links:

  • Boost Your Git DX
  • “Boost Your Git DX” out now - Adam Johnson
  • Boost Your Django DX
  • Git: How to set up a global ignore file - Adam Johnson
  • Git - git-config Documentation
  • Git: How to enable autocorrect - Adam Johnson
  • New zine: Oh shit, Git!
  • Oh Shit, Git!?!
  • Git - git-reflog Documentation
  • Oh My Zsh - a delightful & open source framework for Zsh
  • Starship: Cross-Shell Prompt
  • Git - diff-options Documentation
  • Git - Git Configuration
  • Colemak - Keyboard Layout
  • delta: A syntax-highlighting pager for Git, diff, and grep output
  • pygments-git - PyPI
  • Sapling from Meta
  • Jujutsu: A Git-compatible DVCS that is both simple and powerful
  • Django 5.0 beta 1 released - Django
  • Adam Johnson’s Blog
  • Adam Johnson (@adamchainz@fosstodon.org) - Fosstodon
  • Projects - Adam Johnson

Level up your Python skills with our expert-led courses:

  • Introduction to Git and GitHub for Python Developers
  • How to Set Up a Django Project
  • Building Python Project Documentation With MkDocs

Support the podcast & join our community of Pythonistas

View Details

How do you prepare a scientific Python project for sharing with others? Could you use some best practices and guidance for packaging, documentation, and testing? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We talk about the creation of the Scientific Python Library Development Guide. The guide was finalized during the 2023 Scientific Python Developer Summit and is a resource for modern packaging. It includes sections of tutorials, principles, templates, and common patterns.

Christopher shares a recent Real Python tutorial about sorting Unicode strings in Python. He covers some of the pitfalls and ways to avoid them. The tutorial includes multiple third-party libraries to assist in wrangling Unicode characters.

We also share several other articles and projects from the Python community, including a couple of release announcements, information on namespaces and variable scope in Python, benchmark comparisons of Numba and Mojo, a discussion of recent so-called AI fails, a TUI for log files with a merged timeline, a cross-platform GUI building tool similar to HyperCard, and a project for reproducing exact argparse arguments.

Course Spotlight: Exploring Scopes and Closures in Python

In this Code Conversation video course, you’ll take a deep dive into how scopes and closures work in Python. To do this, you’ll use a debugger to walk through some sample code, and then you’ll take a peek under the hood to see how Python holds variables internally.

Topics:

  • 00:00:00 – Introduction
  • 00:02:30 – Python 3.13.0 alpha 1 is now available
  • 00:03:20 – core.py - Podcast
  • 00:03:53 – PEP 730 - Adding iOS as a supported platform
  • 00:05:22 – Mojo🔥 is now available on Mac
  • 00:06:28 – How to Sort Unicode Strings Alphabetically in Python
  • 00:11:48 – Python Variables: Namespaces and Variable Scope
  • 00:18:18 – Mojo: Head-to-Head With Python and Numba
  • 00:27:25 – Video Course Spotlight
  • 00:28:50 – The Scientific Python Library Development Guide
  • 00:32:47 – I’m banned for life from advertising on Meta
  • 00:48:03 – logmerger: TUI for Log Files With Merged Timeline
  • 00:50:34 – CardStock: Cross-Platform GUI Building Tool
  • 00:54:24 – reverse_argparse: Tell the User What They Ran
  • 00:56:25 – Thanks and goodbye

News:

  • Python Insider: Python 3.13.0 alpha 1 is now available
  • core.py - Podcast by Pablo Galindo and Łukasz Langa
  • PEP 730 - Adding iOS as a supported platform - peps.python.org
  • Modular: Mojo🔥 is now available on Mac

Show Links:

  • How to Sort Unicode Strings Alphabetically in Python – In this tutorial, you’ll learn how to correctly sort Unicode strings in Python while avoiding common pitfalls. You’ll explore powerful third-party libraries implementing the complete Unicode Collation Algorithm (UCA), as well as standard library modules and a few handmade solutions.
  • Python Variables: Namespaces and Variable Scope – This post is a comprehensive guide on namespaces and variable scope. Learn about the four different namespaces and how to access each.
  • Mojo: Head-to-Head With Python and Numba – This article covers a Mandelbrot-based benchmark of Python, variations of Numba, and the newly available Mojo. Although Mojo is fast, it takes a lot more work than the author expected to translate Python to it, and with the right parameters, Numba still beats it.
  • The Scientific Python Development Guide – This article talks about the release of the Scientific Python Development Guide, which documents Python package development. It includes cookie-cutter templates and repo tools.

Discussion:

  • I’m banned for life from advertising on Meta. Because I teach Python. — Reuven Lerner
  • ‘Life or Death:’ AI-Generated Mushroom Foraging Books Are All Over Amazon

Projects:

  • logmerger: TUI for Log Files With Merged Timeline
  • CardStock: Cross-Platform GUI Building Tool
  • reverse_argparse: Tell the User What They Ran

Additional Links:

  • Write once. Deploy everywhere. - BeeWare
  • Python Scope & the LEGB Rule: Resolving Names in Your Code - Real Python
  • Exploring Scopes and Closures in Python - Real Python
  • Thonny, Python IDE for beginners
  • Scikit-HEP - About
  • Episode #39: Generators, Coroutines, and Learning Python Through Exercises - The Real Python Podcast
  • 30-plus years of HyperCard, the missing link to the Web - Ars Technica
  • CardStock.run - Quickly and easily build apps on the web

Level up your Python skills with our expert-led courses:

  • Navigating Namespaces and Scope in Python
  • Unicode in Python: Working With Character Encodings
  • Exploring Scopes and Closures in Python

Support the podcast & join our community of Pythonistas

View Details

You may remember a recent Python Package Index (PyPI) announcement about hiring a full-time security engineer. We’ve also mentioned several current security initiatives from PyPI. This week on the show, we talk with Mike Fiedler about accepting this new role and securing accounts on PyPI.

Mike talks about how he started as a contributor to PyPI and eventually became a maintainer. We dig into why he fits this new role well and what his responsibilities are.

We discuss the initiative to secure accounts using two-factor authentication (2FA) methods. Mike also explains how package maintainers can adopt a new, more secure publishing method called trusted publishing that doesn’t require long-lived passwords.

We also discuss Mike’s recent talk called “How to Give Back to Open Source Without Losing Your Mind.” Mike shares advice and resources for finding your own contribution entry points.

Course Spotlight: Publishing Python Packages to PyPI

In this video course, you’ll learn how to create a Python package for your project and how to publish it to PyPI, the Python Package Index. Quickly get up to speed on everything from naming your package to configuring it using setup.cfg.

Topics:

  • 00:00:00 – Introduction
  • 00:02:11 – PyPI Safety and Security Engineer
  • 00:05:21 – Why did you initially become a PyPI contributor?
  • 00:11:26 – What are you most excited about in your new role?
  • 00:12:02 – Current security concerns
  • 00:15:07 – Focus on malicious package reporting
  • 00:16:30 – 2FA enforcement and building trust
  • 00:26:51 – Managing credentials and password managers
  • 00:29:24 – Forms of 2FA
  • 00:31:48 – Trusted publishers
  • 00:38:08 – Video Course Spotlight
  • 00:39:28 – Updating an older project
  • 00:41:44 – Evolution of security
  • 00:43:06 – Typosquatting and evolving security
  • 00:49:13 – How To Give Back to Open Source Without Losing Your Mind
  • 00:52:48 – What are you excited about in the world of Python?
  • 00:54:45 – What do you want to learn next?
  • 00:57:06 – How can people follow your work online?
  • 00:57:37 – Thanks and goodbye

Show Links:

  • PyPI hires a Safety & Security Engineer - The Python Package Index
  • Inbound Malware Volume Report - The Python Package Index
  • 2FA Enforcement for New User Registrations - The Python Package Index
  • PyPI 2FA Security Key Giveaway - PyPI
  • Software Bill Of Materials - National Telecommunications and Information Administration
  • Introducing ‘Trusted Publishers’ - The Python Package Index
  • Trusted Publishers - Getting Started - PyPI Docs
  • How To Give Back to Open Source Without Losing Your Mind – vBrownBag
  • Good First Issues - OpenSauced
  • Good First Issues
  • Participation - Hacktoberfest 2023
  • Python Release Python 3.12.0 - Python.org
  • htmx - high power tools for html
  • The web framework for perfectionists with deadlines - Django
  • The Python Package Index - Blog
  • Mike Fiedler, Code Gardener (@miketheman@hachyderm.io) - Fosstodon
  • Mike Fiedler, Code Gardener (@mikefiedler) / X
  • Mike Fiedler’s personal website

Level up your Python skills with our expert-led courses:

  • A Beginner's Guide to pip
  • Everyday Project Packaging With pyproject.toml
  • Publishing Python Packages to PyPI

Support the podcast & join our community of Pythonistas

View Details

What fundamental developer skills are new Python users missing? What best practices might developers without a computer science background be lacking? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher opens our discussion by sharing a recent social media thread about teaching software engineering best practices to scientists and others without a computer science background. We talk about software design philosophy and strategies for sharing knowledge within an organization.

We cover the results from the sixth annual official Python Developer Survey. The survey covers Python usage, language versions, frameworks, libraries, and various demographics. We dig into the details and share our insights.

We also share several other articles and projects from the Python community, including a couple of release announcements, so many Python dataframes, ways to speed up your code when multiple cores aren’t an option, Python’s syntactic sugar, a computer algebra system named SymPy, the process of building a blog in Django, code metrics in Python with Radon, and a TUI app for daily writing.

This week’s episode is brought to you by Snyk.

Course Spotlight: Filtering Iterables With Python

In this video course, you’ll learn how Python’s filter() works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace filter() and make your code more Pythonic.

Topics:

  • 00:00:00 – Introduction
  • 00:02:25 – Django 5.0 Alpha 1 Released
  • 00:03:45 – Mojo SDK Released for Linux
  • 00:04:50 – Python Developers Survey 2022 Results
  • 00:13:44 – Why Are There So Many Python Dataframes?
  • 00:20:24 – Sponsor: Snyk
  • 00:21:15 – Speeding Up Your Code When Multiple Cores Aren’t an Option
  • 00:28:41 – Python Is (Mostly) Made of Syntactic Sugar
  • 00:32:57 – Towards a New SymPy
  • 00:36:48 – Video Course Spotlight
  • 00:37:54 – Building a Blog in Django
  • 00:41:22 – What are fundamental skills and best-practices that might be lacking?
  • 00:55:02 – Learning About Code Metrics in Python With Radon
  • 00:59:43 – words-tui: A TUI App for Daily Writing
  • 01:02:34 – Thanks and goodbye

News:

  • Django 5.0 Alpha 1 Released
  • Mojo SDK Released for Linux

Show Links:

  • Python Developers Survey 2022 Results
  • Why Are There So Many Python Dataframes? – Ever wonder why there are so many ways libraries that have dataframes in Python? This article talks about the different perspectives of popular tool kits to explore why they are what they are.
  • Speeding Up Your Code When Multiple Cores Aren’t an Option – Parallelism isn’t the only answer: often you can optimize low-level code to get significant performance improvements.
  • Python Is (Mostly) Made of Syntactic Sugar – “Programming languages are often made up of a (mostly) irreducible core, with lots of sugary constructs sprinkled on top–the syntactic sugar.” This article summarizes a lot of Brett Cannon’s recent work exploring what’s sugar and what’s fundamental in Python.
  • Towards a New SymPy – SymPy is a computer algebra system, meaning that it does math on symbolic concepts. This can provide a lot more accuracy than typical floating-point mathematics found in numeric systems. This is part one of a multi-part article, explaining SymPy along with its recent improvements. Part two discusses how SymPy handles polynomials.
  • Building a Blog in Django – Very little code is needed to get a blog working using the Django framework. This post highlights what you need, including each of the key code components. There’s also an associated Hacker News discussion.

Discussion:

  • What are fundamental skills and best-practices that might be lacking? - Matt Harrison
  • A Philosophy of Software Design - Book
  • Episode #49: The Challenges of Developing Into a Python Professional

Projects:

  • Learning About Code Metrics in Python With Radon – Radon is a code metrics tool. This article introduces you to it and teaches you how you can improve your code based on its measurements.
  • words-tui: A TUI App for Daily Writing

Additional Links:

  • Episode #157: Discussing Mojo & Improving Python Object-Oriented Programming
  • Episode #167: Exploring pandas 2.0 & Targets for Apache Arrow
  • Episode #47: Unraveling Python’s Syntax to Its Core With Brett Cannon
  • Episode #92: Continuing to Unravel Python’s Syntactic Sugar With Brett Cannon
  • Episode #154: Targeting WebAssembly Platforms & Distilling a Minimum Viable Python
  • SymPy
  • Computer algebra system - Wikipedia
  • SimPy: Simulating Real-World Processes With Python
  • Episode #117: Measuring Python Code Quality, Simplicity, and Maintainability
  • Clean Code: Writing Clear, Readable, Understandable & Reliable Quality Code - Sonar
  • Anthony Shaw - Wily Python: Writing simpler and more maintainable Python - PyCon 2019 - YouTube
  • Textual
  • National Novel Writing Month
  • Episode #101: Tools for Setting Up Python on a New Machine

Level up your Python skills with our expert-led courses:

  • Filtering Iterables With Python
  • Defining Python Functions With Optional Arguments
  • Simulating Real-World Processes in Python With SimPy

Support the podcast & join our community of Pythonistas

View Details

Python 3.12 is here! Our regular guests, Geir Arne Hjelle and Christopher Trudeau, return to discuss the new version. Geir Arne coordinated a series of preview articles with several members of the Real Python team this year, and his showcase tutorial, “Python 3.12: Cool New Features for You to Try,” came out on October 2. Christopher’s video course was posted the next day, covering the topics from the article with visual examples of Python 3.12 in action.

Geir Arne and Christopher collaborated to create code examples of the new features. We discuss better error messaging, more intuitive f-strings, subinterpreters, the Linux perf profiler, improved typing syntax, and more.

We dig into the updates and offer advice on incorporating them into your projects. We also consider when you should start running Python 3.12.

Course Spotlight: What’s New in Python 3.12

In this video course, you’ll explore the new features that Python 3.12 brings to the table. These include improved f-strings, better error messages, changes to CPython internals, additions to static typing, and more.

Topics:

  • 00:00:00 – Introduction
  • 00:02:15 – Preview tutorials
  • 00:05:08 – Ever better error messages
  • 00:10:03 – More powerful f-strings
  • 00:15:46 – Comprehension inlining & additional optimizations
  • 00:21:24 – Support for subinterpreters
  • 00:27:55 – Support for the Linux perf profiler
  • 00:32:02 – Immortal objects
  • 00:35:01 – Video Course Spotlight
  • 00:36:03 – Calendar constants for days and months
  • 00:38:48 – New itertools.batched() for grouping Items
  • 00:40:53 – Improved type variable syntax
  • 00:50:51 – New Path.walk() for listing files in subdirectories
  • 00:53:04 – Override decorator for static typing
  • 00:57:36 – Advice on upgrading
  • 01:03:08 – Thanks to the core developer team
  • 01:04:39 – Thanks to the Real Python team and goodbye

Show Links:

  • Python 3.12: Cool New Features for You to Try
  • Python Release Python 3.12.0 - Python.org
  • Python 3.12 Preview: Ever Better Error Messages
  • Python 3.12 Preview: More Intuitive and Consistent F-Strings
  • PEP 701 – Syntactic formalization of f-strings
  • PEP 709 – Inlined comprehensions
  • Python 3.12 Preview: Subinterpreters
  • PEP 554 – Multiple Interpreters in the Stdlib
  • PEP 684 – A Per-Interpreter GIL
  • Python 3.12 Preview: Support For the Linux perf Profiler
  • PEP 683 – Immortal Objects, Using a Fixed Refcount
  • PEP 695 – Type Parameter Syntax
  • Python 3.12 Preview: Static Typing Improvements
  • PEP 698 – Override Decorator for Static Typing

Level up your Python skills with our expert-led courses:

  • Python Type Checking
  • What's New in Python 3.12
  • Cool New Features in Python 3.11

Support the podcast & join our community of Pythonistas

View Details

What can you learn from feeding an entire book on Python programming into ChatGPT-4 and asking it to provide a technical review? What are the potential pitfalls of using an LLM as a learning tool? This week on the show, author Al Sweigart talks about his recent experiments using ChatGPT and Python.

Al wanted to test how well an LLM could understand the computer science concepts covered in his recent book, The Recursive Book of Recursion. We talk about the positive and negative results of this technical review. We consider if this would be a valuable tool for technical review of your projects.

Al shares his thoughts on using ChatGPT as a learning tool and its potential pitfalls. We also cover the current strengths of this type of tool for Python developers.

Course Spotlight: Python Basics Exercises: Conditional Logic and Control Flow

In this Python Basics Exercises course, you’ll review how to use conditional logic to write programs that perform different actions based on different conditions. Paired with functions and loops, conditional logic allows you to write complex programs that can handle many different situations.

Topics:

  • 00:00:00 – Introduction
  • 00:01:51 – Reasons for experimenting
  • 00:04:24 – Using ChatGPT to review his recursion book
  • 00:10:45 – Why do this review?
  • 00:11:34 – The trouble of confabulation
  • 00:18:45 – Meaning of artificial intelligence over time
  • 00:28:21 – Video Course Spotlight
  • 00:29:54 – Detailed prompts and asking for specifics
  • 00:36:44 – Potential pitfalls for learning
  • 00:49:48 – Checking for flaws in generated code
  • 00:54:58 – How can it be useful?
  • 01:01:33 – Touching briefly on ethics
  • 01:02:35 – What are you excited about in the world of Python?
  • 01:05:21 – What do you want to learn next?
  • 01:07:36 – Python Programming Exercises, Gently Explained
  • 01:09:20 – How can people follow your work online?
  • 01:09:49 – Thanks and goodbye

Show Links:

  • Al Sweigart’s Website
  • Using ChatGPT-4 to Review My Recursion Programming Book - The Invent with Python Blog
  • Prompt Engineering: A Practical Example – Real Python
  • ChatGPT: Your Personal Python Coding Mentor – Real Python
  • GitHub Copilot: Fly With Python at the Speed of Thought – Real Python
  • ChatGPT: US lawyer admits using AI for case research - BBC News
  • If a hammer was like AI…
  • The Elements of AI Ethics
  • Al Sweigart: An Overview of the Python Code Tool Landscape 2023 - YouTube
  • Python Programming Exercises, Gently Explained
  • Invent with Python
  • Ruff, an extremely fast Python linter - Astral
  • Rust Programming Language
  • Command Line Applications in Rust

Level up your Python skills with our expert-led courses:

  • Python Basics: Strings and String Methods
  • Python Basics Exercises: Conditional Logic and Control Flow
  • Python Basics: Conditional Logic and Control Flow

Support the podcast & join our community of Pythonistas

View Details

Have you thought about contributing to an open-source Python project? What are possible entry points for intermediate developers? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a recent article by Stefanie Molin called “5 Ways to Get Started in Open Source.” Christopher shares his experience with suggesting features and potential bug fixes. We talk about common entry points for beginners and provide additional resources.

We cover a recent Real Python tutorial about creating QR codes with Python. The tutorial introduces the library Segno and tours the features. By working through the examples, you’ll be ready to build a QR code project yourself.

We also cover several other articles and projects from the Python community, including a couple of release announcements, an introduction to Python’s functools module, Hatch as an alternative for packaging, options for when NumPy is too slow, a simple diceware generator project, and a collection of machine learning recipes.

Course Spotlight: Caching in Python With lru_cache

Caching is an essential optimization technique. In this video course, you’ll learn how to use Python’s @lru_cache decorator to cache the results of your functions using the LRU cache strategy. This is a powerful technique you can use to leverage the power of caching in your implementations.

Topics:

  • 00:00:00 – Introduction
  • 00:02:04 – 2023 Django Developers Survey
  • 00:02:36 – Python 3.12.0 Release Candidate 2 Available
  • 00:03:04 – Pandas 2.1.0 Released
  • 00:03:27 – PEP 713: Callable Modules - Rejected
  • 00:04:52 – Generate Beautiful QR Codes With Python
  • 00:10:17 – Introduction to Python’s Functools Module
  • 00:14:00 – Switching to Hatch
  • 00:20:08 – Video Course Spotlight
  • 00:21:27 – When NumPy is too slow
  • 00:26:31 – 5 Ways to Get Started in Open Source
  • 00:42:28 – nodice-cli: A simple diceware generator with no dependencies
  • 00:44:32 – ML-Recipes: Collection of Machine Learning Recipes
  • 00:47:00 – Thanks and goodbye

News:

  • 2023 Django Developers Survey
  • Python 3.12.0 Release Candidate 2 Available
  • Pandas 2.1.0 Released
  • PEP 713: Callable Modules - Rejected - PEPs - Discussions on Python.org

Show Links:

  • Generate Beautiful QR Codes With Python – In this tutorial, you’ll learn how to use Python to generate QR codes, from your standard black-and-white QR codes to beautiful ones with your favorite colors. You’ll learn how to format QR codes, rotate them, and even replace the static background with moving images.
  • Introduction to Python’s Functools Module – This article introduces you to the functions in Python’s functools module with real-world examples to help show you how and when to use each feature.
  • Switching to Hatch – Oliver used Poetry for most of his projects, but he recently tried out Hatch instead. This blog post covers what it took to get things going and what features he used, including how he ditched tox.
  • When NumPy is too slow – NumPy is typically faster than plain Python for numeric calculations. What should you do when you find your NumPy-based code is too slow?

Discussion:

  • 5 Ways to Get Started in Open Source – This article shares ideas for finding and making your first open-source contribution, using examples from contributions the author has made to various projects.
  • The In-Person Event Handbook
  • Development Sprints - PyCon US 2023
  • Hacktoberfest 2023

Projects:

  • nodice-cli: A simple diceware generator with no dependencies
  • ML-Recipes: Collection of Machine Learning Recipes

Additional Links:

  • Episode #157: Discussing Mojo & Improving Python Object-Oriented Programming
  • Segno - Python QR Code and Micro QR Code encoder — Segno documentation
  • Episode #125: Improve Matplotlib With Style Sheets & Python Async for the Web
  • functools — Higher-order functions and operations on callable objects — Python documentation
  • About - Hatch
  • tox
  • xkcd: Password Strength

Level up your Python skills with our expert-led courses:

  • Building Python Project Documentation With MkDocs
  • Everyday Project Packaging With pyproject.toml
  • Caching in Python With lru_cache

Support the podcast & join our community of Pythonistas

View Details

When choosing a tool for profiling Python code performance, should it focus on the CPU, GPU, memory, or individual lines of code? What if it looked at all those factors and didn’t alter code performance while measuring it? This week on the show, we talk about Scalene with Emery Berger, Professor of Computer Science at the University of Massachusetts Amherst.

Emery talks about his background in memory management and his collaboration on Hoard, a scalable memory manager system used in Mac OS X. We discuss the need for improving code performance on modern computer architecture. He highlights this idea by contrasting the familiar limitations of Moore’s law with the lesser-known rule of Dennard scaling.

Working with his students in the university lab, they developed Scalene. Scalene is a high-performance CPU, GPU, and memory profiler. It can look at code from the individual function or line-by-line level and compare time spent in Python vs C code. Emery talks about the recent Scalene feature of AI-powered optimization proposals and covers a couple of examples. He also shares a collection of additional Python code-assistant tools from their lab.

Course Spotlight: What Does if name == “main” Mean in Python?

In this video course, you’ll learn all about Python’s name-main idiom. You’ll learn what it does in Python, how it works, when to use it, when to avoid it, and how to refer to it.

Topics:

  • 00:00:00 – Introduction
  • 00:02:13 – College of Information and Computer Sciences
  • 00:03:25 – Memory management systems background
  • 00:05:15 – Dennard Scaling vs Moore’s Law
  • 00:10:12 – Starting work on Python profiling
  • 00:15:00 – Deciding on a statistical profiler
  • 00:17:05 – Wanting to trace memory
  • 00:21:21 – Finding memory issues
  • 00:23:59 – Line-by-line analysis
  • 00:25:56 – Video Course Spotlight
  • 00:27:14 – Measuring profiler performance
  • 00:30:30 – Memory leak detection
  • 00:34:31 – When should you run a profiler?
  • 00:37:27 – Considerations for measuring cloud performance
  • 00:39:12 – Working with Jupyter and Conda
  • 00:42:18 – Common issues and AI solutions
  • 00:45:50 – Using a profiler to learn a codebase
  • 00:50:48 – Examples of AI-powered optimizations
  • 00:55:50 – What are you excited about in the world of Python?
  • 00:58:30 – What do you want to learn next?
  • 01:01:48 – How can people follow your work online?
  • 01:02:56 – Thanks and goodbye

Show Links:

  • Emery Berger - Professor of Computer Science, UMass Amherst
  • Scalene: a high-performance, high-precision CPU, GPU, and memory profiler for Python with AI-powered optimization proposals
  • Hoard
  • Moore’s law - Wikipedia
  • Dennard scaling - Wikipedia
  • Scalene: A high-performance, high-precision CPU+GPU+memory profiler for Python - PyCon 2021 - YouTube
  • Python Performance Matters - Strange Loop 2022 - YouTube
  • Triangulating Python Performance Issues with Scalene
  • ChatDBG: Puts root causes analysis into your debugger, and suggests fixes
  • Commentator: Automatically writes comments and type annotations for your code
  • Pythoness: Automatically generates Python code from natural language description
  • Slipcover: Near Zero-Overhead Python Code Coverage
  • emeryberger - GitHub

Level up your Python skills with our expert-led courses:

  • Python Debugging With pdb
  • Testing Your Code With pytest
  • What Does if name == "main" Mean in Python?

Support the podcast & join our community of Pythonistas

View Details

Are you writing efficient Python with as few lines of code as possible? Are you familiar with the many built-in language features that will simplify your code and make it more Pythonic? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a recent post from Bob Belderbos titled “Make Each Line Count, Keeping Things Simple in Python.” We provide many of our favorite Pythonic examples and the language mistakes that we’ve learned from. We also share multiple resources to add to your learning path.

Microsoft has announced a limited beta program for Python in Excel. We dig into the current details, requirements, and potential use cases.

We cover several other articles and projects from the Python community, including a group of announcements from the Python Software Foundation, a showcase of the Polars DataFrame library, immortal objects in Python, a code image generator Python project, an MS Paint clone in the terminal, and a Django ORM cheatsheet.

Topics:

  • 00:00:00 – Introduction
  • 00:02:10 – Python 3.12.0 release candidate 1 released
  • 00:02:53 – PSF Announces New PyPI Safety & Security Engineer
  • 00:03:44 – 2022 PSF Annual Report
  • 00:04:13 – Pydantic has been downloaded … 1 BILLION times!
  • 00:04:28 – Python Polars: A Lightning-Fast DataFrame Library
  • 00:12:26 – Introducing Immortal Objects for Python
  • 00:15:32 – Video Course Spotlight
  • 00:17:01 – Introducing Python in Excel
  • 00:26:34 – Build a Code Image Generator With Python
  • 00:31:49 – Make Each Line Count, Keeping Things Simple in Python
  • 00:44:08 – Textual-paint
  • 00:46:04 – Django ORM Cheatsheet
  • 00:49:48 – Thanks and goodbye

News:

Show Links:

  • Python Polars: A Lightning-Fast DataFrame Library – Welcome to the world of Polars, a powerful DataFrame library for Python! In this showcase tutorial, you’ll get a hands-on introduction to Polars’ core features and see why this library is catching so much buzz.
  • Introducing Immortal Objects for Python – This article explains immortal objects (PEP 683), which are excluded from garbage collection. This causes performance and shared memory improvements for large architectures.
  • Introducing Python in Excel – Microsoft has announced that they’re embedding Python in Excel through a partnership with Anaconda. Read on for details.
  • Build a Code Image Generator With Python – In this step-by-step tutorial, you’ll build a code image generator that creates nice-looking images of your code snippets to share on social media. Your code image generator will be powered by the Flask web framework and include exciting packages like Pygments and Playwright.

Discussion:

Projects:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

What should you consider when picking a font for coding in Python? What characters and their respective glyphs should you check before making your decision? This week on the show, we talk with Real Python author and core team member Philipp Acsany about his recent article, Choosing the Best Coding Font for Programming.

Philipp shares some of his background as a font engineer and graphic designer. We talk about how font design tools were his introduction to programming in Python.

We discuss how the frequent use of underscores, at signs, parentheses, and asterisks in Python’s syntax should affect your decision. Philipp’s tutorial provides several resources to help you find a monospace font that fits your coding requirements.

Topics:

  • 00:00:00 – Introduction
  • 00:01:32 – Previous podcast appearances
  • 00:03:18 – Programming-environment fussiness and monospace fonts
  • 00:07:29 – Researching the tutorial and curating the collection
  • 00:10:51 – Philipp’s background
  • 00:18:07 – Differentiating characters
  • 00:21:37 – Monospace, typewriters, and alignment
  • 00:25:08 – Character sets to study
  • 00:32:38 – The comma and the period
  • 00:37:04 – Video Course Spotlight
  • 00:38:30 – Python’s use in font development
  • 00:42:48 – Different fonts for different languages
  • 00:49:27 – Non-English comments
  • 00:55:40 – Our font choices
  • 00:59:00 – What are you excited about in the world of Python?
  • 01:01:35 – What do you want to learn next?
  • 01:03:41 – Where can people follow your work online?
  • 01:04:38 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

How can you improve a classification model while avoiding overfitting? Once you have a model, what tools can you use to explain it to others? This week on the show, we talk with author and Python trainer Matt Harrison about his new book Effective XGBoost: Tuning, Understanding, and Deploying Classification Models.

View Details

Have you ever encountered strange behavior when trying something new in Python? What are common quirks hiding within the language? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

What are the new ways to describe your data in pandas 2.0? Will the addition of Apache Arrow to the data back end foster the growth of data interoperability? This week on the show, we talk with pandas core developer Marc Garcia about the release of pandas 2.0.

View Details

What are all the different versions of Python? You may have heard of Cython, Brython, PyPy, or others and wondered where they fit into the Python landscape. This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Are you getting the most out of your Postgres database? What features could you leverage to improve your Python project? This week on the show, Craig Kerstiens from Crunchy Data is here to discuss getting the most out of Postgres.

View Details

What principles should you consider when designing a Python library? How do you construct a library API that's understandable and easy to use? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

How much Python do you need to learn to start creating projects? What's a good balance of information and hands-on practice? This week on the show, Eric Matthes is here to discuss his book Python Crash Course.

View Details

What advice can you extract from the Zen of Python? How can these nineteen guiding principles help you write more idiomatic Python? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Are you looking to advance your CircuitPython projects? Would you like a collection of resources and tools to help you along your path? This week on the show, Tod Kurt is here to discuss building projects with CircuitPython.

View Details

What are the unique challenges of a large Python code base? What techniques can you implement to simplify the management of a big project? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Have you thought about getting more involved in the Python community? Are you interested in volunteering for an event or becoming an organizer? This week on the show, we speak with organizers from this year's PyCascades conference about making connections, learning new skills, and rationing your time.

View Details

Do you need a refresher on using Docker with Python? Would you like to learn how to configure a continuous integration pipeline with modern tools and Docker? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We share a Real Python tutorial from Bartosz Zaczyński about building continuous integration with Docker. Docker provides consistent environments for configuring, testing, and delivering Python applications. In this tutorial, you’ll get up to speed with current Docker and CI techniques.

We also speak with Bill Pollock from No Starch Press about Hacker Initiative. The public nonprofit gives back to and strengthens the hacking community. The 2023 grant cycle is currently open until August 15. We discuss the application process and projects from previous grant recipients.

We cover several other articles and projects from the Python community, including a news update and some resources on implementing metaclasses in Python, creating time machine-style backups, and scanning your project for vulnerabilities.

Topics:

  • 00:00:00 – Introduction
  • 00:02:26 – PyPI Temporarily Suspended New Registrations
  • 00:03:38 – PyPI was subpoenaed
  • 00:04:54 – Python 3.12.0 beta 1 released
  • 00:05:19 – Build Robust Continuous Integration With Docker and Friends
  • 00:13:02 – Metaclasses in Python
  • 00:20:03 – Pronouncing SQL - Is there life after SQL?
  • 00:22:52 – Video Course Spotlight
  • 00:24:25 – pyscan: Python dependency vulnerability scanner, written in Rust
  • 00:26:28 – rsync-time-machine.py: Time Machine-Style Backups
  • 00:29:20 – Bill Pollock and Hacker Initiative
  • 00:34:18 – Previous grant recipients
  • 00:36:58 – First Tech Challenge
  • 00:43:18 – Large vs small nonprofits
  • 00:45:48 – Applying for the 2023 grant cycle
  • 00:49:01 – Underserved areas
  • 00:51:45 – Thanks and goodbye

News:

Show Links:

Projects:

Hacker Initiative Links:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Would you like to speed up your Python machine-learning code dramatically? What if you only had to change a few keywords and add a couple of type hints on portions of your code? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a new programming language named Mojo, which is a superset of Python. It aims to fix Python’s performance and deployment problems. The project has many interesting ideas and a leader who has helped to shape modern compiler technology.

We also share a pair of Real Python tutorials from Leodanis Pozo Ramos about object-oriented programming in Python. The first one is a deep dive into the creation of classes. It’s an excellent refresher for anyone looking to hone their OOP skills in Python.

The second tutorial covers the SOLID principles, which are five well-established standards for improving your object-oriented design. These principles guide you to create object-oriented code that is more maintainable, extensible, scalable, and testable.

We cover several other articles and projects from the Python community, including a news update, showing warnings when running Django, tracking the progress of your Python program, and a Markdown browser for your terminal.

This week’s episode is brought to you by Koyeb.

Topics:

  • 00:00:00 – Introduction
  • 00:02:39 – PEP 713: Callable Modules
  • 00:04:22 – PEP 712: “Converter” Parameter for dataclasses.field
  • 00:06:49 – Python Classes: The Power of Object-Oriented Programming
  • 00:16:44 – Sponsor: Koyeb
  • 00:17:33 – SOLID Principles: Improve Object-Oriented Design in Python
  • 00:22:00 – Mojo, a Superset of Python
  • 00:34:31 – Mojo might be the biggest thing to happen in programming for decades
  • 00:41:48 – Mojo – a new programming language for AI developers
  • 00:44:03 – Video Course Spotlight
  • 00:45:23 – Have Python Show Warnings When Running Django
  • 00:47:52 – TQDM: Tracking the Progress of Your Python Program
  • 00:50:34 – frogmouth: A Markdown Browser for Your Terminal
  • 00:53:59 – Thanks and goodbye

News:

Show Links:

  • Python Classes: The Power of Object-Oriented Programming – In this tutorial, you’ll learn how to create and use full-featured classes in your Python code. Classes provide a great way to solve complex programming problems by approaching them through models that represent real-world objects.
  • SOLID Principles: Improve Object-Oriented Design in Python – In this tutorial, you’ll learn about the SOLID principles, which are five well-established standards for improving your object-oriented design in Python. By applying these principles, you can create object-oriented code that is more maintainable, extensible, scalable, and testable.
  • Mojo, a Superset of PythonMojo is a new programming language, which is a superset of Python. It aims to fix Python’s performance and deployment problems.
  • Have Python Show Warnings When Running Django – How to show warnings when running Python, and Django, during local development. The easy, yet not well-known, way.

Discussion:

Projects:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

How do Python virtual environments work under the hood? How does understanding these concepts help you with managing them for your projects? This week on the show, CPython core developer Brett Cannon returns to discuss his recent articles about virtual environments and the Python packaging landscape.

Brett talks about his recent article “How Virtual Environments Work.” He was researching the topic to solve an issue with a Linux Python distribution that doesn’t provide the tools to create virtual environments. We talk about how he solved the problem by creating a tiny library named microvenv.

We also take a look at the Python packaging ecosystem. Brett talks about the early days of Python, when these tools didn’t exist. He contrasts that with the current packaging solution explosion and how each one attempts to solve unique problems. We also discuss the Python Packaging User Survey and the plans for packaging summits at PyCon US. Note that we recorded this episode two weeks before PyCon US 2023.

Topics:

  • 00:00:00 – Introduction
  • 00:01:58 – Virtual environments
  • 00:07:10 – PEP 704 & virtual environment workflows
  • 00:26:57 – Experimenting with not including pip
  • 00:34:44 – Video Course Spotlight
  • 00:36:35 – What are you using for packaging?
  • 00:43:32 – Python Packaging User Survey & the history of packaging
  • 00:48:40 – Packing only gets complex when it’s not pure Python code
  • 01:01:22 – Outcomes after the survey and the packaging summit
  • 01:03:56 – What are you excited about in the world of Python?
  • 01:05:28 – What’s something you want to learn next?
  • 01:07:12 – How can people follow the work that you do?
  • 01:08:14 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

How can you ensure that you’ve appropriately declared your project’s required dependencies? How do you determine what dependencies are missing from a third-party project that you can’t run? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a new Python dependency checker called FawltyDeps. The tool helps you determine if you’ve declared too few or too many packages for your project.

Christopher has brought several developer resource collections: a list of assured open-source Python packages from Google, test databases with interesting datasets, and multiple Django third-party packages.

We cover several other articles and projects from the Python community, including a news update, advice on how to pitch yourself as a guest to a podcast, how to submit articles and projects to PyCoders Weekly, PyPI’s introduction of trusted publishers and organizations, a tool for tracking package history, a pixel art paint program written in Python, and a project for efficient string matching with regular expressions.

Topics:

  • 00:00:00 – Introduction
  • 00:02:19 – PEP 684 – A Per-Interpreter GIL Accepted
  • 00:03:59 – Python 3.10 Runtime Now Available in AWS Lambda
  • 00:04:19 – PyCon US 2023 Follow Up
  • 00:08:05 – Podcast Topic & Guest Submissions
  • 00:13:45 – Submissions to PyCoders Weekly
  • 00:16:49 – Google’s Assured OSS Python Packages
  • 00:18:27 – Groovy Datasets for Test Databases
  • 00:19:10 – Top 10 Django Third-Party Packages
  • 00:20:27 – Video Course Spotlight
  • 00:21:46 – FawltyDeps - A Dependency Checker for Your Python
  • 00:26:58 – PyPI Introduces “Trusted Publishers”
  • 00:28:27 – Introducing PyPI Organizations
  • 00:29:02 – pypi-diff: PyPI Package History Tracking
  • 00:30:29 – PyDPainter: A usable pixel art paint program written in Python
  • 00:35:19 – trrex: Efficient String Matching With Regular Expressions
  • 00:37:16 – Thanks and Goodbye

News:

Show Links:

Projects

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Are you familiar with the different versions of WebAssembly? Could WASM be the “write once, run everywhere” solution that developers have searched for? Where does distributing Python applications fit in the narrative? This week on the show, we have CPython core developer Brett Cannon to discuss his recent articles about WebAssembly and MVPy.

Brett has completed his syntactic sugar series, which we discussed in a previous episode. He details the origin of the series and his process of unearthing a minimum viable version of Python. Brett shares how he updated his PyCon US talk on the subject after feedback from presenting it at PyCascades.

We also dig deep into WebAssembly, specifically WebAssembly System Interface (WASI). Brett explains the concept of a “platform target triple” and the importance of defining which system CPython is compiled for. We also discuss WebAssembly becoming a ubiquitous distribution system.

Topics:

  • 00:00:00 – Introduction
  • 00:02:05 – PyCascades 2023
  • 00:02:56 – Using social media for polls and checking interest
  • 00:06:02 – Completing the syntactic sugar blog series
  • 00:15:29 – Minimum Viable Python (MVPy) and WebAssembly
  • 00:19:29 – Other teams focusing on WebAssembly
  • 00:21:31 – Sponsor: Courier
  • 00:22:13 – Stack of technology
  • 00:26:50 – WebAssembly and its platform targets
  • 00:32:35 – WASI and connecting to a runtime
  • 00:38:33 – Extension modules and dynamic libraries
  • 00:47:29 – Overcoming road blocks and envisioning a new WASI assignment
  • 00:51:51 – Video Course Spotlight
  • 00:53:26 – PEP 11 & CPython platform support for WASI
  • 01:03:11 – Machine-specific runtime
  • 01:04:57 – Write once, run everywhere
  • 01:13:14 – Talks and summits planned for PyCon 2023
  • 01:18:00 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

What can you do if your text manipulation in Python is slowing you down? Are there faster alternatives using a compiled extension? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher shares a recent article by Itamar Turner-Trauring called “Speeding Up Text Processing in Python (Is Hard).” The piece compares the performance of string-matching scenarios using several alternatives to pure Python that rely on compiled extensions.

We also discuss a recent Real Python tutorial by Stephen Gruppetta on when to use .\_\_repr\_\_() vs .\_\_str\_\_() in Python. We cover the use cases for these special methods and the intended audiences for the strings they produce.

We share several other articles and projects from the Python community, including a news update, an article on the functional power of Python’s reduce(), a call to ban 1+N in Django, a friendly project to fetch your data files, and a tool for tracking your work from the shell.

Topics:

  • 00:00:00 – Introduction
  • 00:02:11 – The Python Package Index Launches a Blog
  • 00:03:11 – PEP 582 (Python Local Packages Directory) Rejected
  • 00:05:00 – Django 4.2 Release Candidate 1 Released
  • 00:05:34 – Want to Host DjangoCon Europe 2024?
  • 00:06:23 – When Should You Use .\_\_repr\_\_() vs .\_\_str\_\_() in Python?
  • 00:14:16 – Sponsor: Snyk
  • 00:15:06 – Speeding Up Text Processing in Python (Is Hard)
  • 00:22:21 – reduce() - The Power of a Single Python Function
  • 00:30:27 – Video Course Spotlight
  • 00:32:04 – Ban 1+N in Django
  • 00:35:26 – Pooch - A Friend to Fetch Your Data Files
  • 00:39:11 – workedon - Track Your Work From the Shell
  • 00:41:53 – Thanks and Goodbye

News:

Show Links:

  • When Should You Use .\_\_repr\_\_() vs .\_\_str\_\_() in Python? – In this tutorial, you’ll learn the difference between the string representations returned by .\_\_repr\_\_() vs .\_\_str\_\_() and understand how to use them effectively in classes that you define.
  • Speeding Up Text Processing in Python (Is Hard) – If you need to speed up string parsing and formatting in Python, you have many choices. This article covers the uses of Cython, mypyc, Rust, and PyPy and considers how to choose between them.
  • reduce() - The Power of a Single Python Function – “While Python is not a pure functional programming language, you still can do a lot of functional programming in it. In fact, just one function - reduce() - can do most of it.” This article introduces you to reduce().
  • Ban 1+N in Django – The 1+N database anti-pattern is common: fetch some rows from the database then re-fetch specific rows to get all the items. An ORM can hide this away and make you fail to realize that it’s happening. This article discusses how to avoid this anti-pattern in Django. It also has an added meta-bonus: a link to the attempt to write the article with ChatGPT.

Projects:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Are you exploring automation of your repetitive business tasks with Python? How are you going to share your helpful tools with co-workers? This week on the show, Sampo Ahokas from Robocorp is here to discuss robotic process automation (RPA) and distribution of these robots.

Sampo is a co-founder and VP of engineering at Robocorp. We talk about using Robot Framework, an open-source RPA tool, to develop bots that implement your existing Python skills. Sampo shares example projects and additional resources for new users.

We discuss the typical difficulties of sharing automation tools with a team and trying to avoid the dreaded “works on my machine” problem. Sampo describes how their group worked to develop a Conda-based tool for creating shareable packages and environments.

Topics:

  • 00:00:00 – Introduction
  • 00:02:25 – What is robotic process automation (RPA)?
  • 00:03:55 – What do you mean by automation?
  • 00:05:56 – Additional examples of RPA
  • 00:07:41 – What is the RPA platform?
  • 00:10:06 – What is the Robot Framework?
  • 00:12:42 – Robocorp portal
  • 00:14:09 – Python integration
  • 00:17:06 – Sponsor: REVSYS
  • 00:17:56 – Distribution with RCC
  • 00:20:24 – Why does the system use conda under the hood?
  • 00:24:12 – What hurdles did you face creating RCC?
  • 00:27:51 – Steps for the end user
  • 00:30:52 – Making the project open source
  • 00:35:20 – Video Course Spotlight
  • 00:36:42 – Tips for someone starting with automation
  • 00:42:17 – Integration with VSCode
  • 00:44:18 – Intelligent document processing (IDP)
  • 00:45:36 – What are you excited about in the world of Python?
  • 00:47:46 – What do you want to learn next?
  • 00:48:13 – How can people follow the project online?
  • 00:48:46 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Have you ever installed a Python package without knowing anything about it? What best practices should you employ to ensure the quality of your next package installation? Christopher Trudeau is back this week, bringing another batch of PyCoder’s Weekly articles and projects. We also have Python Software Foundation executive director, Deb Nicholson, to share details about PyCon US 2023.

We cover a recent Real Python tutorial by Philipp Acsany on evaluating the quality of Python packages. The piece provides a tool kit for researching the traits, history, software license, and current condition of external Python packages. We also discuss the techniques that we personally use before selecting a package for our Python projects.

We share several other articles and projects from the Python community, with topics such as the underlying structure of virtual environments, the overhead of Python asyncio tasks, documentation for Python projects with Sphinx and Read the Docs, a project for creating argparse boilerplate, and a way to generate seemingly realistic fake numbers using Benford’s law.

Deb Nicholson is also here to talk about the 20th anniversary of PyCon US, hosted in Salt Lake City. We dig into the details of the upcoming conference, including keynote speakers, tutorials, scheduled talks, and improvements to the hybrid online experience.

Topics:

  • 00:00:00 – Introduction
  • 00:02:46 – How to Evaluate the Quality of Python Packages
  • 00:11:35 – Overhead of Python asyncio Tasks
  • 00:14:53 – Sponsor: Courier
  • 00:15:37 – How Virtual Environments Work
  • 00:23:48 – Documenting Python Projects With Sphinx and Read the Docs
  • 00:28:29 – duckargs: Code Generator for argparse Boilerplate
  • 00:30:46 – Video Course Spotlight
  • 00:32:04 – Are Those Numbers Realistic or Fake? Try Using Benford’s Law
  • 00:34:37 – Introduction for Deb Nicholson
  • 00:36:33 – What is your role with PyCon US?
  • 00:37:28 – Hybrid conference and dates
  • 00:39:07 – Tutorials
  • 00:40:30 – Education Summit and Typing Summit
  • 00:42:06 – Keynote speakers
  • 00:42:57 – Lightning talks, posters, and job fair
  • 00:45:04 – 20th anniversary of PyCon US
  • 00:46:56 – Resources for proposals and talks
  • 00:49:22 – Previous podcast guests and talks
  • 00:51:26 – Mentored sprints for diverse beginners
  • 00:53:12 – PyLadies auction
  • 00:54:29 – COVID policy
  • 00:56:50 – What are you excited about in the world of Python?
  • 00:58:07 – What do you want to learn next?
  • 00:59:24 – How to follow the PSF and PyCon US?
  • 00:59:55 – Thanks and goodbye

Show Links:

  • How to Evaluate the Quality of Python Packages – Just like you shouldn’t download any file from the Internet, you shouldn’t install third-party Python packages without evaluating them first. This tutorial will give you the tool set to evaluate the quality of external Python packages before you incorporate them into your Python projects.
  • Overhead of Python Asyncio Tasks – The Textual library uses a lot of asyncio tasks. In order to determine whether to spend time optimizing them, Will measured the cost of creating asyncio tasks. TLDR; optimize something else. This article also spawned a conversation on Hacker News.
  • How Virtual Environments Work – This article attempts to demystify virtual environments, specifically why they exist and how they work. It even delves into why Brett is heading down this alley and how running into challenges with cross-platform tools has prompted the creation of microvenv.
  • Documenting Python Projects With Sphinx and Read the Docs – In this video series, you’ll create project documentation from scratch using Sphinx, the de facto standard for Python. You’ll also hook your code repository up to Read The Docs to automatically build and publish your code documentation.

Projects:

PyCon US 2023 Links:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

What are the core lessons you’ve learned along your Python development journey? What are key takeaways you would share with new users of the language? This week on the show, Duarte Oliveira e Carmo is here to discuss his recent talk, “Four Years of Python.”

Duarte works at the crossroads of machine learning, data science, and software engineering. He began using Python in his graduate studies and never looked back. In 2021, he wrote a blog post about some of the valuable lessons he’s learned. Then he decided the lessons and concepts in the post might make a good conference talk.

We cover the steps in his process of crafting the presentation, practicing it at a smaller conference, and finally presenting it at PyCon Italia last year.We also dig into the four major themes of the talk. Along the way, we share a collection of resources to help you continue learning on your Python journey.

Topics:

  • 00:00:00 – Introduction
  • 00:02:38 – Four years of Python
  • 00:04:18 – Why did you create a blog?
  • 00:06:19 – A singular vs wide focus for the blog
  • 00:09:19 – Pitching the talk to conferences
  • 00:13:02 – Resources for preparing your talk
  • 00:16:03 – What was your programming and Python background?
  • 00:19:00 – Sponsor: InfluxData
  • 00:19:47 – Reading is better than Googling
  • 00:26:23 – What are some of your favorite docs?
  • 00:28:48 – Thoughts on GPT and Copilot
  • 00:31:45 – Keep it stupid simple
  • 00:36:07 – What’s extensible code?
  • 00:38:29 – Video Course Spotlight
  • 00:39:54 – Learning testing techniques & testing data science code
  • 00:46:05 – Continuous learning
  • 00:51:46 – What do you use for RSS?
  • 00:53:06 – Resources for machine learning
  • 00:57:20 – What are you excited about in the world of Python?
  • 00:58:57 – What do you want to learn next?
  • 01:00:55 – How can people follow the work you do?
  • 01:01:20 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Have you explored Python’s collections module? Within it, you’ll find a powerful factory function called namedtuple(), which provides multiple enhancements over the standard tuple for writing clearer and cleaner code. This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

Christopher discusses his Real Python video course about writing more Pythonic code using namedtuple(). With namedtuple(), you can create immutable sequence types that allow you to access their values using descriptive field names and dot notation instead of clunky integer indices.

We also discuss metaprogramming and the unique advantages of Python’s dynamism. Christopher shares potential paths for this type of coding from web applications, testing, and AST techniques.

We share several other articles and projects from the Python community, including a news update, the Arrow revolution happening in pandas 2.0, a new PEP for inlined comprehensions, tips and techniques for modern Flask apps, a Python helper tool for building and running a REPL with custom commands, and a project to turn a pandas DataFrame into a Tableau-style UI.

Topics:

  • 00:00:00 – Introduction
  • 00:02:17 – Python 3.12.0 alpha 6 released
  • 00:02:40 – Django Developers Survey 2022 Results
  • 00:03:12 – Writing Clean, Pythonic Code With namedtuple
  • 00:07:40 – pandas 2.0 and the Arrow Revolution (Part I)
  • 00:17:21 – Sponsor: RevSys
  • 00:18:10 – PEP 709: Inlined Comprehensions
  • 00:20:51 – 13 Tips and Techniques for Modern Flask Apps
  • 00:25:54 – Video Course Spotlight
  • 00:27:24 – Discussion: Python’s “Disappointing” Superpowers
  • 00:47:54 – replbuilder: Python helper tool for building and running a REPL with custom commands
  • 00:49:58 – pygwalker: Turn pandas Into a Tableau-Style UI
  • 00:52:15 – Thanks and goodbye

News:

Show Links:

  • Writing Clean, Pythonic Code With namedtuple – In this video course, you’ll learn what Python’s namedtuple is and how to use it in your code. You’ll also learn about the main differences between named tuples and other data structures, such as dictionaries, data classes, and typed named tuples.
  • pandas 2.0 and the Arrow Revolution (Part I) – This article details the changes in the pandas 2.0 release, with emphasis on the underlying adoption of Apache Arrow.
  • PEP 709: Inlined Comprehensions – Python Enhancement Proposal 709 covers a change to how comprehensions are handled. Currently, they’re compiled as nested functions. Benchmarking shows that treating list, dict, and set comprehensions as inline code can result in a 2x speedup on the comprehension.
  • 13 Tips and Techniques for Modern Flask Apps – Flask is approaching its 13th birthday, and to celebrate, Phillip has written 13 tips for writing modern Flask apps. It covers dealing with JSON, environment-based configuration, auto-generated docs, and more.

Discussion:

Projects:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Are you interested in deploying your Python project everywhere? This week on the show, Russell Keith-Magee, founder and maintainer of the BeeWare project, returns. Russell shares recent updates to Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices.

We cover how Anaconda hired him last year to work full-time on the BeeWare project. He shares how this has helped him focus his efforts and move the project forward.

We also discuss his recent talk at DjangoCon US 2022 on how to turn your website into an app (and why maybe you shouldn’t). Russell details the problems of converting from the Web to a mobile platform. We also contrast WebAssembly System Interface (WASI) with the tools that his team works on.

Topics:

  • 00:00:00 – Introduction
  • 00:02:06 – BeeWare project update and open-source funding
  • 00:06:47 – What are BeeWare and Briefcase?
  • 00:08:19 – Toga GUI and contributions
  • 00:10:47 – Pace of the project now
  • 00:12:47 – PEP 517 and binary packages with C or Rust
  • 00:17:29 – WASM and Briefcase for Web
  • 00:22:22 – Sponsor: InfluxData
  • 00:23:10 – How to turn your Website into an App - Talk
  • 00:28:14 – Bridging libraries that access platform hardware
  • 00:40:56 – Video Course Spotlight
  • 00:42:27 – WASI - WebAssembly System Interface
  • 00:48:18 – Do you need an app or a website?
  • 00:54:23 – Getting started with BeeWare
  • 01:00:06 – What to do first if interested in contributing?
  • 01:02:33 – Channels for the project
  • 01:04:55 – Upcoming conference talks
  • 01:05:26 – What are you excited about in the world of Python?
  • 01:06:42 – What do you want to learn next?
  • 01:09:28 – How can people follow your work online?
  • 01:10:10 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Have you decided how you’re going to deploy your Django project? Should you use a VPS or a PaaS? Christopher Trudeau is back this week, bringing another batch of PyCoder’s Weekly articles and projects. We also have organizers from PyCascades to share details about this year’s hybrid in-person and virtual conference.

Christopher shares an article about selecting an appropriate Django project deployment strategy. The guide compares VPS (virtual private server) and PaaS (platform as a service) systems. He also covers hosting providers for each and highlights potential pitfalls.

We share several other articles and projects from the Python community, including a news update, what’s new in SQLAlchemy 2.0, how to flush the output of the Python print function, the dangers behind image resizing for machine learning, a project that visualizes pathfinding algorithms, and a runtime executor project.

We also have three special guests from PyCascades 2023 to dig into the details of the conference. Conference chair Eliza Sarobhasa is CTO at Women Who Drone and Leadership Fellow (Python Track) & Python Developer Advocate at Women Who Code. Sprints chair Chethana Gopinath is a Software Engineer at realtor.com and a Senior Lead at Women Who Code Python. Speaker Support Chair Jolene Wong is a Senior Software Engineer at Cisco based in Vancouver. We discuss hosting a hybrid conference, participating in open-source sprints, and finding a local Python community.

Topics:

  • 00:00:00 – Introduction
  • 00:02:47 – Django 4.2 beta 1 released
  • 00:03:04 – What’s New in SQLAlchemy 2.0?
  • 00:06:42 – How to Flush the Output of the Python Print Function
  • 00:14:30 – The Essential Django Deployment Guide
  • 00:21:37 – Sponsor: Snyk
  • 00:22:30 – The Dangers Behind Image Resizing
  • 00:29:40 – Pathfinding-Visualizer: Visualize Pathfinding With Pygame
  • 00:32:40 – rtx: Runtime Executor (asdf Rust Clone)
  • 00:36:19 – Video Course Spotlight
  • 00:37:31 – PyCascades 2023 Details
  • 00:38:53 – Hybrid conference
  • 00:41:11 – How did Chethana get involved?
  • 00:42:30 – Open-source sprints
  • 00:45:19 – How did Jolene get involved?
  • 00:46:31 – How did Eliza get involved?
  • 00:50:21 – Venue details
  • 00:52:32 – Scheduled talks
  • 00:56:13 – Conference sponsors
  • 00:57:48 – Advice for attendees
  • 01:00:46 – Tickets and virtual platform
  • 01:03:01 – What are you excited about in the world of Python?
  • 01:06:13 – Thanks and goodbye

News:

Show Links:

  • What’s New in SQLAlchemy 2.0? – SQLAlchemy 2.0 was launched in January. This article reviews the latest changes, whether it is worth the upgrade, and how to go about it.
  • How to Flush the Output of the Python Print Function – In this tutorial, you’ll learn how to flush the output of Python’s print function. You’ll explore output stream buffering in Python using code examples and learn that output streams are block-buffered by default, and that print() with its default arguments executes line-buffered when interactive.
  • The Essential Django Deployment Guide – Going from “it works on my machine” to deploying to the public can be a daunting task. This guide details the choices between VPS and PaaS systems, how to choose, what the options are, and what you need to know to get your Django code live.
  • The Dangers Behind Image Resizing – When training an ML model on image data you likely want smaller, consistently sized images. That means image processing in your pipeline, but the expectation that image resizing is the same across libraries can cause unforeseen problems.

Projects:

PyCascades Links:

Additional Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

View Details

Are you still using loops and lists to process your data in Python? Have you heard of a Python library with optimized data structures and built-in operations that can speed up your data science code? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to share secrets for harnessing linear algebra and NumPy for your projects.

Jodie details how most people begin their data science journey using loops to iterate over values and apply operations sequentially. We talk about how loops are friendly for beginners, being clear to read and easy to debug, but unfortunately don’t scale well, especially with large amounts of data.

Jodie shares some of the basics of linear algebra and how to organize data into vectors. We talk about how the NumPy library leverages those concepts to improve data processing. We discuss how the library includes operations for vector and matrix addition and subtraction, and why these operations are more efficient than loops. We also cover how NumPy stores arrays in memory and when working with them is faster vs when it’s not.

Topics:

  • 00:00:00 – Introduction
  • 00:02:35 – Vectorize all the things! - PyCon UK 2022 Talk
  • 00:06:39 – Becoming familiar with linear algebra
  • 00:09:05 – Beginners start with loops
  • 00:11:25 – Starting with basic linear algebra
  • 00:12:25 – The basic unit of a vector
  • 00:18:06 – NumPy representing vectors in Python
  • 00:23:25 – Sponsor: InfluxDB
  • 00:24:13 – Block management
  • 00:25:54 – Replacing a loop with vector-based operations
  • 00:34:06 – NumPy broadcasting
  • 00:38:52 – Approximating nearest neighbors
  • 00:43:49 – Video Course Spotlight
  • 00:45:15 – Solving the problem
  • 00:46:44 – Getting rid of nested loops
  • 00:48:54 – A peek under the hood
  • 00:53:28 – How arrays vs lists are stored in memory
  • 01:00:24 – Considering a GPU
  • 01:03:37 – Real Python resources on the subject
  • 01:04:08 – Upcoming talks and conferences
  • 01:07:31 – Thanks and goodbye

Show Links:

Support the podcast & join our community of Pythonistas

View Details

Would you like to practice your Python skills while building a challenging word game? Have you been wanting to learn more about creating command-line interfaces and making them colorful and interactive? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We share a recent Real Python step-by-step project about creating a clone of Wordle. In the project, you’ll practice building a terminal application, validating user input, and refactoring code into functions.

Christopher shares an article that compares two popular testing tools, Nox and Tox. He discusses how each framework approaches test environment configuration and why the author leans toward using Nox’s Python decorator–based format.

We share several other articles and projects from the Python community, including a news update, a guide to trying out code and ideas quickly with the Python REPL, a PEP about requiring virtual environments by default, a discussion about lessons learned in twenty years as a software engineer, a project for a spreadsheet GUI inside of JupyterLab notebooks, and adding C-style for loops to Python.

Topics:

  • 00:00:00 – Introduction
  • 00:02:21 – Django Security Releases Issued
  • 00:02:43 – PSF Is Hiring a Security Developer-in-Residence
  • 00:03:44 – Python 3.11.2, Python 3.10.10 and 3.12.0 alpha 5 are available
  • 00:04:02 – Build a Wordle Clone With Python and Rich
  • 00:10:05 – Why I Like Nox
  • 00:16:44 – Sponsor: Anaconda Cloud
  • 00:17:26 – PEP 704: Require Virtual Environments by Default
  • 00:27:17 – The Python Standard REPL: Try Out Code and Ideas Quickly
  • 00:33:08 – Video Course Spotlight
  • 00:34:35 – 20 Things I’ve Learned in My 20 Years as a Software Engineer
  • 00:47:50 – Mito: A Spreadsheet Inside Your JupyterLab Notebooks
  • 00:51:37 – How I Added C-Style for-Loops to Python
  • 00:58:08 – Thanks and goodbye

News:

Show Links:

  • Build a Wordle Clone With Python and Rich – In this step-by-step project, you’ll build your own Wordle clone with Python. Your game will run in the terminal, and you’ll use Rich to ensure your word-guessing app looks good. Learn how to build a command-line application from scratch and then challenge your friends to a wordly competition!
  • Why I Like Nox – Both Nox and Tox are multi-environment testing tools. This opinion piece by Hynek compares and contrasts them and explains why he is increasingly using Nox.
  • PEP 704: Require Virtual Environments by Default
  • The Python Standard REPL: Try Out Code and Ideas Quickly – In this tutorial, you’ll learn how to use the Python standard REPL (Read-Eval-Print Loop) to run your code interactively. This tool will allow you to test new ideas, explore and experiment with new tools and libraries, refactor and debug your code, try out examples, and more.

Discussion

Projects:

Additional Links:

Support the podcast & join our community of Pythonistas

View Details

Can you describe your business processes with flowcharts? What if you could define the steps in a standard notation and implement the workflows in pure Python? This week on the show, Dan Funk from Sartography is here to discuss SpiffWorkflow.

SpiffWorkflow is a Python tool for translating Business Process Model and Notation (BPMN) diagrams into a workflow engine. You can manipulate this visual chain of events to suit your team’s business requirements. Individual events in the workflow can contain blocks or scripts of Python code to be executed.

We discuss the concept of low-code software tools. Dan also talks about how SpiffWorkflow aims at getting non-developers within an organization involved in development.

Topics:

  • 00:00:00 – Introduction
  • 00:02:14 – What is SpiffWorkflow?
  • 00:03:12 – What is BPMN?
  • 00:06:29 – What did you need to add to the project?
  • 00:07:12 – What are the components of a diagram?
  • 00:12:42 – Examples of workflow
  • 00:13:54 – Sponsor: TelemetryHub
  • 00:14:29 – What types of industries use BPMN?
  • 00:18:02 – Decision Model and Notation (DMN)
  • 00:19:34 – What is low-code?
  • 00:27:02 – How could someone get involved?
  • 00:28:02 – How do you host a workflow?
  • 00:29:43 – Video Course Spotlight
  • 00:31:05 – What has the project taught you as a developer?
  • 00:37:29 – Empowering more members of the organization
  • 00:42:07 – Project direction for the next year
  • 00:42:51 – Where to start with SpiffWorkflow?
  • 00:43:15 – What are you excited about in the world of Python?
  • 00:45:59 – What do you want to learn next?
  • 00:51:06 – Thanks and goodbye

Show Links:

Support the podcast & join our community of Pythonistas

View Details

Would you like to quickly add data to a map with Python? Have you wanted to create beautiful interactive maps and export them as a stand-alone static web page? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We share a recent Real Python tutorial about using Python Folium to create geospatial data visualizations. Folium harnesses the power of the JavaScript library Leaflet. The project shares how to combine this graphical power with Python’s data-wrangling strength.

Christopher shares a recent Python Enhancement Proposal (PEP) about the Global Interpreter Lock (GIL) in CPython. The PEP proposes a change to the build process that implements a flag for optionally building a GIL-less interpreter.

We share several other articles and projects from the Python community, including a news update, a YAML document from hell, a set of logging practices to follow, a discussion about the discourse surrounding the recent Python packaging user survey, a modern Python UI library based on Tkinter, and a lightweight tool kit for bounding boxes.

Topics:

  • 00:00:00 – Introduction
  • 00:02:33 – Bleach 6.0.0 release and deprecation
  • 00:05:03 – Python Folium: Create Web Maps From Your Data
  • 00:10:37 – PEP 703: Making the GIL Optional in CPython
  • 00:15:36 – Sponsor: Influxdata
  • 00:16:24 – The YAML Document From Hell
  • 00:27:53 – Logging Practices I Follow
  • 00:32:08 – How to improve Python packaging
  • 00:36:55 – Video Course Spotlight
  • 00:38:25 – Thoughts on the Python packaging ecosystem
  • 00:58:16 – CustomTkinter: Python UI library Based on Tkinter
  • 01:00:16 – pybboxes: Lightweight Tool Kit for Bounding Boxes
  • 01:01:36 – Thanks and goodbye

News:

Show Links:

  • Python Folium: Create Web Maps From Your Data – You’ll learn how to create web maps from data using Folium. The package combines Python’s data-wrangling strengths with the data-visualization power of the JavaScript library Leaflet. In this tutorial, you’ll create and style a choropleth world map that shows the ecological footprint per country.
  • PEP 703: Making the GIL Optional in CPython – This PEP proposes changes to the CPython build process that would allow you to build a GIL-less interpreter. This kind of interpreter would not be ABI compatible with the GIL-based one, and the programmer would become responsible for some locking situations in C-extensions. If implemented, this would lead the way to being able to operate without the GIL in cases where backward-compatibility issues aren’t important.
  • The yaml Document From Hell – As a data format, YAML is extremely complicated and it has many footguns. In this post, Ruud explains some of those pitfalls by means of an example and suggests a few simpler and safer YAML alternatives.
  • Logging Practices I Follow – “No matter what kind of software you’re developing, you most definitely leverage logging to some extent, probably every single day.” This article outlines good cross-language logging practices, making it easier to find bugs and understand what has happened in your software.

Discussion:

Projects:

Additional Links:

Support the podcast & join our community of Pythonistas

View Details

Have you worked on a project that needed an orchestration tool? How do you define the workflow of an entire data pipeline or a messaging system with Python? This week on the show, Calvin Hendryx-Parker is back to talk about using Apache Airflow and orchestrating Python projects.

Calvin is the co-founder and CTO of Six Feet Up and a Python Web Conference co-organizer. He’s recently been working on a massive project that requires thousands of jobs involving transferring and transforming data. Through his research into orchestration systems, he found Apache Airflow.

Airflow is an open-source tool to define, schedule, and monitor workflows. The platform is pure Python and integrates with a wide variety of services. We discuss how workflows are defined by creating directed acyclic graphs (DAG).

Calvin talks about how a recent project outgrew the system and how his team built a clever solution using Python. We also discuss the upcoming Python Web Conference and what virtual attendees can expect.

Topics:

  • 00:00:00 – Introduction
  • 00:02:24 – Describing the large data pipeline
  • 00:04:38 – What format was the data in?
  • 00:06:04 – Was the format of the data changed for storage?
  • 00:09:34 – Data engineering and describing sources and targets
  • 00:11:29 – Apache Airflow orchestration and hitting limitations
  • 00:18:12 – Sponsor: CData Software
  • 00:18:54 – DAG: Directed acyclic graphs
  • 00:22:29 – Streaming data and other tool choices
  • 00:25:38 – Overcoming DAG Factory limitations
  • 00:31:49 – Another industry example for Airflow
  • 00:34:24 – Finding solutions as a consultancy
  • 00:35:12 – Is there a minimum-size project for Airflow?
  • 00:37:37 – Django under the hood
  • 00:38:31 – Video Course Spotlight
  • 00:39:58 – The Python Web Conference 2023
  • 00:44:24 – Do you have any upcoming conference talks?
  • 00:45:53 – How can people follow your work online?
  • 00:46:52 – IndyPy talk by Mariatta Wijaya
  • 00:48:01 – What are you excited about in the world of Python?
  • 00:51:45 – What do you want to learn next?
  • 00:53:22 – Thanks and goodbye

Show Links:

Support the podcast & join our community of Pythonistas

View Details

Have you used the Python Read-Eval-Print Loop (REPL) to explore the language and learn about how it operates? Would it help if it provided syntax highlighting, definitions, and code completion and behaved more like an IDE? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss the drop-in REPL replacement bpython. bpython enhances the interactivity of a Python REPL session. It’s also a powerful teaching tool for instructors and students to experiment with and explore Python code.

Christopher shares a recent Python Enhancement Proposal (PEP) about formalizing the grammar for f-strings. The PEP describes a reduction in the underlying parser code complexity and provides for future features like comments in multiline f-strings.

We share several other articles and projects from the Python community, including a news roundup, a collection of surveys to classify Python virtual environment workflows, a course about context managers and Python’s with statement, a discussion about microfeatures that we would like to see adopted in Python, a Python terminal music player, and an infinite array powered by AI.

Topics:

  • 00:00:00 – Introduction
  • 00:02:21 – Pillow 9.4.0 Released
  • 00:02:47 – Django Bugfix Release: 4.1.5
  • 00:02:56 – Plone 6.0 Released
  • 00:03:16 – PyCon Italia 2023
  • 00:03:54 – Discover bpython: A Python REPL With IDE-Like Features
  • 00:13:55 – PEP 701: Syntactic Formalization of f-Strings
  • 00:17:07 – Sponsor: Influx Data
  • 00:17:57 – Classifying Python Virtual Environment Workflows
  • 00:30:26 – Context Managers and Python’s with Statement
  • 00:36:32 – Video Course Spotlight
  • 00:37:47 – Microfeatures I’d Like to See in More Languages
  • 00:49:34 – Python Terminal Music Player
  • 00:51:19 – Infinite AI Array
  • 00:55:05 – Thanks and goodbye

News:

Show Links:

  • Discover bpython: A Python REPL With IDE-Like Features – In this tutorial, you’ll learn about bpython, an alternative Python REPL that brings code suggestions and many other IDE-like features to the terminal. Once you discover how much bpython can improve your productivity, you’ll never want to return to using the vanilla Python REPL again.
  • PEP 701: Syntactic Formalization of f-Strings – This Python Enhancement Proposal describes the formalization of a grammar for f-strings, allowing a reduction in the underlying parser code complexity and providing future features like comments in multiline f-strings.
  • Classifying Python Virtual Environment Workflows – This article discusses the various ways of creating and managing Python virtual environments, including what kinds of tools you could use. It categorizes the different styles and describes how the choices that you make affect your workflow.
  • Context Managers and Python’s with Statement – In this video course, you’ll learn what the Python with statement is and how to use it with existing context managers. You’ll also learn how to create your own context managers.
  • Microfeatures I’d Like to See in More Languages – Some language features are intrinsic to the language. Others are syntactic sugar that other programming languages could easily borrow. This opinion piece from Hillel highlights some features that the mainstream should steal from more obscure languages. Two Python features that he’d like to see in more languages are chained evaluations (2 <= x < 10) and numbers with separators (1000000 == 1\_000\_000).

Projects:

Support the podcast & join our community of Pythonistas

View Details

How can you get more performance from your existing data science infrastructure? What if a DataFrame library could take advantage of your machine’s available cores and provide built-in methods for handling larger-than-RAM datasets? This week on the show, Liam Brannigan is here to discuss Polars.

Liam is an experienced data scientist working in finance, technology, and environmental analysis. He’s recently started contributing to the documentation for Polars and developing a training course for the library.

We talk about the library’s overall speed and lack of additional dependencies. Liam explains the advantages of lazy vs eager mode and which to choose when performing data exploration or attempting to load a dataset larger than your RAM.

We also discuss potential barriers to switching to Polars from a pandas workflow. Across our conversation, we explore several other libraries and technologies, including Apache Arrow, DuckDB, query optimization, and the “rustification” of Python tools.

Show Topics:

  • 00:00:00 – Introduction
  • 00:02:06 – Liam’s background and intro to Polars
  • 00:03:37 – Hurdles to switching to Polars
  • 00:05:23 – Creating training resources
  • 00:08:15 – No index
  • 00:09:46 – Data science 2025 predictions
  • 00:12:02 – Contributions to Polars
  • 00:15:07 – Eager vs lazy mode & query optimization
  • 00:19:25 – Sponsor: Anaconda Nucleus
  • 00:20:00 – Apache Arrow and parquet
  • 00:24:43 – DuckDB and column orientation
  • 00:29:27 – The “rustification” of libraries
  • 00:34:49 – Video Course Spotlight
  • 00:36:16 – GPUs and memory requirements
  • 00:45:49 – No additional library requirements
  • 00:47:37 – Development of the ecosystem
  • 00:51:33 – Chaining operations
  • 00:53:39 – How can people follow your work?
  • 00:54:51 – What are you excited about in the world of Python?
  • 00:56:09 – What do you want to learn next?
  • 00:56:58 – Thanks and goodbye

Show Links:

Support the podcast & join our community of Pythonistas

View Details

Have you embraced the use of comprehensions in your Python journey? Are you familiar with all the varieties of comprehension constructs? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a recent article that surveys Python’s comprehensions and generators. This overview includes code snippets and the fundamentals of creating list, set, and dictionary comprehensions. We weigh the advantages of using a comprehension versus the more familiar for loops that they replace.

Christopher shares an article about how there may be infighting between the parallelism in your Python code and the parallelism within the libraries that you’re using. These complex system interactions can cause processing slowdowns and hard-to-trace bottlenecks.

We share several other articles and projects from the Python community, including a news roundup, a Python linter comparison, an overview of multiprocessing race conditions in Python, a discussion covering import statement styles, a project for WASM-powered Jupyter tools running in the browser, and a collection of easter eggs and jokes hidden inside Python itself.

Topics:

  • 00:00:00 – Introduction
  • 00:02:41 – PyPy v7.3.10 Release
  • 00:03:17 – Django Bugfix Release: 4.1.4
  • 00:03:28 – Python 3.11.1, 3.10.9, 3.9.16, 3.8.16, 3.7.16 Released
  • 00:03:56 – Python Linter Comparison 2022
  • 00:11:51 – Who Controls Parallelism? A Disagreement That Leads to Slower Code
  • 00:15:58 – Sponsor: InfluxDB
  • 00:16:47 – A Crash Course in Comprehensions and Generators
  • 00:24:23 – Multiprocessing Race Conditions in Python
  • 00:27:46 – Video Course Spotlight
  • 00:28:55 – What Style of import Statement Do You Use?
  • 00:36:54 – jupyterlite: WASM Powered Jupyter Running in the Browser
  • 00:40:35 – python-easter-eggs: Easter Eggs and Hidden Jokes in Python
  • 00:43:18 – PyCoder’s Weekly: Submit a Link
  • 00:43:46 – Thanks and goodbye

News:

Show Links:

  • Python Linter Comparison 2022 – There are many linter choices for Python. This article covers a lot of them: Pylint, Pyflakes, Flake8, autopep8, Bandit, Prospector, Pylama, Pyroma, Black, Mypy, Radon, and mccabe.
  • Who Controls Parallelism? A Disagreement That Leads to Slower Code – In complex systems, there may be a fight between the parallelism in your code vs the parallelism in the libraries that you’re using. This fight can cause things to slow down. This article shows some examples and explores what you can do about the issue.
  • A Crash Course in Comprehensions and Generators – A great collection of code snippets that showcase the power and flexibility of list comprehensions, generators, and related constructs.
  • Multiprocessing Race Conditions in Python – A race condition happens when parallel tasks attempt to execute code at the same time and the results are dependent on order of execution. Finding race conditions can be challenging. This article gives some hints as to how to find the different kinds of race conditions when coding with the multiprocessing module.

Discussion:

Projects:

Additional Links:

Support the podcast & join our community of Pythonistas

View Details

It’s been another year of changes at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python material this year. We added some new members to the team, updated the site’s features, and created new styles of tutorials and video courses.

Three members of the Real Python team join us this week, Kate Finegan, Geir Arne Hjelle, and Leodanis Pozo Ramos. We wanted to share a year-end wrap-up with tutorials, step-by-step projects, and video courses that showcase what our team created this year.

Kate and Geir Arne help to shepherd articles through the multi-stage editing process. Along with the rest of the team, they make sure these resources impart crucial Python knowledge and provide a thorough didactic experience. Leodanis’ name has been featured many times on this podcast, and it was great to talk to him about writing tutorials and diving deep into the Pythonic details.

We hope you enjoy this review! Programming note, there won’t be an episode next week, but we’ll be back in January and look forward to bringing you a year full of great guests, articles, and topics.

Topics:

  • 00:00:00 – Introduction
  • 00:03:02 – Geir Arne and RP content direction
  • 00:04:31 – Kate Finegan and editing tutorials
  • 00:07:35 – Leodanis Pozo Ramos and writing tutorials
  • 00:09:14 – Changes for Real Python in 2022
  • 00:18:56 – Your Python Coding Environment on Windows
  • 00:23:32 – Sponsor: TelemetryHub
  • 00:24:16 – Why Is It Important to Close Files in Python?
  • 00:28:40 – Python and TOML: New Best Friends
  • 00:33:47 – Sneaky REST APIs With Django Ninja
  • 00:36:24 – Manage Your To-Do Lists Using Python and Django
  • 00:39:52 – Python Constants: Improve Your Code’s Maintainability
  • 00:42:59 – Build Your Python Project Documentation With MkDocs
  • 00:49:28 – Building a URL Shortener With FastAPI and Python
  • 00:51:24 – Video Course Spotlight
  • 00:52:40 – Image Processing With the Python Pillow Library
  • 00:57:20 – Draw the Mandelbrot Set in Python
  • 01:05:01 – Using Python’s pip to Manage Your Projects’ Dependencies
  • 01:11:39 – Exploring Scopes and Closures in Python
  • 01:14:49 – Thanks and goodbye

Show Links:

Additional Links:

Support the podcast & join our community of Pythonistas

View Details

What advantages can a build system provide for a Python developer? What new skills are required when working with a team of developers? This week on the show, Benjy Weinberger from Toolchain is here to discuss the Pants build system and getting started with continuous integration (CI).

Benjy is one of the core developers of the Pants build system. He talks about the software tools and processes that a build system simplifies. We discuss how an individual developer can take advantage of continuous integration. We also cover some of the expectations when moving into professional software development.

Have you learned about or started to use tools like linters, code formatters, import sorters, type checkers, and packaging systems? A build system is designed to combine all of those tools into a simplified, one-step process to share your best code.

Benjy explains concepts like implementing fine-grained invalidation, moving to a monorepo, and using a build system for data science projects. He also shares his tips for getting started with Pants and finding help within the community.

Topics:

  • 00:00:00 – Introduction
  • 00:03:19 – Working on Pants
  • 00:05:24 – Background on Toolchain
  • 00:08:26 – Individual developer using CI
  • 00:11:04 – When did you start using these types of tools?
  • 00:14:30 – Was the organization open to the development of CI tools?
  • 00:15:45 – Having a foundation with Git
  • 00:17:11 – Moving toward workflows
  • 00:23:30 – Sponsor: InfluxDB
  • 00:24:20 – What’s fine-grained invalidation?
  • 00:29:32 – Setting up test coverage
  • 00:33:07 – Moving into packaging and deployment
  • 00:37:22 – Advantages of a monorepo
  • 00:42:10 – Video Course Spotlight
  • 00:43:36 – Reasons for deeper Python integration
  • 00:47:40 – Using the build system with data science projects
  • 00:52:21 – Getting started with Pants
  • 00:55:47 – What are you excited about in the world of Python?
  • 00:57:12 – What do you want to learn next?
  • 00:58:41 – How can people follow your work online?
  • 00:59:27 – Thanks and goodbye

Show Links:

Support the podcast & join our community of Pythonistas

View Details

How do you start packaging your code with pyproject.toml? Would you like to join a conversation that gently walks you through setting up your Python projects to share? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.

We discuss a recent code conversation featuring Real Python team members Ian Currie and Geir Arne Hjelle. The video dives into the officially sanctioned way to configure your project using a pyproject.toml file. We cover how this relatively new approach will help you package your code for use on your system or for sharing with others.

Christopher shares a Real Python tutorial about using pathlib to get a list of all the files within a directory. We’re both fans of pathlib and how it simplifies working with file paths. The tutorial digs into methods to recursively list all directory contents or create a conditional listing.

We share several other articles and projects from the Python community, including an explanation of Python bytecode, an argument for always using [closed, open) intervals, a discussion about building the monolith before microservices, a way to parse natural language time and date expressions, and a project for posting on Mastodon.

Topics:

  • 00:00:00 – Introduction
  • 00:02:30 – Always Use [closed, open) Intervals
  • 00:07:05 – Everyday Project Packaging With pyproject.toml
  • 00:15:38 – Sponsor: InfluxDB
  • 00:16:27 – How to Get a List of All Files in a Directory With Python
  • 00:20:37 – Python Bytecode Explained
  • 00:29:39 – Video Course Spotlight
  • 00:30:48 – Build the Modular Monolith First
  • 00:44:34 – toot - PyPI
  • 00:49:58 – quickadd: Parse Natural Language Time and Date Expressions
  • 00:53:09 – Thanks and goodbye

Show Links:

  • Always Use [closed, open) Intervals – “Intervals or ranges pop-up everywhere in the programming world. The classic example is picking a start and end date, like you would when booking an AirBnB or a flight. Have you ever wondered why they are always implemented as [closed, open) as opposed to [closed, closed]?”
  • Everyday Project Packaging With pyproject.toml – In this Code Conversation video course, you’ll learn how to package your everyday projects with pyproject.toml. Playing on the same team as the import system means you can call your project from anywhere, ensure consistent imports, and have one file that’ll work for many build systems.
  • How to Get a List of All Files in a Directory With Python – In this tutorial, you’ll be examining a couple of methods to get a list of files and folders in a directory with Python. You’ll also use both methods to recursively list directory contents. Finally, you’ll examine a situation that pits one method against the other.
  • Python Bytecode Explained – When a Python program is run, the interpreter first parses your code and checks for syntax errors, then it translates it into bytecode instructions. This article explains some of the features of Python bytecode.

Discussion:

Projects:

Additional Links:

Support the podcast & join our community of Pythonistas

View Details

How do you prepare a dataset for machine learning (ML)? How do you go beyond cleaning the data and move toward measuring how the model performs? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to talk about strategies for better ML model performance.

View Details

How do you build a REST API using the Flask web framework? How can you quickly add endpoints while automatically generating documentation? This week on the show, Real Python author Philipp Acsany is here to discuss his tutorial series "Python REST APIs With Flask, Connexion, and SQLAlchemy." Christopher Trudeau is also here with another batch of PyCoder's Weekly articles and projects.

View Details

What if you didn't have to worry about managing user passwords as a Python developer? That's where the WebAuthn protocol and new hardware standards are heading. This week on the show, Dan Moore from FusionAuth returns to discuss a password-less future.

View Details

How do you create a computer opponent for a simple game within Python? Would you also like to learn how to adapt the game to run in a web browser or graphical user interface (GUI)? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Python 3.11 is here! Our regular guests, Geir Arne Hjelle and Christopher Trudeau, return to talk about the new version. Geir Arne wrote a series of preview tutorials earlier this year, and his annual piece, titled "Python 3.11: Cool New Features for You to Try," was published on October 24. Christopher's video course came out the next day, covering the topics from the tutorial with visual examples of Python 3.11 in action.

View Details

Does your company have a plan for growing an internal Python community? What are the attributes to look for when bringing someone into your department? This week on the show, Pablo Galindo Salgado returns to talk about building community through the Python Guild at Bloomberg and managing the release of Python 3.11.

View Details

Where should you use an ellipsis in Python? How does it behave as a placeholder in a script, project, or stub file? What are the next goals for the Faster CPython project? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Have you used a memory profiler to gauge the performance of your Python application? Maybe you're using it to troubleshoot memory issues when loading a large data science project. What could running a profiler show you about a codebase you're learning? This week on the show, Pablo Galindo Salgado returns to talk about Memray, a powerful tracing memory profiler.

View Details

Have you ever used code to help explain a topic? How can Python scripts be used to understand the intricacies of access control? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Are you interested in using Python in an industry outside of software development? Would adding a few custom software tools increase efficiency and make your coworkers' jobs easier? This week on the show, Josh Burnett talks about using Python as a mechanical engineer.

View Details

Have you thought the standard output from Matplotlib is a bit generic looking? Would you like a quick way to add style and consistency to your data visualizations? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Have you wanted to understand recursion and how to use it in Python? Are you familiar with the call stack and how it relates to tracebacks? This week on the show, Al Sweigart talks about his new book, "The Recursive Book of Recursion."

View Details

How does a code completion tool work? What is an Abstract Syntax Tree, and how is it created in Python? How does an AST help you write programs and projects that inspect and modify your Python code? This week on the show, Meredydd Luff, co-founder of Anvil, shares his PyCon talk, "Building a Python Code Completer."

View Details

Have you attempted to set up a Python development environment on Windows before? Would it be helpful to have an easy-to-follow guide to get you started? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

What's the big breakthrough for Natural Language Processing (NLP) that has dramatically advanced machine learning into deep learning? What makes these transformer models unique, and what defines "attention?" This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, continues our talk about how machine learning (ML) models understand and generate text.

View Details

Is there someone in your life you'd like to inspire to learn Python? Mission Encodeable is a website designed to teach people to code, built by two high-school students. This week on the show, Anna and Harry Wake talk about creating their site and motivating people to start coding.

View Details

How do you process and classify text documents in Python? What are the fundamental techniques and building blocks for Natural Language Processing (NLP)? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, talks about how machine learning (ML) models understand text.

View Details

How do you start building your project documentation? What if you had a tool that could do the heavy lifting and automatically write large portions directly from your code? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

How maintainable is your Python code? Is it possible to hold the code for your functions in your head? When is it appropriate to use measurements in a code review? This week on the show, Reka Horvath and Ben Martineau from Sourcery are here to discuss their recent PyCon talk, "Actionable insights vs ranking: How to use and how NOT to use code quality metrics."

View Details

Would you like to explore the functional programming side of Python? What are the advantages of this approach, and what tools are built into the language? This week on the show, author Bruce Eckel talks about functional programming in Python.

View Details

Have you heard about PyScript? The brand-new framework has the community excited about building interactive Python applications that run entirely within the user's browser. Would you like to dig into the details beyond the "Hello World" examples? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Are you interested in a career in security using Python? Would you like to stay ahead of potential vulnerabilities in your Python applications? This week on the show, James Pleger talks about Python information security, incident response, and forensics.

View Details

Would you like a fast way to share your data science project results as an interactive dashboard instead of a Jupyter notebook? Streamlit is a library for creating simple web apps and dashboards using just Python. This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

What do you do when your data science project doesn't fit within your computer's memory? One solution is to distribute it across multiple worker machines. This week on the show, Guido Imperiale from Coiled talks about Dask and managing large data science projects through distributed computing.

View Details

What are the differences between the various Python game frameworks? Would it help to see a couple of game examples across several libraries to understand the distinctions? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Would you like a way to send structured serialized data between different platforms and languages? What if the data was self-documenting, could automatically generate Python code, and would validate itself? This week on the show, Liran Haimovitch talks about protocol buffers and communicating with microservices through Remote Procedure Calls (RPC).

View Details

Did you know you can add testing to your Python code while simultaneously documenting it? Using docstrings, you can create examples of how your functions should interact in a Python REPL and test them with the built-in doctest module. This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder's Weekly articles and projects.

View Details

Have you heard about the projects working toward getting Python to run in the browser? Maybe you would like to try it out for yourself, by building an interactive Python REPL with Pyodide and WebAssembly (WASM). This week on the show, Christopher Trudeau is here, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Are you using an Object-Relational Mapper (ORM) for your Python projects? What if it could work with SQL or No-SQL databases and be fully type-safe? This week on the show, Robert Craigie talks about Prisma Client Python.

View Details

Do you know the difference between creating a class instance and initializing it? Would you like an interactive tour of the Python Pillow library? This week on the show, Christopher Trudeau is here, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

What goes into creating those enhanced error messages in the latest versions of Python? How does the new PEG parser help to pinpoint where errors have occurred? This week on the show, Pablo Galindo Salgado talks about the work that goes into creating these improvements.

View Details

Do you understand how a hash table works? What if you could learn about building one while practicing test-driven development? What are best practices when designing a REST API? This week on the show, Christopher Trudeau is here, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Do you wonder if you're taking the right approach when shaping data in pandas? Is your Jupyter workflow getting out of hand? This week on the show, Matt Harrison talks about his new book, "Effective Pandas: Patterns for Data Manipulation."

View Details

Would you like to build visualizations that allow your audience to play with data? How do you effectively use Python's assert statement during development? This week on the show, Christopher Trudeau is here, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

There are many ways to get Python installed on your computer. If you were going to start fresh, what tools would you use? What if you need to manage multiple versions of Python and virtual environments? What about all the additional tools that make your coding workflow complete? This week on the show, Calvin Hendryx-Parker is here to talk about bootstrapping your Python environment.

View Details

How do you define Python functions that accept optional arguments or default values? Are you wondering how to go beyond being a beginner with Python? This week on the show, Christopher Trudeau is here, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Have you thought about what authentication system you want to use for your Python project? Should you use an existing Python library or a third-party service? This week on the show, Dan Moore is here to talk about authentication systems and OAuth 2.

View Details

Have you been wanting to explore fractals and complex numbers in Python? Would you like to practice working with APIs in Python through a new project? This week on the show, Christopher Trudeau is here, and he's taking on the task of curating new issues of PyCoder's Weekly going forward. He'll be joining me as a cohost every other week and bringing a fresh batch of PyCoder's Weekly articles and projects.

View Details

How often have you thought about your Developer Experience (DX)? How do you improve your workflow, find documentation, and simplify code formatting? This week on the show, Adam Johnson is here to talk about his new book, "Boost Your Django DX."

View Details

Would you like to experiment with analyzing or manipulating audio with Python? This week on the show, we have Braden Riggs from DolbyIO to discuss extracting audio features and Python libraries for reshaping audio. Braden shares techniques from his recent talk at PyData Global, "Unlocking More From Your Audio Data!"

View Details

How can you can speed up Python? Have you thought of using a JIT (Just-In-Time Compiler)? This week on the show, we have Real Python author and previous guest Anthony Shaw to talk about his project Pyjion, a drop-in JIT compiler for CPython 3.10.

View Details

Are you looking for a project to practice your Django skills? Designing the fundamental interactions of a social network is an instructive way to explore models and relationships while learning advanced Django skills. This week on the show, we talk with previous guest Martin Breuss about his new four-part series, "Build a Social Network With Django".

View Details

Would you like a simple command to launch your Python programs using the newest version of the language installed on your machine? This week on the show, we continue our conversation with Brett Cannon. Brett discusses his project, the Python Launcher for Unix.

View Details

A year ago, we had Brett Cannon on the show to discuss his blog series about unravelling Python's syntactic sugar. Brett has written 15 more entries in the series, and he returns to the show this week to continue our conversation. We dive into unravelling 'async' and 'await' statements and their relationship with Python's generators.

View Details

It's been a year of change at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python articles this year. We also added many new members to the team, updated the site's features, and created new styles of tutorials and projects.

View Details

The Python community continually grows, with many users coming from different languages and backgrounds. This week on the show, we talk with developer Hugh Tipping about his Python journey. Hugh is also a member of the Real Python community.

View Details

Are you ready to break open the first days of puzzles from the annual Advent of Code challenge? Advent of Code is an advent calendar of twenty-five programming puzzles published each December. Practicing solving puzzles is a great way to build your Python skills. This week on the show, we have previous guest and Real Python author Geir Arne Hjelle to discuss his recent article titled, "Advent of Code: Solving Your Puzzles With Python."

View Details

There seem to be three kinds of Python developers: those unaware of type hints or have no opinion, ones that embrace them, and others who have an allergic reaction at the mention of them. Python is famously a dynamically typed language, but there are advantages to adding type hints to your code. This week on the show, we have Luciano Ramalho to discuss his recent talk titled, "Type hints, protocols, and good sense."

View Details

Have you wanted to work with RSS feeds in Python? Maybe you're looking for a new project to build for your portfolio that uses Django, unit tests, and custom commands. This week on the show, we have Real Python author Ricky White to talk about his recent step-by-step project titled, "Build a Content Aggregator in Python."

View Details

Do you remember the One Laptop Per Child program? What went wrong, and what can we learn from the program's failure? What are the potential pitfalls of charismatic technology, and how can we avoid them when introducing students to programming? This week on the show, former guest Al Sweigart and author Morgan Ames are here to talk about her book "The Charisma Machine - The Life, Death, and Legacy of One Laptop per Child."

View Details

Are you getting the most out of the Django framework? It's a powerful web framework if you're not interested in reinventing the wheel. Django includes a useful template system with inheritance for composing reusable HTML. This week on the show, we have previous guest and Real Python author Christopher Trudeau to talk about his recent articles and courses about Django.

View Details

Have you wanted to generate PDFs from your Python project? Many of the current libraries require designing the document down at the pixel level. Would you be interested in a tool that lets you specify the page layout while it handles the specific details of laying out the text? This week on the show, we talk with Joris Schellekens about his library for creating and manipulating PDFs named borb.

View Details

Are you interested in sharing your Python project with the broader world? Would you like to make it easily installable using pip? How do you create Python packages that share your code in a scalable and maintainable way? This week on the show, Real Python author and former guest Dane Hillard returns to talk about his new book, "Publishing Python Packages."

View Details

Earlier this year, the Python Software Foundation announced the creation of the Developer in Residence role. The first Visionary Sponsors of the PSF have provided funding for this new role for one year. What development responsibilities does this job address? This week on the show, we talk to previous guest Łukasz Langa about becoming the first CPython Developer in Residence.

View Details

Python 3.10 is here! This week on the show, two former guests and Real Python authors return to talk about the new version. Geir Arne Hjelle's article was posted to the site Monday, and it's titled "Python 3.10: Cool New Features for You to Try". Christopher Trudeau's video course came out on Tuesday, and it covers the topics from the article with multiple visual examples of Python 3.10 code.

View Details

Have you wanted to create a Python application that goes further than a command-line interface? You would like it to have a friendly interface but don't want to make a GUI (Graphical User Interface) or web application. Maybe a TUI (Text User Interface)would be a perfect fit for the project. This week on the show, we have Will McGugan to talk about his projects Textual and Rich.

View Details

Where are you along the path of learning Python? Do you feel like you're making progress? What are ways you can put the learning path into a more precise focus? This week on the show, we talk with previous guest Martin Breuss about his recent article "How Long Does It Take to Learn Python?"

View Details

Are you a visual learner? Does it help to have programming concepts shared with concrete examples and images? Would you like to see if your child might be interested in programming? This week on the show, we talk with author Shari Eskenas about her books, "A Day in Code - Python: Learn to Code in Python Through an Illustrated Story" and "Learn Python Through Nursery Rhymes & Fairy Tales."

View Details

Are you a beginner or intermediate Python programmer who has made it through some of the fundamentals? Have you tried to tackle a big project but got stuck and frustrated? Completing some small projects might be the answer. This week on the show, we have author Al Sweigart and talk about his new book, "The Big Book of Small Python Projects."

View Details

How well do you know Python's math module? Maybe you've used a few of the constants or arithmetic functions. You may be surprised by the amount of functionality hiding within this built-in library, and perhaps you don't need to reach for an additional outside library. This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Can you make a version of Python that fits within the memory constraints of a microcontroller and have it still feel like Python? That is the intention behind CircuitPython. This week on the show, we have Scott Shawcroft, who is the project lead for CircuitPython.

View Details

Have you started to use Python's assignment expression in your code? Maybe you have heard them called the walrus operator. Now that the controversy over the introduction in Python 3.8 has settled down, how can you use assignment expressions effectively in your code? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

How do you define open source software? What are the challenges an open source project and maintainers face? How do maintainers receive financial, legal, security, or other types of help? This week on the show, we have Josh Simmons from Tidelift and the Open Source Initiative to help answer these questions.

View Details

Have you heard of FastAPI? An application programming interface is vital to make your software accessible to users across the internet. FastAPI is an excellent option for quickly creating a web API that implements best practices. This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Are you still sprinkling print statements throughout your code while writing it? Print statements are often clunky and offer only a limited view of the state of your code. Have you thought there must be a better way? This week on the show, we have Nina Zakharenko to discuss her conference talk titled "Goodbye Print, Hello Debugger."

View Details

How is Python being used today, and what can you do with the language? Do you want to develop software, dive into data science and math, automate parts of your job and digital life, or work with electronics? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Do you wonder what the future may hold for the Python language? Are there speed improvements coming soon? What if you could be in the room while the core developers discuss Python's future? This week on the show, we have Joanna Jablonski, who was invited to the Python Language Summit 2021 as a journalist to summarize and document the event.

View Details

Are you ready to expand your Python knowledge into the intermediate to advanced territory? What tools are awaiting your discovery inside Python's functools module? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

How well do you know your software supply chain? When you PIP install a package, what steps can you take to minimize the risk of installing something malicious? This week on the show, we have Dustin Ingram, a director of the Python Software Foundation (PSF) and a maintainer of the Python Package Index (PyPI).

View Details

Are you ready to practice your Python skills some more? There is a new set of practice problems prepared for you to tackle, and this time they're based on working with CSV files. This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

The popularity of Python is continuing to grow Developers across the globe are embracing the language. How is Python being used in all of these different countries? How does an organization like the Python Software Foundation (PSF) work toward the goals in its mission statement for supporting and growing this international community? This week on the show, we have Marlene Mhangami, a PSF board member and part of the Diversity and Inclusion Work Group.

View Details

Are you looking for an in-depth data science project to practice your skills on? Perhaps you would like to add new tools to your Python web development projects instead? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

What if you could create an application and deploy it to the web with just Python? Wouldn't it be nice to skip the additional full-stack development steps of learning three different languages in addition to Python? That's the idea behind Anvil. This week on the show, we have Meredydd Luff, co-founder of Anvil.

View Details

How do you know you're using the correct data structure for your Python project? There are so many built into Python and even more that are importable from the collections module. This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects. We discuss a recent three-part video course on selecting the ideal data structure.

View Details

Would you move your data science project from a laptop to the cloud? Would you also like to have snapshots of your project saved along the way so that you can go back in time or share the state of your project with another team member? This week on the show, we have Savin Goyal from Netflix. Savin is the technical lead for machine learning infrastructure at Netflix. He joins us to talk about Metaflow, an open-source tool to simplify building, managing, and scaling data science projects.

View Details

Did you know the Python Software Foundation is hiring! With the recent support of three Visionary Sponsors, the PSF has been able to open positions for a developer-in-residence and a Python packaging project manager. Real Python now has a monthly Python news article. Frequent guest of the show, David Amos compiles and summarizes the biggest Python news from the past month.

View Details

Are you interested in learning more about Django? Would you like to meet other professionals and learn how they are using Django? DjangoCon Europe 2021 is virtual this year, and you can join in from anywhere in the world. This week on the show, we have Miguel Magalhães and David Vaz, two of the organizers of the conference.

View Details

This week's show is a bit different. We are taking a well-deserved short break, but we still wanted to share an episode with you. This rewind episode highlights clips from the many interviews over the past year or so of the show.

View Details

Are you interested in creating video games but feel limited in what you can accomplish within Python? Is there a platform where you can take advantage of your Python skills and provide the benefits of a dedicated game engine? This week on the show, we have Paweł Fertyk. Paweł is a Real Python author and has been creating games as Miskatonic Studio for several years now.

View Details

Are you looking for a bit of order when working with dictionaries in Python? Are you aware that the Python dict has changed over the last several versions and now keeps items in order? Could you learn more about object-oriented programming in Python by comparing it to another language? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Do you think it's time to refactor your Python code? What should you think about before starting this task? This week on the show, we have Brendan Maginnis and Nick Thapen from Sourcery. Sourcery is an automated refactoring tool that integrates into your IDE and suggests improvements to your code.

View Details

Do you know how a neural network functions? What goes into building one from scratch using Python? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

If you haven't visited the website lately, then you're missing out on the updates to realpython.com! The site features a completely refreshed layout with multiple sections to help you take advantage of even more great educational Python content. This week on the show, we have Dan Bader, the person behind Real Python, and all these architectural changes.

View Details

Have you heard about NoSQL databases, or wondered how to use one with Python? How does MongoDB store information and what packages can you use to connect this type of database to your Python project? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

What goes into the decision of how to host your Python code or application in the cloud? Which technology stack is the right size for your project? This week on the show, we have Calvin Hendryx-Parker. Calvin talks about cloud hosting options, infrastructure choices, and deployment tools.

View Details

Have you wanted to get your Python code to consume data from web-based APIs? Maybe you've dabbled with the requests package, but you don't know what steps to take next. This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

What's the difference between writing code for yourself and developing for others? What new considerations do you need to take into account as a professional Python developer? This week on the show, we talk to Dane Hillard about his book "Practices of the Python Pro".

View Details

Do you know the initial steps to get your Python script hosted on the web? You may have built something with Flask, but how would you stand it up so that you can share it with others? This week on the show, we have the previous guest Martin Breuss back on the show. Martin shares his recent article titled, "Python Web Applications: Deploy Your Script as a Flask App". David Amos also returns, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Do you feel like you understand how Python works under the hood? What is syntactic sugar, and how much of it should be in Python? This week on the show, we have Brett Cannon. Brett is a Python core developer and he's been working on a series of articles where he is unraveling the syntax of Python. His series is a fantastic resource for those wanting to learn how Python is structured and works at its core.

View Details

Are you interested in building interactive dashboards with Python? How about a project that takes a flat data file all the way to a web-hosted interactive dashboard? This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

Are you interested in processing images in Python? Do you need to load and modify images for your Flask or Django website or CMS? Then you most likely will be working with Pillow, the friendly fork of PIL, the Python imaging library. This week on the show, we have Mike Driscoll, who is writing a new book about image processing in Python.

View Details

How do you create a virtual conference that retains the interactivity of an in-person event? What are the tools needed for talk submissions, ticketing, and live hosting? Can you find those tools written in Python? This week on the show, we have several of the organizers of the PyCascades 2021 conference. They share the process of restructuring a Python conference to meet those challenges.

View Details

What is it like to design a Python library for three different audiences? This week on the show, we have Nir Aides, creator of Jupylet. His new library is designed for deep reinforcement learning researchers, musicians interested in live music coding, and kids interested in learning to program. Everything is designed to run inside of a Jupyter notebook.

View Details

Are you familiar with the role data engineers play in the modern landscape of data science and Python? Data engineering is a sub-discipline that focuses on the transportation, transformation, and storage of data. This week on the show, David Amos is back, and he's brought another batch of PyCoder's Weekly articles and projects.

View Details

It's been quite the year! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python articles this year. We also upgraded the site and membership with office hours, transcripts, this podcast, and much more.

We are joined by two members of the Real Python team, David Amos and Joanna Jablonski. We wanted to share a year-end wrap-up with a collection of articles that showcase a diversity of Python topics and the quality of what our team created this year.

View Details

Have you wondered how Python manages memory? How are your variables stored in memory, and when do they get deleted? This week on the show, David Amos is here, and he has brought another batch of PyCoder's Weekly articles and projects.

Along with the Real Python article on Python memory management, we also talk about another article about creating even and non-even spaced arrays in Python with np.linspace.

View Details

Have you started to use generators in Python? Are you unsure why you would even use one over a regular function? How do you use the special "send" method and the "yield from" syntax? This week on the show, we have Reuven Lerner to talk about his PyCon Africa 2020 talk titled "Generators, coroutines, and nanoservices."

View Details

If you're coming to Python from a different language, you may not know about a useful tool for working with loops, Python's built-in enumerate function. This week on the show, David Amos is here, and he has brought another batch of PyCoder's Weekly articles and projects.

Along with the Real Python article covering the details of the enumerate function, we also talk about another article about constructing Python graphical user interface elements in PyQt.

View Details

One of the best ways to learn something well is to teach it. This week on the show, we have Kelly Schuster-Paredes and Sean Tibor from the Teaching Python podcast.

Sean and Kelly teach middle school students Python and share their art and science of teaching Python on their podcast. They wanted to come on the show to talk about the Real Python articles, quizzes, and other resources they use when teaching their students.

View Details

Are you interested in learning more about Natural Language Processing? Have you heard of sentiment analysis? This week on the show, Kyle Stratis returns to talk about his new article titled, Use Sentiment Analysis With Python to Classify Movie Reviews. David Amos is also here, and all of us cover another batch of PyCoder’s Weekly articles and projects.

View Details

So you built a web application in Python. Now how are you going to authorize users? Security goes beyond authentication. Who gets to do what, where, and when? This week on the show, we have Sam Scott, chief technology officer from Oso. Oso is an open-source policy engine for authorization that you embed in your application.

View Details

Are you ready to move beyond flat files for your data in Python? Maybe you're not sure where to start with databases and SQL. This week on the show, David Amos returns with another batch of PyCoder’s Weekly articles and projects. We cover a Real Python article about managing data with SQLite and SQLAlchemy.

View Details

You probably have heard of the bestselling Python book, "Automate the Boring Stuff with Python." What are the next steps after starting to dabble in the Python basics? Maybe you've completed some tutorials, created a few scripts, and automated repetitive tasks in your life. This week on the show, we have author Al Sweigart to talk about his new book, "Beyond the Basic Stuff with Python: Best Practices for Writing Clean Code."

View Details

Do you have gaps in your Python learning path? If you're like me, you may have followed a completely random route to learn Python. This week on the show, David Amos is here to talk about the release of the Real Python book, "Python Basics: A Practical Introduction to Python 3". The book is designed not only to get beginners up to speed but also to help fill in the gaps many intermediate learners may still have.

View Details

The Python return statement is such a fundamental part of writing functions. Is it possible you missed some best practices when writing your own return statements? This week on the show, David Amos returns with another batch of PyCoder’s Weekly articles and projects. We also talk functional programming again with an article on the Python map function and processing iterables without a loop.

View Details

Python 3.9 has arrived! This week on the show, former guest and Real Python author Geir Arne Hjelle returns to talk about his recent article, "Python 3.9: Cool New Features for You to Try". Also joining the conversation is Real Python video course instructor and author Christopher Trudeau. Christopher has created a video course, which was released this week also, based on Geir Arne's article. We talk about time zones, merging dictionaries, the new parser, type hints, and more.

View Details

If you use Python, then you probably have used pip to install additional packages from the Python package index. Part of the magic behind pip is the dependency resolver, and there is a new version of it in the latest version of pip. This week on the show, we have Sumana Harihareswara and Georgia Bullen, who have been working on the recent releases of pip. Sumana is the project manager for pip, and Georgia has been working on pip's user experience (UX).

View Details

A big decision a developer has to make is what tool to use to write code? Would you like an editor that understands Python, and is there to help with suggestions, definitions, and analysis of your code? For many developers, its the free tool, Visual Studio Code. This week on the show, we have Savannah Ostrowski, program manager for the Python Language Server and Python in Visual Studio. We discuss Pylance, a new language server with fast, feature-rich language support for Python in VS Code.

View Details

What is an effective way to prepare for a Python interview? Would you like a set of problems that increase in difficulty to practice and hone your Python skills? This week on the show, we have Jim Anderson to talk about his new Real Python article, "Python Practice Problems: Get Ready for Your Next Interview." This article provides several problems, which include skeleton code, unit tests, and solutions for you to compare your work.

View Details

Why is Python pulling in so many new programmers? Maybe some of that growth is from Python being a full-spectrum language. This week on the show we have Michael Kennedy, the host of the podcast "Talk Python to Me". Michael reflects on five years of podcasting about Python, and many of the changes he has seen in the Python landscape.

View Details

Wouldn't it be nice to a use a form of version control for data? Something that would allow you to track and version your datasets and models. Well, that's what the tool called DVC is designed to do. This week on the show, David Amos is here and he's brought another batch of PyCoder’s Weekly articles and projects.

View Details

Have you wondered, how should I package my Python code? You've written the application, but now you need to distribute it to the machines it's intended to run on. It depends on what the code is, the libraries it depends on, and with whom do you want to share it. This week on the show we have Itamar Turner-Trauring, creator of the website pythonspeed.com. We discuss his article "Options for Packaging Your Python Code: Wheels, Conda, Docker, and More," covering the how of sharing your code.

View Details

Have you wondered what are Python wheels? How are they used to package Python code? Does Python use pass by value or pass by reference? This week on the show, David Amos is here to help answer these questions, and he has brought another batch of PyCoder’s Weekly articles and projects.

View Details

Do you want to distribute your Python applications to other users who don't have or even use Python? Maybe you're interested in seeing your Python application run on iOS or Android mobile devices. This week on the show we have Russell Keith-Magee, the founder and maintainer of the BeeWare project. Russell talks about Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices.

View Details

Do you want to learn the how and when of implementing K-means clustering in Python? Would you like to practice your pandas skills with a real-world project? This week on the show, David Amos is back with another batch of PyCoder’s Weekly articles and projects.

View Details

Have you wanted to generate advanced reports as PDFs using Python? Maybe you want to build documents with tables, images, or fillable forms. This week on the show we have Mike Driscoll to talk about his book "ReportLab - PDF Processing with Python."

View Details

Would you like to clearly understand what's happening when you use the Python import keyword? Do you want to use modules more effectively to structure your code? Or maybe you're ready to move to the next level with your Django project by adding user management. This week on the show, David Amos is back with another batch of PyCoder's Weekly articles and projects.

View Details

This week on the show we have Armin Ronacher to talk about the first 10 years of Flask. Armin talks about the origins of Flask and the components that make up the framework. He talks about what goes into documenting a framework or API. He also talks about the community working on the ongoing development of Flask.

View Details

Are you familiar with linear programming, and how it can be used to solve resource optimization problems? Would you like to free your Python code from a clunky command line and start making convenient graphical interfaces for your users? This week on the show, David Amos is back with another batch of PyCoder's Weekly articles and projects.

View Details

Are you using the Python library Pandas the right way? Do you wonder about getting better performance, or how to optimize your data for analysis? What does normalization mean? This week on the show we have Hannah Stepanek to discuss her new book "Thinking in Pandas".

View Details

Have you wanted to learn Regular Expressions in Python, but don't know where to start? Have you stumbled into the dreaded pink SettingWithCopyWarning in Pandas? This week on the show, we have David Amos from the Real Python team to discuss a recent two-part series on Regex in Python. We also talk about another recent article on the site about views vs copies in Pandas. David also brings a few other articles and projects from the wider Python community for us to discuss.

View Details

Would you like to run your Python code in the cloud without having to become an infrastructure engineer? Do you want to have Python functions that run when triggered by specific events? This week on the show we have Anthony Chu to discuss serverless computing and running python functions in the cloud. Anthony Chu is program manager for Microsoft's Azure Functions.

View Details

Have you wanted to work with PDF files in Python? Maybe you want to extract text, merge and concatenate files, or even create PDFs from scratch. Are you interested in building hardware projects using a Raspberry Pi? This week on the show we have David Amos from the Real Python team to discuss his recent article on working with PDFs. David also brings a few other articles from the wider Python community for us to discuss.

View Details

Do you want to get started with web scraping using Python? Are you concerned about the potential legal implications? What are the tools required and what are some of the best practices? This week on the show we have Kimberly Fessel to discuss her excellent tutorial created for PyCon 2020 online titled "It's Officially Legal so Let's Scrape the Web."

View Details

Have you wanted to get started with testing in Python? Maybe you feel a little nervous about diving in deeper than just confirming your code runs. What are the tools needed and what would be the next steps to level up your Python testing? This week on the show we have Anthony Shaw to discuss his article on this subject. Anthony is a member of the Real Python team and has written several articles for the site.

View Details

Do you know someone in the Python community who recently was let go from their job due to the pandemic? What does the job landscape currently look like? What are skills and techniques that will help you in your job search? This week we have Kyle Stratis on the show to discuss how he is managing his job search after just being let go from his data engineering job. Kyle is a member of the Real Python team and has written several articles for the site.

View Details

In your quest to become a better developer, how do you find Python code that is at your reading level? What are good code bases or projects to study? What are the things holding you back from leveling up your Python literacy? This week we have Cecil Phillip on the show to discuss all of these common questions. Cecil is a Senior Cloud Advocate at Microsoft.

View Details

Docker is a common tool for Python developers creating and deploying applications, but what do you need to know if you want to use Docker for data science and machine learning? What are the best practices if you want to start using containers for your scientific projects? This week we have Tania Allard on the show. She is a Sr. Developer Advocate at Microsoft focusing on Machine Learning, scientific computing, research and open source.

View Details

Want to learn more about AsyncIO in Python, with an example where you can see and hear events being triggered in real-time? This week we have Łukasz Langa on the show. Łukasz has created a talk for PyCon 2020 online about using AsyncIO with Music.

View Details

Are you interested in building REST APIs with Flask and SQLAlchemy? This week we have Doug Farrell on the show. We talk about his four-part Real Python article series on Python REST APIs.

View Details

Have you ever wanted to explore using Python with electronics? CircuitPython is a great platform to get started with. This week we have Thea Flowers on the show. Thea has been creating several hardware projects based around CircuitPython, and she talks about getting started on the platform.

View Details

Do you get upset and frustrated when you experience errors running your Python code? This week we have Martin Breuss on the show. We discuss how to learn Python through errors, and how errors really are your friends.

View Details

Have you been using Python for a while, but want to be more effective with your code? This week we have Brett Slatkin on the show. We talk about the 2nd edition of his book Effective Python.

View Details

Is game programming a good way to develop your Python programming skills? This week we have Jon Fincher on the show. Jon is an author on the Real Python team, and we talk about his recent articles on PyGame and Arcade.

View Details

Do you want to learn more about Python decorators? Have you ever wondered what goes on behind the scenes to create a Real Python article? In this first episode, We have Geir Arne Hjelle from the Real Python team on the show.

View Details

A weekly Python podcast hosted by Christopher Bailey with interviews, coding tips, and conversation with guests from the Python community.