Filtrar por género
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.
- 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:
Get Started With Django: Build 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:
Python Histogram Plotting: 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() Python Histogram Plotting: 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:
Python Debugging With pdb Using Python's assert to Debug and Test Your Code Create a Tic-Tac-Toe Python Game Engine With an AI 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 Data 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 Python Histogram Plotting: 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 Developers 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:
Python Debugging With pdb Testing Your Code With pytest What Does if name == "main" Mean in Python?Support the podcast & join our community of Pythonistas
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:
Get Started With Django: Build 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 Python Histogram Plotting: 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 Providing 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 Python Code: A Complete GuideSupport 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 Python Histogram Plotting: 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 in 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 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 - 131 - Fostering an Internal Python Community & Managing the 3.11 Release
Does your company have a plan for growing an internal Python community? What are the attributes to look for when bringing someone into your department? This week on the show, Pablo Galindo Salgado returns to talk about building community through the Python Guild at Bloomberg and managing the release of Python 3.11.
Pablo describes how the Python Guild started and currently operates inside Bloomberg. We talk about how it fosters community and acts as a way to promote internally developed tools across disparate teams. We also discuss how work groups use it to find new internal candidates for their teams.
Pablo talks about his role as release manager for Python 3.10 and 3.11. He shares the intense journey the team has had this year in preparing for the release of 3.11. He details updating testing strategies to work with the new specializing adaptive interpreter.
Course Spotlight: Python Basics: Strings and String Methods
In Python, collections of text are called strings. In this course, you’ll learn about this fundamental data type and the string methods that you can use to manipulate strings. Along the way, you’ll learn ways to work with strings of numbers, and how to format strings for printing.
Topics:
00:00:00 – Introduction 00:02:13 – Python Guild inside of Bloomberg 00:13:31 – Finding candidates for the guild from other areas 00:19:11 – Sponsor: Platform.sh 00:19:47 – Considering eagerness to learn and excitement 00:29:44 – Structuring the guild into work groups 00:33:43 – How are things going as release manager? 00:38:25 – Testing for adaptive interpreters 00:44:02 – Working toward the feature freeze 00:50:39 – Changing the parser went smoothly 00:54:34 – Video Course Spotlight 00:55:55 – Where do you find the time? 00:59:51 – How’s the sweep picking coming along? 01:00:33 – What are you excited about in the world of Python? 01:01:29 – What do you want to learn next? 01:07:18 – How can people follow the work you do? 01:08:20 – Thanks and goodbyeShow Links:
Bloomberg publishes Memray, a new open source memory profiler for Python code - Bloomberg LP bloomberg/memray: Memray is a memory profiler for Python Pluralsight Tech Blog - Guilds at Pluralsight Lessons From Building a Community of Python Users Among Capital One’s Analysts - Capital One PEP 13 – Python Language Governance - peps.python.org Python Insider: Python 3.11.0rc2 is now available What’s New In Python 3.11 — Python 3.11.0rc2 documentation PEP 659 – Specializing Adaptive Interpreter - peps.python.org Andon (manufacturing) - Wikipedia Learn Rust - Rust Programming Language Swift - Apple raywenderlich.com - High quality programming tutorials: iOS, Android, Swift, Kotlin, Flutter, Server Side Swift, Unity, and more! Python Developers Survey 2022 pablogsal (Pablo Galindo Salgado) - GitHub Pablo Galindo Salgado (@pyblogsal) - TwitterLevel up your Python skills with our expert-led courses:
Python Basics: Strings and String Methods Cool New Features in Python 3.10 Python Basics: Code Your First Python ProgramSupport the podcast & join our community of Pythonistas
Fri, 21 Oct 2022 - 130 - Using an Ellipsis in Python & Goals for CPython 3.12
Where should you use an ellipsis in Python? How does it behave as a placeholder in a script, project, or stub file? What are the next goals for the Faster CPython project? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We talk about a Real Python article that covers when you should use an ellipsis in Python. We discuss the similarities with the
pass
keyword and how it’s used for type hints within stub files.Christopher shares resources covering the goals of the Faster CPython project. We’re on the cusp of the release of Python 3.11, but the project keeps moving forward as they look at ways to continue speeding up Python.
We share several other articles and projects from the Python community, including a news roundup, alternatives for hosting Python-based applications, ways to create custom Python strings, a discussion about aging programmers, a structural diff that understands syntax, and a project for refurbishing and modernizing Python codebases.
Course Spotlight: Providing Multiple Constructors in Your Python Classes
In this video course, you’ll learn how to provide multiple constructors in your Python classes. To this end, you’ll learn different techniques, such as checking argument types, using default argument values, writing class methods, and implementing single-dispatch methods.
Topics:
00:00:00 – Introduction 00:02:26 – Django security releases issued 00:02:44 – PEP 698: Override Decorator for Static Typing 00:03:37 – Heroku Alternatives for Python-Based Applications 00:14:34 – Python 3.12 Goals: Faster-CPython Ideas Wiki 00:20:29 – Sponsor: InfluxDB 00:21:19 – When Do You Use an Ellipsis in Python? 00:28:18 – Custom Python Strings: Inheriting Fromstr
vsUserString
00:32:52 – Aging Programmer 00:46:32 – Video Course Spotlight 00:47:48 – difftastic: A Structural Diff That Understands Syntax 00:50:44 – refurb: Refurbish and Modernize Python Codebases 00:55:44 – Thanks and goodbyeNews:
Django security releases issued: 4.1.2, 4.0.8, and 3.2.16 | Weblog | Django PEP 698: Override Decorator for Static Typing – This Python Enhancement Proposal describes the use of a new decorator,@override
, which would be used as a type hint for methods in a subclass that override a parent’s method. This type hint would introduce a level of safety if the parent method is refactored without corresponding changes to the child method.Show Links:
Heroku Alternatives for Python-Based Applications – Learn about alternatives to Heroku and their pros and cons. Platforms discussed include Digital Ocean, Google App Engine, AWS, Azure, PythonAnywhere, and half a dozen more. Python 3.12 Goals: Faster-CPython Ideas Wiki – A summary of the goals for the Faster CPython initiative within the Python 3.12 release. Includes trace optimizations, shrinking object sizes, improving memory management overhead, and more. See also the associated Workflow for 3.12 cycle checklist. When Do You Use an Ellipsis in Python? – You may have seen three dots in Python scripts. Although this syntax may look odd, using an ellipsis is valid Python code. In this tutorial, you’ll learn when Python’sEllipsis
constant can come in handy for you. Custom Python Strings: Inheriting Fromstr
vsUserString
– In this tutorial, you’ll learn how to create custom string-like classes in Python by inheriting from the built-instr
class or by subclassingUserString
from thecollections
module.Discussion:
Aging ProgrammerProjects:
difftastic: A Structural Diff That Understands Syntax refurb: Refurbish and Modernize Python CodebasesAdditional Links:
Opalstack cookiecutter-python · PyPI typeshed/stubs at master · python/typeshed Why Can’t Programmers.. Program?Level up your Python skills with our expert-led courses:
Sneaky REST APIs With Django Ninja Providing Multiple Constructors in Your Python Classes Using Python Class ConstructorsSupport the podcast & join our community of Pythonistas
Fri, 14 Oct 2022 - 129 - Using a Memory Profiler in Python & What It Can Teach You
Have you used a memory profiler to gauge the performance of your Python application? Maybe you’re using it to troubleshoot memory issues when loading a large data science project. What could running a profiler show you about a codebase you’re learning? This week on the show, Pablo Galindo Salgado returns to talk about Memray, a powerful tracing memory profiler.
Pablo developed Memray while working at Bloomberg to track memory allocations beyond Python code into native extensions and the interpreter itself. It’s a compelling tool that provides fine-grain reports to help you understand where memory is used.
Pablo shares the reporting that Memray provides, including live mode, flame graphs, and a
pytest
plug-in. We also discuss how a tracing memory profiler can help you understand a new codebase.He walks through how he developed the first prototype internally and eventually moved the project into open source. This is the first part of my conversation with Pablo. In a couple of weeks, you’ll get the second part, where we talk about Python guilds inside large companies and his work as the release manager for Python 3.10 and 3.11.
Course Spotlight: SQLite and SQLAlchemy in Python: Moving 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:48 – When should you use a memory profiler? 00:05:13 – Fine-grain reporting 00:13:17 – Sampling profiler vs tracing profiler 00:19:46 – Sponsor: Deepgram 00:20:31 – What is a flame graph? 00:30:36 – Using Rich for terminal reporters 00:40:08 – Currently only Linux and macOS 00:41:13 –pytest
plug-in 00:42:03 – Showing native allocation details 00:44:20 – Video Course Spotlight 00:45:52 – Using a profiler to learn a codebase 00:54:39 – Moving from internal project to open source 01:02:17 – Thanks and goodbyeShow Links:
memray: Memray is a memory profiler for Python - GitHub bloomberg/memray memray - PyPI Bloomberg publishes Memray, a new open source memory profiler for Python code - Bloomberg LP What is a Flame Graph? How it Works & Use Cases - Datadog Gantt chart - Wikipedia py-spy - PyPI scalene - PyPI Reduce your Python program’s memory usage with Fil fil: A Python memory profiler for data processing and scientific computing applications - GitHub pythonspeed/filprofiler Episode #24: Options for Packaging Your Python Application: Wheels, Docker, and More - The Real Python Podcast rich - PyPI Textualize Brendan Gregg Linux perf Examples Deepgram - Speech-to-Text for Developers & EnterpriseLevel up your Python skills with our expert-led courses:
Python Debugging With pdb SQLite and SQLAlchemy in Python: Moving Your Data Beyond Flat Files Testing Your Code With pytestSupport the podcast & join our community of Pythonistas
Fri, 07 Oct 2022 - 128 - Explaining Access Control Using Python & Cautiously Handling Pickles
Have you ever used code to help explain a topic? How can Python scripts be used to understand the intricacies of access control? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher talks about an article that explores the evolution of access control by reimplementing the concepts with Python scripts. The experiment moves across the various access forms, starting with control lists, roles, and attributes, then ending with purpose-based access control (PBAC).
We also cover a post about how to create dangerous pickles. We discuss where malicious code can hide within the serialization process and how decompiling code can be an education tool.
We share several other articles and projects from the Python community, including command line interface (CLI) creation with
argparse
, HTML and CSS for Python developers, a Python packaging user survey, a visual Python Tkinter GUI creator, a PyScript-based data visualization cookbook, and a project for writing functional test helpers in Django.Course Spotlight: Serializing Objects With the Python pickle Module
In this course, you’ll learn how you can use the Python
pickle
module to convert your objects into a stream of bytes that can be saved to a disk or sent over a network. You’ll also learn the security implications of using this process on objects from an untrusted source.Topics:
00:00:00 – Introduction 00:02:19 – Python 3.11.0rc2 is now available 00:03:45 – HTML and CSS for Python Developers 00:08:34 – Evolution of Access Control Explained Through Python 00:17:14 – Sponsor: InfluxDB 00:18:03 – Dangerous Pickles 00:28:08 – Building Command Line Interfaces With argparse 00:34:27 – Video Course Spotlight 00:35:45 – PyPI.org is running a survey 00:49:01 – Visual Python Tkinter GUI Creator 00:50:33 – Python Data Visualization Cookbook 00:52:06 – django-functest: Helpers for Functional Tests in Django 00:57:55 – Thanks and goodbyeShow Links:
Python Insider: Python 3.11.0rc2 is now available HTML and CSS 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 tutorial, you’ll get an introduction to HTML and CSS for Python programmers. Evolution of Access Control Explained Through Python – Sometimes, writing code can help you explore and understand concepts. This article shows a history of access controls in software, using Python scripts to reimplement the ideas. Dangerous Pickles – A light introduction to the Python pickle protocol, the Pickle Machine, and the construction of malicious pickles. Learn why your code shouldn’t trust arbitrary serialized objects, and discover the dangers of pickle-bombs. 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 withargparse
.Discussion:
Python Packaging User Survey PyPI.org is running a survey on the state of Python packaging | Hacker NewsProjects:
Visual Python Tkinter GUI Creator - Chinese Python Data Visualization Cookbook django-functest: Helpers for Functional Tests in DjangoAdditional Links:
Axess Lab | Alt-texts: The Ultimate Guide The Python pickle Module: How to Persist Objects in Python – Real Python Understanding pickle in Python | #hsfzxjy# The ultimate guide to Python pickle | Snyk Pickle’s nine flaws | Ned Batchelder pickle — Python object serialization — Python 3.10.7 documentation pickletools — Tools for pickle developers — Python 3.10.7 documentation argparse — Parser for command-line option | Python 3.10.7 documentation Have been testing @pyscript_dev these past few days and finally made something cool. I built an interactive data viz cookbook | Dylan Castillo - TwitterLevel up your Python skills with our expert-led courses:
Grow Your Python Portfolio With 13 Intermediate Project Ideas Building Command Line Interfaces With argparse Serializing Objects With the Python pickle ModuleSupport the podcast & join our community of Pythonistas
Fri, 30 Sep 2022 - 127 - Python as an Efficiency Tool for Non-Developers
Are you interested in using Python in an industry outside of software development? Would adding a few custom software tools increase efficiency and make your coworkers’ jobs easier? This week on the show, Josh Burnett talks about using Python as a mechanical engineer.
I met Josh at PyCon US 2022 in Salt Lake City, which he attended for the first time with several coworkers. He suggested we do an episode to shed some light on ways that Python is being used professionally by people who aren’t primarily programming for a living.
Josh works as a mechanical engineer for an equipment manufacturer, where he needs to perform repetitive tasks and generate copious logs. He explains how he moved his team away from MATLAB and toward Python.
We discuss his progression from writing scripts to developing packages and eventually hosting his work on PyPI. He also shares his explorations with CircuitPython for personal and professional projects.
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:02:10 – Meeting at PyCon US 2022 00:04:32 – Bringing members of team to PyCon 00:05:30 – What are next generation instrumentation platforms? 00:06:35 – What is the lifespan of a platform? 00:09:26 – Has interconnectivity affected upgrades? 00:10:57 – Programming and Python background 00:12:13 – Introduction to MATLAB at university 00:15:18 – Moving away from MATLAB to Python 00:19:39 – How was your transition from Python 2 to 3? 00:21:19 – Debugging methods and logging 00:22:27 – Why did you choose Python? 00:24:26 – Sponsor: Deepgram 00:25:12 – Promoting more use of Python in the organization 00:33:07 – Selling the idea of Python training in the organization 00:37:16 – Moving from scripts to building packages 00:43:48 – From personal project to critical package on PyPI 00:44:29 – Using PyPI or in-house package repository 00:46:27 – Experience with modern packaging tools 00:48:16 – Video Course Spotlight 00:49:32 – Using CircuitPython for personal and work projects 00:56:09 – Use of 3D printing and machining 00:57:33 – Josh’s projects on PyPI 01:02:57 – What are you excited about in the world of Python? 01:05:23 – What do you want to learn next? 01:08:46 – How can people follow your work? 01:09:07 – Thanks and goodbyeShow Links:
PyPI Profile of joshburnett PyCon 2022 Welcome to PyCon US 2022 MATLAB - MathWorks - MATLAB & Simulink devpi: PyPI server and packaging/testing/release tool Artifactory - Universal Artifact Repository Manager - JFrog loguru · PyPI How to Publish an Open-Source Python Package to PyPI – Real Python Python and TOML: New Best Friends – Real Python PyQtGraph - Scientific Graphics and GUI Library for Python CircuitPython Adafruit MagTag - 2.9 Grayscale E-Ink WiFi Display canaveral · PyPI addcopyfighandler · PyPI PyScript | Run Python in your HTML What exactly is WASI? - Wasm Builders 🧱 WASI - WebAssembly System Interface KiCad EDA - Schematic Capture & PCB Design Software Lessons learned from building a custom CircuitPython board - Stargirl (Thea) Flowers Using Python to vectorize artwork for PCBs - Stargirl (Thea) Flowers Josh Burnett - GitHub Josh Burnett - LinkedInLevel up your Python skills with our expert-led courses:
Building Python Project Documentation With MkDocs How to Publish Your Own Python Package to PyPI Python Modules and Packages: An IntroductionSupport the podcast & join our community of Pythonistas
Fri, 23 Sep 2022 - 126 - Improve Matplotlib With Style Sheets & Python Async for the Web
Have you thought the standard output from Matplotlib is a bit generic looking? Would you like a quick way to add style and consistency to your data visualizations? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We cover an article about the magic of creating style sheets for Matplotlib. You can quickly customize plots and graphs with a single line of code. We share additional resources for you to try out new styles and learn what parameters are customizable.
Christopher covers an article about using async for web development in Python. The creation of Python generators inspired the development of async functionality. He discusses recent changes and async additions within Python web frameworks.
We cover several other articles and projects from the Python community, including how to install a pre-release version of Python, cache in Python with lru_cache, and get better at debugging, along with suggestions of libraries that deserve attention, a Python library for creating mathematical animations, and an extremely fast Python linter that’s written in Rust.
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:21 – Python releases 3.10.7, 3.9.14, 3.8.14, and 3.7.14 are now available 00:03:51 – How Can You Install a Pre-Release Version of Python? 00:08:13 – Understanding async Python for the Web 00:17:11 – The Magic of Matplotlib Style Sheets 00:24:20 – Sponsor: Platform.sh 00:24:56 – Caching in Python With lru_cache 00:29:41 – Some Ways to Get Better at Debugging 00:38:14 – Video Course Spotlight 00:39:26 – Suggest a Lesser Known Library Deserving Attention 00:44:52 – ruff: An Extremely Fast Python Linter, Written in Rust 00:48:19 – Manim: Python Library for Creating Mathematical Animations 00:51:50 – Thanks and goodbyeShow Links:
Python releases 3.10.7, 3.9.14, 3.8.14, and 3.7.14 are now available How Can You Install a Pre-Release Version of Python? – If you want to have a peek at what’s coming in the next stable version of Python, then you can install a pre-release version. In this tutorial, you’ll learn how to access the latest Python versions and help test them. Understanding async Python for the Web – “Recently Django 4.1 was released, and the thing most people seem interested in is the expandedasync
support. The Python web ecosystem has been seeing new frameworks pop up which are fullyasync
, or support going fully async, from the start.” Learn more aboutasync
and its use in web frameworks. The Magic of Matplotlib Stylesheets – With a single line of code, you can integrate a style sheet with your Matplotlib visualization. In this tutorial, you’ll learn how to make your very own custom reusable style sheet. 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. Some Ways to Get Better at Debugging – This is a short summary of a couple of academic papers on how to improve your debugging skills. The suggestions are to learn the codebase, learn the system, learn your tools, learn strategies, and gain experience.Discussions:
Suggest a Lesser Known Library Deserving AttentionProjects:
ruff: An Extremely Fast Python Linter, Written in Rust Manim: Python Library for Creating Mathematical AnimationsAdditional Links:
Managing Multiple Python Versions With pyenv – Real Python Your Python Coding Environment on Windows: Setup Guide – Real Python Customizing Matplotlib with style sheets and rcParams — Matplotlib 3.5.3 documentation dhaitz/matplotlib-stylesheets: Stylesheets for Matplotlib Kaggle: Your Home for Data Science wizard zines Rubber Duck Debugging – Debugging software with a rubber ducky pudb · PyPI Humre · PyPI Welcome to Nox — Nox 2022.8.7 documentation Episode #21: Exploring K-means Clustering and Building a Gradebook With Pandas – The Real Python Podcast 3Blue1Brown - YouTubeLevel up your Python skills with our expert-led courses:
Python Basics: Finding and Fixing Code Bugs Python Plotting With Matplotlib Python Debugging With pdbSupport the podcast & join our community of Pythonistas
Fri, 16 Sep 2022 - 125 - Exploring Recursion in Python With Al Sweigart
Have you wanted to understand recursion and how to use it in Python? Are you familiar with the call stack and how it relates to tracebacks? This week on the show, Al Sweigart talks about his new book, “The Recursive Book of Recursion.”
Recursion is one of those concepts held as a tenet of high-level computer science priesthood. Al explains the fundamentals of writing recursive functions and a critical missing piece in understanding how they operate, the call stack. After completing his research, he concluded that it’s a technique that you should understand but rarely use.
He also shares the few cases where recursion is an appropriate solution. Along the way, we talk about directed acyclic graphs, solving mazes, exploring file trees, and creating fractal images.
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:01:55 – The Recursive Book of Recursion 00:02:55 – A Beginner’s Guide to Recursion - YouTube 00:05:41 – What is recursion? 00:10:17 – Understanding the call stack 00:12:15 – Languages moving from GOTO statements to functions and a stack 00:21:11 – A common recursion example of factorials 00:26:00 – Fibonacci sequence and memoization 00:30:25 – Cautionary advice on applying recursion 00:32:55 – What is recursion useful for? 00:39:56 – Video Course Spotlight 00:41:14 – Recursion and directed acyclic graphs 00:45:46 – Book examples 00:49:50 – Thoughts on tail recursion 00:54:34 – How has the scope of the book evolved? 01:00:34 – Creating examples in two languages 01:02:37 – Upcoming projects 01:05:19 – Examples of the projects in the book 01:10:30 – What are you excited about in the world of Python? 01:14:50 – What do you want to learn next? 01:19:06 – How can people follow your work? 01:19:48 – Thanks and goodbyeShow Links:
The Recursive Book of Recursion | No Starch Press Recursion for Beginners: A Beginner’s Guide to Recursion - YouTube The Invent with Python Blog Recursion in Python factorial | Definition, Symbol, & Facts | Britannica Fibonacci sequence | Definition, Formula, Numbers, Ratio, & Facts | Britannica A Python Guide to the Fibonacci Sequence – Real Python Directed acyclic graph - Wikipedia Dynamic programming - Wikipedia The Little Schemer : Friedman, Daniel P : Internet Archive Book Review: The Little Schemer - The Invent with Python Blog Droste effect - Wikipedia Episode #33: Going Beyond the Basic Stuff With Python and Al Sweigart – The Real Python Podcast Textualize Episode #80: Make Your Python App Interactive With a Text User Interface (TUI) – The Real Python Podcast BeeWare — Write once. Deploy everywhere. Episode #22: Create Cross-Platform Python GUI Apps With BeeWare – The Real Python Podcast Origami with Jo Nakashima - YouTube Invent with PythonLevel up your Python skills with our expert-led courses:
Grow Your Python Portfolio With 13 Intermediate Project Ideas Caching in Python With lru_cache Exploring the Fibonacci Sequence With PythonSupport the podcast & join our community of Pythonistas
Fri, 09 Sep 2022 - 124 - Creating a Python Code Completer & More Abstract Syntax Tree Projects
How does a code completion tool work? What is an Abstract Syntax Tree, and how is it created in Python? How does an AST help you write programs and projects that inspect and modify your Python code? This week on the show, Meredydd Luff, co-founder of Anvil, shares his PyCon talk, “Building a Python Code Completer.”
Meredydd talks about his experience building a code completion engine for the Anvil platform. The conversation leads us to discuss how Python parses the code that you type. We examine tokenization, abstract syntax trees, and how parsing has changed in Python.
We cover additional projects that you can explore once you have a tool that inspects the Python code you’re writing. Join us as we dive into multiple rabbit holes of research and exploration.
Course Spotlight: Python Assignment Expressions and Using the Walrus Operator
In this course, you’ll learn about assignment expressions and the walrus operator. The biggest change in Python 3.8 was the inclusion of the
:=
operator, which you can use to assign variables in the middle of expressions. You’ll see several examples of how to take advantage of this feature.Topics:
00:00:00 – Introduction 00:02:11 – Building a Python Code Completer - Talk 00:08:48 – How is recursion being used? 00:10:28 – Abstract Syntax Trees, Parsers, and Tokens 00:14:58 – Sponsor: CData Software 00:15:39 – Is parsing into tokens a separate step? 00:21:45 – What makes the new PEG parser unique? 00:25:32 – Using the AST doesn’t have to be scary. 00:27:33 – More on the PEG parser 00:29:54 – Keeping scope and holding completions 00:39:43 – Video Course Spotlight 00:41:15 – Was this your first expirement in creating a code completer? 00:46:46 – How can adding type hints assist a completer? 00:50:53 – Projects you can build using AST 00:53:02 – Linter project 00:54:15 – Automatic code formatter 00:54:59 – Code testing and the pytest project 00:56:22 – Security tools 00:57:11 – Friendlier tracebacks 00:59:57 – Code completion vs GitHub Copilot 01:04:14 – Code completion in a text editor vs IDE 01:08:53 – What are you excited about in the world of Python? 01:09:54 – What do you want to learn next? 01:11:20 – How can people follow your work? 01:12:31 – Thanks and goodbyeShow Links:
Talk - Meredydd Luff: Building a Python Code Completer - YouTube Anvil | Build Web Apps with Nothing but Python Episode #63: Create Web Applications Using Only Python With Anvil – The Real Python Podcast “Writing a PEG parser for fun and profit” - Guido van Rossum (North Bay Python 2019) - YouTube PEG Parsing Series Overview. My series of blog posts about PEG | by Guido van Rossum Abstract syntax tree - Wikipedia Parse tree - Wikipedia ast — Abstract Syntax Trees — Python 3.10.6 documentation Full Grammar specification — Python 3.10.6 documentation Python AST Explorer Examples of working with ASTs — Green Tree Snakes 1.0 documentation bellybutton: Custom Python linting through AST expressions black · PyPI pytest: helps you write better programs — pytest documentation friendly-traceback: Friendlier Python tracebacks. Raspberry Pi Pico – Raspberry Pi Raspberry Pi Pico W : ID 5526 : $6.00 : Adafruit Industries, Unique & fun DIY electronics and kits State management - Wikipedia Recoil Meredydd Luff (@meredydd) / TwitterLevel up your Python skills with our expert-led courses:
Python Assignment Expressions and Using the Walrus Operator Testing Your Code With pytest Writing Beautiful Pythonic Code With PEP 8Support the podcast & join our community of Pythonistas
Fri, 02 Sep 2022 - 123 - Configuring a Coding Environment on Windows & Using TOML With Python
Have you attempted to set up a Python development environment on Windows before? Would it be helpful to have an easy-to-follow guide to get you started? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We talk about a Real Python tutorial that covers configuring a Windows coding environment. The guide contains valuable suggestions, best practices, and powerful coding tools. It also covers how to use a package manager, the new Windows Terminal, PowerShell Core, and a program to manage multiple versions of Python.
Christopher covers another Real Python tutorial about using TOML in Python. TOML is a configuration format for building and distributing your own packages. We discuss how TOML parsing will be added to Python’s standard library in version 3.11.
We cover several other articles and projects from the Python community, on topics including technical writing for developers, a news round-up, a farewell to obsolete Python libraries, uncommon uses of Python in commonly used libraries, a prettier
ls
, and a project for advanced hot reloading in Python.Course Spotlight: Python Basics: Finding and Fixing Code Bugs
In this Python Basics video course, you’ll learn how to identify and fix logic errors, or bugs, in your Python code. You’ll use the built-in debugging tools in Python’s Integrated Development and Learning Environment to practice locating and resolving bugs in an example function.
Topics:
00:00:00 – Introduction 00:02:13 – Python 3.10.6 Released 00:02:41 – Python 3.11.0rc1 Released 00:03:13 – Django 4.1 Released 00:04:07 – 10 malicious Python packages exposed in latest repository attack 00:05:12 – Protestware: Why Developers Sabotage Their Own Code 00:06:41 – Python and TOML: New Best Friends 00:16:19 – Say Goodbye to These Obsolete Python Libraries 00:25:51 – Video Course Spotlight 00:27:26 – Uncommon Uses of Python in Commonly Used Libraries 00:37:56 – Your Python Coding Environment on Windows: Setup Guide 00:48:20 – Technical Writing for Developers 00:55:24 – reloadium: Advanced Hot Reloading for Python 00:58:07 – pls: A Prettier ‘ls’ 01:00:56 – Thanks and goodbyeNews:
Python 3.10.6 Released Python 3.11.0rc1 Released Django 4.1 Released 10 malicious Python packages exposed in latest repository attack | Ars Technica Protestware: Why Developers Sabotage Their Own CodeTopic Links:
Python and TOML: New Best Friends – TOML is a configuration file format that’s becoming increasingly popular in the Python community. In this tutorial, you’ll learn the syntax of TOML and explore how you can work with TOML files in your own projects. Say Goodbye to These Obsolete Python Libraries – It’s time to say goodbye toos.path
,random
,pytz
,namedtuple
and many more obsolete Python libraries. Start using the latest and greatest ones instead. Uncommon Uses of Python in Commonly Used Libraries – To learn more about writing maintainable Python, Eugene has been reading code from some of the more popular Python libraries. This blog post talks about some of the coding patterns he has encountered along the way. Your Python Coding Environment on Windows: Setup Guide – With this opinionated guide to setting up a basic, fully featured, and flexible setup for Python coding and contributing to open-source projects when working from Windows, you’ll go from a fresh install to ready to contribute, and even check out a PowerShell script to automate much of the process.Discussion:
Technical Writing for Developers – “The way we write about and around code is arguably as important as the code itself.” This article outlines how programming and writing come together to take your developer skills to the next level.Projects:
reloadium: Advanced Hot Reloading for Python pls: A Prettier ‘ls’Additional Links:
Python 3.11 Preview: TOML and tomllib – Real Python Why you should be using pathlib No really, pathlib is great Episode #116: Exploring Functional Programming in Python With Bruce Eckel – The Real Python Podcast Episode #101: Tools for Setting Up Python on a New Machine – The Real Python Podcast pls: DocumentationLevel up your Python skills with our expert-led courses:
Python Basics: Finding and Fixing Code Bugs Practical Recipes for Working With Files in Python Python Debugging With pdbSupport the podcast & join our community of Pythonistas
Fri, 19 Aug 2022 - 122 - Moving NLP Forward With Transformer Models and Attention
What’s the big breakthrough for Natural Language Processing (NLP) that has dramatically advanced machine learning into deep learning? What makes these transformer models unique, and what defines “attention?” This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, continues our talk about how machine learning (ML) models understand and generate text.
This episode is a continuation of the conversation in episode #119. Jodie builds on the concepts of bag-of-words, word2vec, and simple embedding models. We talk about the breakthrough mechanism called “attention,” which allows for parallelization in building models.
We also discuss the two major transformer models, BERT and GPT3. Jodie continues to share multiple resources to help you continue exploring modeling and NLP with Python.
Course Spotlight: Building a Neural Network & Making Predictions With Python AI
In this step-by-step course, you’ll build a neural network from scratch as an introduction to the world of artificial intelligence (AI) in Python. You’ll learn how to train your neural network and make predictions based on a given dataset.
Topics:
00:00:00 – Introduction 00:02:20 – Where we left off with word2vec… 00:03:35 – Example of losing context 00:06:50 – Working at scale and adding attention 00:12:34 – Multiple levels of training for the model 00:14:10 – Attention is the basis for transformer models 00:15:07 – BERT (Bidirectional Encoder Representations from Transformers) 00:16:29 – GPT (Generative Pre-trained Transformer) 00:19:08 – Video Course Spotlight 00:20:08 – How far have we moved forward? 00:20:41 – Access to GPT-2 via Hugging Face 00:23:56 – How to access and use these models? 00:30:42 – Cost of training GPT-3 00:35:01 – Resources to practice and learn with BERT 00:38:19 – GPT-3 and GitHub Copilot 00:44:35 – DALL-E is a transformer 00:46:13 – Help yourself to the show notes! 00:49:19 – How can people follow your work? 00:50:03 – Thanks and goodbyeShow Links:
Recurrent neural network - Wikipedia Long short-term memory - Wikipedia Vanishing gradient problem - Wikipedia Vanishing Gradient Problem | What is Vanishing Gradient Problem? Attention Is All You Need | Cornell University Visualizing A Neural Machine Translation Model (Mechanics of Seq2seq Models With Attention) – Jay Alammar Standing on the Shoulders of Giant Frozen Language Models | Cornell University #datalift22 Embeddings paradigm shift: Model training to vector similarity search by Nava Levy - YouTube Transformer Neural Networks - EXPLAINED! (Attention is all you need) - YouTube BERT 101 - State Of The Art NLP Model Explained How GPT3 Works - Easily Explained with Animations - YouTube Write With Transformer (GPT2 Live Playground Tool) - Hugging Face Language Model with Alpa (GPT3 Live Playground Tool) OPT-175B Big Data | Music OpenAI API 🤗 (Hugging Face)Transformers Notebooks GitHub Copilot: Fly With Python at the Speed of Thought GitHub Copilot learned about the daily struggle of JavaScript developers after being trained on billions of lines of code. | Marek Sotak on Twitter Jodie Burchell’s Blog - Standard error Jodie Burchell 🇦🇺🇩🇪 (@t_redactyl) / Twitter JetBrains: Essential tools for software developers and teamsLevel up your Python skills with our expert-led courses:
Building a Neural Network & Making Predictions With Python AI Learn Text Classification With Python and Keras The pandas DataFrame: Working With Data EfficientlySupport the podcast & join our community of Pythonistas
Fri, 12 Aug 2022 - 121 - Inspiring Young People to Learn Python With Mission Encodeable
Is there someone in your life you’d like to inspire to learn Python? Mission Encodeable is a website designed to teach people to code, built by two high-school students. This week on the show, Anna and Harry Wake talk about creating their site and motivating people to start coding.
We discuss why they decided to build the site. Anna and Harry initially felt that the site would be for other students but soon realized it could be helpful for anyone interested in starting to code in Python. We cover the project-based approach and how they implemented the interactive browser-based tool replit.com.
We talk about learning Python in the classroom and how they found additional books and tutorials to supplement their coding education. Anna and Harry also created a resource hub to help teachers take advantage of the site.
Course Spotlight: Rock, Paper, Scissors With Python: A Command Line Game
In this course, you’ll learn to program rock paper scissors in Python from scratch. You’ll learn how to take in user input, make the computer choose a random action, determine a winner, and split your code into functions.
Topics:
00:00:00 – Introduction 00:02:17 – Personal backgrounds 00:02:51 – What’s the goal for the site? 00:03:54 – How did you come up with the idea? 00:05:08 – Where have you shared it? 00:06:39 – Projects for each level 00:09:28 – How has the response been? 00:10:10 – Using replit 00:12:56 – Sponsor: CData Software 00:13:37 – Design of the site and other tools to create it 00:15:49 – Learning Python and classes at school 00:17:41 – Did remote school inspire more online exploration? 00:19:16 – Myths of how kids learn programming 00:23:32 – More about projects 00:27:57 – Video Course Spotlight 00:29:27 – What other areas of Python do you want to explore? 00:33:08 – Teachers using the site 00:37:11 – What other resources have you used to learn Python? 00:38:52 – What are you excited about in the world of Python? 00:40:01 – What do you want to learn next? 00:42:06 – Thanks and goodbyeShow Links:
Mission Encodeable | Free coding tutorials for young people Replit - The collaborative browser based IDE Make Your First Python Game: Rock, Paper, Scissors! – Real Python Figma: the collaborative interface design tool. React – A JavaScript library for building user interfaces Coding with Minecraft - Al Sweigart The Recursive Book of Recursion - Al Sweigart Codewars - Achieve mastery through coding practice and developer mentorship Advent of Code 2021 Object-Oriented Programming (OOP) in Python 3 – Real Python Python Arcade Craig’n’Dave “Unscripted” - Mission Encodeable - YouTube Hello World issue 19 — Hello World LearningDust: LearningDust 3.15 - Anna & Harry Wake Teaching Python Episode 93: Mission Encodeable Mission Encodeable (@missionencode) / TwitterLevel up your Python skills with our expert-led courses:
Grow Your Python Portfolio With 13 Intermediate Project Ideas Get Started With Django: Build a Portfolio App Rock, Paper, Scissors With Python: A Command Line GameSupport the podcast & join our community of Pythonistas
Fri, 05 Aug 2022 - 120 - Natural Language Processing and How ML Models Understand Text
How do you process and classify text documents in Python? What are the fundamental techniques and building blocks for Natural Language Processing (NLP)? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, talks about how machine learning (ML) models understand text.
Jodie explains how ML models require data in a structured format, which involves transforming text documents into columns and rows. She covers the most straightforward approach, called binary vectorization. We discuss the bag-of-words method and the tools of stemming, lemmatization, and count vectorization.
We jump into word embedding models next. Jodie talks about WordNet, Natural Language Toolkit (NLTK), word2vec, and Gensim. Our conversation lays a foundation for starting with text classification, implementing sentiment analysis, and building projects using these tools. Jodie also shares multiple resources to help you continue exploring NLP and modeling.
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:47 – Exploring the topic 00:06:00 – Perceived sentience of LaMDA 00:10:24 – How do we get started? 00:11:16 – What are classification and sentiment analysis? 00:13:03 – Transforming text in rows and columns 00:14:47 – Sponsor: Snyk 00:15:27 – Bag-of-words approach 00:19:12 – Stemming and lemmatization 00:22:05 – Capturing N-grams 00:25:34 – Count vectorization 00:27:14 – Stop words 00:28:46 – Text Frequency / Inverse Document Frequency (TFIDF) vectorization 00:32:28 – Potential projects for bag-of-words techniques 00:34:07 – Video Course Spotlight 00:35:20 – WordNet and NLTK package 00:37:27 – Word embeddings and word2vec 00:45:30 – Previous training and too many dimensions 00:50:07 – How to use word2vec and Gensim? 00:51:26 – What types of projects for word2vec and Gensim? 00:54:41 – Getting into GPT and BERT in another episode 00:56:11 – How to follow Jodie’s work? 00:57:36 – Thanks and goodbyeShow Links:
Why Google’s “sentient” AI LaMDA is nothing like a person. On NYT Magazine on AI: Resist the Urge to be Impressed | Emily M. Bender | Medium ELIZA - Wikipedia eliza.py - Python 2 version by Daniel Connelly dabraude/Pyliza: Python3 Implementation of Eliza magneticpoetry.com Natural Language Processing With Python’s NLTK Package – Real Python Practical Text Classification With Python and Keras – Real Python Sentiment Analysis: First Steps With Python’s NLTK Library – Real Python NLTK: Natural Language Toolkit spaCy · Industrial-strength Natural Language Processing in Python Natural Language Processing With spaCy in Python - Real Python Stemming - Wikipedia Lemmatization - Wikipedia Binary/Count Vectorization: sklearn.feature_extraction.text.CountVectorizer— scikit-learn TFIDF: sklearn.feature_extraction.text.TfidfVectorizer — scikit-learn Porter Stemmer: nltk.stem.porter module — NLTK Snowball Stemmer: nltk.stem.snowball module — NLTK WordNet Lemmatizer: nltk.stem.wordnet module — NLTK Lemmatizer · spaCy API Documentation Applying Bag of Words and Word2Vec models on Reuters-21578 Dataset Elvin Ouyang’s Blog UCI Machine Learning Repository: Reuters-21578 Text Categorization Collection Data Set The Illustrated Word2vec – Jay Alammar A Complete Guide to Using WordNET in NLP Applications Gensim: Topic modeling for humans Core Tutorials — gensim Find Open Datasets and Machine Learning Projects | Kaggle Engineering All Hands: Vectorise all the things! - YouTube PyCon Portugal 2022 NDC Oslo 2022 | Conference for Software Developers Jodie Burchell’s Blog - Standard error Jodie Burchell 🇦🇺🇩🇪 (@t_redactyl) / Twitter JetBrains: Essential tools for software developers and teamsLevel up your Python skills with our expert-led courses:
Data Cleaning With pandas and NumPy Reading and Writing Files With pandas Learn Text Classification With Python and KerasSupport the podcast & join our community of Pythonistas
Fri, 29 Jul 2022 - 119 - Creating Documentation With MkDocs & When to Use a Python dict
How do you start building your project documentation? What if you had a tool that could do the heavy lifting and automatically write large portions directly from your code? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We talk about a Real Python step-by-step project from Martin Breuss about MkDocs. The project walks you through generating nice-looking and modern documentation from Markdown files and your existing code’s docstrings. The final step is to deploy your freshly generated documentation to a GitHub repository.
Christopher talks about a pair of articles arguing for and against using Python dictionaries. The first article, “Just Use Dictionaries,” pushes to keep things simple, while the second article, “Don’t Let Dicts Spoil Your Code,” contends that complex projects require something more specific.
We cover several other articles and projects from the Python community, including discussing the recent beta release of Python 3.11, 2FA for PyPI, procedural music composition with arvo, building a tic-tac-toe game with Python and Tkinter, common issues encountered while coding in Python, a type-safe library to generate SVG files, and a lightweight static analysis tool for your projects.
Course Spotlight: Dictionaries and Arrays: Selecting the Ideal Data Structure
In this course, you’ll learn about two of Python’s data structures: dictionaries and arrays. You’ll look at multiple types and classes for both of these and learn which implementations are best for your specific use cases.
Topics:
00:00:00 – Introduction 00:02:39 – Python 3.11 Release May Be Delayed 00:03:39 – The cursed release of Python 3.11.0b4 is now available 00:05:01 – PyPI 2FA Security Key Giveaway 00:08:01 – Build Your Python Project Documentation With MkDocs 00:14:12 – Don’t Let Dicts Spoil Your Code 00:16:22 – Just Use Dictionaries 00:20:12 – Sponsor: Snyk.io 00:20:51 – Procedural Music Composition With arvo 00:29:10 – Build a Tic-Tac-Toe Game With Python and Tkinter 00:33:59 – Video Course Spotlight 00:35:35 – Most Common Issue You Have Coding With Python? 00:45:00 – svg.py: Type-Safe Library to Generate SVG Files 00:48:27 – semgrep: Lightweight Static Analysis for Many Languages 00:53:46 – Thanks and goodbyeNews:
Python 3.11 Release May Be Delayed The cursed release of Python 3.11.0b4 is now available - Python.org. “We’ve begun rolling out a 2FA requirement”: PyPI on Twitter PyPI 2FA Security Key GiveawayTopic Links:
Build Your Python Project Documentation With MkDocs – In this tutorial, 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. Don’t Let Dicts Spoil Your Code – Thedict
is the go-to data structure for Python programmers, but its loose relationship to the data can be problematic in large data streams. Learn more about why and when you might choose a different data structure. Just Use Dictionaries – Using simple data structures is an important part of keeping it simple, and Python is all about simplicity. Less code means fewer problems. Just use dictionaries. You probably don’t need classes. Procedural Music Composition With arvo – By using themusic21
andavro
libraries, you can create musical scores programmatically. This article runs you through which libraries you need and how you can compose your own music. Build a Tic-Tac-Toe Game With Python and Tkinter – In this step-by-step project, you’ll learn how to create a tic-tac-toe game using Python and the Tkinter GUI framework. Tkinter is cross-platform and is available in the Python standard library. Creating a game in Python is a great and fun way to learn something new and exciting!Discussion:
Most Common Issue You Have Coding With Python?Projects:
svg.py: Type-Safe Library to Generate SVG Files semgrep: Lightweight Static Analysis for Many LanguagesAdditional Links:
Getting 2FA Right in 2019 | Trail of Bits Blog autoDocstring - Python Docstring Generator - Visual Studio Marketplace styleguide | Style guides for Google-originated open-source projects Writing docstrings — Sphinx-RTD-Tutorial documentation Django Ninja arvo: Python library for procedural music composition Getting Started with arvo: a Procedural Music Composition Library - YouTube music21: a Toolkit for Computer-Aided Musicology music21: GitHub Free music composition and notation software | MuseScore Code Generation | MusicXML 4.0 Python GUI Programming With Tkinter – Real Python Tcl Developer Site tkinter — Python interface to Tcl/Tk — Python 3.10.5 documentation svg-xsd-schema: XSD schema for SVG SVG: Scalable Vector Graphics | MDNLevel up your Python skills with our expert-led courses:
Records and Sets: Selecting the Ideal Data Structure Documenting Python Code: A Complete Guide Dictionaries and Arrays: Selecting the Ideal Data StructureSupport the podcast & join our community of Pythonistas
Fri, 22 Jul 2022 - 118 - Measuring Python Code Quality, Simplicity, and Maintainability
How maintainable is your Python code? Is it possible to hold the code for your functions in your head? When is it appropriate to use measurements in a code review? This week on the show, Reka Horvath and Ben Martineau from Sourcery are here to discuss their recent PyCon talk, “Actionable insights vs ranking: How to use and how NOT to use code quality metrics.”
Reka and Ben share their thoughts on how metrics can provide insights into your Python code. We discuss four measurements of code complexity and what factors into each.
We also talk about deciding whether to refactor or rewrite code. Ben and Reka share their experience in code review situations and the importance of shifting the conversation from subjective opinions toward objective measurements.
Course Spotlight: Writing Idiomatic Python
What are the programming idioms unique to Python? This course is a short overview for people coming from other languages and an introduction for beginners to the idiomatic practices within Python. You’ll cover truth values, looping, DRY principles, and the Zen of Python.
Topics:
00:00:00 – Introduction 00:01:54 – Reka’s tutorials on Real Python 00:02:45 – PyCon US 2022 Talk 00:06:01 – Code reviews and metrics 00:09:42 – Trying to make things more objective 00:13:24 – Sponsor: CData Software 00:14:07 – Measuring WTFs/min and magical code 00:16:39 – Pythonic, idiomatic, and clean code 00:21:17 – Sourcery.ai and refactoring 00:24:04 – Four metrics to measure 00:24:56 – Function length 00:30:05 – Cyclomatic complexity 00:36:49 – Video Course Spotlight 00:38:21 – Cognitive complexity 00:44:38 – Working memory 00:51:49 – Suggestions on how to use the metrics 00:58:34 – Generating measurements 01:01:36 – What are you excited about in the world of Python? 01:03:30 – What do you want to learn next? 01:05:31 – Thanks and goodbyeShow Links:
Sourcery | Automatically Improve Python Code Quality Can you fit all of this code in your head? Talk - Reka/Ben: Actionable insights vs ranking How to use and how NOT to use code quality metrics - YouTube Using Pandas and Python to Explore Your Dataset – Real Python Refactoring - Martin Fowler WTFs/m – OSnews Who’s Your Coding Buddy? Principle of least astonishment - Wikipedia Anthony Shaw - Wily Python: Writing simpler and more maintainable Python - PyCon 2019 - YouTube Refactoring Python Applications for Simplicity – Real Python Cyclomatic complexity - Wikipedia Cognitive Complexity: A new way of measuring understandability - SonarSource The Magical Number Seven, Plus or Minus Two - Wikipedia wily · PyPI sourcery-analytics: A command line tool and library for statically analyzing Python code quality. Clean Code: A Handbook of Agile Software Craftsmanship - Robert C. Martin Errors and Exceptions — Python 3.10.5 documentation Rust Programming Language Ben Martineau – Medium Sourcery | Blog The Prodigy - ‘Breathe’ - YouTubeLevel up your Python skills with our expert-led courses:
Python vs JavaScript for Python Developers Testing Your Code With pytest Writing Idiomatic PythonSupport the podcast & join our community of Pythonistas
Fri, 15 Jul 2022 - 117 - Exploring Functional Programming in Python With Bruce Eckel
Would you like to explore the functional programming side of Python? What are the advantages of this approach, and what tools are built into the language? This week on the show, author Bruce Eckel talks about functional programming in Python.
Bruce is the author of several programming books, including Thinking in Java, Thinking in C++, Thinking in Python, Atomic Scala, and most recently, Atomic Kotlin. He’s been an explorer of programming languages over his career. Functional programming—with its lack of side effects, its transparency, and its potential for parallelization—has recently caught Bruce’s attention.
Bruce’s talk “Making Data Classes Work for You” at PyCon US 2022 explored the idea of the invariance of objects.
We also discuss his next book project, the Python community, and his affection for “un-conferences”. Bruce is hosting the upcoming Summer Tech Forum in Crested Butte, Colorado, this August.
Course Spotlight: Using Data Classes in Python
Data classes were introduced in Python 3.7. When using data classes, you don’t have to write boilerplate code to get proper initialization, representation, and comparisons for your objects.
Topics:
00:00:00 – Introduction 00:02:15 – Musicians as programmers 00:03:40 – Happy Path Programming Podcast 00:04:19 – The essence of functional programming 00:10:55 – Making Data Classes Work for You - PyCon US 2022 talk 00:15:14 – What are things that have drawn you to Python? 00:17:39 – More than just a scripting language 00:21:35 – Consulting with companies 00:23:40 – Video Course Spotlight 00:25:04 – The frozen flag in a data class and__post_init__
00:29:02 – Invariance and funtional programming 00:31:02 – How do you see it changing your programming? 00:34:49 – Not forcing an “approach” to Python 00:38:46 – Writing style in programming and books 00:42:31 – Who has been the intended audience for your books? 00:45:26 – Educational debt 00:46:50 – Python’s community 00:51:03 – New book about concurrency 01:00:51 – Winter and Summer Tech Forums 01:07:23 – Conference precautions and safety 01:08:51 – What are you excited about in the world of Python? 01:11:40 – What do you want to learn next? 01:12:23 – How can people follow the things you do? 01:13:13 – Thanks and goodbyeShow Links:
Computing Thoughts - Bruce Eckel’s Programming Blog MindView Exceptional Learning Experiences Happy Path Programming • A podcast on Anchor Bruce Eckel: Making Data Classes Work for You - PyCon US 2022 - YouTube Data Classes in Python 3.7+ (Guide) – Real Python Functional Programming in Python: When and How to Use It – Real Python Function composition (computer science) - Wikipedia Monad (functional programming) - Wikipedia Smalltalk - Wikipedia C++ - Wikipedia Java (programming language) - Wikipedia Object-oriented programming - Wikipedia Learning Resources for the Kotlin Programming Language Episode #88: Discussing Type Hints, Protocols, and Ducks in Python – The Real Python Podcast Fluent Python, 2nd Edition Summer Tech Forum Unconference: Self-Organizing Open Spaces in Crested Butte, Colorado August 15-19, 2022 Bruce Eckel (@BruceEckel) / TwitterLevel up your Python skills with our expert-led courses:
Python Decorators 101 Using Data Classes in Python How to Use Python Lambda FunctionsSupport the podcast & join our community of Pythonistas
Fri, 01 Jul 2022 - 116 - Digging Into PyScript & Preventing or Handling Python Errors
Have you heard about PyScript? The brand-new framework has the community excited about building interactive Python applications that run entirely within the user’s browser. Would you like to dig into the details beyond the “Hello World” examples? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We talk about a Real Python tutorial from Bartosz Zaczyński about PyScript. The article provides an initial look at the framework and then takes you deep into the intricacies. We also share additional resources to help familiarize you with the project.
Christopher talks about another Real Python article, this one on how to approach managing errors in Python. The tutorial “LBYL vs EAFP: Preventing or Handling Errors in Python” is from frequent contributor Leodanis Pozo Ramos.
We cover several other articles and projects from the Python community, including discussing the PSF’s Python Developers Survey 2021 Results, Django static files and templates, how to profile Python code, a launcher for penetration testing, and a project for confirming Python versions through syntax errors.
Course Spotlight: Building a Django User Management System
In this video course, you’ll learn how to extend your Django application with a user management system, complete with email sending and third-party authentication.
Topics:
00:00:00 – Introduction 00:02:32 – LBYL vs EAFP: Preventing or Handling Errors in Python 00:08:38 – How To Profile Python Code 00:18:52 – Sponsor: CData Software 00:19:35 – Django Static Files and Templates 00:26:35 – A First Look at PyScript: Python in the Web Browser 00:38:20 – Video Course Spotlight 00:39:39 – Python Developers Survey 2021 Results 00:48:19 – python-syntax-errors: Version-Specific No-Ops 00:50:03 – arsenal: Inventory Launcher for Penetration Testing 00:55:03 – Thanks and goodbyeTopics Links:
LBYL vs EAFP: Preventing or Handling Errors in Python – In this tutorial, you’ll learn about two popular coding styles in Python: look before you leap (LBYL) and easier to ask forgiveness than permission (EAFP). You can use these styles to deal with errors and exceptional situations in your code. You’ll dive into the LBYL vs EAFP discussion in Python. How To Profile Python Code – No matter how good you are, sometimes your code just runs slowly. Learning how to properly profile your software to identify and fix bottlenecks is a useful skill. This article talks about what you need to know to measure your code’s performance and how to use the cProfile,profile
, andtimeit
libraries, along with others. Django Static Files and Templates – “Static files like CSS, JavaScript, and fonts are a core piece of any modern web application. They are also typically confusing for Django newcomers since Django provides tremendous flexibility around how these files are used. This tutorial will demonstrate current best practices for configuring static files in both local development and production.” A First Look at PyScript: Python in the Web Browser – In this tutorial, you’ll learn about PyScript, a new framework that allows for running Python in the web browser with few or no code modifications and excellent performance. You’ll leverage browser APIs and JavaScript libraries to build rich, highly interactive web applications with Python.Discussion:
Python Developers Survey 2021 Results | PSF Python Developers Survey 2021 Results | JetBrains Raw Data SurveyExport.csv | Google DriveProjects:
python-syntax-errors: Version-Specific No-Ops arsenal: Inventory Launcher for Penetration Testing navi: An interactive cheatsheet tool for the command-line eg: Useful examples at the command line.Additional Links:
“Zero cost” exception handling · Issue #84403 Python 3.11 Preview: Task and Exception Groups | Real Python PyCon US 2022 Keynote - Peter Wang - PyScript | YouTube PyScript | Run Python in your HTML pyscript: Getting started pyscript: Pyscript examples Python Timer Functions: Three Ways to Monitor Your Code | Real Python Amdahl’s law | Wikipedia Django Books | William Vincent Django Chat Episode #114: Getting Started in Python Cybersecurity and Forensics | The Real Python PodcastLevel up your Python skills with our expert-led courses:
Building a Django User Management System How to Set Up a Django Project Raising and Handling Python ExceptionsSupport the podcast & join our community of Pythonistas
Fri, 24 Jun 2022 - 115 - Getting Started in Python Cybersecurity and Forensics
Are you interested in a career in security using Python? Would you like to stay ahead of potential vulnerabilities in your Python applications? This week on the show, James Pleger talks about Python information security, incident response, and forensics.
James has been doing information security for over fifteen years, working at some of the biggest companies, government agencies, and startups. He shares numerous Python resources to dive into detecting threats and improving your projects.
We discuss how to learn about security topics and get involved in the community. Make sure you check out the massive collection of links in the show notes this week.
Course Spotlight: Exploring HTTPS and Cryptography in Python
In this course, you’ll gain a working knowledge of the various factors that combine to keep communications over the Internet safe. You’ll see concrete examples of how to keep information secure and use cryptography to build your own Python HTTPS application.
Topics:
00:00:00 – Introduction 00:01:28 – How did you find the show? 00:02:00 – Evolution of roles in security 00:04:09 – Why is Python leveraged in security? 00:07:51 – Red team vs blue team 00:10:16 – Application security and bug bounties 00:13:31 – What’s your background? 00:14:07 – Company focus between regulations vs engineering 00:18:09 – Ways to get involved and keep learning 00:21:56 – Different perspective from computer science 00:23:35 – Red vs blue reprise 00:25:07 – Shifting landscape of vulnerabilities 00:30:06 – How do you approach tests? 00:32:30 – Incident response 00:35:54 – Video Course Spotlight 00:37:19 – Where does Python come in during an incident? 00:43:08 – Crossing into forensic research 00:48:43 – Where to practice security research and learn more? 00:51:41 – What’s the security community like? 00:56:05 – What are you excited about in the world of Python? 00:57:53 – What do you want to learn next? 01:00:17 – Where can people learn more about what you do? 01:00:39 – Thanks and goodbyeSecurity Specific Tools Written in Python:
binwalk: Firmware Analysis Tool | ReFirmLabs binaryalert: BinaryAlert: Serverless, Real-time & Retroactive Malware Detection | airbnb Cuckoo Sandbox - Automated Malware Analysis YARA - The pattern matching Swiss knife for malware researchers Scapy: Python-based interactive packet manipulation program & library radare2-bindings: Bindings of the r2 api for Valabind and friends python-iocextract: Defanged Indicator of Compromise (IOC) Extractor | InQuest yeti: Your Everyday Threat Intelligence capa: The FLARE team’s open-source tool to identify capabilities in executable files PDF Tools | Didier StevensIncident Response and Memory Forensics:
volatility: An advanced memory forensics framework | Volatility Foundation FIR: Fast Incident Response | CERT Societe Generale (Computer Emergency Response Team) GRR Rapid Response: Remote live forensics for incident response | GoogleHoneypot Resources:
What is a Honeypot? How It Can Trap Cyberattackers | CrowdStrike awesome-honeypots: An awesome list of honeypot resourcesBug Bounty Programs:
Bug Bounty Program List - All Active Programs in 2022 | Bugcrowd Bug Bounty Program - Complete List | HackerOne TOP Bug Bounty Programs & Websites (Jun 2022 Updated List)Security and Hacking Conferences:
Black Hat USA 2022 DEF CON® Hacking Conference Home Chaos Communication Congress - Wikipedia CactusConAdditional Links:
Blue team (computer security) - Wikipedia Open Source Projects for Software Security | OWASP Foundation HackerOne | #1 Trusted Security Platform and Hacker Program Bugcrowd | Platform Overview pyinstaller · PyPI Wireshark · Go Deep. Python security best practices cheat sheet | Snyk PyCharm Python Security Scanner · Actions · GitHub Marketplace Security scanners for Python and Docker: from code to dependencies Bandit — Designed to find common security issues in Python code black · PyPI Build a Site Connectivity Checker in Python – Real Python Kali Linux | Penetration Testing and Ethical Hacking Linux DistributionLevel up your Python skills with our expert-led courses:
Exploring HTTPS and Cryptography in Python Django View Authorization: Restricting Access Testing Your Code With pytestSupport the podcast & join our community of Pythonistas
Fri, 17 Jun 2022 - 114 - Build Streamlit Data Science Dashboards & Verbose Regex f-Strings
Would you like a fast way to share your data science project results as an interactive dashboard instead of a Jupyter notebook? Streamlit is a library for creating simple web apps and dashboards using just Python. This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We talk about the article “Forget About Jupyter Notebooks - Showcase Your Research Using Dashboards.” It covers the basics of turning a data science script into an interactive dashboard using Streamlit. We also share some additional resources to get you started with the library.
Christopher discusses an article covering ways to make life easier when working with Python regular expressions. He talks about composing verbose regexes using f-strings and potentially reusing these patterns.
We cover several other articles and projects from the Python community, including a news roundup, a step-by-step project to build a URL shortener with FastAPI, the fact that Python’s functions are sometimes classes, an automatic water pistol pigeon deterrent project, a discussion about music playlists for coding, a project for Python metadata extraction without execution, and a powerful audio-to-MIDI converter library.
Course Spotlight: Using Python Class Constructors
In this video course, you’ll learn how class constructors work in Python. You’ll also explore Python’s instantiation process, which has two main steps: instance creation and instance initialization.
Topics:
00:00:00 – Introduction 00:02:22 – ctx Library Hijacked to Steal AWS Keys 00:04:33 – Typosquatting Attack on ‘requests’ 00:06:55 – Build a URL Shortener With FastAPI and Python 00:10:51 – Sponsor: Rookout 00:11:31 – Python’s Functions Are Sometimes Classes 00:14:05 – Forget Jupyter, Showcase Your Data with Dashboards 00:22:08 – The Unreasonable Effectiveness of f-strings and re.VERBOSE 00:25:43 – Robotic Water Pistol as Pigeon Deterrent 00:28:13 – Video Course Spotlight 00:29:34 – Do You Have a Favorite Playlist for Coding? 00:40:05 – dowsing: Metadata Extraction Without Execution 00:42:01 – spotify/basic-pitch: A lightweight yet powerful audio-to-MIDI converter 00:49:12 – Thanks and goodbyeNews:
ctx Library Hijacked to Steal AWS Keys Typosquatting Attack on ‘requests’ - One of the Most Popular Python packagesTopic Links:
Build a URL Shortener With FastAPI and Python – In this step-by-step project, 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. Python’s Functions Are Sometimes Classes – Ever uselist()
orenumerate()
? Think of them as functions? They’re not—they’re classes. Sometimes we call classes functions in Python. Why? And what’s a “callable”? Forget Jupyter, Showcase Your Data with Dashboards – Streamlit can be used as an alternative to Jupyter notebooks for sharing research data. Streamlit is a relatively new library for creating simple web apps and dashboards using just Python. Learn why it might be the right choice for your next data project. The Unreasonable Effectiveness of f-strings and re.VERBOSE – A look at one or two ways to make life easier when working with Python regular expressions. Robotic Water Pistol as Pigeon Deterrent – Max built a wifi-equipped water gun to shoot the pigeons on his balcony. It is controlled over the Internet by a Python script runningopenCV
reading the camera image from an old iPhone. See all the details.Discussion:
Do You Have a Favorite Playlist for Coding?Projects:
dowsing: Metadata Extraction Without Execution spotify/basic-pitch: A lightweight yet powerful audio-to-MIDI converter with pitch bend detectionAdditional Links:
The Twelve-Factor App Streamlit vs Dash vs Voilà vs Panel — Battle of The Python Dashboarding Giants Getting machine learning to production | Vicki Boykis Detecting deforestation from satellite images | André Ferreira Create an app - Streamlit Docs spotify/pedalboard: 🎛 🔊 A Python library for manipulating audio. Episode #96: Manipulating and Analyzing Audio in Python – The Real Python Podcast Episode #15: Python Regular Expressions, Views vs Copies in Pandas, and More – The Real Python Podcast Episode #64: Detecting Deforestation With Python & Using GraphQL With Django and Vue – The Real Python PodcastLevel up your Python skills with our expert-led courses:
Data Visualization Interfaces in Python With Dash Regular Expressions and Building Regexes in Python Using Python Class ConstructorsSupport the podcast & join our community of Pythonistas
Fri, 10 Jun 2022 - 113 - Managing Large Python Data Science Projects With Dask
What do you do when your data science project doesn’t fit within your computer’s memory? One solution is to distribute it across multiple worker machines. This week on the show, Guido Imperiale from Coiled talks about Dask and managing large data science projects through distributed computing.
We talk about projects where an orchestration system like Dask will help. Dask is designed to take advantage of parallel computing, spreading the work and data across multiple machines. Many familiar techniques for working with pandas and NumPy data are supported with Dask equivalents.
We also discuss the differences between managed and unmanaged memory. Guido shares advice on how to tackle memory issues while working with Dask.
This week we also talk briefly with Jodie Burchell, who will be a guest host on upcoming episodes. As a data scientist, Jodie will be bringing new topics, projects, and discussions to the show.
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:01:56 – Guido at PyCon DE 2022 00:02:14 – Working on Dask for Coiled 00:03:27 – Dask project history 00:04:00 – How would someone start to use Dask? 00:10:28 – Managing distributed data 00:11:18 – Data files CSV vs Parquet 00:15:02 – Managed vs unmanaged memory 00:22:42 – Video Course Spotlight 00:24:01 – Dask active memory manager 00:28:36 – Learning best practices and Dask tutorials 00:33:06 – Where is Dask being used? 00:35:45 – What are you excited about in the world of Python? 00:37:55 – What do you want to learn next? 00:40:31 – Thanks, Guido 00:40:40 – Introduction to Jodie Burchell 00:45:28 – GoodbyeShow Links:
Coiled | Python for Data Science on the Cloud with Dask Guido Imperiale: Introducing the Dask Active Memory Manager - PyCon DE 2022 - YouTube Active Memory Management on Dask.Distributed - Guido Imperiale | Dask Summit 2021 - YouTube Tackling unmanaged memory with Dask | Coiled The Beginner’s Guide to Distributed Computing | Richard Pelgrim Common Mistakes to Avoid when Using Dask | Coiled File Format | Apache Parquet Dask: Scalable analytics in Python PEP 554 – Multiple Interpreters in the Stdlib | peps.python.org CUDA Python | NVIDIA Developer Rust Programming Language Product : Coiled Coiled (@CoiledHQ) / Twitter Jodie Burchell (@t_redactyl) | Twitter Learn Python through Nursery Rhymes and Fairy Tales: Shari Eskenas - AmazonLevel up your Python skills with our expert-led courses:
Data Cleaning With pandas and NumPy Navigating Namespaces and Scope in Python Exploring Scopes and Closures in PythonSupport the podcast & join our community of Pythonistas
Fri, 03 Jun 2022 - 112 - Questions for New Dependencies & Comparing Python Game Libraries
What are the differences between the various Python game frameworks? Would it help to see a couple of game examples across several libraries to understand the distinctions? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss a Real Python article by previous guest Jon Fincher titled “Top Python Game Engines”. Jon compares five different game frameworks and provides example projects and thorough commentary for each.
We talk about a blog post by recent guest Adam Johnson about determining if a project is well maintained. He suggests twelve questions to decide whether to add a new dependency to your project.
We cover several other articles and projects from the Python community, including a news roundup, Python decorator patterns, finding the smallest and largest values with
min()
andmax()
, a discussion about the most-used Python packages, the pony object-relational mapper, and a project to read PEPs in your console.Course Spotlight: Using Pygame to Build an Asteroids Game in Python
In this course, you’ll build a clone of the Asteroids game in Python using Pygame. Step by step, you’ll add images, input handling, game logic, sounds, and text to your program.
Topics:
00:00:00 – Introduction 00:02:04 – News: Python Release Python 3.11.0b1 00:02:56 – Faster CPython project 00:04:16 – nogil conversation at the 2022 summit 00:06:08 – PEP 690: Lazy Imports 00:08:14 – DjangoCon US & Europe 2022 Call for Proposals 00:09:25 – Top Python Game Engines 00:20:38 – Sponsor: CData Software 00:21:20 – Python Decorator Patterns 00:24:00 – The Well-Maintained Test: 12 Questions for New Dependencies 00:29:27 – Python’s min() and max(): Find Smallest and Largest Values 00:33:33 – Video Course Spotlight 00:34:44 – Which Python Packages Do You Use the Most? 00:41:42 – pony: Pony Object Relational Mapper 00:47:41 – pepdocs: Read PEPs in Your Console 00:50:20 – Thanks and goodbyeNews:
Python Release Python 3.11.0b1 Faster CPython faster-cpython/cpython: The Python programming language nogil conversation at the 2022 summit PEP 690: Lazy Imports DjangoCon Europe 2022 Call for Proposals DjangoCon US 2022 Call for ProposalsTopic Links:
Top Python Game Engines – In this tutorial, you’ll explore several Python game engines available to you. For each, you’ll code simple examples and a more advanced game to learn the game engine’s strengths and weaknesses. Python Decorator Patterns – Decorators are a way of wrapping functions around functions, they’re a common technique for providing pre- and post-conditions on your code. Learn about the different ways decorators get invoked and how to write each pattern. The Well-Maintained Test: 12 Questions for New Dependencies – There is lots of openly available code out there, but how do you know if you should build a dependency on some random coder’s package? 12 Questions you should ask yourself before using a library. Python’s min() and max(): Find Smallest and Largest Values – In this tutorial, you’ll learn how to use Python’s built-in min() and max() functions to find the smallest and largest values. You’ll also learn how to modify their standard behavior by providing a suitable key function. Finally, you’ll code a few practical examples of usingmin()
andmax()
.Discussion:
Which Python Packages Do You Use the Most?Projects:
pony: Pony Object Relational Mapper pepdocs: Read PEPs in Your ConsoleAdditional Links:
Eric Snow on Twitter:”We need your help making CPython faster. Publish benchmarks for your app or library.” Episode #59: Organizing and Restructuring DjangoCon Europe 2021 – The Real Python Podcast PyGame: A Primer on Game Programming in Python – Real Python Make a 2D Side-Scroller Game With PyGame – Real Python Primer on Python Decorators – Real Python The Joel Test: 12 Steps to Better Code – Joel on Software Episode #97: Improving Your Django and Python Developer Experience – The Real Python Podcast pyflakes · PyPI coverage · PyPI pudb · PyPI Django | The web framework for perfectionists with deadlines django-awl · PyPI waelstow · PyPI six · PyPI Pygments — Welcome! chardet · PyPI certifi · PyPI pandas - Python Data Analysis Library Project Jupyter | Home BokehLevel up your Python skills with our expert-led courses:
Using Pygame to Build an Asteroids Game in Python Python's map() Function: Transforming Iterables Python Decorators 101Support the podcast & join our community of Pythonistas
Fri, 27 May 2022 - 111 - Advantages of Protobuf for Serialization in Python
Would you like a way to send structured serialized data between different platforms and languages? What if the data was self-documenting, could automatically generate Python code, and would validate itself? This week on the show, Liran Haimovitch talks about protocol buffers and communicating with microservices through Remote Procedure Calls (RPC).
Protocol buffers, aka protobuf, are a language-neutral, platform-neutral system for serializing structured data. Liran talks about how they go beyond text-based protocols like JSON, providing the benefits above, along with faster transmissions and a smaller footprint.
Liran shares how his company uses protobuf to communicate between their tools. We also discuss using gRPC to communicate between microservices and scaling infrastructure in either direction.
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:01:59 – PyCon US 2022 Talk on protobuf 00:04:46 – PyCon 2019 Talk on Understanding Python’s Debugging Internals 00:05:34 – The Production-First Mindset Podcast 00:07:03 – Protobuf and serialization 00:11:17 – Static vs dynamic serializers 00:13:58 – Text vs binary serializers and metadata 00:21:08 – How long have you been using protobuf? 00:21:40 – What does it look like to set up? 00:24:45 – Video Course Spotlight 00:26:11 – Performance challenges and trade-offs 00:34:29 – Remote procedure calls 00:41:13 – Using RPC for microservices 00:47:21 – Scaling your infrastructure up or down 00:50:35 – Working across different languages 00:54:02 – What is Rookout? 00:55:11 – What are you excited about in the world of Python? 00:55:59 – What do you want to learn next? 00:56:57 – How can people learn more about what you do? 00:57:31 – Thanks and goodbyeShow Links:
Rookout | Painless Cloud-Native Debugging Liran Haimovitch - Understanding Python’s Debugging Internals - PyCon 2019 - YouTube The Production-First Mindset Podcast Liran Haimovitch: Effective Protobuf: Everything You Wanted To Know, But Never Dared To Ask - PyCon 2022 - YouTube Protocol Buffers | Google Developers Frequently Asked Questions - Protocol Buffers | Google Developers Thrift protocol stack — Thrift Tutorial 1.0 documentation Python Microservices With gRPC – Real Python gRPC - Modern Open Source High Performance Remote Procedure Call Framework gRPC vs REST: Understanding gRPC, OpenAPI and REST and when to use them in API design | Google Cloud Blog Welcome to PyCon US 2022 Rust Programming LanguageLevel up your Python skills with our expert-led courses:
Working With JSON Data in Python Testing Your Code With pytest Deploy Your Python Script on the Web With FlaskSupport the podcast & join our community of Pythonistas
Fri, 20 May 2022 - 110 - Start Testing Your Python with doctest & Pagination in Django
Did you know you can add testing to your Python code while simultaneously documenting it? Using docstrings, you can create examples of how your functions should interact in a Python REPL and test them with the built-in doctest module. This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher shares an article by previous guest Mike Driscoll about testing with doctest. This is a great way to get started with testing your own code, and it offers the added benefit of documenting functionality.
We talk about the recent Real Python article “Pagination for a User-Friendly Django App.” Spreading your content across multiple pages can significantly improve the user experience of your web application. This article takes you through configuring Django’s built-in pagination tool and how to combine it with other web tools.
We discuss a recent article about Python type hints and the author’s disappointment. We also include reactions from a couple of online communities.
We cover several other articles and projects from the Python community, including why it’s important to close files in Python, how dunder methods are awesome, a bidirectional Python dictionary, prettier git diffs, and a command-line game to learn git.
Spotlight: Python Coding Interviews: Tips & Best Practices
In this step-by-step course, you’ll learn how to take your Python coding interview skills to the next level and use Python’s built-in functions and modules to solve problems faster and more easily.
Topics:
00:00:00 – Introduction 00:02:15 – PyCon US 2022 Follow-up 00:07:57 – Why Is It Important to Close Files in Python? 00:15:17 – Dunder Methods in Python: The Ugliest Awesome Sauce 00:24:26 – Sponsor: Mailtrap 00:25:08 – Python Testing With doctest 00:28:20 – Python Bidirectional Dictionary 00:30:27 – Pagination for a User-Friendly Django App 00:36:07 – Video Course Spotlight 00:37:27 – Python’s “Type Hints” are a bit of a disappointment to me 00:52:25 – dunk: Prettier Git Diffs 00:53:43 – git-gud: Command-Line Game to Learn git 00:55:40 – Thanks and goodbyeTopic Links:
Why Is It Important to Close Files in Python? – Model citizens use context managers to open and close file resources in Python, but have you ever wondered why it’s important to close files? In this tutorial, you’ll take a deep dive into the reasons why it’s important to close files and what can happen if you dont. Dunder Methods in Python: The Ugliest Awesome Sauce – Double-underscore methods, also known as “dunder methods” or “magic methods” are an ugly way of bringing beauty to your code. Learn about constructors,__repr__
,__str__
, operator overloading, and getting your classes working with Python functions likelen()
. Python Testing With doctest – Python’sdoctest
module allows you to write unit tests through REPL-like sessions in your docstrings. Learn how to write and executedoctest
code. Also available in video. Python Bidirectional Dictionary – Learn about the Bidict library, a bidirectional dictionary where your keys and your values can both be used to look up an item. This can be a useful tool when dealing with mapped data, like country code to country name, where you want to look up either side of the relationship. Pagination for a User-Friendly Django App – In this tutorial, you’ll learn how to serve paginated content in your Django apps. Using Django pagination can significantly improve your website’s performance and give your visitors a better user experience.Discussion:
Python’s “Type Hints” are a bit of a disappointment to me | Original Article Python’s “Type Hints” | Lobsters Thread Python’s “Type Hints” | Hacker News ThreadProjects:
dunk: Prettier Git Diffs git-gud: Command-Line Game to Learn gitAdditional Links:
Episode #47: Unraveling Python’s Syntax to Its Core With Brett Cannon – The Real Python Podcast Python Coding Interviews: Tips & Best Practices – Real Python Episode #88: Discussing Type Hints, Protocols, and Ducks in Python – The Real Python Podcast Up and Running with Git Online Course - Talk Python Training Python’s doctest: Document and Test Your Code at Once - Real Python tutorialLevel up your Python skills with our expert-led courses:
Python Type Checking Python Coding Interviews: Tips & Best Practices Testing Your Code With pytestSupport the podcast & join our community of Pythonistas
Fri, 13 May 2022 - 109 - Run Python in a Browser With Pyodide & The Power of f-Strings
Have you heard about the projects working toward getting Python to run in the browser? Maybe you would like to try it out for yourself, by building an interactive Python REPL with Pyodide and WebAssembly (WASM). This week on the show, Christopher Trudeau is here, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We talk about a step-by-step project that shows you how to build a Python code editor in the browser using WebAssembly through Pyodide and CodeMirror. You’re going to be hearing a lot about Pyodide in the coming months, and here’s a chance for you to play around while building a small project.
Christopher shares an article about the power of Python f-strings. It covers some lesser-known features like variable debugging, nesting, and detailed formatting.
We also have a couple of topics up for discussion this week. They’re both related to finding work as a Python developer.
We cover several other articles and projects from the Python community, including the 2038 date problem, a primer about Python virtual environments, how to build a site connectivity checker in Python, a free book on digital signal processing in Python, and a project to build a voice-activated, password-protected wooden box.
Spotlight: Using Python’s datetime Module
Have you ever wondered about working with dates and times in Python? In this video course, you’ll learn all about the built-in Python datetime library. You’ll also learn about how to manage time zones and daylight saving time, and how to do accurate arithmetic on dates and times.
Topics:
00:00:00 – Introduction 00:02:38 – 2038 Date Problem 00:07:46 – Python Virtual Environments: A Primer 00:16:06 – Python f-Strings Are More Powerful Than You Might Think 00:20:19 – Sponsor: CData Software 00:21:01 – Build an Editor in Python and WebAssembly 00:28:19 – Build a Site Connectivity Checker in Python 00:30:21 – What Jobs Can I Have Knowing Python? 00:39:53 – Video Course Spotlight 00:41:12 – Projects for a Self-Taught Dev to Help Get a Job? 00:50:46 – ThinkDSP: Free Book on Digital Signal Processing in Python 00:53:14 – Durin’s Box: Voice-Activated, Password-Protected Wooden Box 00:55:05 – Thanks and goodbyeTopic Links:
2038 Date Problem (Funny, but True) – Coders old enough to remember Y2K are already dreading 2038. Join the conversation. Python Virtual Environments: A Primer – In this tutorial, you’ll learn how to use a Python virtual environment to manage your Python projects. You’ll also dive deep into the structure of virtual environments built using thevenv
module, as well as the reasoning behind using virtual environments. Python f-Strings Are More Powerful Than You Might Think – Learn about the lesser-known features of Python’s f-strings, including date formatting, variable debugging, nested f-strings, and conditional formatting. Build an Editor in Python and WebAssembly – Step-by-step instructions on how to build a code editor in the browser using Python and WebAssembly (WASM), via Pyodide and CodeMirror. Build a Site Connectivity Checker in Python – In this step-by-step project, 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.Discussions:
What Jobs Can I Have Knowing Python? Projects for a Self-Taught Dev to Help Get a Job?Projects:
ThinkDSP: Free Book on Digital Signal Processing in Python Durin’s Box: Voice Activated, Password Protected, Wooden BoxAdditional Links:
Tushar Sadhwani on Twitter: Add this to bash profile - export PIP_REQUIRE_VIRTUALENV=true Python 3’s f-Strings: An Improved String Formatting Syntax – Real Python A Guide to the Newer Python String Format Techniques – Real Python Cool New Features in Python 3.8 – Real Python “Why I Hate Frameworks”, Benji Smith (The Joel on Software Discussion Group) What are the top 10 job skills for the future? | World Economic Forum PyCoder’s Weekly | A Weekly Python E-Mail NewsletterLevel up your Python skills with our expert-led courses:
Using Python's datetime Module Python 3's F-Strings: An Improved String Formatting Syntax Formatting Python StringsSupport the podcast & join our community of Pythonistas
Fri, 06 May 2022 - 108 - Type-Safe ORM With Prisma Client & Real Python at PyCon US 2022
Are you using an Object-Relational Mapper (ORM) for your Python projects? What if it could work with SQL or No-SQL databases and be fully type-safe? This week on the show, Robert Craigie talks about Prisma Client Python.
Prisma Client Python is built on top of Prisma, which was created for TypeScript and Node.js. It uses a schema file to declare your application’s data models and relationships in a human-readable form. The schema file allows you to easily switch the database type.
Prisma Client is different from other Python ORMs. It is fully type-safe and can be used with or without async.
We talk about how Robert started the project and what types of challenges he’s faced. He also shares areas of improvement and how to contribute to the project.
We also have a conversation with several Real Python core team members about PyCon US 2022. We will have a booth at the conference where we hope you’ll come and connect with us. The team also shares what to expect from PyCon and what they’re excited about this year.
Course Spotlight: Python REST APIs With FastAPI
In this course, you’ll learn the main concepts of FastAPI and how to use it to quickly create web APIs that implement best practices by default. By the end of it, you will be able to start creating production-ready web APIs.
Topics:
00:00:00 – Introduction 00:02:15 – Have you worked on other open-source projects? 00:02:59 – What is Prisma? 00:05:00 – What are advantages of using an ORM? 00:06:52 – What problem is Prisma Client solving? 00:08:43 – What was involved in porting the project over? 00:09:55 – Creating a Prisma schema 00:12:09 – Other challenges along the way 00:14:57 – Dangers of not having type safety 00:16:27 – Sponsor: Linear B 00:17:06 – How long have you been working on the project? 00:18:57 – How could someone contribute to the project? 00:21:03 – In what situations does Prisma Client excel? 00:24:21 – What other projects do you currently work on? 00:24:57 – What are you excited about in the world of Python? 00:28:01 – What do you want to learn next? 00:29:52 – Thanks and Goodbye 00:30:14 – Introduction of RP team 00:31:09 – What are we doing at PyCon 2022? 00:35:55 – How to Get the Most Out of PyCon US 00:37:42 – Tutorials at PyCon US 2022 00:40:24 – Video Course Spotlight 00:41:49 – Talks at PyCon US 2022 00:50:16 – Sprints at PyCon US 2022 00:54:38 – Final thoughts 00:57:30 – Thanks and goodbyesShow Links:
Prisma Client Python Prisma schema (Reference) | Prisma Docs TypeScript: JavaScript With Syntax For Types. pyright: Static type checker for Python pyright-python: Python command line wrapper for pyright, a static type checker Pylance - Visual Studio Marketplace MkDocs Rust Programming Language prisma-client-py: An auto-generated and fully type-safe database client built for autocomplete Prisma Python Discord server PyCon 2022 Welcome to PyCon US 2022 How to Get the Most Out of PyCon US – Real Python KiwiPyCon - New Zealand Python User Group EuroSciPy PyColorado 2019Level up your Python skills with our expert-led courses:
Python REST APIs With FastAPI Building a Django User Management System Basic Data Types in PythonSupport the podcast & join our community of Pythonistas
Fri, 22 Apr 2022 - 107 - Class Constructors & Pythonic Image Processing
Do you know the difference between creating a class instance and initializing it? Would you like an interactive tour of the Python Pillow library? This week on the show, Christopher Trudeau is here, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We talk about the recent Real Python tutorial “Image Processing With the Python Pillow Library.” It walks you through manipulating, filtering, and creating images from scratch.
Christopher shares an article about Python class constructors, exploring the two-step instance creation and initialization process.
We also have a couple of discussions this week. The first is about contributing to open source projects. The second topic is about searching large codebases before adding features.
We cover several other articles and projects from the Python community, including the counter-intuitive rise of Python in scientific computing, preparation for interview questions, a project for adding pointer hell to Python, and a fast and powerful graphical user interface tool kit for Python with minimal dependencies.
Spotlight: Python vs JavaScript for Python Developers
Python and JavaScript are two of the most popular programming languages in the world. In this course, you’ll take a deep dive into the JavaScript ecosystem by comparing Python vs JavaScript. You’ll learn the jargon, language history, and best practices from a Python developer’s perspective.
Topics:
00:00:00 – Introduction 00:02:18 – Image Processing With the Python Pillow Library 00:11:10 – The Counter-Intuitive Rise of Python in Scientific computing 00:17:15 – 20 Python Interview Questions 00:25:48 – Sponsor: FusionAuth 00:26:25 – Python Class Constructors: Control Your Object Instantiation 00:31:17 – Do You Contribute to Open Source Projects? 00:42:43 – Video Course Spotlight 00:44:08 – How To Search Large Codebases Before Adding a Feature? 00:49:34 – pointers.py: Bringing the Hell of Pointers to Python 00:52:16 – DearPyGui: A fast and powerful Graphical User Interface Toolkit for Python 00:57:11 – Thanks and goodbyeTopic Links:
Image Processing With the Python Pillow Library – Learn how to use the Python Pillow library to deal with images. Combine this with some NumPy to process images and create animations. The Counter-Intuitive Rise of Python in Scientific computing – Explore why Python’s ability to write code quickly and access more libraries can outperform heavily optimized compiled code. 20 Python Interview Questions – Practice up for that next interview. Questions about data structures, language concepts, and some common standard library functions. Python Class Constructors: Control Your Object Instantiation – Learn how class constructors work in Python and explore the two steps of Python’s instantiation process: instance creation and instance initialization.Discussion:
Do You Contribute to Open Source Projects? How To Search Large Codebases Before Adding a Feature?Projects:
pointers.py: Bringing the Hell of Pointers to Python hoffstadt/DearPyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependenciesAdditional Links:
Gonzalez & Woods, Digital Image Processing, 4th Edition | Pearson Pillow: Image Processing with Python Python Pillow danielgatis/rembg: Rembg is a tool to remove images background. Top 50 Python Interview Questions for Data Science | AnalytixLabs Programming FAQ — Python 3.10.4 documentation Episode #49: The Challenges of Developing Into a Python Professional – The Real Python Podcast PyCoder’s Weekly | Submit a Link awesome-python: Awesome Python Libraries and Resources Dear PyGui’s Documentation — Dear PyGui documentation ocornut/imgui: Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies Video Tutorials — Dear PyGui documentationLevel up your Python skills with our expert-led courses:
Python vs JavaScript for Python Developers Simplify Python GUI Development With PySimpleGUI Documenting Python Projects With Sphinx and Read The Docs - ArchivedSupport the podcast & join our community of Pythonistas
Fri, 15 Apr 2022 - 106 - Creating Better Error Messages for Python 3.10 & 3.11
What goes into creating those enhanced error messages in the latest versions of Python? How does the new PEG parser help to pinpoint where errors have occurred? This week on the show, Pablo Galindo Salgado talks about the work that goes into creating these improvements.
Pablo is a core CPython developer and is the release manager for Python versions 3.10 and 3.11. He is also serving his second term on the Python Steering Council.
Pablo is pleasantly surprised by the positive feedback for the new error messages in Python 3.10. He shares some of the upcoming enhancements for 3.11. We talk about how the new PEG parser allows for greater context when defining errors and pinpointing where they occur.
We talk about how he started contributing to CPython. He also shares some of the programming experiences he had while studying physics at university.
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:01:56 – Member of the Python Steering Council 00:02:40 – Physics background and research use of Python 00:08:43 – How did you get involved in core development? 00:10:27 – Why did you take on the role of release manager? 00:13:38 – What challenges have you found along the way? 00:19:08 – Sponsor: LinearB 00:19:48 – What motivated you to add enhanced error messages? 00:29:33 – How does the PEG parser help in these situations? 00:37:04 – PEG parser and infinite lookahead 00:40:58 – Identifying where the syntax is wrong 00:43:28 – Finding where a comma is missing 00:48:49 – Is this a dictionary missing a colon, or is it a set? 00:50:19 – Identifying missing portions of atry
…except
block 00:51:44 – Video Course Spotlight 00:53:00 – Informing library maintainers and not slowing performance 00:56:18 – Enhanced error messages coming in 3.11 01:06:38 – Real Python preview of Python 3.11 01:07:28 – What are you excited about in the world of Python? 01:13:00 – What do you want to learn next? 01:15:43 – How to contribute to the project? 01:20:24 – Thanks and goodbyeShow Links:
PEP 8016 – The Steering Council Model | peps.python.org Fortran Programming Language Wolfram Mathematica: Modern Technical Computing C (programming language) - Wikipedia Mare Nostrum, The Temple Of The Bit | WIRED Python Insider: Python 3.10.4 and 3.9.12 are now available out of schedule PEP 657 – Include Fine Grained Error Locations in Tracebacks | peps.python.org Python 3.11 Preview: Even Better Error Messages – Real Python friendly-traceback: Friendlier Python tracebacks. IPython - Interactive Computing Coverage.py - Documentation faster-cpython/ideas - presentation pdf · GitHub PEP 659 – Specializing Adaptive Interpreter | peps.python.org How to Sweep Pick: 14 Steps (with Pictures) - wikiHow Line 6 - Shuriken Variax Guitar Talks: Making Python Better One Error Message at a Time PyCon 2022 Python Developer’s Guide Guide to CPython’s Parser - Python Developer’s Guide pablogsal (Pablo Galindo Salgado) · GitHub Pablo Galindo Salgado (@pyblogsal) / TwitterLevel up your Python skills with our expert-led courses:
Cool New Features in Python 3.10 Starting With Linear Regression in Python Raising and Handling Python ExceptionsSupport the podcast & join our community of Pythonistas
Fri, 08 Apr 2022
Podcasts similares a The Real Python Podcast
- Global News Podcast BBC World Service
- 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
- Dateline NBC NBC News
- 財經一路發 News98
- La rosa de los vientos OndaCero
- Más de uno OndaCero
- La Zanzara Radio 24
- L'Heure Du Crime RTL
- El Larguero SER Podcast
- Nadie Sabe Nada SER Podcast
- SER Historia SER Podcast
- Todo Concostrina SER Podcast
- 安住紳一郎の日曜天国 TBS RADIO
- TED Talks Daily TED
- アンガールズのジャンピン[オールナイトニッポンPODCAST] ニッポン放送
- 辛坊治郎 ズーム そこまで言うか! ニッポン放送
- 飯田浩司のOK! Cozy up! Podcast ニッポン放送
- 吳淡如人生實用商學院 吳淡如
- 武田鉄矢・今朝の三枚おろし 文化放送PodcastQR