Filtrer par genre
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.
- 231 - marimo: Reactive Notebooks and Deployable Web Apps in Python
What are common issues with using notebooks for Python development? How do you know the current state, share reproducible results, or create interactive applications? This week on the show, we speak with Akshay Agrawal about the open-source reactive marimo notebook for Python.
Before writing any code, Akshay wrote a 2,500-word design document. He wanted to create a maintainable and reproducible tool that avoided the hidden state of traditional notebooks. We discuss solving the hidden state problem by building the notebook as a directed acyclic graph (DAG).
Akshay shares how marimo notebooks are stored as pure Python files, which makes them easy to read, importable, and git-friendly. We discuss serializing package requirements using PEP 723 inline metadata to create standalone reproducible notebooks. We also cover how marimo notebooks can be deployed as a web app or dashboard using Pyodide.
Course Spotlight: Navigating Namespaces and Scope in Python
In this course, you’ll learn about Python namespaces, the structures used to store and organize the symbolic names created during execution of a Python program. You’ll learn when namespaces are created, how they are implemented, and how they define variable scope.
Topics:
00:00:00 – Introduction 00:02:06 – Akshay’s background and studies 00:04:14 – Work at Google and PhD program 00:06:29 – Sharing notebooks 00:08:18 – Starting work on marimo 2 years ago 00:12:48 – Avoiding notebook issues and building a DAG 00:18:39 – The difference of reactivity 00:20:39 – What is a marimo notebook? 00:23:39 – Video Course Spotlight 00:24:50 – Reproducibility and managing package requirements 00:27:49 – Using decorators for cells 00:30:23 – Writing a design document before any coding 00:34:08 – Interactivity and UI widgets 00:38:20 – Design decisions and built-in widgets 00:42:05 – Creating a deployable web application 00:44:34 – Exploring examples and tutorials 00:46:13 – Supporting DataFrame libraries with narwhals 00:48:00 – Migrating from a Jupyter notebook 00:52:02 – Working with cells and not running code 00:54:30 – A couple favorite tutorials 00:56:17 – What are you excited about in the world of Python? 00:57:39 – What do you want to learn next? 00:59:34 – How can people follow the project and yourself? 01:00:12 – Thanks and goodbyeShow Links:
marimo - a next-generation Python notebook marimo: an open-source reactive notebook for Python - Akshay Agrawal (Nbpy2024) - YouTube TensorFlow Made with marimo - marimo FAQ - marimo Pluto.jl — interactive Julia programming environment Observable: Build expressive charts and dashboards with code We Downloaded 10,000,000 Jupyter Notebooks From Github – This Is What We Learned - The Datalore Blog A Large-scale Study about Quality and Reproducibility of Jupyter Notebooks Lessons learned reinventing the Python notebook - marimo Episode #226: PySheets: Spreadsheets in the Browser Using PyScript PEP 723 – Inline script metadata Inline script metadata - Python Packaging User Guide Serializing package requirements in marimo notebooks - marimo uv: Unified Python packaging marimo Newsletter 7 - Jupyter to marimo Custom UI elements - marimo anywidget - anywidget Interactive elements - marimo Episode #224: Narwhals: Expanding DataFrame Compatibility Between Libraries Calmcode - marimo: Introduction Join the marimo Discord marimo newsletter marimo on Twitter marimo on LinkedIn Akshay Agrawal’s website Aksahy on TwitterLevel up your Python skills with our expert-led courses:
Navigating Namespaces and Scope in Python Python Decorators 101 Using Jupyter NotebooksSupport the podcast & join our community of Pythonistas
Fri, 29 Nov 2024 - 230 - The Joy of Tinkering & Python Free-Threading Performance
What keeps your spark alive for developing software and learning Python? Do you like to try new frameworks, build toy projects, or collaborate with other developers? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss the joy of tinkering with Python as a way to keep your developer skills sharp. We dig into our techniques for continuing to learn and build projects.
Christopher shares an article that examines the performance of Python 3.13’s free-threading features. This piece uses a clever example to measure how the new features behave with large datasets and parallelization.
We share several other articles and projects from the Python community, including a group of new releases, common use cases and examples for Python closures, finding the opposite of cloud-native, Python’s soft keywords, a command-line utility for taking automated screenshots of websites, and putting the Django admin in the terminal with Textual.
This episode is sponsored by Windsurf.
Course Spotlight: Python Inner Functions
In this step-by-step course, you’ll learn what inner functions are in Python, how to define them, and what their main use cases are. You’ll see how to write helper functions, create closure factory functions, and how to add behavior to existing functions with decorators.
Topics:
00:00:00 – Introduction 00:02:18 – Django Bugfix Release Issued: 5.1.3 00:02:46 – Pillow Release 11.0.0 00:03:14 – Flask Version 3.1.0 00:03:30 – PyCon US 2025 (Pittsburgh) Call for Proposals 00:03:46 – Python Closures: Common Use Cases and Examples 00:09:20 – State of Python 3.13 Performance: Free-Threading 00:15:42 – Sponsor: Windsurf 00:16:32 – Opposite of Cloud Native Is…? 00:22:36 – Python’s Soft Keywords 00:24:50 – Video Course Spotlight 00:26:11 – The Joy of Tinkering 00:38:33 – shot-scraper: A command-line utility for taking automated screenshots of websites 00:41:13 – django-admin-tui: Django Admin in the Terminal! 00:42:37 – django-admin-dracula: Dracula Themes for the Django Admin 00:44:21 – Thanks and goodbyeNews:
Django Bugfix Release Issued: 5.1.3 Pillow Release 11.0.0 Flask Version 3.1.0 PyCon US 2025 (Pittsburgh) Call for ProposalsShow Links:
Python Closures: Common Use Cases and Examples – In this tutorial, you’ll learn about Python closures. A closure is a function-like object with an extended scope. You can use closures to create decorators, factory functions, stateful functions, and more. State of Python 3.13 Performance: Free-Threading – This article does a comparison between code in single threaded, threaded, and multi-process versions under Python 3.12, 3.13, and 3.13 free-threaded with the GIL on and off. Opposite of Cloud Native Is…? – Michael (from Talk Python fame) introduces the concept of “stack-native” as the opposite of “cloud-native”, and how it applies to Python web apps. Building applications with just enough full-stack building blocks to run reliably with minimal complexity, rather than relying on a multitude of cloud services. Python’s soft keywords – Python includes soft keywords: tokens that are important to the parser but can also be used as variable names. This article shows you what a soft keyword is and how to find them in Python 3.12 (both the easy and hard way).Discussion:
Habits of Great Software Engineers - The Joy of TinkeringProjects:
shot-scraper: A command-line utility for taking automated screenshots of websites django-admin-tui: Django admin in the terminal! django-admin-dracula: 🦇 Dracula themes for the Django adminAdditional Projects:
Primer on Python Decorators – Real Python We’ve moved to Hetzner - Talk Python Blog Talk Python rewritten in Quart (async Flask) - Talk Python Blog PyCoder’s Weekly - Have a Project You Want to Share? - Submit a LinkLevel up your Python skills with our expert-led courses:
Python Decorators 101 Python Inner Functions Defining and Calling Python FunctionsSupport the podcast & join our community of Pythonistas
Fri, 22 Nov 2024 - 229 - Maintaining the Foundations of Python & Cautionary Tales
How do you build a sustainable open-source project and community? What lessons can be learned from Python’s history and the current mess that the WordPress community is going through? This week on the show, we speak with Paul Everitt from JetBrains about navigating open-source funding and the start of the Python Software Foundation.
Paul has been an organizer in the Python community almost from the beginning. He shares how the project has navigated through multiple sponsors. We talk about the early governance models and the formation of the Python Software Foundation.
We contrast this journey with the current drama unfolding in the WordPress community. We discuss the potential problems of having a benevolent dictator for life. We also dig into sponsorship models and ways to get companies to give back to the open-source projects they rely on.
This episode is sponsored by Sentry.
Course Spotlight: Using pandas to Make a Gradebook in Python
With this course and Python project, you’ll build a script to calculate grades for a class using pandas. The script will quickly and accurately calculate grades from a variety of data sources. You’ll see examples of loading, merging, and saving data with pandas, as well as plotting some summary statistics.
Topics:
00:00:00 – Introduction 00:01:55 – Meeting Jodie Burchell at PyCon 2022 00:02:51 – A non-traditional path into open-source 00:07:09 – The current turmoil around WordPress 00:13:49 – Keeping things fair in the age of extraction 00:16:03 – Sponsor: Sentry 00:17:07 – Early Python organizing history and conservation 00:20:41 – The Python Software Activity precursor to PSF 00:24:14 – Creating the Python Software Foundation 00:27:24 – Keeping the perfect distance of business and project 00:28:13 – Who gets to capture the value from open-source? 00:31:07 – Sponsorships becoming more common 00:33:24 – BDFL to a steering council 00:34:58 – Video Course Spotlight 00:36:16 – What is Plone? 00:38:11 – Starting in Python and finding community 00:50:07 – Companies contributing 00:53:16 – Examples of how JetBrains contributes back 00:55:41 – Understanding the support system 00:58:09 – Talking to decision makers 01:00:07 – Python 1994 talk and continuation 01:01:49 – What are you excited about in the world of Python? 01:03:06 – What do you want to learn next? 01:04:17 – How can people follow your work online? 01:07:16 – Thanks and goodbyeShow Links:
JetBrains: Essential tools for software developers and teams PyCharm: the Python IDE for data science and web development PyCon - Join us at PyCon Benevolent dictator for life - Wikipedia The messy WordPress drama, explained - The Verge WordPress.org’s latest move involves taking control of a WP Engine plugin - The Verge WP Engine asks court to stop Matt Mullenweg from blocking access to WordPress resources - The Verge Podcast: Why the WordPress Chaos Matters - 404 Media Zope - Wikipedia Python Software Foundation PyLadies – Women Who Love Coding in Python Django Software Foundation - Django OpenCV - About Page Plone Foundation FastHTML - Modern web applications in pure Python Paul Everitt - Python 1994 - YouTube A Team at Microsoft is Helping Make Python Faster - Python Velda Kiara JetBrains Blog: The Drive to Develop Paul Everitt (@pauleveritt@fosstodon.org) - Fosstodon Guido van Rossum - Wikipedia The History of Python: Personal History - part 1, CWI Oral History of Guido van Rossum, part 1 - YouTubeLevel up your Python skills with our expert-led courses:
Building Python Project Documentation With MkDocs The pandas DataFrame: Working With Data Efficiently Using pandas to Make a Gradebook in PythonSupport the podcast & join our community of Pythonistas
Fri, 15 Nov 2024 - 228 - New PEPs: Template Strings & External Wheel Hosting
Have you wanted the flexibility of f-strings but need safety checks in place? What if you could have deferred evaluation for logging or avoiding injection attacks? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss a set of recent Python Enhancement Proposals (PEPs). The idea of template strings has been under consideration for a while, and PEP 750 describes a new way forward. PEP 759 proposes a way for projects on PyPI to safely host resources on external sites using a new package upload format called a .rim file.
We share several other articles and projects from the Python community, including what didn’t make the headlines about Python 3.13, solving Sudoku with Python packaging, what’s sweet about Python’s syntactic sugar, creating database-generated columns using SQLite and Django, a discussion about mentoring, an adaptive web scraper, and a debugging tool for HTTP(S) client requests.
This episode is sponsored by Sentry.
Course Spotlight: Using Pydantic to Simplify Python Data Validation
Discover the power of Pydantic, Python’s most popular data parsing, validation, and serialization library. In this hands-on video course, you’ll learn how to make your code more robust, trustworthy, and easier to debug with Pydantic.
Topics:
00:00:00 – Introduction 00:02:08 – Python 3.14.0 Alpha 1 Released 00:02:38 – Python 3.13, What Didn’t Make the Headlines 00:05:23 – What’s up Python? 3.13 is out, t-strings look awesome 00:10:21 – Sponsor: Sentry 00:11:25 – Sudoku in Python Packaging 00:14:29 – Syntactic Sugar: Why Python Is Sweet and Pythonic 00:22:31 – Database generated columns: Django & SQLite 00:27:14 – Video Course Spotlight 00:28:39 – Mentors 00:42:23 – Scrapling: Lightning-Fast, Adaptive Web Scraping for Python 00:44:14 – httpdbg: A tool for Python developers to easily debug the HTTP(S) client requests 00:46:04 – Request for project submissions to PyCoders 00:46:59 – Thanks and goodbyeNews:
Python 3.14.0 Alpha 1 ReleasedShow Links:
Python 3.13, What Didn’t Make the Headlines – Bite Code summarizes some of the lesser covered changes to Python in the 3.13 release, including how some of the REPL improvements made it intopdb
, improvements toshutil
, and small additions to the asyncio library. What’s up Python? 3.13 is out, t-strings look awesome, dep groups come in handy… Sudoku in Python Packaging – Simon writes about a Sudoku solver written by Konstin that uses the Python packaging mechanisms to do Sudoku puzzles. The results are output using a requirements.txt file, wheresudoku-0-3==5
represents the (0,3) cell’s answer of 5. Syntactic Sugar: Why Python Is Sweet and Pythonic – In this tutorial, you’ll learn what syntactic sugar is and how Python uses it to help you create more readable, descriptive, clean, and Pythonic code. You’ll also learn how to replace a given piece of syntactic sugar with another syntax construct. Database generated columns: Django & SQLite – An introduction to database generated columns, using SQLite and the new GeneratedField added in Django 5.0Discussion:
Mentors – Ryan just finished his second round of mentoring with the Djangonaut.Space program. This post talks about how you can help your mentor help you and how to be a good mentor.Projects:
Scrapling: Lightning-Fast, Adaptive Web Scraping for Python httpdbg: A tool for Python developers to easily debug the HTTP(S) client requests in a Python programAdditional Links:
PEP 750 – Template Strings PEP 735 – Dependency Groups in pyproject.toml PEP 759 – External Wheel Hosting Episode #47: Unraveling Python’s Syntax to Its Core With Brett Cannon – The Real Python Podcast Episode #92: Continuing to Unravel Python’s Syntactic Sugar With Brett Cannon – The Real Python Podcast Episode #4: Learning Python Through Errors – The Real Python Podcast PyCoder’s Weekly - Have a Project You Want to Share? - Submit a LinkLevel up your Python skills with our expert-led courses:
Using Pydantic to Simplify Python Data Validation Python Type Checking Using Type Hints for Multiple Return Types in PythonSupport the podcast & join our community of Pythonistas
Fri, 08 Nov 2024 - 227 - PySheets: Spreadsheets in the Browser Using PyScript
What goes into building a spreadsheet application in Python that runs in the browser? How do you make it launch quickly, and where do you store the cells of data? This week on the show, we speak with Chris Laffra about his project, PySheets, and his book “Communication for Engineers.”
As a software engineer, Chris has worked at IBM, Google, Uber, and several financial institutions. He speaks about developer productivity and communication skills as an engineer. We begin our conversation by digging into his background, his approach to building engineering teams, and strategies for improving communication.
Chris’ idea for PySheets is to have Excel inside Python with everything running locally in your browser. He was inspired by the success of Jupyter Notebooks but wanted to develop a tool more suited to a spreadsheet’s non-linear graph structure.
PySheets is built to run locally in the user’s browser, taking advantage of PyScript. We discuss finding the right solution for storing data in the browser and developing a graphic toolkit to create the UI. Chris also shares the novel method he found to get the interface up and running while the larger assets are loading.
This episode is sponsored by Sentry.
Course Spotlight: Understanding Python’s Global Interpreter Lock (GIL)
Python’s Global Interpreter Lock, or GIL, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter at any one time. In this video course, you’ll learn how the GIL affects the performance of your Python programs.
Topics:
00:00:00 – Introduction 00:02:25 – Background with building engineering teams 00:08:43 – Communication for Engineers book 00:16:17 – What do customers want and experiences at IBM 00:24:28 – Starting the development of PySheets 00:27:19 – Working with the DOM 00:29:41 – Success of Jupyter notebooks 00:35:46 – Sponsor: Sentry 00:36:52 – Little Toolkit for PyScript 00:43:24 – Finding funding 00:46:58 – Building a product before selling 00:52:27 – Video Course Spotlight 00:53:46 – Finding the right data storage in IndexedDB 01:01:57 – Exploring the trial page and extensibility 01:08:26 – Contributing to the project or forking 01:11:56 – What are you excited about in the world of Python? 01:16:20 – What do you want to learn next? 01:17:25 – How can people follow your work online? 01:18:05 – Thanks and goodbyeShow Links:
Chris Laffra C4E - Communication for Engineers (ePUB) PySheets - Spreadsheet UI for Python PySheets: Source for PySheets PyScript - Python in the browser - Chris Laffra - YouTube Python in Excel - Microsoft 365 pyscript/ltk: LTK is a little toolkit for writing UIs in PyScript LTK - Little Toolkit PROCOL: a parallel object language with protocols - ACM SIGPLAN IndexedDB API - MDN First steps - PyScript Pyodide — Version 0.26.3 PyScript Updates: Bytecode Alliance, Pyodide, and MicroPython MicroPython - Python for microcontrollers FreeCAD: Your own 3D parametric modeler Chris Laffra - How to become a Happy and Productive Engineer - YouTubeLevel up your Python skills with our expert-led courses:
What's New in Python 3.13 Python Plotting With Matplotlib Understanding Python's Global Interpreter Lock (GIL)Support the podcast & join our community of Pythonistas
Fri, 01 Nov 2024 - 226 - Python Getting Faster and Leaner & Ideas for Django Projects
What changes are happening under the hood in the latest versions of Python? How are these updates laying the groundwork for a faster Python in the coming years? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher shares an article about Python’s recent performance improvements. The piece covers the specialized adaptive interpreter and explains what those terms mean. It also includes details about the experimental feature of the Just-In-Time (JIT) compiler added in 3.13.
We dig into a collection of Django projects you can use to practice and develop your skills. The projects ramp up from detailed beginner tutorials to more advanced projects with guidelines on how to get started. We also discuss a collection of popular websites that use Django.
We share several other articles and projects from the Python community, including a batch of recent Python Enhancement Protocols (PEPs), a couple of Python releases, using DuckDB in the browser with Pyodide, building a contact book app with Textual, generating a tiny status page with a Python script, and a grep-like tool that understands code.
This episode is sponsored by AssemblyAI.
Course Spotlight: Building a Site Connectivity Checker
In this video course, you’ll build a Python site connectivity checker for the command line. While building this app, you’ll integrate knowledge related to making HTTP requests with standard-library tools, creating command-line interfaces, and managing concurrency with asyncio and aiohttp.
Topics:
00:00:00 – Introduction 00:03:11 – PEP 777: How to Re-Invent the Wheel 00:04:22 – PEP 758: Allowexcept
andexcept*
Expressions Without Parentheses 00:04:51 – PEP 760: No More Bare Excepts (Withdrawn) 00:05:42 – PEP 735: Dependency Groups inpyproject.toml
00:06:29 – PEP 761: Deprecating PGP Signatures for CPython Artifacts 00:06:59 – Python 3.12.7 Released 00:07:12 – Incremental GC and Pushing Back the 3.13.0 Release 00:09:10 – DuckDB in the Browser With Pyodide 00:15:35 – Sponsor: AssemblyAI 00:16:18 – Build a Contact Book App With Python, Textual, and SQLite 00:21:55 – Django Project Ideas 00:28:42 – Video Course Spotlight 00:30:00 – In the Making of Python Fitter and Faster 00:35:13 – tinystatus: Tiny Status Page Generated by a Python Script 00:38:06 – srgn: Grep-Like Tool That Understands Code 00:42:01 – Thanks and goodbyeNews:
PEP 777: How to Re-Invent the Wheel – “The current wheel 1.0 specification was written over a decade ago, and has been extremely robust to changes in the Python packaging ecosystem… this PEP prescribes compatibility requirements on future wheel revisions.” PEP 758: Allowexcept
andexcept*
Expressions Without Parentheses – “This PEP proposes to allow unparenthesizedexcept
andexcept*
blocks in Python’s exception handling syntax. Currently, when catching multiple exceptions, parentheses are required around the exception types.” PEP 760: No More Bare Excepts (Withdrawn) PEP 735: Dependency Groups inpyproject.toml
(Accepted) PEP 761: Deprecating PGP Signatures for CPython Artifacts – Since Python 3.11.0, CPython has provided two verifiable digital signatures for all CPython artifacts: PGP and Sigstore. This PEP proposes moving to Sigstore as the only way of signing artifacts. Python 3.12.7 Released Python 3.13.0 Released Incremental GC and Pushing Back the 3.13.0 Release – Some last minute performance considerations delayed the release of Python 3.13 with one of the features being backed out.Show Links:
DuckDB in the Browser With Pyodide – Learn how to run DuckDB in an in-browser Python environment to enable simple querying on remote files, interactive documentation, and easy to use training materials. Build a Contact Book App With Python, Textual, and SQLite – In this tutorial, you’ll be guided step by step through the process of building a basic contact book application. You’ll use Python and Textual to build the application’s text-based user interface (TUI), and then use SQLite to manage the database. Django Project Ideas – Looking to experiment or build your portfolio? Discover creative Django project ideas for all skill levels, from beginner apps to advanced full-stack projects. In the Making of Python Fitter and Faster – This post details how Python’s recent performance improvements work under the hood. It covers changes to the interpreter, better memory management, and the newly experimental JIT compiler.Projects:
tinystatus: Tiny Status Page Generated by a Python Script srgn: Grep-Like Tool That Understands CodeAdditional Links:
What Are Python Wheels and Why Should You Care? – Real Python Deploy your first JupyterLite website on GitHub Pages — JupyterLite 0.4.3 documentation rich: Python library for rich text and beautiful formatting in the terminal The 10 Most Popular Websites Using Django Django in Action Django and htmx Tutorial: Easier Web Development - YouTube Build a Site Connectivity Checker in Python – Real Python Refactoring Python with 🌳 Tree-sitter & Jedi | Jack’s blogLevel up your Python skills with our expert-led courses:
Building a Site Connectivity Checker How to Set Up a Django Project Building Command Line Interfaces With argparseSupport the podcast & join our community of Pythonistas
Fri, 25 Oct 2024 - 225 - Narwhals: Expanding DataFrame Compatibility Between Libraries
How does a Python tool support all types of DataFrames and their various features? Could a lightweight library be used to add compatibility for newer formats like Polars or PyArrow? This week on the show, we speak with Marco Gorelli about his project, Narwhals.
Narwhals is a project aimed at library maintainers rather than end users. We discuss how the added compatibility benefits users by supporting modern features like lazy evaluation. We cover several projects Marco has been working with to implement Narwhals, including Altair, scikit-lego, and Ibis.
We also discuss how Marco started contributing to open-source projects. Marco has contributed to both pandas and Polars, which helps explain his interest in growing compatibility between libraries. He also offers advice on making your first contribution.
This episode is sponsored by CodeRabbit.
Course Spotlight: Differences Between Python’s Mutable and Immutable Types
In this video course, you’ll learn how Python’s mutable and immutable data types work internally and how you can take advantage of mutability or immutability to power your code.
Topics:
00:00:00 – Introduction 00:02:02 – Euro SciPy 2024 and sprints 00:04:04 – How did you get involved in open source? 00:07:18 – Finding a good issue to get started 00:09:25 – Discord and open-source projects 00:11:12 – Who would you describe Narwhals? 00:16:47 – Working on Polars 00:19:17 – Apache Arrow and a data interchange protocol 00:22:55 – Sponsor: CodeRabbit 00:23:55 – Digging into eager vs lazy 00:27:04 – Ibis DataFrame library 00:28:57 – What do libraries need from Narwhals? 00:34:57 – The scikit-lego library 00:37:15 – Video Course Spotlight 00:38:45 – Other libraries interested in Narwhals 00:41:56 – Compatibility policy 00:45:18 – What should an end user expect? 00:46:32 – Have other projects that attempted this? 00:47:54 – Keeping the project light and pure Python 00:49:32 – Contributors and how to get involved 00:54:42 – What are you excited about in the world of Python? 00:57:18 – What do you want to learn next? 00:59:05 – How can people follow your work online? 00:59:27 – Thanks and goodbyeShow Links:
Narwhals EuroSciPy narwhals: Lightweight and Extensible Compatibility Layer Between DataFrame Libraries! - GitHub DataFrame Interoperability - What’s Been Achieved, and What Comes Next? - PyCon Lithuania - YouTube How Narwhals Has Many End Users … That Never Use It Directly - YouTube Polars Has a New Lightweight Plotting Backend - Altair pandas - Python Data Analysis Library Polars — DataFrames for the new era great-tables - PyPI Episode #214: Build Captivating Display Tables in Python With Great Tables Ibis Episode #201: Decoupling Systems to Get Closer to the Data Great Tables is Now BYODF (Bring Your Own DataFrame) How Narwhals and scikit-lego Came Together to Achieve DataFrame-Agnosticism Explore Using Narwhals in Plotly Express · Issue #4749 - GitHub Fairlearn Perfect Backwards Compatibility Policy - Narwhals uv: Unified Python packaging pixi - Powerful Development Environments Narwhals - Discord marcogorelli (@marcogorelli@fosstodon.org) - Fosstodon Marco Gorelli - Quansight - LinkedInLevel up your Python skills with our expert-led courses:
What's New in Python 3.13 pandas GroupBy: Grouping Real World Data in Python The pandas DataFrame: Working With Data EfficientlySupport the podcast & join our community of Pythonistas
Fri, 18 Oct 2024 - 224 - Exploring the New Features of Python 3.13
Python 3.13 is here! Our regular guests, Geir Arne Hjelle and Christopher Trudeau, return to discuss the new version. This year, Geir Arne coordinated a series of preview articles with members of the Real Python team and a showcase tutorial, “Python 3.13: Cool New Features for You to Try.” Christopher’s video course “What’s New in Python 3.13” covers the topics from the article and shows the new features in action.
Geir Arne and Christopher dug into the release to create code examples of the new features for the tutorial and course. We look at the options for disabling the Global Interpreter Lock (GIL) and enabling the Just-in-Time (JIT) compiler. We also discuss the new interactive interpreter, better error messages, multiple improvements to static typing, and additional performance improvements.
We share our thoughts on the updates and offer advice about incorporating them into your projects. We also discuss when you should start running Python 3.13.
This is episode is sponsored by Nvidia.
Course Spotlight: What’s New in Python 3.13
In this video course, you’ll learn about the new features in Python 3.13. You’ll take a tour of the new REPL and error messages and see how you can try out the experimental free threading and JIT versions of Python 3.13 yourself.
Topics:
00:00:00 – Introduction 00:03:14 – A Modern REPL 00:08:54 – Making the Global Interpreter Lock Optional in CPython 00:11:33 – JIT Compilation 00:15:48 – More improved error messages 00:18:30 – Sponsor: NVIDIA 00:19:13 – Marking deprecations using the type system 00:21:09 – Type Defaults for Type Parameters 00:22:44 – Narrowing types with TypeIs 00:25:24 – TypedDict: Read-only items 00:27:50 – Random command line interface 00:29:54 – New copy.replace() 00:33:43 – Video Course Spotlight 00:34:55 – Pathlib and globbing 00:39:33 – Stripping docstrings 00:41:28 – Import improvements 00:41:56 – Dynamically import non-code files 00:42:23 – Adding iOS as a supported platform 00:43:32 – More consistency with local namespace 00:44:30 – Support for deprecation in argparse 00:45:00 – Better entry points for breakpoint or set_trace 00:46:08 – Removing dead batteries 00:47:43 – When to upgrade to 3.13? 00:53:19 – core.py podcast 00:54:14 – Thanks and goodbyeShow Links:
Python 3.13: Cool New Features for You to Try What’s New in Python 3.13 Python 3.13 Preview: A Modern REPL Python 3.13 Preview: Free Threading and a JIT Compiler What’s New In Python 3.13 — Python 3.13.0rc2 documentation PEP 703 – Making the Global Interpreter Lock Optional in CPython PEP 744 – JIT Compilation PEP 702 – Marking deprecations using the type system PEP 696 – Type Defaults for Type Parameters PEP 742 – Narrowing types with TypeIs PEP 705 – TypedDict: Read-only items PEP 730 – Adding iOS as a supported platform PEP 738 – Adding Android as a supported platform PEP 667 – Consistent views of namespaces PEP 594 – Removing dead batteries from the standard library The Python Standard REPL: Try Out Code and Ideas Quickly Unlock IPython’s Magical Toolbox for Your Coding Journey core.py Podcast - Episode 14: Integration EventsLevel up your Python skills with our expert-led courses:
What's New in Python 3.13 Python Type Checking What's New in Python 3.12Support the podcast & join our community of Pythonistas
Fri, 11 Oct 2024 - 223 - Using Virtual Environments in Docker & Comparing Python Dev Tools
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 NumPywhere()
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 goodbyeNews:
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.16Show 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 NumPywhere()
– 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 ReplacementProjects:
csv_trimming: Remove Common Ugliness From CSV Files django-tables2: Create HTML Tables in DjangoAdditional 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 - LeanpubLevel up your Python skills with our expert-led courses:
Using Jupyter Notebooks Absolute vs Relative Imports in Python Advanced Python import TechniquesSupport the podcast & join our community of Pythonistas
Fri, 27 Sep 2024 - 222 - Thriving as a Developer With ADHD
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 goodbyeShow 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) - FosstodonLevel 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 DevelopersSupport the podcast & join our community of Pythonistas
Fri, 20 Sep 2024 - 221 - Configuring Git Pre-Commit Hooks & Estimating Software Projects
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 goodbyeNews:
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 runpre-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 EngineersProjects:
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 AdminAdditional 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 PythonLevel 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 MemorySupport the podcast & join our community of Pythonistas
Fri, 13 Sep 2024 - 220 - Astrophysics and Astronomy With Python & PyCon Africa 2024
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 goodbyeNews:
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’sprint()
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 ObjectsAdditional 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) - XLevel 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 MatplotlibSupport the podcast & join our community of Pythonistas
Fri, 06 Sep 2024 - 219 - Exploring Robotics and Python Through Electronic Projects
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 goodbyeShow 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) - GitHubLevel up your Python skills with our expert-led courses:
Using Pygame to Build an Asteroids Game in Python Debugging in Python With pdb Using Python's assert to Debug and Test Your CodeSupport the podcast & join our community of Pythonistas
Fri, 23 Aug 2024 - 218 - Packaging Data Analyses & Using pandas GroupBy
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 goodbyeNews:
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 itstest
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 WeblogShow 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 engineersProjects:
pyxel: A Retro Game Engine for Python python-vendorize: Vendorize Packages From PyPIAdditional 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 PodcastLevel up your Python skills with our expert-led courses:
Everyday Project Packaging With pyproject.toml Working With JSON in Python pandas GroupBy: Grouping Real World Data in PythonSupport the podcast & join our community of Pythonistas
Fri, 16 Aug 2024 - 217 - Learning Through Building the Black Python Devs Community
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 goodbyeShow 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 docsLevel 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 PythonSupport the podcast & join our community of Pythonistas
Fri, 09 Aug 2024 - 216 - Using GraphQL in Django With Strawberry & Prototype Purgatory
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 goodbyeNews:
Python 3.13.0 Beta 4 ReleasedTopics:
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 DiscordLevel 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 FastAPISupport the podcast & join our community of Pythonistas
Fri, 02 Aug 2024 - 215 - Build Captivating Display Tables in Python With Great Tables
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 goodbyeShow 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 - LinkedInLevel 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 ggplotSupport the podcast & join our community of Pythonistas
Fri, 26 Jul 2024 - 214 - Constraint Programming & Exploring Python's Built-in Functions
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 thexz-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 goodbyeNews:
Polars 1.0 Released Psycopg 3.2 Released Django security releases issued: 5.0.7 and 4.2.14 PyBay 2024 Call for ProposalsShow 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 theurllib
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 thexz-utils
Backdoor – The backdoor introduced to thexz-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.orgLevel up your Python skills with our expert-led courses:
Parallel Iteration With Python's zip() Function Python Inner Functions Jinja TemplatingSupport the podcast & join our community of Pythonistas
Fri, 19 Jul 2024 - 213 - Digging Into Graph Theory in Python With David Amos
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 goodbyeShow 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 – MediumLevel up your Python skills with our expert-led courses:
Using Jupyter Notebooks Defining Python Constants for Code Maintainability Python Basics: Setting Up PythonSupport the podcast & join our community of Pythonistas
Fri, 12 Jul 2024 - 212 - Python Doesn't Round Numbers the Way You Might Think
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 goodbyeNews:
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 — CalVerProjects:
FinanceDatabase: Financial Database as a Python Module prettypretty: Build Awesome Terminal User InterfacesAdditional 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 - WikipediaLevel up your Python skills with our expert-led courses:
Python Basics: Numbers and Math Rounding Numbers in Python Editing Excel Spreadsheets in Python With openpyxlSupport the podcast & join our community of Pythonistas
Fri, 05 Jul 2024 - 211 - Creating a Guitar Synthesizer & Generating WAV Files With Python
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 goodbyeShow 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 - LinkedInLevel up your Python skills with our expert-led courses:
Simulating Real-World Processes in Python With SimPy Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn Playing and Recording Sound in PythonSupport the podcast & join our community of Pythonistas
Fri, 28 Jun 2024 - 210 - Python's Command-Line Utilities & Music Information Retrieval Tools
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 goodbyeNews:
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 todataclasses.field
” was determined to have an insufficient number of use cases. Django in ActionShow 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 withpython -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 – Thebytes
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-8Discussion:
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 InProjects:
Python Resources for Working With Excel Python Finite State Machines Made EasyAdditional 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 VegasLevel 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 EncodingsSupport the podcast & join our community of Pythonistas
Fri, 21 Jun 2024 - 209 - Detecting Outliers in Your Data With Python
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 goodbyeShow 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 - GitHubLevel 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 PythonSupport the podcast & join our community of Pythonistas
Fri, 14 Jun 2024 - 208 - Decomposing Software Problems & Avoiding the Trap of Clever Code
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 goodbyeNews:
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 DjangoLevel up your Python skills with our expert-led courses:
Getting Started With Django: Building a Portfolio App Efficient Iterations With Python Iterators and Iterables For Loops in Python (Definite Iteration)Support the podcast & join our community of Pythonistas
Fri, 07 Jun 2024 - 207 - Building Python Unit Tests & Exploring a Data Visualization Gallery
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’sunittest
: 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 goodbyeNews:
Python Software Foundation Board Election Dates for 2024 2023 PSF Annual Impact ReportShow Links:
Python’sunittest
: 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 PythonAdditional 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 RobotLevel 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 ApplicationsSupport the podcast & join our community of Pythonistas
Fri, 31 May 2024 - 206 - Considering Accessibility & Assistive Tech as a Python Developer
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 goodbyeShow 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 ScientificLevel up your Python skills with our expert-led courses:
Getting Started With Django: Building a Portfolio App Python Basics: Dictionaries HTML and CSS Foundations for Python DevelopersSupport the podcast & join our community of Pythonistas
Fri, 17 May 2024 - 205 - Querying OpenStreetMaps via API & Lazy Evaluation in Python
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 goodbyeNews:
PyPy v7.3.16 Release PEP 745: Python 3.14 Release Schedule The BASIC programming language turns 60 - Ars TechnicaShow 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 usingasyncio
. 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 inpandas
&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 PythonAdditional 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 LawyerLevel up your Python skills with our expert-led courses:
Getting Started With Django: Building a Portfolio App Python Generators 101 How to Set Up a Django ProjectSupport the podcast & join our community of Pythonistas
Fri, 10 May 2024 - 204 - Embarking on a Relaxed and Friendly Python Coding Journey
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 goodbyeShow 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) / XLevel up your Python skills with our expert-led courses:
Python Basics: Setting Up Python Python Turtle for Beginners Python Basics: Code Your First Python ProgramSupport the podcast & join our community of Pythonistas
Fri, 03 May 2024 - 203 - Pydantic Data Validation & Python Web Security Practices
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 inpipx
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 goodbyeNews:
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 2024Show 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 inpipx
1.4.2 – PEP 723 adds the ability to specify dependencies within a Python script itself. The folks who writepipx
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 Usingpipx
– 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 translationsAdditional 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 pandasSupport the podcast & join our community of Pythonistas
Fri, 26 Apr 2024 - 202 - Decoupling Systems to Get Closer to the Data
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 goodbyeShow 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) · GitHubLevel 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 ExceptionsSupport the podcast & join our community of Pythonistas
Fri, 19 Apr 2024 - 201 - Avoiding Error Culture and Getting Help Inside Python
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 goodbyeNews:
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.orgTopics:
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 wheresleep()
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 IIIProjects:
botasaurus: The All in One Framework to Build Awesome Scrapers suby: Slightly Simplified SubprocessesAdditional Links:
xkcd: Exploits of a Mom How SQLite Is Tested SettingWithCopyWarning in pandas: Views vs Copies – Real Python 99% Invisible - Mini-Stories: Volume 4Level 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 FilesSupport the podcast & join our community of Pythonistas
Fri, 12 Apr 2024 - 200 - Leveraging Documents and Data to Create a Custom LLM Chatbot
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 goodbyeShow 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 - YouTubeLevel 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 PythonSupport the podcast & join our community of Pythonistas
Fri, 05 Apr 2024 - 199 - Build a Video Game With Python Turtle & Visualize Data in Seaborn
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 goodbyeNews:
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 PlaceShow 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 TextualLevel up your Python skills with our expert-led courses:
Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn Python Turtle for Beginners Pointers and Objects in PythonSupport the podcast & join our community of Pythonistas
Fri, 29 Mar 2024 - 198 - Using Python in Bioinformatics and the Laboratory
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 goodbyeShow 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 - LinkedInLevel 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 FilesSupport the podcast & join our community of Pythonistas
Fri, 22 Mar 2024 - 197 - Exploring Duck Typing in Python & Dynamics of Monkey Patching
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 goodbyeNews:
DjangoCon US Call for Proposals White House Recommends Use of Python JupyterLab 4.1 and Notebook 7.1 ReleasedShow 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 TestingAdditional 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 ShellLevel up your Python skills with our expert-led courses:
Python Type Checking Testing Your Code With pytest Pointers and Objects in PythonSupport the podcast & join our community of Pythonistas
Fri, 15 Mar 2024 - 196 - Building a Healthy Developer Mindset While Learning Python
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 goodbyeShow 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 - LinkedInLevel 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 MkDocsSupport the podcast & join our community of Pythonistas
Fri, 08 Mar 2024 - 195 - Automate Tasks With Python & Building a Small Search Engine
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 goodbyeNews:
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 AvailableShow 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 NewsProjects
hexabyte: A modern, modular, and robust TUI hex editor ibis: The Flexibility of Python With the Scale of Modern SQLAdditional 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 PythonLevel 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 argparseSupport the podcast & join our community of Pythonistas
Fri, 01 Mar 2024 - 194 - Wes McKinney on Improving the Data Stack & Composable Systems
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 goodbyeShow 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 CompanyLevel 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 EfficientlySupport the podcast & join our community of Pythonistas
Fri, 23 Feb 2024 - 193 - Practical Python Decorator Uses & Avoiding datetime Pitfalls
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 Python
datetime
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 Pythondatetime
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 goodbyeNews:
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 HoursShow 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 Pythondatetime
Pitfalls – It’s no secret that the Pythondatetime
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 betterdatetime
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 asNone
so there is no way to distinguish between an explicitNone
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 ApplicationsProjects:
django-mock-queries: Mock Django Queryset Functions for Testing niquests: Requests but MultiplexedAdditional 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 3Level 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 SyntaxSupport the podcast & join our community of Pythonistas
Fri, 16 Feb 2024 - 192 - Focusing on Data Science & Less on Engineering and Dependencies
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 goodbyeShow 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 BlogLevel up your Python skills with our expert-led courses:
Everyday Project Packaging With pyproject.toml Combining Data in pandas With concat() and merge() Histogram Plotting in Python: NumPy, Matplotlib, Pandas & SeabornSupport the podcast & join our community of Pythonistas
Fri, 09 Feb 2024 - 191 - Great Starting Points for Contributing to Open Source
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 goodbyeShow 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 WebsiteLevel 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 DocsSupport the podcast & join our community of Pythonistas
Fri, 02 Feb 2024 - 190 - Building a Python Debugger & Preparing for NumPy 2.0
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 GoodbyeNews:
DjangoCon Europe 2024 CFP Now Open Python Insider: Python 3.13.0 alpha 3 is now availableShow 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 DiscussionProjects:
Fontimize: Optimize Fonts to the Glyphs on Your Site Pint: Units for PythonAdditional 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:
Debugging in Python With pdb Using Python's assert to Debug and Test Your Code Create a Tic-Tac-Toe Python Game Engine With an AI PlayerSupport the podcast & join our community of Pythonistas
Fri, 26 Jan 2024 - 189 - Measuring Bias, Toxicity, and Truthfulness in LLMs With Python
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 goodbyeBackground Links:
A Beginner’s Guide to Language Models - Built In ChatGPT - Explained! - YouTubeDataset Links:
truthful_qa - Datasets at Hugging Face wino_bias - Datasets at Hugging Face bold - Datasets at Hugging FaceTutorials 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 - 🦜️🔗 LangchainMeasurement Links:
Toxicity - a Hugging Face Space by evaluate-measurement Regard - a Hugging Face Space by evaluate-measurement Open LLM Leaderboard - a Hugging Face SpaceTraining Data for LLMs:
Common Crawl - Open Repository of Web Crawl Data The Pile The RefinedWeb Dataset for Falcon LLM: Outperforming Curated CorporaAgents and Plugin Links:
Transformers Agents - Hugging Face Agents - 🦜️🔗 Langchain ChatGPT Gets Its “Wolfram Superpowers”! - Stephen WolframAdditional 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 teamsLevel 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 KerasSupport the podcast & join our community of Pythonistas
Fri, 19 Jan 2024 - 188 - Serializing Data With Python & Underscore Naming Conventions
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 thekey
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 goodbyeNews:
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 DjangoShow 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 thekey
Parameter in Python – A parameter namedkey
is present in several Python functions, such assorted()
. 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 articleProjects:
flask-muck: RESTful APIs Using Flask and SqlAlchemy nh3: Python binding to Ammonia HTML sanitizer Rust crateAdditional 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 Withnh3
– 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 useddjango-bleach
, but since its deprecation, Adam has been usingnh3
, a Rust-based HTML sanitizer. nh3 · PyPILevel up your Python skills with our expert-led courses:
Working With JSON in Python Writing Beautiful Pythonic Code With PEP 8 Serializing Objects With the Python pickle ModuleSupport the podcast & join our community of Pythonistas
Fri, 12 Jan 2024 - 187 - Exploring Python in Excel
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 goodbyeShow 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) - XLevel up your Python skills with our expert-led courses:
Data Cleaning With pandas and NumPy Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn The pandas DataFrame: Working With Data EfficientlySupport the podcast & join our community of Pythonistas
Fri, 05 Jan 2024 - 186 - 2023 Real Python Tutorial & Video Course Wrap-Up
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 goodbyeShow 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 ConversationAdditional 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 PodcastLevel 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 PythonSupport the podcast & join our community of Pythonistas
Fri, 29 Dec 2023 - 185 - PyCoder's Weekly 2023 Wrap Up
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 goodbyeNews:
Python 3.13.0 Alpha 2 Is Now Available Welcoming the Supporting Developer in Residence Django 5.0 Released Django Ninja 1.0 ReleasedTop 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 PythonAdditional 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 htmlLevel 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 ClassesSupport the podcast & join our community of Pythonistas
Fri, 22 Dec 2023 - 184 - Exploring Code Reviews in Python and Automating the Process
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 goodbyeShow 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+ GamesLevel 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 MethodsSupport the podcast & join our community of Pythonistas
Fri, 08 Dec 2023 - 183 - Building a Python JSON Parser & Discussing Ideas for PEPs
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 aNamedTuple
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 goodbyeNews:
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 v2Show 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 aNamedTuple
Idea: Syntactic Sugar to Encourage Use of Named ArgumentsProjects:
grablinks: Extract Links From a Remote HTML Resource Regex Crossword Regex Crossword MobileAdditional 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 Withnamedtuple
– Real PythonLevel 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 namedtupleSupport the podcast & join our community of Pythonistas
Fri, 01 Dec 2023 - 182 - Computational Thinking & Learning Python During an AI Revolution
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-inenumerate()
, 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 goodbyeShow 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 SiteLevel 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
Fri, 17 Nov 2023 - 181 - Studying Python Software Architecture & Creating Lambda Expressions
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 goodbyeNews:
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 PodcastProjects:
selenium-python-helium: Write Less Selenium Code pyfiglet: An implementation of figlet written in Python - PyPIAdditional 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 - PyPILevel 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 PythonSupport the podcast & join our community of Pythonistas
Fri, 10 Nov 2023 - 180 - Improving Your Git Developer Experience in Python
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 goodbyeShow 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 JohnsonLevel up your Python skills with our expert-led courses:
Introduction to Git and GitHub for Python How to Set Up a Django Project Building Python Project Documentation With MkDocsSupport the podcast & join our community of Pythonistas
Fri, 03 Nov 2023 - 179 - Guiding Scientific Python Library Development
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 goodbyeNews:
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 MacShow 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 AmazonProjects:
logmerger
: TUI for Log Files With Merged Timeline CardStock: Cross-Platform GUI Building Toolreverse_argparse
: Tell the User What They RanAdditional 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 webLevel 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 PythonSupport the podcast & join our community of Pythonistas
Fri, 27 Oct 2023 - 178 - Welcoming PyPI's Safety & Security Engineer Mike Fiedler
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 goodbyeShow 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 websiteLevel 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 PyPISupport the podcast & join our community of Pythonistas
Fri, 20 Oct 2023 - 177 - Building Python Best Practices and Fundamental Skills
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 replacefilter()
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 goodbyeNews:
Django 5.0 Alpha 1 Released Mojo SDK Released for LinuxShow 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 ProfessionalProjects:
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 WritingAdditional 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 MachineLevel 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 SimPySupport the podcast & join our community of Pythonistas
Fri, 13 Oct 2023 - 176 - Exploring the New Features of Python 3.12
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 Linuxperf
profiler 00:32:02 – Immortal objects 00:35:01 – Video Course Spotlight 00:36:03 – Calendar constants for days and months 00:38:48 – Newitertools.batched()
for grouping Items 00:40:53 – Improved type variable syntax 00:50:51 – NewPath.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 goodbyeShow 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 TypingLevel 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.11Support the podcast & join our community of Pythonistas
Fri, 06 Oct 2023 - 175 - Considering ChatGPT's Technical Review of a Programming Book
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 goodbyeShow 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 RustLevel 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 FlowSupport the podcast & join our community of Pythonistas
Fri, 29 Sep 2023 - 174 - Getting Involved in Open Source & Generating QR Codes With Python
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 goodbyeNews:
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.orgShow 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’sfunctools
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 2023Projects:
nodice-cli: A simple diceware generator with no dependencies ML-Recipes: Collection of Machine Learning RecipesAdditional 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 Webfunctools
— Higher-order functions and operations on callable objects — Python documentation About - Hatch tox xkcd: Password StrengthLevel 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_cacheSupport the podcast & join our community of Pythonistas
Fri, 22 Sep 2023 - 173 - Measuring Multiple Facets of Python Performance With Scalene
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 goodbyeShow 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 - GitHubLevel up your Python skills with our expert-led courses:
Debugging in Python With pdb Testing Your Code With pytest What Does if name == "main" Mean in Python?Support the podcast & join our community of Pythonistas
Fri, 15 Sep 2023 - 172 - Making Each Line of Code Efficient & Python In Excel
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.
Course Spotlight: Process Images Using the Pillow Library and Python
In this video course, you’ll learn how to use the Python Pillow library to deal with images and perform image processing. You’ll also explore using NumPy for further processing, including to create animations.
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 goodbyeNews:
Python Insider: Python 3.12.0 release candidate 1 released – “The second candidate (and the last planned release preview) is scheduled for Monday, 2023-09-04, while the official release of 3.12.0 is scheduled for Monday, 2023-10-02.” Python 3.11.5, 3.10.13, 3.9.18, and 3.8.18 is now available - Python Insider PSF Announces New PyPI Safety & Security Engineer 2022 PSF Annual Report – The annual report from the Python Software Foundation details all the changes and events at the PSF last year. Pydantic has been downloaded … 1 BILLION times! - TwitterShow 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:
Make Each Line Count, Keeping Things Simple in Python – Simplicity is hard. This article talks briefly about how you approach coding while keeping things simple. itertools — Functions creating iterators for efficient looping — Python documentation More Itertools - more-itertools 10.1.0 documentation Pythonenumerate()
: Simplify Loops That Need Counters – Real Python Python’sall()
: Check Your Iterables for Truthiness – Real Python How to Useany()
in Python – Real PythonProjects:
Textual-paint Django ORM CheatsheetAdditional Links:
Release Python Polars 0.19.0 · pola-rs/polars Episode #140: Speeding Up Your DataFrames With Polars – The Real Python Podcast Episode #167: Exploring pandas 2.0 & Targets for Apache Arrow – The Real Python Podcast Introducing Python in Excel 😱 - YouTube Source code beautifier / syntax highlighter – convert code snippets to HTML « hilite.meLevel up your Python skills with our expert-led courses:
Building a Django User Management System Process Images Using the Pillow Library and Python Editing Excel Spreadsheets in Python With openpyxlSupport the podcast & join our community of Pythonistas
Fri, 08 Sep 2023 - 171 - Finding the Right Coding Font for Programming in Python
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.
Course Spotlight: Create a Python Wordle Clone With 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!
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 goodbyeShow Links:
Choosing the Best Coding Font for Programming - Real Python #79 Font-Engineering und Schriftarten fürs Programmieren mit Philipp Acsany - Engineering Kiosk Episode #134: Building Python REST APIs With Flask & Structuring Pull Requests – The Real Python Podcast Input: Fonts for Code — Info Slashed zero - Wikipedia Papyrus - SNL - YouTube FontLab - Font editors and converters for Mac and Windows RoboFont Hedy - Textual programming made easy Typing Practice - keybr.com Monkeytype - A minimalistic, customizable typing test Homerow — Keyboard shortcuts for every button in macOS About Philipp Acsany – Real Python Philipp Acsany - LinkedIn Filip Axani (axani) - Chess Profile - Chess.comLevel up your Python skills with our expert-led courses:
Create a Python Wordle Clone With Rich Building Python Project Documentation With MkDocs Building Command Line Interfaces With argparseSupport the podcast & join our community of Pythonistas
Fri, 01 Sep 2023 - 170 - Improving Classification Models With XGBoost
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.
Matt talks about the process of developing the book and how he wanted it to be an interactive experience for the reader. He explains the concept of gradient boosting and provides metaphors for developing a model. He shares his appreciation for exploratory data analysis as a crucial step in understanding your data.
He also shares additional libraries to help you explain your model. We discuss how difficult it is to develop the story of how the model works to share it with stakeholders.
He illustrates why covering the complete process is essential, from exploring data and building a model to finally deploying it. He shares many of the tools he found along the way.
This week’s episode is brought to you by Scout APM.
Course Spotlight: Starting With Linear Regression in Python
In this video course, you’ll get started with linear regression in Python. Linear regression is one of the fundamental statistical and machine learning techniques, and Python is a popular choice for machine learning.
Topics:
00:00:00 – Introduction 00:02:16 – Starting on the book 00:04:36 – What is tabular prediction? 00:06:50 – Who could leverage XGBoost? 00:09:46 – Background to get started 00:11:50 – Using XGBoost to explore data 00:21:06 – Sponsor: ScoutAPM 00:21:54 – Focusing on using the tool 00:26:37 – Not being a developer 00:30:53 – Contrasting XGBoost and logistic regression 00:41:57 – Video Course Spotlight 00:43:21 – Using SHAP to explain the model 00:48:06 – Working with hyperparameters 00:51:40 – Deploying your model 00:53:09 – XGBoost Feature Interactions Reshaped (XGBFIR) 00:55:47 – Communicating the story of a model 00:57:57 – How to find the book 00:59:07 – What are you excited about in the world of Python? 01:02:46 – What do you want to learn next? 01:03:12 – How can people follow what you do online? 01:03:59 – Thanks and goodbyeShow Links:
MetaSnake - Custom Python Training Effective XGBoost Book - Store Link (Discount expires end of September 2023) XGBoost Documentation — xgboost 1.7.6 documentation Gradient boosting - Wikipedia SHAP (SHapley Additive exPlanations) Documentation Hyperopt Documentation MLflow - A platform for the machine learning lifecycle xgbfir: XGBoost Feature Interactions Reshaped Effective XGBoost Book - Store Link (Discount expires end of September 2023) Mojo 🔥: Programming language for all of AI MetaSnake - Blog 🐍 Matt Harrison - LinkedIn Matt Harrison (@__mharrison__) - TwitterLevel 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 PythonSupport the podcast & join our community of Pythonistas
Fri, 25 Aug 2023 - 169 - Common Python Stumbling Blocks & Quirky Behaviors
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.
We discuss a recent blog post that lists a collection of quirky Python behaviors. We share a few examples with explanations but leave several as puzzles to dig into.
Christopher transitions our discussion into Python features that can be difficult to explain to a new programmer. We also share some of our own stumbling blocks while learning the language.
We cover several other articles and projects from the Python community, including a news update, previewing Python 3.12’s more intuitive and consistent f-strings, finding performance bottlenecks with profiling, emulating the 6502 processor in Python, using Rich to inspect Python objects, and plotting statistical data with Lets-Plot.
This week’s episode is brought to you by Porkbun.
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:12 – Steering Council Announces Optional GIL 00:04:05 – Polars is Starting a Company 00:05:13 – Python 3.12 Preview: More Intuitive and Consistent F-Strings 00:09:29 – Sponsor: Porkbun 00:10:22 – Profiling in Python: How to Find Performance Bottlenecks 00:21:01 – Writing a 6502 Emulator in Python 00:24:36 – Python Quirks 00:32:30 – Video Course Spotlight 00:34:02 – What Python feature would you have trouble explaining to a new programmer? 00:42:25 – Using Rich Inspect to Interrogate Python Objects 00:44:36 – Lets-Plot: Plotting Library for Statistical Data 00:48:01 – Thanks and goodbyeNews:
Steering Council Announces Optional GIL Polars is Starting a CompanyShow Links:
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. Profiling in Python: How to Find Performance Bottlenecks – In this tutorial, you’ll learn how to profile your Python programs using numerous tools available in the standard library, third-party libraries, as well as a powerful tool foreign to Python. Along the way, you’ll learn what profiling is and cover a few related concepts. Writing a 6502 Emulator in Python – The 6502 processor from Motorola was quite popular and could be found in the Nintendo and Sega consoles as well as the Commodore 64. This very detailed article shows you how to build an emulator for the processor in Python. Python Quirks – A straight-out list of code snippets showing off some of the weird and unexpected behavior of your favorite language.Discussion
What Python feature would you have trouble explaining to a new programmer? - Trey Hunner on TwitterProjects:
Using Rich Inspect to Interrogate Python Objects – You might know the Rich library as the terminal color tool, but it has a few utilities that are generally helpful in your code. This article shows you theinspect
feature, which gives you loads of information on an object. Lets-Plot: Plotting Library for Statistical DataAdditional Links:
Polars Python 3.12 Preview: Support For the Linux perf Profiler – Real Python Python Timer Functions: Three Ways to Monitor Your Code – Real Python Episode #128: Using a Memory Profiler in Python & What It Can Teach You – The Real Python Podcast Defining Your Own Python Function – Mutable Default ParametersLevel up your Python skills with our expert-led courses:
Using Jupyter Notebooks Creating Web Maps From Your Data With Python Folium Graph Your Data With Python and ggplotSupport the podcast & join our community of Pythonistas
Fri, 11 Aug 2023 - 168 - Exploring pandas 2.0 & Targets for Apache Arrow
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.
Marc shares his background and work on pandas. We discuss the history of data representation in pandas and the need to move beyond NumPy. We also talk about how Apache Arrow only solves some of the issues.
We dig into the potential of an Apache Arrow back end and how it could offer interoperability between data platforms. We also cover the moderate adoption and backward-compatibility concerns. Marc also shares his thoughts on making pandas more extensible.
Course Spotlight: The pandas DataFrame: Working With Data Efficiently
In this course, you’ll get started with pandas DataFrames, which are powerful and widely used two-dimensional data structures. You’ll learn how to perform basic operations with data, handle missing values, work with time-series data, and visualize data from a pandas DataFrame.
Topics:
00:00:00 – Introduction 00:02:07 – Getting involved with the pandas project 00:03:48 – Continued growth of the platform 00:06:49 – Parallel branch development 00:09:19 – The introduction of Apache Arrow 00:18:53 – Working with NumPy data in pandas 00:30:18 – Arrow data types and strings 00:41:23 – Video Course Spotlight 00:42:37 – Interoperability of Arrow data back end 00:50:36 – Could pandas be more extensible? 01:00:49 – Python DataFrame Summit 2023 01:08:12 – What are you excited about in the world of Python? 01:11:13 – What do you want to learn next? 01:12:12 – How can people follow your work online? 01:13:46 – Thanks and GoodbyeShow Links:
Marc Garcia - datapythonista - data engineer, data scientist and pandas core developer pandas 2.0 and the Arrow revolution (part I) The pandas of the future - Marc Garcia - SciPyLA 2019 - TubEdu The deadly consequences of rounding errors - Slate Community Blog - pandas - Python Data Analysis Library Apache Arrow - Apache Arrow Apache Arrow and the “10 Things I Hate About pandas” - Wes McKinney I/O Extensions in pandas - PDEP-9 Extension Arrays for Pandas - Tom’s Blog Python Dataframe Summit 2023 Rust Programming Language Freediving - Wikipedia Marc Garcia - LinkedIn Marc Garcia (@datapythonista) - XLevel up your Python skills with our expert-led courses:
Reading and Writing Files With pandas Explore Your Dataset With pandas The pandas DataFrame: Working With Data EfficientlySupport the podcast & join our community of Pythonistas
Fri, 04 Aug 2023 - 167 - Differentiating the Versions of Python & Unlocking IPython's Magic
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.
Christopher shares an article from the Bite Code blog about all the different forms that Python can take. CPython is the reference implementation of the language, which is what we usually discuss. He lists several alternative projects and the use cases.
We also discuss a recent Real Python tutorial about IPython. IPython is an interactive Python shell from the team that developed Jupyter Notebooks. It includes a set of IDE-like features and unique magic commands. The tutorial digs into using the tool to learn more about Python and explore your code.
We cover several other articles and projects from the Python community, including several news updates, the state of WASI support for CPython, how Python uses garbage collection, a discussion about the current AI echo chamber, an async Python web microframework, a stand-alone CSV editor, and a project for identifying unused dependencies to avoid a bloated virtual environment.
This week’s episode is brought to you by Scout APM.
Course Spotlight: Mazes in Python Part 1: Building and Visualizing
In this two-part video course project, you’ll build a maze solver in Python using graph algorithms from the NetworkX library. Along the way, you’ll design a binary file format for the maze, represent it in an object-oriented way, and visualize the solution using scalable vector graphics (SVG).
Topics:
00:00:00 – Introduction 00:02:19 – Python 3.12.0 Beta 4 Released 00:02:53 – Django in Action - Christopher’s Book 00:04:28 – State of WASI Support for CPython: June 2023 00:08:32 – What’s the Deal With CPython, PyPy, MicroPython, Jython…? 00:12:10 – Sponsor: Scout APM 00:12:57 – Unlock IPython’s Magical Toolbox for Your Coding Journey 00:18:33 – How Python Uses Garbage Collection 00:21:31 – Video Course Spotlight 00:23:04 – Are People in Tech Inside an AI Echo Chamber? 00:39:39 – quart: An Async Python Web Microframework 00:41:33 – Modern CSV: CSV Editor/Viewer 00:43:09 – creosote: Identify Unused Dependencies 00:45:09 – Thanks and GoodbyeNews:
Python 3.12.0 Beta 4 Released Django in Action - Christopher’s Book - Manning Early Access ProgramShow Links:
State of WASI Support for CPython: June 2023 – This post from Brett Cannon covers the current state of WebAssembly targets in Python. What’s the Deal With CPython, PyPy, MicroPython, Jython…? – This comprehensive article introduces you to all the different ways that you can Python. CPython isn’t the only choice. Learn what else is out there and why you might choose an alternative. Unlock IPython’s Magical Toolbox for Your Coding Journey – IPython is a powerful tool that can prove useful on your journey to mastering Python. Its friendly interface will enable you to comfortably take control of your learning. In this tutorial, you’ll cover the basic concepts of using IPython and learn how its features can make coding efficient. How Python Uses Garbage Collection – This article outlines how Python stores variables as references and how that relates to memory managementDiscussion:
Are People in Tech Inside an AI Echo Chamber? Inside the AI Factory: the humans that make tech seem human - The Verge Is ChatGPT getting worse over time? Study claims yes, but others aren’t sure | Ars Technica How Is ChatGPT’s Behavior Changing over Time?Projects:
quart: An Async Python Web Microframework Modern CSV: CSV Editor/Viewer creosote: Identify unused dependencies and avoid a bloated virtual environmentAdditional Links:
Episode #154: Targeting WebAssembly Platforms & Distilling a Minimum Viable Python – The Real Python Podcast IPython 8.14.0 documentationLevel up your Python skills with our expert-led courses:
Mazes in Python Part 2: Storing and Solving Python Basics: Object-Oriented Programming Mazes in Python: Build, Visualize, Store, and SolveSupport the podcast & join our community of Pythonistas
Fri, 28 Jul 2023 - 166 - Leveraging the Features of Your Database With Postgres and Python
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.
Craig shares his years of PostgreSQL expertise with advice on getting more from the platform. We talk about rich data types for describing ranges, geospatial data, and JSON.
Craig shares tools for accessing performance statistics from the command line and strategies for optimizing your terminal settings for SQL searches. He discusses Postgres extensions for customizing the database to your needs. Craig also provides multiple resources for learning more and an online tool for practicing within a playground environment.
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:36 – What are reasons for considering Postgres? 00:07:41 – Timeline of recent features 00:11:06 – Unique data types 00:16:34 – Storing JSON information 00:20:19 – Video Course Spotlight 00:21:50 – Storing geographic information 00:25:16 – What’s the process for adding extensions? 00:31:33 – Advice for Python developers using Postgres 00:33:31 – Advice on writing SQL 00:38:06 – Command-line tools and customizations 00:48:18 – Django as an entry to Python 00:51:13 – Resources for learning and practicing with Postgres 00:53:45 – What are you excited about in the world of Python? 00:55:55 – What do you want to learn next? 00:58:34 – How can people follow your work online? 00:59:20 – Thanks and goodbyeShow Links:
Craig Kerstiens - Blog Trusted Open Source PostgreSQL & Commercial Support for the Enterprise - Crunchy Data Why Postgres? - Crunchy Data Why Postgres - Craig Kerstiens - YouTube A hands on experience with complex SQL - Craig Kerstiens - YouTube Ingres (database) - Wikipedia PostgreSQL specific model fields - Django documentation Psqlrc - PostgreSQL wiki The most useful Postgres extension - pg_stat_statements High-compression Metrics Storage with Postgres Hyperloglog Postgres Playground and Tutorials - Crunchy Data PostgreSQL Blog - Crunchy Data It’s at least once a week I talk with someone that “loves Postgres” but isn’t sure why… Craig Kerstiens on Twitter: The Wok Book: Recipes and Techniques by J. Kenji Lopez-AltLevel up your Python skills with our expert-led courses:
Creating Web Maps From Your Data With Python Folium Deploying a Flask Application Using Heroku SQLite and SQLAlchemy in Python: Moving Your Data Beyond Flat FilesSupport the podcast & join our community of Pythonistas
Fri, 21 Jul 2023 - 165 - Constructing Python Library APIs & Tackling Jinja Templating
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.
We share an article about building library APIs. The piece provides advice for package structure, naming, error handling, and more. The author guides you toward Pythonic principles by comparing clunky vs elegant design examples.
Christopher discusses his recent video course on Jinja templating. The course covers creating text files with programmatic content and employing rich templates to structure the front end of Python web applications.
We cover several other articles and projects from the Python community, including several news updates, reasons why membership tests are fast for the
range()
function, CLI tools hidden in the Python standard library, a thread about the right way to install Python, recipes for using the Polars library, and a project for feature flags within Django.This week’s episode is brought to you by Snyk.
Course Spotlight: Jinja Templating
With Jinja, you can build rich templates that power the front end of your web applications. But you can use Jinja without a web framework running in the background. Anytime you want to create text files with programmatic content, Jinja can help you out.
Topics:
00:00:00 – Introduction 00:02:16 – PyLadies Conference (Dec 2023) Call for Volunteers 00:02:32 – PSF Board Election Results 00:03:47 – PSF Announces New Security Developer in Residence 00:04:39 – Django Security Releases Issued 00:04:50 – Deprecation ofbdist_egg
Uploads to PyPI 00:05:54 – Why Are Membership Tests So Fast forrange()
in Python? 00:11:51 – CLI Tools Hidden in the Python Standard Library 00:15:59 – Sponsor: Snyk 00:16:49 – Designing Pythonic Library APIs 00:28:27 – Jinja Templating 00:32:49 – Kill a Developer in 4 Words or Less 00:37:28 – Video Course Spotlight 00:38:51 – What is “the right way” to install Python on a new M2 MacBook? 00:44:11 – polars-cookbook: Recipes for Using Python’s Polars Library 00:46:48 – waffle: Feature Flags for Django 00:49:54 – Thanks and goodbyeNews:
PyLadies Conference (Dec 2023) Call for Volunteers PSF Board Election Results PSF Announces New Security Developer in Residence I Am the First PSF Security Developer-in-Residence – Seth was recently hired as the first security developer in residence at the PSF. His blog post talks about what his responsibilities are and how he defines success for the position. Deputy CPython Developer in Residence - Python Software Foundation - Career Page Django Security Releases Issued: 4.2.3, 4.1.10, and 3.2.20 Deprecation ofbdist_egg
Uploads to PyPI – PEP 715 has been accepted and as of August 1, 2023, the.egg
format will no longer be accepted as an upload. Existing eggs on PyPI will remain in place.Show Links:
Why Are Membership Tests So Fast forrange()
in Python? – In Python,range()
is most commonly used infor
loops. However, ranges have some other use cases too, as they share many properties with lists. In this tutorial, you’ll explore why it’s so fast to perform a membership test on a Python range. CLI Tools Hidden in the Python Standard Library – There are several modules in Python that are directly callable from the command line, including the ability to gzip and pretty-print JSON. This article introduces you to what options are available and how Simon discovered them. Designing Pythonic Library APIs – This article summarizes principles that Ben has found useful when designing Python library APIs. Topics include structure, naming, error handling, and type annotations. Jinja Templating – With Jinja, you can build rich templates that power the front end of your web applications. But you can use Jinja without a web framework running in the background. Anytime you want to create text files with programmatic content, Jinja can help you out.Discussion:
Kill a Developer in 4 Words or Less - Twitter What is “the right way” to install Python on a new M2 MacBook? - TwitterProjects:
polars-cookbook: Recipes for Using Python’s Polars Library waffle: Feature Flags for DjangoAdditional Links:
PSF Board of Directors Nominees - 2023 - YouTube pandas-cookbook: Recipes for using Python’s pandas libraryLevel up your Python skills with our expert-led courses:
Getting Started With Django: Building a Portfolio App Deploy Your Python Script on the Web With Flask Jinja TemplatingSupport the podcast & join our community of Pythonistas
Fri, 14 Jul 2023 - 164 - Python Crash Course & Learning Enough to Start Creating
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.
As a former high school science, math, and programming teacher, Eric saw something missing in the programming publishing landscape. We discuss the guiding questions that inspired the book’s development and the title. Eric covers how the crash course takes readers through a fast-paced introduction to Python that culminates in three unique projects.
We also discuss Eric’s blog, Mostly Python, where he digs deeper into technical subjects. He also occasionally shares more topical posts and includes many exercises.
Course Spotlight: Plot With pandas: Python Data Visualization Basics
In this course, you’ll get to know the basic plotting possibilities that Python provides in the popular data analysis library pandas. You’ll learn about the different kinds of plots that pandas offers, how to use them for data exploration, and which types of plots are best for certain use cases.
Topics:
00:00:00 – Introduction 00:02:04 – Why Alaska? 00:05:33 – What do you like about Python? 00:06:40 – Becoming an author & the intended reader 00:15:56 – History of programming books 00:17:39 – Having a purpose for learning 00:20:22 – Exercising as you go 00:24:45 – Including projects in the book 00:26:32 – Is the “crash course” a book model? 00:29:20 – Video Course Spotlight 00:30:29 – How much of a topic to reveal 00:35:08 – Guiding questions 00:42:43 – Moving from functions to testing in four chapters 00:46:21 – What were you excited to update in the book? 00:50:28 – Were there doubts about preparing readers for projects? 00:53:52 – Space invaders clone pygame project 00:55:52 – Data visualization project 01:00:38 – Django web app project 01:04:15 – Cheat sheets and additional resources 01:07:54 – Python flash cards 01:09:54 – What are you excited about in the world of Python? 01:10:54 – What do you want to learn next? 01:11:46 – How can people follow the work you do? 01:13:06 – Thanks and goodbyeShow Links:
Python Crash Course, 3rd Edition - No Starch Press Episode #105: Creating Better Error Messages for Python 3.10 & 3.11 – The Real Python Podcast Making Python Better One Error Message At A Time - PyCon 2022 Learning Python, 2nd Edition pytest: helps you write better programs — pytest documentation Pygame Matplotlib — Visualization with Python Plotly: Low-Code Data App Development django-simple-deploy - readthedocs.io Cheat Sheets - Python Crash Course, Third Edition Python Flash Cards - No Starch Press DjangoCon US 2023 - October 16-20, 2023 - Durham, NC United States pandas - Python Data Analysis Library Python Crash Course, Third Edition - GitHub Resources Mostly Python - Eric Matthes - Substack Eric Matthes (@ehmatthes@fosstodon.org) - FosstodonLevel up your Python skills with our expert-led courses:
Testing Your Code With pytest Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn Plot With pandas: Python Data Visualization BasicsSupport the podcast & join our community of Pythonistas
Fri, 07 Jul 2023 - 163 - Exploring the Zen of Python & pandas Features for Finance
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.
Christopher shares a Real Python tutorial by Bartosz Zaczyński titled “What’s the Zen of Python?” We talk about the poem’s origin and ways to access the Zen within Python. We also discuss how different sections provide contradictory advice for what makes good Python code.
We cover a recent post by previous guest Matt Harrison about using Python and pandas for finance. Matt’s article covers methods in the pandas library for aggregation, resampling, and rolling averages.
We cover several other articles and projects from the Python community, including staying up-to-date with news, solving a Legend of Zelda puzzle with Python, avoiding “simply” providing advice, displaying better stack traces, and creating files with fake data.
Course Spotlight: Speed Up Python With Concurrency
Learn what concurrency means in Python and why you might want to use it. You’ll see a simple, non-concurrent approach and then look into why you’d want threading, asyncio, or multiprocessing.
Topics:
00:00:00 – Introduction 00:01:49 – Python 3.11.4, 3.10.12, 3.9.17, 3.8.17, 3.7.17, and Python 3.12.0 beta 3 released 00:02:24 – Enforcement of 2FA for PyPI Began June 1st 00:02:54 – Faster Python 3.13 Plan 00:03:14 – PyPy v7.3.12 Released 00:03:28 – Migrate to.readthedocs.yaml
Configuration 00:05:14 – PyCon US 2023 and PyCascades 2023 Videos Are Up 00:05:37 – What’s the Zen of Python? 00:09:22 – Python for Finance: Pandas Resample, Groupby, and Rolling 00:15:24 – Python and the Legend of Zelda 00:17:47 – Don’t Say “Simply” Use Pyenv, Poetry or Anaconda 00:28:54 – Is Parallel Programming Hard? 00:40:54 – Video Course Spotlight 00:42:20 – pymg: A Better Display for Stack Traces 00:44:58 – faker-file: Create Files With Fake Data 00:49:14 – Thanks and goodbyeNews:
Python 3.11.4, 3.10.12, 3.9.17, 3.8.17, 3.7.17, and 3.12.0 Beta 2 Released Python Insider: Python 3.12.0 beta 3 released Enforcement of 2FA for PyPI Began June 1st – For those accounts that have two-factor authentication turned on for PyPI uploads, the use of 2FA is now required. Users with 2FA who were only using a password in the past will now have to perform 2FA as well. This is all part of the PyPI transition to 2FA across the board. Faster Python 3.13 Plan – This brief outline highlights the plan for the faster CPython project for the 3.13 release. It includes PEP 669, PEP 554, improved memory management, and more. Here’s the associated Hacker News discussion. PyPy v7.3.12 Released Migrate to.readthedocs.yaml
Configuration – The Read the Docs site has announced the new requirement that all builds must move to using a.readthedocs.yaml
configuration file, version 2. There are some test windows where they’ll be temporarily enforcing the change, but the final release date is September 25, 2023. Read on for details on how to migrate your project. PyCascades 2023 Videos Are Up PyCon US 2023 Videos Are UpTopic Links:
What’s the Zen of Python? – In this tutorial, you’ll be exploring the Zen of Python, a collection of nineteen guiding principles for writing idiomatic Python. You’ll find out how they originated and whether you should follow them. Along the way, you’ll uncover several inside jokes associated with this humorous poem. Python for Finance: Pandas Resample, Groupby, and Rolling – When working with time series data such as financial information, the resample, grouping, and rolling features of pandas can make your life easier. Python and the Legend of Zelda – The Game Boy Color version of Legend of Zelda: Oracle of Ages contains a grid-based puzzle. Gaz writes about creating a brute-force program to solve the challenge using Python. Don’t Say “Simply” Use Pyenv, Poetry or Anaconda – This article talks about the issues that newer Python coders might encounter by adopting more complicated package management mechanisms and explains why sticking withpip
is often the better choice.Discussion:
Is Parallel Programming Hard? AsyncIO: Why I Hate It – Charles is the creator of Peewee ORM and often gets the question when will it supportasyncio
? In this opinion piece, he talks about why he doesn’t likeasyncio
and which alternatives he prefers.Projects:
pymg: A Better Display for Stack Traces faker-file: Create Files With Fake DataAdditional Links:
Practicality Beats Purity: The Zen of Python’s Escape Hatch - Chris Neugebauer - YouTube Relieving your Python packaging pain Is Parallel Programming Hard, And, If So, What Can You Do About It? - Book DownloadLevel up your Python skills with our expert-led courses:
Threading in Python Hands-On Python 3 Concurrency With the asyncio Module Speed Up Python With ConcurrencySupport the podcast & join our community of Pythonistas
Fri, 30 Jun 2023 - 162 - Resources and Advice for Building CircuitPython Projects
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.
Tod has been working with embedded electronics for a long time and has been an active member of the Arduino community. He recently started to build projects using CircuitPython, and it has become his preferred prototype method.
He shares software resources, hardware tools, and advice about working with CircuitPython and embedded electronics. We discuss several of his music hardware projects and the libraries and modules that he uses for synthesis. He also shares a powerful online prototyping tool to plan your project before spending money or plugging in a soldering iron.
Course Spotlight: Python Basics: Reading and Writing Files
In this video course, you’ll learn how to move data back and forth between your Python programs and external software by reading and writing files. You’ll practice reading and writing data stored in the CSV file format, one of the most widely supported file formats for transferring tabular data.
Topics:
00:00:00 – Introduction 00:02:17 – Tod’s background and ThingM 00:06:37 – The Bootloader Podcast 00:09:58 – Why did you move from C to Python? 00:13:47 – Starting new projects with CircuitPython instead of Arduino 00:17:14 – Advantages of the Arduino language 00:21:07 – Modules that extend CircuitPython with C 00:25:23 – Synthesis and sample playback in CircuitPython 00:32:54 – Video Course Spotlight 00:34:13 – ulab for NumPy-like functionality in CircuitPython 00:39:20 – Raspberry Pi Pico as inexpensive project board 00:46:08 – STEMMA QT and breadboards 00:48:40 – Powering projects with a USB power bank 00:51:25 – Software tools - tio, circup, and discotool 00:56:55 – CircuitPython tricks GitHub repo 00:59:44 – Wokwi simulator for CircuitPython and Raspberry Pi Pico 01:01:25 – PCB board design resources 01:03:27 – todbot projects on Tindie 01:06:11 – Hardware tools for projects 01:08:21 – What are you excited about in the world of Python? 01:09:42 – What do you want to learn next? 01:11:30 – How can people follow your work online? 01:12:50 – Thanks and goodbyeShow Links:
todbot blog – Random experiments, circuits, and code by Tod Kurt. todbot - YouTube ThingM The Bootloader Podcast The CircuitPython Show Podcast CircuitPython Arduino - Home Extending CircuitPython: An Introduction - Adafruit Learning System Adafruit Feather RP2040 with DVI - HDMI Output Episode #75: Building With CircuitPython & Constraints of Python for Microcontrollers displayio – Native helpers for driving displays - CircuitPython Mozzi synthio: Support for multi-channel audio synthesis - Adafruit ulab: Crunch Numbers fast in CircuitPython - Adafruit Learning System Raspberry Pi Pico RP2040 - Adafruit What is STEMMA? - Adafruit STEMMA & STEMMA QT USB Power bank - Current Favorite - Amazon tio: A simple serial device I/O tool - GitHub circup: CircuitPython library updater - GitHub discotool: USB Arduino type boards discovery library and tool - GitHub circuitpython-tricks: Some CircuitPython tricks, mostly reminders to myself - GitHub Wokwi Simulator - CircuitPython on Raspberry Pi Pico Project EAGLE - PCB Design And Electrical Schematic Software - Autodesk KiCad EDA - Schematic Capture & PCB Design Software Introducing KiCanvas - Stargirl (Thea) Flowers PicoTouch - Capsense MIDI keyboard - Tindie PicoStepSeq PCB from todbot synth toys - Tindie USB Voltage and Current Tester - Amazon USB Hub with Individual Power Switches - Amazon CPython Internals Book – Real Python ThinkDSP: Free Book on Digital Signal Processing in Python todbot blog – Random experiments, circuits, and code by Tod Kurt. Tod Kurt (todbot) (@todbot@mastodon.social) - Mastodon Adafruit Discord - @todbotLevel up your Python skills with our expert-led courses:
Python Basics: Reading and Writing Files Getting Started With MicroPython Python Basics: File System OperationsSupport the podcast & join our community of Pythonistas
Fri, 23 Jun 2023 - 161 - Inheriting a Large Python Code Base & Building a GUI With Kivy
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.
We discuss a recent thread on Hacker News about working with a large Python code base. Christopher advises configuring tests and using tools to keep your code consistent across an organization. He also answers several questions about code complexity, typing, and leveraging third-party libraries.
We cover several other articles and projects from the Python community, including news from the Python Language Summit, Kivy for GUI development, the power of bit manipulation, the removal of unused import statements in your code, and a Python-based iOS project for adding reminders about links from a podcast.
Course Spotlight: Build Cross-Platform GUI Apps With Kivy
In this video course, you’ll learn how to build a cross-platform mobile application with Python and the Kivy GUI framework. You’ll discover how to develop an application that can run on your desktop as well as your phone. Then, you’ll package your app for Windows, Linux, and macOS.
Topics:
00:00:00 – Introduction 00:01:43 – Python 3.13 Removes 20 Stdlib Modules 00:03:20 – Making the Global Interpreter Lock Optional 00:04:52 – What Is the Standard Library For? 00:06:14 – Python’s.__call__()
Method: Creating Callable Instances 00:11:40 – The Power of Bit Manipulation 00:15:39 – Using Kivy for GUI Development 00:21:18 – Video Course Spotlight 00:22:43 – How Do You Deal With Large Python Code Bases? 00:40:50 – unimport: Remove Unused Import Statements in Your Code 00:42:36 – Update: rsync-time-machine.py 00:43:20 – memocast: Add links heard in podcasts into iOS reminders 00:47:42 – A request to listeners 00:48:20 – Thanks and goodbyeShow Links:
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. Making the Global Interpreter Lock Optional – In the past, Sam Gross has outlined how to make the GIL optional in CPython. He presented at the Python Language Summit, providing updates on his progress and future plans for the project. PEP 703 – Making the Global Interpreter Lock Optional in CPython | peps.python.org PEP 703 - Discussion on Python.org What Is the Standard Library For? – This post summarizes a conversation at the Python Language Summit proposing that guidelines be defined for when something should be added to the standard library. Python’s.__call__()
Method: Creating Callable Instances – In this tutorial, you’ll learn what a callable is in Python and how to create callable instances using the.__call__()
special method in your custom classes. You’ll also code several examples of practical use cases for callable instances in Python. The Power of Bit Manipulation – In this article, you learn about bit manipulation and how to solve problems efficiently using it in Python. Using Kivy for GUI Development – Kivy is an open-source Python library for developing desktop and mobile GUI apps. It’s supported on Windows, Linux, macOS, Android, and iOS. This article introduces you to Kivy and teaches you how to build your first GUI with it.Discussion:
How Do You Deal With Large Python Code Bases?Projects:
unimport: Remove Unused Import Statements in Your Code memocast: 🎧 A small iOS app for e.g. iPhone that allow you to add links heard in podcasts into remindersAdditional Links:
Binary, Bytes, and Bitwise Operators in Python – Real Python Build a Mobile Application With the Kivy Python Framework – Real Python Open Source ERP and CRM | Odoo Moodle - Open-source learning platform | Moodle.org rsync-time-machine.py: Time Machine-style backups using rsync Pythonista for iOSLevel up your Python skills with our expert-led courses:
Python Basics: Object-Oriented Programming Simplify Python GUI Development With PySimpleGUI Build Cross-Platform GUI Apps With KivySupport the podcast & join our community of Pythonistas
Fri, 16 Jun 2023 - 160 - Volunteering, Organizing, and Finding a Python Community
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.
We have three guests to discuss working on PyCascades 2023 and how they got involved in volunteering. Conference Chair Ben Berry, a site reliability engineer based in Seattle, is currently working on a private platform-as-a-service. Diversity Chair Madison Swain-Bowden is a senior data engineer out of Seattle, currently working at Automattic on the Openverse team. Sponsorship Chair Michael van der Kamp is a back-end engineer at Coffee Meets Bagel.
We discuss finding other volunteers, maintaining motivation, and connecting with sponsors. Our guests also share their stories of overcoming challenges, connecting with community, and finding fulfillment through volunteering.
This week’s episode is brought to you by Proxify.
Course Spotlight: Using pandas to Make a Gradebook in Python
With this course and Python project, you’ll build a script to calculate grades for a class using pandas. The script will quickly and accurately calculate grades from a variety of data sources. You’ll see examples of loading, merging, and saving data with pandas, as well as plotting some summary statistics.
Topics:
00:00:00 – Introduction 00:02:34 – Conference Chair Ben Berry 00:03:58 – Diversity Chair Madison Swain-Bowden 00:06:04 – Sponsorship Chair Michael van der Kamp 00:08:28 – Scheduling of conferences around one another 00:10:41 – How did you get involved in the community? 00:20:01 – Sponsor: Proxify 00:20:57 – Workplace groups and guilds 00:27:41 – How community helps with job referrals 00:32:19 – New position and added responsibilities 00:41:24 – How would you pitch volunteering? 00:44:32 – Video Course Spotlight 00:45:45 – How do you avoid overdoing it? 00:52:46 – What are you excited about in the world of Python? 00:55:16 – What do you want to learn next? 00:59:22 – Thanks and goodbyeShow Links:
The Team - PyCascades 2023 PyCascades 2023 - YouTube PyLadies – Women Who Love Coding in Python Puget Sound Programming Python (PuPPy) (Seattle, WA) - Meetup PySprings (Colorado Springs, CO) - Meetup What is Lean Coffee? - an introduction to agenda-less meetings Async IO in Python: A Complete Walkthrough – Real Python Structural Pattern Matching – Real Python Using FastAPI to Build Python Web APIs – Real Python Rust Programming Language Rust for Rustaceans - No Starch Press CircuitPython Michael van der Kamp - LinkedIn Madison on Tumblr Ben Berry (@benb@fosstodon.org)Level up your Python skills with our expert-led courses:
Using pandas to Make a Gradebook in Python The pandas DataFrame: Working With Data Efficiently Building Python Project Documentation With MkDocsSupport the podcast & join our community of Pythonistas
Fri, 09 Jun 2023 - 159 - Building Python CI With Docker & Applying for a Hacker Initiative Grant
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.
Course Spotlight: Metaclasses in Python
Metaclasses are an important but mysterious behind-the-scenes mechanism for instantiating classes in Python. In this video course, you’ll learn how Python’s metaclasses work in object-oriented programming.
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 goodbyeNews:
PyPI Temporarily Suspended New Registrations – Due to a large volume of traffic from malicious users, PyPI temporarily suspended new account and project registrations on May 20. The suspension was lifted thirty hours later on May 21. PyPI was subpoenaed - The Python Package Index – The PSF received three subpoenas from the US Department of Justice for PyPI user data in March and April of 2023. Python Insider: Python 3.12.0 beta 1 releasedShow Links:
Build Robust Continuous Integration With Docker and Friends – In this tutorial, you’ll use Docker and GitHub Actions to build a robust continuous integration pipeline for a multi-container web application consisting of Flask and Redis. Along the way, you’ll learn how to dockerize a Python web application. Metaclasses in Python - Real Python Video Course – Metaclasses are an important but mysterious behind-the-scenes mechanism for instantiating classes in Python. In this video course, you’ll learn how Python’s metaclasses work in object-oriented programming. Is there life after SQL? - YouTubeProjects:
pyscan: Python dependency vulnerability scanner, written in Rust - GitHub rsync-time-machine.py: Time Machine-Style BackupsHacker Initiative Links:
Hacker Initiative – By hackers. For hackers. Apply for the 2023 Grant Cycle – Hacker Initiative 2022 Grant Recipients – Hacker InitiativeAdditional Links:
Release CPython 3.12.0b1 w/ WASI SDK 20 - brettcannon/cpython-wasi-build Episode #149: Coding With namedtuple & Python’s Dynamic Superpowers What is FIRST Tech Challenge? - FIRST No Starch Press - “The finest in geek entertainment”Level up your Python skills with our expert-led courses:
Continuous Integration With Python Metaclasses in Python Writing Clean, Pythonic Code With namedtupleSupport the podcast & join our community of Pythonistas
Fri, 02 Jun 2023 - 158 - Discussing Mojo & Improving Python Object-Oriented Programming
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.
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:02:39 – PEP 713: Callable Modules 00:04:22 – PEP 712: “Converter” Parameter fordataclasses.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 goodbyeNews:
PEP 713: Callable Modules PEP 712: “Converter” Parameter fordataclasses.field
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 Python – Mojo 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:
Mojo might be the biggest thing to happen in programming for decades - Hacker News Mojo, a new programming language for AI developers - Hacker NewsProjects:
TQDM: Tracking the Progress of Your Python Program frogmouth: A Markdown Browser for Your TerminalAdditional Links:
Video - tqdm documentation tqdm documentation pipx Episode #101: Tools for Setting Up Python on a New Machine – The Real Python PodcastLevel up your Python skills with our expert-led courses:
Using Jupyter Notebooks Using k-Nearest Neighbors (kNN) in Python Using Multiple Constructors in Your Python ClassesSupport the podcast & join our community of Pythonistas
Fri, 26 May 2023 - 157 - Virtual Environment Structure & Surveying the Packaging Ecosystem
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.
Course Spotlight: Getting the Most Out of the Python Standard REPL
In this video course, 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.
Topics:
00:00:00 – Introduction 00:01:58 – Virtual environments 00:07:10 – PEP 704 & virtual environment workflows 00:26:57 – Experimenting with not includingpip
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 goodbyeShow Links:
How virtual environments work PEP 704 – Require virtual environments by default for package installers - peps.python.org microvenv - PyPI python-launcher: Python launcher for Unix - GitHub bootstrap.pypa.io Classifying Python virtual environment workflows Python Packaging User Survey - Results PDF Thoughts on the Python packaging ecosystem - Pradyun Gedam pypa/packaging: Core utilities for Python packages - GitHub Flit 3.8.0 - Flit 3.8.0 documentation hatch - PyPI hatchling - PyPI Episode #93: Launching Python, Virtual Environments, and Locking Dependencies With Brett Cannon – The Real Python Podcast PEP 665 – A file format to list Python dependencies for reproducibility of an application - peps.python.org Programming Rust, 2nd Edition Tall, Snarky Canadian - Brett’s Blog Microsoft Python Blog Visual Studio Code Blog Brett Cannon (@brettcannon@fosstodon.org) - MastodonLevel up your Python skills with our expert-led courses:
Getting the Most Out of the Python Standard REPL Working With Python Virtual Environments Publishing Python Packages to PyPISupport the podcast & join our community of Pythonistas
Fri, 12 May 2023 - 156 - Checking Project Dependencies & Python Dev Resource Collections
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.
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: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 GoodbyeNews:
PEP 684 – A Per-Interpreter GIL Accepted Python 3.10 Runtime Now Available in AWS LambdaShow Links:
PyCon US 2023 - Follow Up The Real Python Podcast (podcast@realpython.com) PyCoder’s Weekly - Submit a Link Google’s Assured OSS Python Packages – Google publishes a list of the open-source packages that it uses and secures within its own software supply chain. The list is public, so you can take advantage of their assessment. Groovy Datasets for Test Databases – When you experiment with a new-to-you data science skill, you need some sort of data to work with. Why be boring? This article talks about several available datasets that you can use when you practice your coding skills. Top 10 Django Third-Party Packages – Will covers a list of his favorite third-party packages for Django. This includes old favorites, like Django REST framework, and lesser-known packages, like django-filter and django-environ. FawltyDeps: A Dependency Checker for Your Python – FawltyDeps is a new tool to help you identify undeclared and unused dependencies in your Python code, making your projects leaner and more reproducible. PyPI Introduces “Trusted Publishers” – PyPI package maintainers can adopt a new, more secure, OIDC-authenticated publishing method that doesn’t require sharing long-lived passwords or API tokens with external systems. Introducing PyPI Organizations - The Python Package Index pypi-diff: PyPI Package History TrackingProjects
PyDPainter: A usable pixel art paint program written in Python - GitHub trrex: Efficient String Matching With Regular ExpressionsAdditional Links:
Data Is Plural FawltyDeps Quick PyDPainter Demo - YouTube Having a look at PyDPainter and comparing it to Deluxe Paint on the Amiga - YouTubeLevel up your Python skills with our expert-led courses:
Everyday Project Packaging With pyproject.toml Publishing Python Packages to PyPI Documenting Python Projects With Sphinx and Read the DocsSupport the podcast & join our community of Pythonistas
Fri, 05 May 2023 - 155 - Targeting WebAssembly Platforms & Distilling a Minimum Viable Python
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.
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: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 goodbyeShow Links:
MVPy: Minimum Viable Python Python’s Syntactic Sugar - PyCon US 2023 Episode #47: Unraveling Python’s Syntax to Its Core With Brett Cannon – The Real Python Podcast syntactic sugar - Tall, Snarky Canadian Brett Cannon (@brettcannon@fosstodon.org) - Fosstodon WASI - wasi.dev WebAssembly and its platform targets Introducing the Disney+ Application Development Kit (ADK) - Mike Hanley Compute@Edge services using WebAssembly - Fastly Developer Hub Experimental - Python for the Web - Visual Studio Marketplace PEP 11 – CPython platform support - peps.python.org Testing a Python project using the WASI build of CPython withpytest
The rise of WebAssembly - InfoWorld Can WASM become the new Docker? bytecodealliance/wasmtime: A fast and secure runtime for WebAssembly Emscripten - Dev Documentation PyScript - Run Python in your HTMLLevel up your Python skills with our expert-led courses:
Python Basics: Object-Oriented Programming Inheritance and Composition: A Python OOP Guide Python Basics: Building Systems With ClassesSupport the podcast & join our community of Pythonistas
Fri, 28 Apr 2023 - 154 - Seeking Faster Text Processing & Python's .__repr__() vs .__str__()
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.Course Spotlight: Unicode in Python: Working With Character Encodings
In this course, you’ll get a Python-centric introduction to character encodings and Unicode. Handling character encodings and numbering systems can at times seem painful and complicated, but this guide is here to help with easy-to-follow Python examples.
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 GoodbyeNews:
The Python Package Index Launches a Blog PEP 582 (Python Local Packages Directory) Rejected Django 4.2 Release Candidate 1 Released Want to Host DjangoCon Europe 2024?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 toreduce()
. 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:
Pooch: A Friend to Fetch Your Data Files workedon: Track Your Work From the ShellAdditional Links:
Python’sreduce()
: From Functional to Pythonic Style – Real Python Episode #116: Exploring Functional Programming in Python With Bruce Eckel – The Real Python Podcast Lightning talk at PyCascades 2023 - Pooch: A friend to fetch your data files - YouTube Secure copy protocol - WikipediaLevel up your Python skills with our expert-led courses:
Python's map() Function: Transforming Iterables Python Basics: Strings and String Methods Unicode in Python: Working With Character EncodingsSupport the podcast & join our community of Pythonistas
Fri, 14 Apr 2023 - 153 - Automate Processes and Distribute Python Tools With RPA and RCC
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.
Course Spotlight: Manipulating ZIP Files With Python
In this video course, you’ll learn how to manipulate ZIP files using Python’s
zipfile
module from the standard library. Through hands-on examples, you’ll learn how to read, write, compress, and extract files from your ZIP files quickly.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 goodbyeShow Links:
Open Source RPA - Intelligent Automation Software - Robocorp What is RPA? A breakdown of RPA and its benefits - Robocorp Robocorp Portal RPA Documentation, Training Courses, Certificates - Robocorp documentation rpaframework: Collection of open-source libraries and tools for Robotic Process Automation (RPA), designed to be used with both Robot Framework and Python rcc: RCC is a set of tooling that allows you to create, manage, and distribute Python-based self-contained automation packages - or ‘robots’ as we call them. Conda - documentation QuantStack micromamba - documentation Low-code RPA Development Solution | Automation Studio - Robocorp Bolster IDP With Robotic Process Automation - DZone Visual Studio Code - Code Editing. Redefined Welcome to LangChain - 🦜🔗 LangChain 0.0.131 Sampo Ahokas - LinkedIn Robocorp (@RobocorpInc) - Twitter Community for Software Robot Developers RPA Resources, White Papers and Case Studies - RobocorpLevel up your Python skills with our expert-led courses:
Reading and Writing Files in Python Testing Your Code With pytest Manipulating ZIP Files With PythonSupport the podcast & join our community of Pythonistas
Fri, 07 Apr 2023 - 152 - Evaluating Python Packages & Celebrating 20 Years of PyCon US
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 creatingargparse
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.
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:46 – How to Evaluate the Quality of Python Packages 00:11:35 – Overhead of Pythonasyncio
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 forargparse
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 goodbyeShow 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 ofmicrovenv
. 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:
duckargs: Code Generator forargparse
Boilerplate Are Those Numbers Realistic or Fake? Try Using Benford’s Law – How can you tell whether a set of figures is trustworthy? It’s not always simple, but Benford’s Law gives you one way to find out. There’s even a Python Package to help you check: randalyze.PyCon US 2023 Links:
Welcome to PyCon US 2023 Python Software Foundation Registration Information - PyCon US 2023 Talks Schedule - PyCon US 2023 Tutorials Schedule - PyCon US 2023 Education Summit - PyCon US 2023 PyCon US Stories Slideshow Proposal Guidelines - PyCon US 2023 PyLadies Auction - PyCon US 2023 Volunteering - PyCon US 2023Additional Links:
Libraries.io - The Open Source Discovery Service Licenses - Choose a License Python Virtual Environments: A Primer – Real Python EU Cyber Resilience Act - Shaping Europe’s digital future Python Software Foundation News: Where is the PSF? Signup for the Python Software Foundation Newsletter The Boston Python User Group (Cambridge, MA) - Meetup PyLadies – Women Who Love Coding in PythonLevel up your Python skills with our expert-led courses:
Building Python Project Documentation With MkDocs Documenting Python Projects With Sphinx and Read the Docs Documenting Code in PythonSupport the podcast & join our community of Pythonistas
Fri, 31 Mar 2023 - 151 - Lessons Learned From Four Years Programming With Python
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.
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: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 goodbyeShow Links:
Four years of Python - Duarte O.Carmo Four years of Python - Duarte Carmo - YouTube Practices of the Python Pro Pelican 4.8.0 “One for Them, One for Me” - Blank Check Movies From Famous Directors PyData NumFOCUS: A Nonprofit Supporting Open Code for Better Science Proposing a Talk - PyCon US 2023 pandas documentation - pandas 1.5.3 documentation scikit-learn 1.2.2 - User guide - documentation FastAPI - Tutorial - User Guide Using FastAPI to Build Python Web APIs - Real Python Python 3.11.2 Documentation Kindle Highlights Newsletter Reeder 5 Welcome to Feedly Normconf: The Normcore Tech Conference Tech Blog - ★❤✰ Vicki Boykis ★❤✰ Sebastian Raschka - Blog Blog of a data person. - koaning.io Machine Learning Design Patterns - Book The Practical AI Podcast - Changelog tidytuesday: Official repo for the #tidytuesday project PyCon.DE & PyData Berlin, 2023 - PyConDE & PyData Berlin 2023 PyCon Italia - 2023 ruff - PyPI Effective Python › The Book: Second Edition Episode #3: Effective Python and Python at Google Scale - The Real Python Podcast Duarte O.Carmo Talks - Duarte O.Carmo Duarte O.Carmo - LinkedInLevel up your Python skills with our expert-led courses:
Python REST APIs With FastAPI Splitting Datasets With scikit-learn and train_test_split() Building a URL Shortener With FastAPI and PythonSupport the podcast & join our community of Pythonistas
Fri, 24 Mar 2023 - 150 - Coding With namedtuple & Python's Dynamic Superpowers
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.
Course Spotlight: 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.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 Withnamedtuple
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 goodbyeNews:
Python Insider: Python 3.12.0 alpha 6 released Django Developers Survey 2022 Results - Django WeblogShow Links:
Writing Clean, Pythonic Code Withnamedtuple
– In this video course, you’ll learn what Python’snamedtuple
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 treatinglist
,dict
, andset
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:
Python’s “Disappointing” Superpowers - lukeplant.me.uk I am disappointed by dynamic typing - Buttondown Python’s “Disappointing” superpowers - Hacker News Python’s “Disappointing” Superpowers - LobstersProjects:
replbuilder: Python helper tool for building and running a repl with custom commands pygwalker: Turn pandas Into a Tableau-Style UIAdditional Links:
Write Pythonic and Clean Code With namedtuple – Real Python Episode #146: Using NumPy and Linear Algebra for Faster Python Code – The Real Python Podcast Apache Arrow and the “10 Things I Hate About pandas” - Wes McKinney Data science without borders - Wes McKinney (Two Sigma Investments) - YouTube Joining Forces for an Arrow-Native Future - Wes McKinney pandas arrays, scalars, and data types — pandas 2.1.0.dev0+171.gc293caf2e9 documentation Episode #18: Ten Years of Flask: Conversation With Creator Armin Ronacher – The Real Python Podcast Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 1 – Real Python Python Metaclasses – Real Python Kanaries AI enhanced data explorationLevel up your Python skills with our expert-led courses:
Data Cleaning With pandas and NumPy Lists and Tuples in Python Writing Clean, Pythonic Code With namedtupleSupport the podcast & join our community of Pythonistas
Fri, 17 Mar 2023 - 149 - Sharing Your Python App Across Platforms With BeeWare
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.
Course Spotlight: Managing Attributes With Python’s
property()
In this video course, you’ll learn how to create managed attributes, also known as properties, using Python’s
property()
in your custom classes.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 goodbyeShow Links:
Write once. Deploy everywhere. — BeeWare Russell Keith-Magee - Keynote - PyCon 2019 - YouTube Anaconda - Open Source PyScript - Run Python in your HTML Episode #22: Create Cross-Platform Python GUI Apps With BeeWare – The Real Python Podcast How to turn your Website into an App (and why maybe you shouldn’t!) with Russell Keith Magee - YouTube PEP 517 – A build-system independent format for source trees - peps.python.org rubicon-objc - PyPI Chaquopy – Python SDK for Android WASI.dev CAP theorem - Wikipedia BeeWare Tutorial The Buzz - BeeWare Blog You can take it with you: Packaging your Python code with Briefcase - PyCon US 2023 BeeWare (@PyBeeWare) - Twitter Russell Keith-Magee (@freakboy3742@cloudisland.nz) - MastodonLevel up your Python skills with our expert-led courses:
Managing Attributes With Python's property() Everyday Project Packaging With pyproject.toml Getters and Setters in PythonSupport the podcast & join our community of Pythonistas
Fri, 10 Mar 2023 - 148 - Django Deployment Strategies & Preparing for PyCascades 2023
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.
Course Spotlight: The Python print() Function: Go Beyond the Basics
In this step-by-step course, you’ll learn about the print() function in Python and discover some of its lesser-known features. Avoid common mistakes, take your “hello world” to the next level, and know when to use a better alternative.
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 goodbyeNews:
Django 4.2 beta 1 released | Weblog | Django SQLAlchemy 2.0 ReleasedShow 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:
Pathfinding-Visualizer: Visualize Pathfinding With Pygame rtx: Runtime Executor (asdf
Rust Clone)PyCascades Links:
Home - PyCascades 2023 The Team - PyCascades 2023 Schedule - PyCascades 2023 Sprints - PyCascades 2023 PyCascades 2023 - Sprints Sign Up Form COVID Policy - PyCascades 2023 Venueless - PyCascades 2023 Become A Sponsor - PyCascades 2023 PyCascades - YouTube Episode #44: Creating an Interactive Online Python Conference for PyCascades 2021 – The Real Python PodcastAdditional Links:
File Object - Glossary - Python Documentation The Python print() Function: Go Beyond the Basics – Real Python functools — Higher-order functions and operations on callable objects — Python 3.11.2 documentation Python - Women Who Code WWCodePython - Tiktok Creator & Bio Links - Beacons PyLadies – Women Who Love Coding in Python PyLadies Vancouver (Vancouver, BC) | MeetupLevel up your Python skills with our expert-led courses:
Deploy a Django App With Gunicorn and Nginx The Python print() Function: Go Beyond the Basics SQLite and SQLAlchemy in Python: Moving Your Data Beyond Flat FilesSupport the podcast & join our community of Pythonistas
Fri, 03 Mar 2023 - 147 - Using NumPy and Linear Algebra for Faster Python Code
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.
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: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 goodbyeShow Links:
Vectorize all the things! How basic linear algebra can speed up your data science code - YouTube Introduction to Linear Algebra, 5th Edition Linear Algebra - Mathematics - MIT OpenCourseWare Linear Algebra and Learning from Data Linear Algebra in Python: Matrix Inverses and Least Squares NumPy: the absolute basics for beginners - NumPy Manual Broadcasting — NumPy v1.24 Manual spotify/annoy: Approximate Nearest Neighbors in C++/Python optimized Look Ma, No For-Loops: Array Programming With NumPy – Real Python NumPy Tutorial: Your First Steps Into Data Science in Python – Real Python How to Iterate Over Rows in pandas, and Why You Shouldn’t – Real Python RADAR: Thrive in the era of data - DataCamp Vectorize all the things! Using linear algebra and NumPy to make your Python code lightning fast. - Python Web Conference 2023 Jodie Burchell - PyCon US 2023 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 teamsLevel up your Python skills with our expert-led courses:
Data Cleaning With pandas and NumPy Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn Using NumPy's np.arange() EffectivelySupport the podcast & join our community of Pythonistas
Fri, 24 Feb 2023 - 146 - Creating a Python Wordle Clone & Testing Environments With Nox
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.Course Spotlight: Getters and Setters in Python
In this video course, you’ll learn what getter and setter methods are, how Python properties are preferred over getters and setters when dealing with attribute access and mutation, and when to use getter and setter methods instead of properties in 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 goodbyeNews:
Django Security Releases Issued: 4.1.6, 4.0.9, and 3.2.17 PSF Is Hiring a Security Developer-in-Residence Python Insider: Python 3.11.2, Python 3.10.10 and 3.12.0 alpha 5 are availableShow 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
20 Things I’ve Learned in My 20 Years as a Software Engineer – Justin writes a list of things he’s learned over his past twenty years in development. He starts by stating how context is important and that his lessons are from small teams that emphasize productivity and are tool agnostic. The 10x Programmer Myth - Simple ThreadProjects:
Mito: A Spreadsheet Inside Your JupyterLab Notebooks How I Added C-Style for-Loops to Python – Ever wanted a C-stylefor
loop in Python? No? Well, you can have one anyway. See how Tushar implementedwith for (i := var(0), i < 10, i + 2):
Additional Links:
Alpha-Omega - Open Source Security Foundation Welcome to Nox - Nox 2022.11.21 documentation Classifying Python Virtual Environment Workflows PEP 704 - Require virtual environments by default for package installers - Discourse on Python.org Creating Virtual Environments - Python Packaging User Guide Python Virtual Environments: A Primer – Real Python JupyterLab for an Enhanced Notebook ExperienceLevel up your Python skills with our expert-led courses:
Intro to Object-Oriented Programming (OOP) in Python Python Basics: Object-Oriented Programming Getters and Setters in PythonSupport the podcast & join our community of Pythonistas
Fri, 17 Feb 2023 - 145 - Wrangling Business Process Models With Python and SpiffWorkflow
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.
Course Spotlight: Cool New Features in Python 3.11 – Real Python
In this video course, you’ll explore what Python 3.11 brings to the table. You’ll learn how Python 3.11 is the fastest and most user-friendly version of CPython yet, and learn about improvements to the typing system and to the asynchronous features of Python.
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 goodbyeShow Links:
SpiffWorkflow Overview SpiffWorkflow 1.2.1 documentation SpiffWorkflow: A powerful workflow engine implemented in pure Python - GitHub Sartography Business Process Model and Notation - Wikipedia Decision Model and Notation™ (DMN™) | Object Management Group Web-based tooling for BPMN, DMN, CMMN, and Forms | bpmn.io Creating a Low-Code Business Process Execution Platform With Python, BPMN, and DMN - IEEE Software The Low Code Wall, SpiffWorkflow SpiffArena, SpiffWorkflow Install SpiffArena then build and run your first diagram - YouTube MindTrails - University of Virginia Practices of the Python Pro Episode #49: The Challenges of Developing Into a Python Professional – The Real Python Podcast PEP 678: Exceptions can be enriched with notes - Python 3.11.1 documentation Building a Ship in a Bottle. : 14 Steps (with Pictures) - Instructables Status - Private, Secure Communication Dan Funk - LinkedIn SpiffWorkflow (@SpiffWorkflow) - TwitterLevel up your Python skills with our expert-led courses:
Building Python Project Documentation With MkDocs Cool New Features in Python 3.11 Editing Excel Spreadsheets in Python With openpyxlSupport the podcast & join our community of Pythonistas
Fri, 10 Feb 2023 - 144 - Create Interactive Maps & Geospatial Data Visualizations With Python
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.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: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 goodbyeNews:
Bleach 6.0.0 release and deprecation - Will’s BlogShow 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. Theyaml
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:
How to improve Python packaging, or why fourteen tools are at least twelve too many - Chris Warrick Thoughts on the Python packaging ecosystem - Pradyun Gedam Python Packaging User Survey - Results PDF Python Packaging Strategy Discussion - Part 1 - Packaging - Discussions on Python.org Thoughts on the Python packaging ecosystem | Hacker News Stargirl: “So You Want to Solve Python Packaging” - Fosstodon xkcd: StandardsProjects:
CustomTkinter: Python UI Library Based on Tkinter pybboxes: Lightweight Tool Kit for Bounding BoxesAdditional Links:
PEP 554 – Multiple Interpreters in the Stdlib - peps.python.org YAML: The Missing Battery in Python – Real Python Python and TOML: New Best Friends – Real Python PEP 665 – A file format to list Python dependencies for reproducibility of an application - peps.python.org tkinter — Python interface to Tcl/Tk — Python 3.11.1 docs Python GUI Programming With Tkinter – Real PythonLevel up your Python skills with our expert-led courses:
Logging Inside Python Everyday Project Packaging With pyproject.toml Graph Your Data With Python and ggplotSupport the podcast & join our community of Pythonistas
Fri, 03 Feb 2023 - 143 - Orchestrating Large and Small Projects With Apache Airflow
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.
Course Spotlight: Python Basics: Object-Oriented Programming
In this video course, you’ll get to know OOP, or object-oriented programming. You’ll learn how to create a class, use classes to create new objects, and instantiate classes with attributes.
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 goodbyeShow Links:
Apache Airflow - Documentation Too Big for DAG Factories? — Six Feet Up Directed acyclic graph - Wikipedia DAGs — Airflow Documentation Dynamically generating DAGs in Airflow - Astronomer Documentation Data Lakehouse Architecture and AI Company - Databricks Episode #10: Python Job Hunting in a Pandemic – The Real Python Podcast Episode #124: Exploring Recursion in Python With Al Sweigart – The Real Python Podcast The Recursive Book of Recursion Episode #61: Scaling Data Science and Machine Learning Infrastructure Like Netflix – The Real Python Podcast IndyPy — Indiana Python User Group Contributing to Python - Mariatta Wijaya - Python Core Developer - YouTube Home Assistant Arturia - MicroFreak Arturia - Pigments CalvinHP (@calvinhp@fosstodon.org) - Fosstodon calvinhp - Twitter Six Feet Up - Blog Python Web Conference 2023Level up your Python skills with our expert-led courses:
Data Cleaning With pandas and NumPy Python Basics: Object-Oriented Programming Intro to Object-Oriented Programming (OOP) in PythonSupport the podcast & join our community of Pythonistas
Fri, 27 Jan 2023 - 142 - Exploring Python With bpython & Formalizing f-String Grammar
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.Course Spotlight: Context Managers and Python’s
with
StatementIn 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.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’swith
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 goodbyeNews:
Pillow 9.4.0 Released Django Bugfix Release: 4.1.5 Plone 6.0 Released PyCon Italia 2023Show 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’swith
Statement – In this video course, you’ll learn what the Pythonwith
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:
Python Terminal Music Player Infinite AI Array – Learn about an insane library containing special lists and dicts so that any missed calls automatically go to GPT3 and add a predictive value in its place.Additional Links:
Christopher Trudeau’s - Act function for virtual environmentsLevel up your Python skills with our expert-led courses:
Working With Python Virtual Environments Python 3's F-Strings: An Improved String Formatting Syntax Context Managers and Using Python's with StatementSupport the podcast & join our community of Pythonistas
Fri, 20 Jan 2023 - 141 - Speeding Up Your DataFrames With Polars
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.
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.
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 goodbyeShow Links:
Liam Brannigan - Data Scientist Polars polars - PyPI Coming from Pandas - Polars - User Guide Rho-Signal Data Analytics - YouTube Cheatsheet for Pandas to Polars - Rho Signal Data Analysis with Polars - Udemy I wrote one of the fastest DataFrame libraries - Polars Database-like ops benchmark comparison Data science 2025 - Liam Brannigan DuckDB - An in-process SQL OLAP database management system The great Python DataFrame showdown, part 1: Demystifying Apache Arrow Apache Arrow Learn Rust - Rust Programming Language Modern Polars Anaconda - PyScript Updates: Bytecode Alliance, Pyodide, and MicroPython Jupytext - Jupyter Notebooks as Markdown Documents, Julia, Python or R Scripts Polars up and running - Liam Brannigan Liam Brannigan - Data Scientist - Blog Liam Brannigan (@braaannigan) - Twitter Liam Brannigan - LinkedInLevel up your Python skills with our expert-led courses:
Threading in Python Reading and Writing Files With pandas Graph Your Data With Python and ggplotSupport the podcast & join our community of Pythonistas
Fri, 13 Jan 2023 - 140 - Surveying Comprehension Constructs & Python Parallelism Infighting
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.Course Spotlight: Understanding Python List Comprehensions
Python list comprehensions make it easy to create lists while performing sophisticated filtering, mapping, and conditional logic on their members. In this course, you’ll learn when to use list comprehensions in Python and how to create them effectively.
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 ofimport
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 goodbyeNews:
PyPy v7.3.10 Release Django Bugfix Release: 4.1.4 Python 3.11.1, 3.10.9, 3.9.16, 3.8.16, 3.7.16 ReleasedShow 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 themultiprocessing
module.Discussion:
What Style ofimport
Statement Do You Use? Using wildcard imports (from … import *) — Python Anti-Patterns documentation Python import: Advanced Techniques and Tips – Real PythonProjects:
jupyterlite: WASM Powered Jupyter Running in the Browser python-easter-eggs: Easter Eggs and Hidden Jokes in PythonAdditional Links:
Episode #39: Generators, Coroutines, and Learning Python Through Exercises – The Real Python Podcast How to Use Generators and yield in Python – Real Python PyCoder’s Weekly: Submit a LinkLevel up your Python skills with our expert-led courses:
Threading in Python Understanding Python List Comprehensions Python Generators 101Support the podcast & join our community of Pythonistas
Fri, 06 Jan 2023 - 139 - 2022 Real Python Tutorial & Video Course Wrap Up
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.
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: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 goodbyeShow Links:
Your Python Coding Environment on Windows: Setup Guide Why Is It Important to Close Files in Python? Python and TOML: New Best Friends Sneaky REST APIs With Django Ninja – Video Course Manage Your To-Do Lists Using Python and Django Python Constants: Improve Your Code’s Maintainability Build Your Python Project Documentation With MkDocs Building a URL Shortener With FastAPI and Python – Video Course Image Processing With the Python Pillow Library Draw the Mandelbrot Set in Python Using Python’s pip to Manage Your Projects’ Dependencies Exploring Scopes and Closures in Python – Video CourseAdditional Links:
Building Python Project Documentation With MkDocs – Video Course Build a URL Shortener With FastAPI and Python – Step-by-Step TutorialLevel up your Python skills with our expert-led courses:
Building Python Project Documentation With MkDocs Sneaky REST APIs With Django Ninja Exploring Scopes and Closures in PythonSupport the podcast & join our community of Pythonistas
Fri, 23 Dec 2022 - 138 - Start Using a Build System & Continuous Integration in Python
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.
Course Spotlight: Testing Your Code With pytest
In this video course, you’ll learn how to take your testing to the next level with pytest. You’ll cover intermediate and advanced pytest features such as fixtures, marks, parameters, and plugins. With pytest, you can make your test suites fast, effective, and less painful to maintain.
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 goodbyeShow Links:
Pants 2: The ergonomic build system GitHub - pantsbuild/pants: The Pantsbuild developer workflow system Toolchain Labs E387 Build All the Things with Pants Build System - Talk Python To Me Continuous Integration With Python: An Introduction – Real Python Introduction to Git and GitHub for Python Developers – Real Python Monorepo Explained pex - PyPI pantsbuild/example-python: An example repo to demonstrate Python support The Pants community Christopher Neugebauer - Presentation at PyCon 2022 Talk - Christopher Neugebauer: Fast and reproducible tests, packaging, and deploys with… - YouTube Rust Programming Language Benjy Weinberger (@benjy) / Twitter Pantsbuild (@pantsbuild) / TwitterLevel up your Python skills with our expert-led courses:
Continuous Integration With Python Testing Your Code With pytest Test-Driven Development With pytestSupport the podcast & join our community of Pythonistas
Fri, 16 Dec 2022 - 137 - Package Python Code With pyproject.toml & Listing Files With pathlib
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 ofpathlib
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.Course Spotlight: Using Python’s pathlib Module
In this video course, you’ll learn how to effectively work with file system paths in Python 3 using the
pathlib
module in the standard library.Topics:
00:00:00 – Introduction 00:02:30 – Always Use[closed, open)
Intervals 00:07:05 – Everyday Project Packaging Withpyproject.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 goodbyeShow 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 Withpyproject.toml
– In this Code Conversation video course, you’ll learn how to package your everyday projects withpyproject.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:
Build the Modular Monolith First – “Even talking about building a monolith today, is a bit taboo. It is all about microservices at the moment, and has been for a few years. But they aren’t a silver bullet.” Coding samples in the article aren’t Python, but the architectural advice is cross-language. Microservices and the First Law of Distributed Objects “I’m convinced that one of the biggest architectural mistakes of the past decade was going full microservice” Jason Warner - TwitterProjects:
toot - PyPI quickadd: Parse Natural Language Time and Date ExpressionsAdditional Links:
Packaging Your Python Code With pyproject.toml | Complete Code Conversation - YouTube How to Publish an Open-Source Python Package to PyPI – Real Python Publishing Python Packages: Test, share, and automate your projects | Dane Hillard Episode #83: Ready to Publish Your Python Packages? – The Real Python Podcast Advanced Course on Python3 - MoserMichael - GitHub pyasmtool: Explores the Python bytecode, provides some tools to access it for fun and profit. - GitHub Episode #39: Generators, Coroutines, and Learning Python Through Exercises – The Real Python Podcast Episode #47: Unraveling Python’s Syntax to Its Core With Brett Cannon – The Real Python Podcast MVPy: Minimum Viable Python Episode #124: Exploring Recursion in Python With Al Sweigart – The Real Python Podcast Microservices and the First Law of Distributed Objects Mastodon for Python Devs - Talk Python #390 Mastodon is just blogs ActivityPub The Top 239 Activitypub Open Source Projects A 🦣 opportunity for developers - DEV Community 👩💻👨💻 Getting Started with Mastodon API in Python | Martin Heinz - Medium Christopher Trudeau (@cltrudeau) - Twitter Christopher Bailey | (@digiglean) - Twitter Christopher Bailey (@digiglean@fosstodon.org) - Fosstodon Real Python (@realpython@fosstodon.org) - FosstodonLevel up your Python skills with our expert-led courses:
Lists and Tuples in Python Everyday Project Packaging With pyproject.toml Using Python's pathlib ModuleSupport the podcast & join our community of Pythonistas
Fri, 09 Dec 2022 - 136 - Preparing Data to Measure True Machine Learning Model Performance
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.
Jodie starts by defining some terms for the conversation. We talk about targets, features, and supervised learning.
We discuss three common ways that data can alter model performance and which Python tools can help spot and avoid them. Jodie shares personal experiences of working through these pitfalls. We also share a healthy collection of resources to explore and learn more.
Course Spotlight: Combining Data in pandas With concat() and merge()
In this video course, you’ll learn two techniques for combining data in pandas: merge() and concat(). Combining Series and DataFrame objects in pandas is a powerful way to gain new insights into your data.
Topics:
00:00:00 – Introduction 00:01:46 – Recent conference talks 00:03:24 – How to prepare your data for model performance 00:04:24 – Vocabulary: target, features, and supervised learning 00:06:28 – The curse of dimensionality 00:08:57 – Overfitting 00:11:08 – Underfitting 00:12:11 – Splitting the dataset 00:13:39 – K-fold cross validation 00:18:30 – Data leakage 00:21:36 – Checking for duplicates 00:26:23 – Applying transformations only after splitting data 00:31:16 – Imbalanced data 00:36:36 – Using ML to balance data 00:41:05 – Informing your model of the imbalance 00:42:56 – Video Course Spotlight 00:44:20 – Accuracy used as a measure 00:49:05 – Scikit-learn methodclassification_table
00:50:43 – Jet Brains blog post and conference talk 00:52:18 – How can people follow your work online? 00:54:39 – Upcoming webinars 00:56:20 – Thanks and goodbyeShow Links:
How to Prepare Your Dataset for Machine Learning and Analysis - The JetBrains Datalore Blog Curse of dimensionality - Wikipedia Overfitting vs. Underfitting: A Complete Example - Will Koehrsen A Gentle Introduction to k-fold Cross-Validation - MachineLearningMastery.com sklearn.model_selection.train_test_split — scikit-learn documentation Cross-validation: evaluating estimator performance — scikit-learn documentation sklearn.model_selection.cross_val_score — scikit-learn documentation Data Leakage And Its Effect On The Performance of An ML Model pandas.DataFrame.duplicated — pandas documentation pandas GroupBy: Your Guide to Grouping Data in Python – Real Python pandas.DataFrame.groupby — pandas documentation Difference between fit(), transform() and fit_transform() method in Scikit-learn - Aishwarya Chand: Nerd For Tech Imbalanced Data in Machine Learning - Google Developers Under-sampling — imbalanced-learn.org Over-sampling — imbalanced-learn.org Learn - Getting Started with Gretel.ai Classification on imbalanced data: Class weights - TensorFlow Core Tour of Evaluation Metrics for Imbalanced Classification - MachineLearningMastery.com CloudBrew - A two-day conference by AZUG, the Belgium Microsoft Azure User Group 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 teamsLevel up your Python skills with our expert-led courses:
Data Cleaning With pandas and NumPy Sneaky REST APIs With Django Ninja Combining Data in pandas With concat() and merge()Support the podcast & join our community of Pythonistas
Fri, 02 Dec 2022 - 135 - Building Python REST APIs With Flask & Structuring Pull Requests
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.
Philipp talks about updating a set of tutorials to use current libraries and best practices. The series takes you through building the base Flask project, defining endpoints, creating documentation, adding a persistent database, and implementing models with SQLAlchemy.
Christopher shares an article about contributing to an existing internal or open-source project by properly preparing pull requests. The article is titled “Ten Tasty Ingredients for a Delicious Pull Request”.
We share several other articles and projects from the Python community, including more suspicious PyPI packages using new tactics, method chaining in pandas, tools to find syntax errors without stopping, a library for searching text in videos using optical character recognition (OCR), a project for visualizing CPython’s specializing adaptive interpreter, and a library for building CLI applications based on type hints.
Course Spotlight: The Pandas DataFrame: Working With Data Efficiently
In this course, you’ll get started with pandas DataFrames, which are powerful and widely used two-dimensional data structures. You’ll learn how to perform basic operations with data, handle missing values, work with time-series data, and visualize data from a pandas DataFrame.
Topics:
00:00:00 – Introduction 00:03:09 – Philipp’s background 00:05:37 – Python REST APIs With Flask, Connexion, and SQLAlchemy 00:14:35 – Ten Tasty Ingredients for a Delicious Pull Request 00:24:25 – Sponsor: InfluxDB 00:25:13 – Method Chaining in Pandas: Bad Form or a Recipe for Success? 00:31:35 – More Suspicious PyPI Packages 00:35:48 – Video Course Spotlight 00:37:01 – What Tools Find Syntax Errors Without Stopping? 00:47:29 – Perform OCR upon entire videos 00:49:49 – Visualize CPython 3.11’s Specializing, Adaptive Interpreter 00:54:08 – Typer, build great CLIs 00:56:29 – Thanks and goodbyeShow Links:
About Philipp Acsany – Real Python Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 1 Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 2 Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 3 Ten Tasty Ingredients for a Delicious Pull Request – LB is a core team member of the open-source project Wagtail and, as such, has a lot of experience dealing with community contributions. This article talks about how to be a good contributor, whether for your next open-source software (OSS) PR or within your own organization. Method Chaining in Pandas: Bad Form or a Recipe for Success? – Python trainer Matt Harrison has been creating a bit of a stir. Some of his pandas examples have elicited criticism from different folks in the Twitterverse. Dave Amos interviews Matt to discuss the pros and cons of his approach. More Suspicious PyPI Packages – Researchers at Phylum have come across over a dozen new malicious uploads to PyPI. Many of them are copied and pasted versions of legitimate packages that have been renamed and had malicious code inserted. This detailed article shows some of the tactics used by the bad actors.Discussion:
What Tools Find Syntax Errors Without Stopping?Projects:
videocr: Perform OCR upon entire videos to look for credentials or similar Visualize CPython 3.11’s Specializing, Adaptive Interpreter Typer, build great CLIsAdditional Links:
What Percentage Of Websites Use WordPress In 2022? “Here’s a recipe to clean up the Ames housing dataset.” Matt Harrison - Twitter Idiomatic Pandas - Matt Harrison | Conf42 Python 2021 - YouTube Episode #103: Becoming More Effective at Manipulating Data With Pandas – The Real Python Podcast Getting started - Polars - User Guide py_compile — Compile Python source files — Python 3.11.0 documentation Build a Command-Line To-Do App With Python and Typer – Real PythonLevel up your Python skills with our expert-led courses:
Deploy Your Python Script on the Web With Flask The pandas DataFrame: Working With Data Efficiently SQLite and SQLAlchemy in Python: Moving Your Data Beyond Flat FilesSupport the podcast & join our community of Pythonistas
Fri, 25 Nov 2022 - 134 - Moving Projects Away From Passwords With WebAuthn and Python
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.
WebAuthn is a way to authenticate users using biometric, secure authentication methods. Dan dives into passkeys, ceremonies, authenticators, and hardware standards. We also cover several projects and libraries that can help you get started with WebAuthn in Python.
Course Spotlight: Refactoring: Prepare Your Code to Get Help
In this Code Conversation video course, you’ll explore the steps you can take to get help when you’re stuck while coding. You’ll investigate how to clean up your code to focus on the question you have. Along the way, you’ll learn how to handle errors and use custom exceptions.
Topics:
00:00:00 – Introduction 00:01:36 – Dan’s WebAuthn article 00:03:26 – FIDO and WebAuthn 00:05:53 – What’s a YubiKey? 00:07:57 – Phones with biometric systems 00:12:03 – Sponsor: CData Software 00:12:45 – Similarities to HTTPS 00:16:13 – A password-less future 00:24:31 – Where’s it being used? 00:30:53 – Video Course Spotlight 00:32:26 – Python WebAuthn projects and packages 00:34:52 – Does a developer need to set up additional auth methods? 00:37:31 – How are the third-party auth services implementing this? 00:39:50 – What are you excited about in the world of Python? 00:41:24 – What do you want to learn next? 00:43:20 – Thanks and goodbyeShow Links:
WebAuthn Explained - FusionAuth Episode #99: OAuth 2 and Authentication Choices for Your Python Project – The Real Python Podcast All about FIDO2, CTAP2 and WebAuthn - Microsoft Community Hub YubiKey - Hardware Security Keys Apple Adopts Passwordless Authentication Technology – Hideez 1Password is launching passkey support in early 2023 - The Verge duo-labs/py_webauthn: Pythonic WebAuthn python-webauthn: Server side handlers for WebAuthN with support for Apple’s FaceID, and the FIDO metadata service pywarp - PyPI webauthn-rp documentation Going Passwordless With py_webauthn - Duo Security django-webauth: Two Factor Authentication in Django using Web Authentication API (WebAuthn) django-webauthin - PyPI python-fido2 Python 3.11.0 Release - Python.org Real Food Fermentation by Alex Lewin - Amazon Auth. Built for Devs, by Devs - FusionAuthLevel up your Python skills with our expert-led courses:
Exploring HTTPS and Cryptography in Python Python Basics: Finding and Fixing Code Bugs Refactoring: Prepare Your Code to Get HelpSupport the podcast & join our community of Pythonistas
Fri, 18 Nov 2022 - 133 - Creating Tic-Tac-Toe With an AI Player & Shortcuts for Python Decorators
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.
Christopher shares a recent Real Python step-by-step project for creating a tic-tac-toe game engine. He talks about how to build the game engine and adapt it for different front ends. The tutorial also shows how to implement an unbeatable computer player using the minimax algorithm.
We discuss an article about how to avoid repeating yourself when creating decorators with multiple parameters. We talk about how you can stop copying and pasting code several times by assigning the decorator to a new variable.
We share several other articles and projects from the Python community, including a news roundup, a deep dive into Python’s doctest, several Python command line tricks, type annotations via automated refactoring, a new way to draw boxes in the terminal, a collection of projects for beginners with source code, a minimalist PDF creation library, and a tool for sensible logging in Python.
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:25 – Python 3.12.0 Alpha 1 Released 00:02:45 – PyCon US 2023 Call for Proposals 00:03:27 – Python’s doctest: Document and Test Your Code at Once 00:13:59 – Build a Tic-Tac-Toe Game Engine With an AI Player in Python 00:22:12 – Sponsor: InfluxDB 00:22:59 – Python Command Line Tricks 00:30:50 – Type Annotation via Automated Refactoring 00:34:29 – A New (?) Way of Drawing Boxes in the Terminal 00:37:10 – Decorator Shortcuts 00:39:36 – Video Course Spotlight 00:41:02 – 190 Python Projects With Source Code 00:47:58 – fpdf2: Minimalist PDF Creation Library 00:50:04 – Simple, Sane, and Sensible Logging in Python 00:53:05 – Thanks and goodbyeNews:
Python 3.12.0 Alpha 1 Released PyCon US 2023 Call for ProposalsTopics:
Python’s doctest: Document and Test Your Code at Once – In this tutorial, you’ll learn how to add usage examples to your code’s documentation and docstrings and how to use these examples to test your code. To run your usage examples as automated tests, you’ll use Python’s doctest module from the standard library. Build a Tic-Tac-Toe Game Engine With an AI Player in Python – In this step-by-step tutorial, you’ll build a universal game engine in Python with tic-tac-toe rules and two computer players, including an unbeatable AI player using the minimax algorithm. You’ll also create a text-based graphical front end for your library and explore two alternative front ends. Python Command Line Tricks – Usingpython -m
you can do all sorts of things from the command line, including starting a webserver, opening a browser, parsing JSON, compressing files, and much more. Type Annotation via Automated Refactoring – Jimmy’s team at Carta decided they wanted to add type annotations to their large codebase, but doing so manually would’ve taken a very long time. This post shows you how they built automated refactoring tools to add type annotations to their code. A New (?) Way of Drawing Boxes in the Terminal – With clever use of some of the Unicode border characters, you can build a better box around your text, without any color bleeding. Decorator Shortcuts – “When using many decorators in code, there’s a shortcut you can use if you find yourself repeating them. They can be assigned to a variable just like any other Python expression.”Discussion:
190 Python Projects With Source CodeProjects:
fpdf2: Minimalist PDF Creation Library Simple, Sane, and Sensible Logging in Python – Get started with logging in Python or deploy advanced, flexible loggers without the boilerplate code. Learn all aboutlog2d
, a third-party wrapper for the Python logging library.Additional Links:
Build Your Python Project Documentation With MkDocs – Real Python Episode #97: Improving Your Django and Python Developer Experience – The Real Python Podcast Python’s zipapp: Build Executable Zip Applications – Real Python Episode #80: Make Your Python App Interactive With a Text User Interface (TUI) – The Real Python Podcast Episode #20: Building PDFs in Python with ReportLab – The Real Python Podcast Links for Documentation FPDF and Other Ports PFython/log2d - GitHubLevel up your Python skills with our expert-led courses:
How to Work With a PDF in Python Python Inner Functions Python Decorators 101Support the podcast & join our community of Pythonistas
Fri, 11 Nov 2022 - 132 - Exploring the New Features of Python 3.11
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.
Geir Arne and Christopher collaborated to create code examples for the new features. We discuss better error messages, faster code execution, task and exception groups, typing features, and native TOML support.
We dive into the updates and offer advice about ways to incorporate them into your projects. We also consider when you should start running Python 3.11.
Course Spotlight: Cool New Features in Python 3.11 – Real Python
In this video course, you’ll explore what Python 3.11 brings to the table. You’ll learn how Python 3.11 is the fastest and most user-friendly version of CPython yet, and learn about improvements to the typing system and to the asynchronous features of Python.
Topics:
00:00:00 – Introduction 00:02:19 – Preview series 00:03:50 – Faster CPython project 00:07:10 – Specializing adaptive interpreter 00:11:24 – Other performance stuff 00:16:07 – Sponsor: Deepgram 00:16:51 – Improved tracebacks 00:21:49 – Exception groups and notes 00:27:22 – Self type and additional type hints 00:36:14 – Video Course Spotlight 00:37:27 – asyncio and task groups 00:41:25 – TOML and tomllib 00:46:21 – ISO date parsing 00:50:09 – Negative zeros 00:53:38 – Dead battery deprecations 00:56:04 – Advice on upgrading 01:01:01 – Thanks and goodbyeShow Links:
Python 3.11: Cool New Features for You to Try – Real Python Cool New Features in Python 3.11 – Video Course faster-cpython/plan.md - GitHub PEP 659 – Specializing Adaptive Interpreter - peps.python.org Just-in-time compilation - Wikipedia Episode #381 Python Perf: Specializing, Adaptive Interpreter - Talk Python To Me Podcast Episode #339 Making Python Faster with Guido and Mark - Talk Python To Me Podcast “Zero cost” exception handling · Issue #84403 · python/cpython - GitHub Python 3.11 Preview: Task and Exception Groups – Real Python Faster Startup In Python 3.11 — Python 3.11.0 documentation Python 3.11 Preview: Even Better Error Messages – Real Python PEP 657 – Include Fine Grained Error Locations in Tracebacks - peps.python.org Episode #105: Creating Better Error Messages for Python 3.10 & 3.11 – The Real Python Podcast Exception Groups and except: Irit Katriel - YouTube PEP 673 – Self Type - peps.python.org PEP 646 – Variadic Generics - peps.python.org How Exception Groups Will Improve Error Handling in AsyncIO - Łukasz Langa | Power IT Conference - YouTube Neopythonic: Reasoning about asyncio.Semaphore PEP 680 – tomllib: Support for Parsing TOML in the Standard Library - peps.python.org TOML: Tom’s Obvious Minimal Language Python 3.11 Preview: TOML and tomllib – Real Python datetime — Basic date and time types — Python 3.11.0 documentation 13 Month Calendar Signed zero - Wikipedia PEP 594 – Removing dead batteries from the standard library - peps.python.orgLevel up your Python skills with our expert-led courses:
Cool New Features in Python 3.10 Cool New Features in Python 3.11 Python Type CheckingSupport the podcast & join our community of Pythonistas
Fri, 04 Nov 2022
Podcasts similaires à The Real Python Podcast
- Global News Podcast BBC World Service
- Kriminálka Český rozhlas
- El Partidazo de COPE COPE
- Herrera en COPE COPE
- The Dan Bongino Show Cumulus Podcast Network | Dan Bongino
- Es la Mañana de Federico esRadio
- La Noche de Dieter esRadio
- Hondelatte Raconte - Christophe Hondelatte Europe 1
- Affaires sensibles France Inter
- La rosa de los vientos OndaCero
- Más de uno OndaCero
- La Zanzara Radio 24
- Espacio en blanco Radio Nacional
- Les Grosses Têtes RTL
- L'Heure Du Crime RTL
- El Larguero SER Podcast
- Nadie Sabe Nada SER Podcast
- SER Historia SER Podcast
- Todo Concostrina SER Podcast
- 安住紳一郎の日曜天国 TBS RADIO
- The Tucker Carlson Show Tucker Carlson Network
- 辛坊治郎 ズーム そこまで言うか! ニッポン放送
- 飯田浩司のOK! Cozy up! Podcast ニッポン放送
- 武田鉄矢・今朝の三枚おろし 文化放送PodcastQR