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.
The podcast The Real Python Podcast is created by Real Python. The podcast and the artwork on this page are embedded on this page using the public podcast feed (RSS).
What are the current approaches for analyzing emotions within a piece of text? Which tools and Python packages should you use for sentiment analysis? This week, Jodie Burchell, developer advocate for data science at JetBrains, returns to the show to discuss modern sentiment analysis in Python.
Jodie holds a PhD in clinical psychology. We discuss how her interest in studying emotions has continued throughout her career.
In this episode, Jodie covers three ways to approach sentiment analysis. We start by discussing traditional lexicon-based and machine-learning approaches. Then, we dive into how specific types of LLMs can be used for the task. We also share multiple resources so you can continue to explore sentiment analysis on your own.
This week’s episode is brought to you by Sentry.
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:
Show Links:
Level up your Python skills with our expert-led courses:
What advice would you give to someone moving from another language to Python? What good programming practices are inherent to the language? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss an older forum post from a new Python user who came from Perl. We suggest checking out PEP 8, or as it’s commonly known, “The Style Guide for Python Code.” We provide advice about installing Python, avoiding common pitfalls, learning how scope is managed, and taking advantage of a collection of Real Python resources.
We share several other articles and projects from the Python community, including a new Python release, practical NumPy examples and exercises, considering targets of for loops, exploring Python dependency management, checking package compatibility with free-threading and subinterpreters, an experimental filesystem navigator in Textual, and a background workers reference implementation in Django.
This episode is sponsored by AssemblyAI.
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:
News:
Topics:
for
loop. This post covers what that means and that it is no more costly than regular assignment.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
What are common issues with using notebooks for Python development? How do you know the current state, share reproducible results, or create interactive applications? This week on the show, we speak with Akshay Agrawal about the open-source reactive marimo notebook for Python.
Before writing any code, Akshay wrote a 2,500-word design document. He wanted to create a maintainable and reproducible tool that avoided the hidden state of traditional notebooks. We discuss solving the hidden state problem by building the notebook as a directed acyclic graph (DAG).
Akshay shares how marimo notebooks are stored as pure Python files, which makes them easy to read, importable, and git-friendly. We discuss serializing package requirements using PEP 723 inline metadata to create standalone reproducible notebooks. We also cover how marimo notebooks can be deployed as a web app or dashboard using Pyodide.
Course Spotlight: Navigating Namespaces and Scope in Python
In this course, you’ll learn about Python namespaces, the structures used to store and organize the symbolic names created during execution of a Python program. You’ll learn when namespaces are created, how they are implemented, and how they define variable scope.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
What keeps your spark alive for developing software and learning Python? Do you like to try new frameworks, build toy projects, or collaborate with other developers? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss the joy of tinkering with Python as a way to keep your developer skills sharp. We dig into our techniques for continuing to learn and build projects.
Christopher shares an article that examines the performance of Python 3.13’s free-threading features. This piece uses a clever example to measure how the new features behave with large datasets and parallelization.
We share several other articles and projects from the Python community, including a group of new releases, common use cases and examples for Python closures, finding the opposite of cloud-native, Python’s soft keywords, a command-line utility for taking automated screenshots of websites, and putting the Django admin in the terminal with Textual.
This episode is sponsored by Windsurf.
Course Spotlight: Python Inner Functions
In this step-by-step course, you’ll learn what inner functions are in Python, how to define them, and what their main use cases are. You’ll see how to write helper functions, create closure factory functions, and how to add behavior to existing functions with decorators.
Topics:
News:
Show Links:
Discussion:
Projects:
Additional Projects:
Level up your Python skills with our expert-led courses:
How do you build a sustainable open-source project and community? What lessons can be learned from Python’s history and the current mess that the WordPress community is going through? This week on the show, we speak with Paul Everitt from JetBrains about navigating open-source funding and the start of the Python Software Foundation.
Paul has been an organizer in the Python community almost from the beginning. He shares how the project has navigated through multiple sponsors. We talk about the early governance models and the formation of the Python Software Foundation.
We contrast this journey with the current drama unfolding in the WordPress community. We discuss the potential problems of having a benevolent dictator for life. We also dig into sponsorship models and ways to get companies to give back to the open-source projects they rely on.
This episode is sponsored by Sentry.
Course Spotlight: Using pandas to Make a Gradebook in Python
With this course and Python project, you’ll build a script to calculate grades for a class using pandas. The script will quickly and accurately calculate grades from a variety of data sources. You’ll see examples of loading, merging, and saving data with pandas, as well as plotting some summary statistics.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you wanted the flexibility of f-strings but need safety checks in place? What if you could have deferred evaluation for logging or avoiding injection attacks? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss a set of recent Python Enhancement Proposals (PEPs). The idea of template strings has been under consideration for a while, and PEP 750 describes a new way forward. PEP 759 proposes a way for projects on PyPI to safely host resources on external sites using a new package upload format called a .rim file.
We share several other articles and projects from the Python community, including what didn’t make the headlines about Python 3.13, solving Sudoku with Python packaging, what’s sweet about Python’s syntactic sugar, creating database-generated columns using SQLite and Django, a discussion about mentoring, an adaptive web scraper, and a debugging tool for HTTP(S) client requests.
This episode is sponsored by Sentry.
Course Spotlight: Using Pydantic to Simplify Python Data Validation
Discover the power of Pydantic, Python’s most popular data parsing, validation, and serialization library. In this hands-on video course, you’ll learn how to make your code more robust, trustworthy, and easier to debug with Pydantic.
Topics:
News:
Show Links:
pdb
, improvements to shutil
, and small additions to the asyncio library.sudoku-0-3==5
represents the (0,3) cell’s answer of 5.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
What goes into building a spreadsheet application in Python that runs in the browser? How do you make it launch quickly, and where do you store the cells of data? This week on the show, we speak with Chris Laffra about his project, PySheets, and his book “Communication for Engineers.”
As a software engineer, Chris has worked at IBM, Google, Uber, and several financial institutions. He speaks about developer productivity and communication skills as an engineer. We begin our conversation by digging into his background, his approach to building engineering teams, and strategies for improving communication.
Chris’ idea for PySheets is to have Excel inside Python with everything running locally in your browser. He was inspired by the success of Jupyter Notebooks but wanted to develop a tool more suited to a spreadsheet’s non-linear graph structure.
PySheets is built to run locally in the user’s browser, taking advantage of PyScript. We discuss finding the right solution for storing data in the browser and developing a graphic toolkit to create the UI. Chris also shares the novel method he found to get the interface up and running while the larger assets are loading.
This episode is sponsored by Sentry.
Course Spotlight: Understanding Python’s Global Interpreter Lock (GIL)
Python’s Global Interpreter Lock, or GIL, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter at any one time. In this video course, you’ll learn how the GIL affects the performance of your Python programs.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
What changes are happening under the hood in the latest versions of Python? How are these updates laying the groundwork for a faster Python in the coming years? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher shares an article about Python’s recent performance improvements. The piece covers the specialized adaptive interpreter and explains what those terms mean. It also includes details about the experimental feature of the Just-In-Time (JIT) compiler added in 3.13.
We dig into a collection of Django projects you can use to practice and develop your skills. The projects ramp up from detailed beginner tutorials to more advanced projects with guidelines on how to get started. We also discuss a collection of popular websites that use Django.
We share several other articles and projects from the Python community, including a batch of recent Python Enhancement Protocols (PEPs), a couple of Python releases, using DuckDB in the browser with Pyodide, building a contact book app with Textual, generating a tiny status page with a Python script, and a grep-like tool that understands code.
This episode is sponsored by AssemblyAI.
Course Spotlight: Building a Site Connectivity Checker
In this video course, you’ll build a Python site connectivity checker for the command line. While building this app, you’ll integrate knowledge related to making HTTP requests with standard-library tools, creating command-line interfaces, and managing concurrency with asyncio and aiohttp.
Topics:
except
and except*
Expressions Without Parenthesespyproject.toml
News:
except
and except*
Expressions Without Parentheses – “This PEP proposes to allow unparenthesized except
and except*
blocks in Python’s exception handling syntax. Currently, when catching multiple exceptions, parentheses are required around the exception types.”pyproject.toml
(Accepted)Show Links:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
How does a Python tool support all types of DataFrames and their various features? Could a lightweight library be used to add compatibility for newer formats like Polars or PyArrow? This week on the show, we speak with Marco Gorelli about his project, Narwhals.
Narwhals is a project aimed at library maintainers rather than end users. We discuss how the added compatibility benefits users by supporting modern features like lazy evaluation. We cover several projects Marco has been working with to implement Narwhals, including Altair, scikit-lego, and Ibis.
We also discuss how Marco started contributing to open-source projects. Marco has contributed to both pandas and Polars, which helps explain his interest in growing compatibility between libraries. He also offers advice on making your first contribution.
This episode is sponsored by CodeRabbit.
Course Spotlight: Differences Between Python’s Mutable and Immutable Types
In this video course, you’ll learn how Python’s mutable and immutable data types work internally and how you can take advantage of mutability or immutability to power your code.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Python 3.13 is here! Our regular guests, Geir Arne Hjelle and Christopher Trudeau, return to discuss the new version. This year, Geir Arne coordinated a series of preview articles with members of the Real Python team and a showcase tutorial, “Python 3.13: Cool New Features for You to Try.” Christopher’s video course “What’s New in Python 3.13” covers the topics from the article and shows the new features in action.
Geir Arne and Christopher dug into the release to create code examples of the new features for the tutorial and course. We look at the options for disabling the Global Interpreter Lock (GIL) and enabling the Just-in-Time (JIT) compiler. We also discuss the new interactive interpreter, better error messages, multiple improvements to static typing, and additional performance improvements.
We share our thoughts on the updates and offer advice about incorporating them into your projects. We also discuss when you should start running Python 3.13.
This is episode is sponsored by Nvidia.
Course Spotlight: What’s New in Python 3.13
In this video course, you’ll learn about the new features in Python 3.13. You’ll take a tour of the new REPL and error messages and see how you can try out the experimental free threading and JIT versions of Python 3.13 yourself.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Should you use a Python virtual environment in a Docker container? What are the advantages of using the same development practices locally and inside a container? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We share a recent post by Hynek Schlawack about building Python projects using Docker containers. Hynek argues for using virtual environments for these projects, like developing a local one. He’s found that keeping your code in an isolated, well-defined location and structure avoids confusion and complexity.
We also discuss our development setups, including Python versions, code editors, virtual environment practices, terminals, and customizations. We dig into how your programming history affects the tools you use.
We share several other articles and projects from the Python community, including a group of new releases, addressing the “why” in comments, comparing a data science workflow in Python and R, removing common problems from CSV files, and a project for creating HTML tables in Django.
This episode is sponsored by InfluxData.
Course Spotlight: Advanced Python import Techniques
The Python import system is as powerful as it is useful. In this in-depth video course, you’ll learn how to harness this power to improve the structure and maintainability of your code.
Topics:
where()
News:
Show Links:
where()
– This tutorial teaches you how to use the where() function to select elements from your NumPy arrays based on a condition. You’ll learn how to perform various operations on those elements and even replace them with elements from a separate array or arrays.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
What are strategies for being a productive developer with ADHD? How can you help your team members with ADHD to succeed and complete projects? This week on the show, we speak with Chris Ferdinandi about his website and podcast “ADHD For the Win!”
Chris struggled with productivity early in his career as a developer. He shares systems and strategies he’s discovered to harness the focusing power of ADHD.
We discuss time management, meetings, and maintaining productivity in a hectic world. Chris also shares resources for learning more about defining ADHD, self-evaluation, and how to keep getting things done.
This episode is sponsored by InfluxData.
Course Spotlight: Build a GUI Calculator With PyQt and Python
In this video course, you’ll learn how to create graphical user interface (GUI) applications with Python and PyQt. Once you’ve covered the basics, you’ll build a fully functional desktop calculator that can respond to user events with concrete actions.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
How do you take advantage of Git pre-commit hooks? How do you build custom software checks and rules that run every time you commit your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We share a trio of articles by previous guest Stefanie Molin about Git pre-commit hooks. Across the series, she provides step-by-step instructions for building your own hooks, managing them, and learning how they operate.
We discuss the process of estimating software development projects. We dig into the art of “guesstimation,” rough calculation, and napkin math. Christopher shares his experience in agile scenarios and measuring projects by story counts.
We share several other articles and projects from the Python community, including a news roundup, 10 Python programming optimization techniques, and building a blog in Django using GraphQL & Vue. We also explore experimenting with Python’s preprocessor, a toolkit for writing UIs in PyScript, and a couple of projects for working with Django Admin.
This episode is sponsored by InfluxData.
Course Spotlight: Python mmap: Doing File I/O With Memory Mapping
In this video course, you’ll learn how to use Python’s mmap module to improve your code’s performance when you’re working with files. You’ll get a quick overview of the different types of memory before diving into how and why memory mapping with mmap can make your file I/O operations faster.
Topics:
News:
Show Links:
pre-commit install
or why you have to run it in the first place? How does pre-commit actually work with Git? In this article, Stefanie takes you behind the scenes of how your pre-commit setup works.Discussion
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Are you interested in practicing your Python skills while learning how to solve astrophysics and astronomy problems? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher shares a pair of his recent Real Python video courses about exploring astronomy and astrophysics with Python. Throughout the courses, you’ll get to practice using a variety of data science libraries, such as NumPy, Matplotlib, pandas, pint, and Astropy.
We speak with Mannie Young who is the Organizing Committee Chair of PyCon Africa. Real Python is excited to be a contributing sponsor of this year’s conference. Mannie discusses reinvigorating a continent-spanning conference after a multiyear hiatus. He also talks about introducing Python to students and new developers across Africa through PyClubs, PyLadies, and PyData programs.
We share several other articles and projects from the Python community, including a news roundup, logging in Python, understanding operator precedence, reconciling why it only works on your machine, a fast way to create an HTML app, and a tool for deep inspection of Python objects.
This episode is sponsored by InfluxData.
Course Spotlight: Sorting Dictionaries in Python: Keys, Values, and More
In this video course, you’ll learn how to sort Python dictionaries. By the end, you’ll be able to sort by key, value, or even nested attributes. But you won’t stop there, you’ll also measure the performance of variations when sorting and compare different key-value data structures.
Topics:
News:
Show Links:
print()
function to get information about the flow of your programs, then logging is the natural next step for you. This tutorial will guide you through creating your first logs and show you ways to curate them to grow with your projects.Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Are you interested in learning robotics with Python? Can physical electronics-based projects grow a child’s interest in coding? This week on the show, we speak with author Marwan Alsabbagh about his book “Build Your Own Robot - Using Python, CRICKIT, and Raspberry Pi.”
Marwan discusses his two conferences talks about building electronics projects with his children. He provides advice on equipment and techniques to make learning Python engaging.
We explore his robotics project and the literal balancing act of designing a robot around the Raspberry Pi. Marwan shares his successes and disappointments while working to incorporate computer vision, joystick controls, and voice commands.
This episode is sponsored by Mailtrap.
Course Spotlight: Python Debugging With pdb
In this hands-on course, you’ll learn the basics of using pdb, Python’s interactive source code debugger. pdb is a great tool for tracking down hard-to-find bugs, and it allows you to fix faulty code more quickly.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
What are the best practices for organizing data analysis projects in Python? What are the advantages of a more package-centric approach to data science? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss Joshua Cook’s recent article “How I Use Python to Organize My Data Analyses.” The article covers how his process for building data analysis projects has evolved and now incorporates modern Python packaging techniques.
Christopher shares his recent video course on grouping real-world data with pandas. The course offers a quick refresher before digging into how to use pandas GroupBy to manipulate, transform, and summarize data.
We also share several other articles and projects from the Python community, including a news roundup, working with JSON data in Python, running an Asyncio event loop in a separate thread, knowing the why behind a system’s code, a retro game engine for Python, and a project for vendorizing packages from PyPI.
This episode is sponsored by Mailtrap.
Course Spotlight: pandas GroupBy: Grouping Real World Data in Python
In this course, you’ll learn how to work adeptly with the pandas GroupBy while mastering ways to manipulate, transform, and summarize data. You’ll work with real-world datasets and chain GroupBy methods together to get data into an output that suits your needs.
Topics:
News:
test
command. Many packages promptly broke. The following day the change was undone.Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
What hurdles must be cleared when starting an international organization? How do you empower others in a community by sharing responsibilities? This week on the show, we speak with Jay Miller about Black Python Devs.
Jay shares how the idea of forming a community began through attending conferences. They wanted to welcome more black developers into the Python community. We discuss the introduction of Black Python Devs as part of their PyCon 2024 keynote presentation.
Jay explains working with a few key people to build the group’s foundations. They talk about the difficulty of letting other people share in the responsibilities and ownership as the membership grew. We also discuss the advantages of partnering with a non-profit organization.
This episode is sponsored by InfluxData.
Course Spotlight: Interacting With REST APIs and Python
In this video course, you’ll learn how to use Python to communicate with REST APIs. You’ll learn about REST architecture and how to use the requests library to get data from a REST API. You’ll also explore different Python tools you can use to build REST APIs.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
How do you integrate GraphQL into your Python web development? How about quickly building graph-based APIs inside Django’s battery-included framework? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher shares a recent tutorial for building GraphQL APIs in Django using the Python library Strawberry. The tutorial digs into creating a project, defining models, and creating GraphQL queries and mutations using Strawberry.
We discuss a blog post from Nat Bennet titled “Why do prototypes suck?” We dig into the common pitfalls of building prototypes and the misconceptions between developers and end users.
We also share several other articles and projects from the Python community, including a news roundup, using HTMX with FastAPI, creating an unbelievably stupid airline Wi-Fi package, extracting wisdom from conference videos, writing pixel images to the terminal, and a macOS app for Jupyter Notebooks.
This episode is sponsored by Mailtrap.
Course Spotlight: Building a URL Shortener With FastAPI and Python
In this video course, you’ll build an app to create and manage shortened URLs. Your Python URL shortener can receive a full target URL and return a shortened URL. You’ll also use the automatically created documentation of FastAPI to try out your API endpoints.
Topics:
News:
Topics:
Discussion:
Project:
Additional Links:
Level up your Python skills with our expert-led courses:
Do you need help making data tables in Python look interesting and attractive? How can you create beautiful display-ready tables as easily as charts and graphs in Python? This week on the show, we speak with Richard Iannone and Michael Chow from Posit about the Great Tables Python library.
Michael and Richard discuss the design philosophy and history behind creating display tables. We dig into the grammar of tables, the background of the project, and an ingenious way to build a collection of examples for a library.
We briefly cover how Richard and Michael started contributing to open source. We also discuss practicing data skills with challenges and resources like Tidy Tuesday.
This episode is sponsored by Mailtrap.
Course Spotlight: Graph Your Data With Python and ggplot
In this course, you’ll learn how to use ggplot in Python to build data visualizations with plotnine. You’ll discover what a grammar of graphics is and how it can help you create plots in a very concise and consistent way.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
What are discrete optimization problems? How do you solve them with constraint programming in Python? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects
Christopher discusses an article about constraint programming using Python. He describes the fundamentals and how the problems resemble logic problems you may have experienced in school. The article shows how to solve a weekly work scheduling problem using the open-source CP-SAT package.
We discuss Leodanis Pozo Ramos’s recent tutorial, “Python’s Built-in Functions: A Complete Exploration.” These functions are available for use directly in your code without importing.
We also share several other articles and projects from the Python community, including a news roundup, spotting ships with satellites, grappling with Apple’s App Store rejecting Python applications, considering changes to Python’s security model, discussing pivoting from one development path to another, prettifying Jinja and Django templates, and generating static sites with Python.
This episode is sponsored by Sentry.
Course Spotlight: Parallel Iteration With Python’s zip() Function
In this course, you’ll learn how to use the Python zip() function to solve common programming problems. You’ll learn how to traverse multiple iterables in parallel and create dictionaries with just a few lines of code.
Topics:
xz-utils
BackdoorNews:
Show Links:
urllib
parser module in Python references a scheme for apps that use the iTunes feature to install other apps, which is disallowed. Auto scanning by Apple is rejecting any app that uses Python 3.12 underneath. A solution has been proposed for Python 3.13.xz-utils
Backdoor – The backdoor introduced to the xz-utils
compression project through social engineering was one of the topics at the Python Language Summit. Participants discussed what can be done to prevent similar social engineering attacks on the Python source.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Have you wondered about graph theory and how to start exploring it in Python? What resources and Python libraries can you use to experiment and learn more? This week on the show, former co-host David Amos returns to talk about what he’s been up to and share his knowledge about graph theory in Python.
David started a Ph.D. program studying mathematics, with a focus on graph theory. Though life interrupted his pursuit after three years, he is still passionate about the subject. He’s been using these skills to create documentation and teach users as part of RelationalAI’s education team.
David has also been exploring the Julia programming language. He wrote about it on his blog, created videos, and started a podcast on the topic. He shares his excitement about learning new techniques from different languages and how these ideas can enhance your coding in Python.
This episode is sponsored by Sentry.
Course Spotlight: Defining Python Constants for Code Maintainability
In this video course, you’ll learn how to properly define constants in Python. By coding a bunch of practical example, you’ll also learn how Python constants can improve your code’s readability, reusability, and maintainability.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Does Python round numbers the same way you learned back in math class? You might be surprised by the default method Python uses and the variety of ways to round numbers in Python. Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher discusses his recent video course, “Rounding Numbers in Python.” He covers rounding bias and how to avoid introducing it into your dataset. We dig into the various rounding strategies and how to implement them in Python.
We also share several other articles and projects from the Python community, including a news roundup, a fast Python linter for error-free and maintainable code, the decline of the user interface, more thoughts on Python in Excel, a discussion about calendar versioning for Python, a financial database as a Python module, and a project to prettify the colors of your terminal user interfaces.
This episode is sponsored by Sentry.
Course Spotlight: Rounding Numbers in Python
In this video course, you’ll learn about the mistakes you might make when rounding numbers and how to best manage or avoid them. It’s a great place to start for the early to intermediate Python developer who’s interested in using Python for finance, data science, or scientific computing.
Topics:
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
What techniques go into synthesizing a guitar sound in Python? What higher-level programming and Python concepts can you practice while building advanced projects? This week on the show, we talk with Real Python author and core team member Bartosz Zaczyński about his recent step-by-step project, Build a Guitar Synthesizer: Play Musical Tablature in Python.
Bartosz shares how he had built an early prototype of the guitar synth using a different language. He describes recreating the Karplus-Strong algorithm in Python to create the plucked guitar sounds. We discuss teaching advanced Python concepts while guiding readers through constructing a complete project.
We also dig into reading and writing WAV files in Python, using Spotify’s pedalboard library, implementing Poetry in a project, and designing a file format for guitar tablature.
This episode is sponsored by Mailtrap.
Course Spotlight: Playing and Recording Sound in Python
In this course, you’ll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. You’ll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
What are the built-in Python modules that can work as useful command-line tools? How can these tools add more functionality to Windows machines? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher shares an article by Trey Hunner about Python’s extensive collection of command-line utilities? The piece digs into general-purpose tools that format JSON data or start a simple web server and additional utilities for working with your Python code from the terminal.
We cover a set of Jupyter Notebooks for teaching and learning the art of music processing and Music Information Retrieval (MIR). The notebooks are resources for working through the textbook, “Fundamentals of Music Processing: Audio, Analysis, Algorithms, Applications.”
We also share several other articles and projects from the Python community, including a news roundup, a discussion of CRUD operations, a description of Python’s built-in bytes sequence, favorite essays on development and programming, Python resources for working with Excel, and a project for creating finite state machines in Python.
This episode is sponsored by APILayer.
Course Spotlight: Binary, Bytes, and Bitwise Operators in Python
In this course, you’ll learn how to use Python’s bitwise operators to manipulate individual bits of data at the most granular level. With the help of hands-on examples, you’ll see how you can apply bitmasks and overload bitwise operators to control binary data in your code.
Topics:
News:
dataclasses.field
” was determined to have an insufficient number of use cases.Show Links:
python -m module_name
.bytes
: The Lesser-Known Python Built-in Sequence – The bytes
data type looks a bit like a string, but it isn’t a string. This article explores it and also looks at the main Unicode encoding, UTF-8Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
How do you find the most interesting or suspicious points within your data? What libraries and techniques can you use to detect these anomalies with Python? This week on the show, we speak with author Brett Kennedy about his book “Outlier Detection in Python.”
Brett describes initially getting involved with detecting outliers in financial data. He discusses various applications and techniques in security, manufacturing, quality assurance, and fraud. We also dig into the concept of explainable AI and the differences between supervised and unsupervised learning.
This episode is sponsored by APILayer.
Course Spotlight: Using k-Nearest Neighbors (kNN) in Python
In this video course, you’ll learn all about the k-nearest neighbors (kNN) algorithm in Python, including how to implement kNN from scratch. Once you understand how kNN works, you’ll use scikit-learn to facilitate your coding process.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
How do you effectively break a software problem into individual steps? What are signs you’re writing overly clever code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss an article about de-warping images of book pages. We both found the piece a good study on decomposing a complex software problem.
Christopher discusses an article titled “Clever code is probably the worst code you could write.” Early in a programming career, it’s easier to write complex and difficult-to-read code. The real challenge is progressing towards writing clearer and readable code.
We also share several other articles and projects from the Python community, including a news roundup, what the __pycache__
folder is for in Python, what’s new in Django 5.1, a discussion about software engineering hiring and firing, a project for setting up repeated tasks, and a simple way to create reusable template components in Django.
This episode is sponsored by Sentry.
Course Spotlight: Efficient Iterations With Python Iterators and Iterables
In this video course, you’ll learn what iterators and iterables are in Python. You’ll learn how they differ and when to use them in your code. You’ll also learn how to create your own iterators and iterables to make data processing more efficient.
Topics:
__pycache__
Folder in Python?News:
Show Links:
__pycache__
Folder in Python? – In this tutorial, you’ll explore Python’s __pycache__
folder. You’ll learn about when and why the interpreter creates these folders, and you’ll customize their default behavior. Finally, you’ll take a look under the hood of the cached .pyc files.Discussion:
Projects:
Level up your Python skills with our expert-led courses:
How do you start adding unit tests to your Python code? Can the built-in unittest framework cover most or all of your needs? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We dig into a recent tutorial by Leodanis Pozo Ramos about writing unit tests using Python’s unittest. The tutorial covers organizing your tests, exploring assert methods, creating test fixtures, and debugging failing tests.
We explore a collection of Python data visualizations and tutorials from the Python Graph Gallery. The website features hundreds of charts and graphs built using popular plotting libraries. Each chart type features a foundational tutorial that introduces the structure and application.
We also share several other articles and projects from the Python community, including a news roundup, the new REPL coming in Python 3.13, a pytest daemon to 10X test iteration speed, a discussion about software friction, a Raspberry Pi document scanner, and a project for controlling time per iteration loop.
Course Spotlight: Building a Python GUI Application With Tkinter
In this video course, you’ll learn the basics of GUI programming with Tkinter, the de facto Python GUI framework. Master GUI programming concepts such as widgets, geometry managers, and event handlers. Then, put it all together by building two applications: a temperature converter and a text editor.
Topics:
unittest
: Writing Unit Tests for Your CodeNews:
Show Links:
unittest
: Writing Unit Tests for Your Code – In this tutorial, you’ll learn how to use the unittest framework to create unit tests for your Python code. Along the way, you’ll also learn how to create test cases, fixtures, test suites, and more.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
What’s it like to learn Python as a visually impaired or blind developer? How can you improve the accessibility of your Python web applications and learn current guidelines? This week on the show, Real Python community member Audrey van Breederode discusses her programming journey, web accessibility, and assistive technology.
Audrey shares her background as a system administrator and instructor. While she was learning Python, she discovered Real Python. Audrey provided some feedback about the built-in video player’s accessibility. Dan reached out and worked with Audrey on some website improvements for the visually impaired.
We discuss navigating modern websites and using assistive technology. Audrey also provides resources Python developers can use to improve the accessibility of their applications.
Course Spotlight: HTML and CSS Foundations for Python Developers
There’s no way around HTML and CSS when you want to build web apps. Even if you’re not aiming to become a web developer, knowing the basics of HTML and CSS will help you understand the Web better. In this video course, you’ll get an introduction to HTML and CSS for Python programmers.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
asyncio
.pandas
& scikit-learn
– How you impute missing values in machine learning data sets can affect the quality of your training. This article teaches you what data leakage is and what steps you should take to avoid it.Discussion
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
pipx
1.4.2News:
Show Links:
pipx
1.4.2 – PEP 723 adds the ability to specify dependencies within a Python script itself. The folks who write pipx
have added an experimental feature that takes advantage of this future language change. This article shows you how the new feature looks and what pipx does with it.pipx
– In this tutorial, you’ll learn about a tool called pipx, which lets you conveniently install and run Python packages as standalone command-line applications in isolated environments. In a way, pipx turns the Python Package Index (PyPI) into an app marketplace for Python programmers.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Topics:
sleep()
was in the Python standard library, Ishaan stumbled through the built-in help and learned how to use it to answer just these kinds of questions.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
uv
: Python Packaging in Rust – uv is an extremely fast Python package installer and resolver, designed as a drop-in alternative to pip and pip-tools. This post introduces you to uv and shows some of its performance numbers.Show Links:
Discussion:
Projects
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
What are real-life examples of using Python decorators? How can you harness their power in your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss a recent article series that digs into Python decorators. The first two articles discuss the basics of constructing decorators. The third part describes how popular Python libraries use decorators with call interception, function registration, and enriching the behavior of a function.
Christopher shares a piece about the common pitfalls of working with the Pythondatetime
library. The article considers how current third-party libraries don’t address most of these quirks and offers a potential solution with a new library.
We also share several other articles and projects from the Python community, including a couple of news items, a discussion about the popularity of the Rust language, handling unset values in FastAPI with Pydantic, working with Python’s mini-language for formatting strings, mocking Django queryset functions, and a modern replacement for the Requests library.
This week’s episode is brought to you by Sentry.
Course Spotlight: Python Decorators 101
In this course on Python decorators, you’ll learn what they are and how to create and use them. Decorators provide a simple syntax for calling higher-order functions in Python. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it.
Topics:
datetime
PitfallsNews:
Show Links:
datetime
Pitfalls – It’s no secret that the Python datetime
library has its quirks. Not only are there probably more than you think, but third-party libraries don’t address most of them! Arie created a new library to explore what a better datetime
library could look like.None
so there is no way to distinguish between an explicit None
value and an unset field. This post explains how you process this scenario.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
@conda
and @pypi
decoratorsShow Links:
@pypi
Decorator - OuterboundsLevel up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Background Links:
Dataset Links:
Tutorials and Documentation for Python Packages:
Measurement Links:
Training Data for LLMs:
Agents and Plugin Links:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
key
Parameter in PythonNews:
Show Links:
_
). 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.key
Parameter in Python – A parameter named key
is present in several Python functions, such as sorted()
. This article explores what it is and how to use it.Discussion:
Projects:
Additional Links:
nh3
– Allowing users to input HTML in comments or blog posts is problematic and can lead to exploits on your site. For years, the Django community used django-bleach
, but since its deprecation, Adam has been using nh3
, a Rust-based HTML sanitizer.Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
News:
Top Five PyCoder Links:
Topics and 2023 Trends:
pathlib
improvements, and a few other changes.Project:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
NamedTuple
News:
Show Links:
Discussion:
Projects:
Additional Links:
namedtuple
– Real PythonLevel up your Python skills with our expert-led courses:
Has the current growth of artificial intelligence (AI) systems made you wonder what the future holds for Python developers? What are the hidden benefits of learning to program in Python and practicing computational thinking? This week on the show, we speak with author Lawrence Gray about his upcoming book “Mastering Python: A Problem Solving Approach.”
Lawrence shares how learning Python helped him through a dark and trying time. He developed lifelong skills that he wants to pass along through teaching and authoring a book.
We discuss what you can do to prepare for a future where coding jobs are automated through AI. He shares ways that Python can help build the higher-order thinking skills required by future careers. We also talk about how Python can help with computational thinking and promote cognitive development.
This week’s episode is brought to you by Site24x7.
Course Spotlight: Looping With Python enumerate()
Once you learn about for
loops in Python, you know that using an index to access items in a sequence isn’t very Pythonic. So what do you do when you need that index value? In this course, you’ll learn all about Python’s built-in enumerate()
, where it’s used, and how you can emulate its behavior.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
logmerger
: TUI for Log Files With Merged Timelinereverse_argparse
: Tell the User What They RanNews:
Show Links:
Discussion:
Projects:
logmerger
: TUI for Log Files With Merged Timelinereverse_argparse
: Tell the User What They RanAdditional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
What fundamental developer skills are new Python users missing? What best practices might developers without a computer science background be lacking? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.
Christopher opens our discussion by sharing a recent social media thread about teaching software engineering best practices to scientists and others without a computer science background. We talk about software design philosophy and strategies for sharing knowledge within an organization.
We cover the results from the sixth annual official Python Developer Survey. The survey covers Python usage, language versions, frameworks, libraries, and various demographics. We dig into the details and share our insights.
We also share several other articles and projects from the Python community, including a couple of release announcements, so many Python dataframes, ways to speed up your code when multiple cores aren’t an option, Python’s syntactic sugar, a computer algebra system named SymPy, the process of building a blog in Django, code metrics in Python with Radon, and a TUI app for daily writing.
This week’s episode is brought to you by Snyk.
Course Spotlight: Filtering Iterables With Python
In this video course, you’ll learn how Python’s filter()
works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace filter()
and make your code more Pythonic.
Topics:
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
perf
profileritertools.batched()
for grouping ItemsPath.walk()
for listing files in subdirectoriesShow Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
functools
module with real-world examples to help show you how and when to use each feature.Discussion:
Projects:
Additional Links:
functools
— Higher-order functions and operations on callable objects — Python documentationLevel up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Discussion:
enumerate()
: Simplify Loops That Need Counters – Real Pythonall()
: Check Your Iterables for Truthiness – Real Pythonany()
in Python – Real PythonProjects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Discussion
Projects:
inspect
feature, which gives you loads of information on an object.Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
bdist_egg
Uploads to PyPIrange()
in Python?News:
bdist_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:
range()
in Python? – In Python, range()
is most commonly used in for
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.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
.readthedocs.yaml
ConfigurationNews:
.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.Topic Links:
pip
is often the better choice.Discussion:
asyncio
? In this opinion piece, he talks about why he doesn’t like asyncio
and which alternatives he prefers.Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
.__call__()
Method: Creating Callable InstancesShow Links:
.__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.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Projects:
Hacker Initiative Links:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
dataclasses.field
News:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
pip
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Projects
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
pytest
Level up your Python skills with our expert-led courses:
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:
.__repr__()
vs .__str__()
in Python?reduce()
- The Power of a Single Python FunctionNews:
Show Links:
.__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.reduce()
- The Power of a Single Python Function – “While Python is not a pure functional programming language, you still can do a lot of functional programming in it. In fact, just one function - reduce()
- can do most of it.” This article introduces you to reduce()
.Projects:
Additional Links:
reduce()
: From Functional to Pythonic Style – Real PythonLevel up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
Have you ever installed a Python package without knowing anything about it? What best practices should you employ to ensure the quality of your next package installation? Christopher Trudeau is back this week, bringing another batch of PyCoder’s Weekly articles and projects. We also have Python Software Foundation executive director, Deb Nicholson, to share details about PyCon US 2023.
We cover a recent Real Python tutorial by Philipp Acsany on evaluating the quality of Python packages. The piece provides a tool kit for researching the traits, history, software license, and current condition of external Python packages. We also discuss the techniques that we personally use before selecting a package for our Python projects.
We share several other articles and projects from the Python community, with topics such as the underlying structure of virtual environments, the overhead of Python asyncio
tasks, documentation for Python projects with Sphinx and Read the Docs, a project for creating argparse
boilerplate, and a way to generate seemingly realistic fake numbers using Benford’s law.
Deb Nicholson is also here to talk about the 20th anniversary of PyCon US, hosted in Salt Lake City. We dig into the details of the upcoming conference, including keynote speakers, tutorials, scheduled talks, and improvements to the hybrid online experience.
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:
asyncio
Tasksargparse
BoilerplateShow Links:
microvenv
.Projects:
argparse
BoilerplatePyCon US 2023 Links:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
namedtuple
News:
Show Links:
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.list
, dict
, and set
comprehensions as inline code can result in a 2x speedup on the comprehension.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
asdf
Rust Clone)News:
Show Links:
Projects:
PyCascades Links:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
Discussion
Projects:
for
loop in Python? No? Well, you can have one anyway. See how Tushar implemented with for (i := var(0), i < 10, i + 2):
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Show Links:
yaml
Document From Hell – As a data format, YAML is extremely complicated and it has many footguns. In this post, Ruud explains some of those pitfalls by means of an example and suggests a few simpler and safer YAML alternatives.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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
Statement
In this video course, you’ll learn what the Python with
statement is and how to use it with existing context managers. You’ll also learn how to create your own context managers.
Topics:
with
StatementNews:
Show Links:
with
Statement – In this video course, you’ll learn what the Python with
statement is and how to use it with existing context managers. You’ll also learn how to create your own context managers.2 <= x < 10
) and numbers with separators (1000000 == 1_000_000).Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
import
Statement Do You Use?News:
Show Links:
multiprocessing
module.Discussion:
import
Statement Do You Use?Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
How do you start packaging your code with pyproject.toml? Would you like to join a conversation that gently walks you through setting up your Python projects to share? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.
We discuss a recent code conversation featuring Real Python team members Ian Currie and Geir Arne Hjelle. The video dives into the officially sanctioned way to configure your project using a pyproject.toml
file. We cover how this relatively new approach will help you package your code for use on your system or for sharing with others.
Christopher shares a Real Python tutorial about using pathlib
to get a list of all the files within a directory. We’re both fans of pathlib
and how it simplifies working with file paths. The tutorial digs into methods to recursively list all directory contents or create a conditional listing.
We share several other articles and projects from the Python community, including an explanation of Python bytecode, an argument for always using [closed, open)
intervals, a discussion about building the monolith before microservices, a way to parse natural language time and date expressions, and a project for posting on Mastodon.
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:
[closed, open)
Intervalspyproject.toml
Show Links:
[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]?”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.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
classification_table
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Topics:
python -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.Discussion:
Projects:
log2d
, a third-party wrapper for the Python logging library.Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
str
vs UserString
News:
@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:
Ellipsis
constant can come in handy for you.str
vs UserString
– In this tutorial, you’ll learn how to create custom string-like classes in Python by inheriting from the built-in str
class or by subclassing UserString
from the collections
module.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
pytest
plug-inShow Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
argparse
.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
async
support. The Python web ecosystem has been seeing new frameworks pop up which are fully async
, or support going fully async, from the start.” Learn more about async
and its use in web frameworks.@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.Discussions:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Topic Links:
os.path
, random
, pytz
, namedtuple
and many more obsolete Python libraries. Start using the latest and greatest ones instead.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
News:
Topic Links:
dict
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.music21
and avro
libraries, you can create musical scores programmatically. This article runs you through which libraries you need and how you can compose your own music.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
__post_init__
Show Links:
Level up your Python skills with our expert-led courses:
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:
Topics Links:
profile
, and timeit
libraries, along with others.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Security Specific Tools Written in Python:
Incident Response and Memory Forensics:
Honeypot Resources:
Bug Bounty Programs:
Security and Hacking Conferences:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
News:
Topic Links:
list()
or enumerate()
? Think of them as functions? They’re not—they’re classes. Sometimes we call classes functions in Python. Why? And what’s a “callable”?openCV
reading the camera image from an old iPhone. See all the details.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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()
and max()
, 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:
News:
Topic Links:
min()
and max()
.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Topic Links:
__repr__
, __str__
, operator overloading, and getting your classes working with Python functions like len()
.doctest
module allows you to write unit tests through REPL-like sessions in your docstrings. Learn how to write and execute doctest
code. Also available in video.Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Topic Links:
venv
module, as well as the reasoning behind using virtual environments.Discussions:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
Show Links:
Level up your Python skills with our expert-led courses:
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:
Topic Links:
Discussion:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
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:
try
… except
blockShow Links:
Level up your Python skills with our expert-led courses:
Do you understand how a hash table works? What if you could learn about building one while practicing test-driven development? What are best practices when designing a REST API? This week on the show, Christopher Trudeau is here, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We talk about the recent Real Python article “Build a Hash Table in Python With TDD.” The tutorial shows how to implement a hash table prototype from scratch in Python. It also provides a hands-on crash course in test-driven development.
Christopher shares an article on designing REST APIs and provides some of his own best practices. We cover authentication implementation, good naming conventions, versioned APIs, and ways to specify dates.
We cover several other articles and projects from the Python community, including a news roundup, a PEP on removing dead batteries from the standard library, a comparison of the Python list vs tuple, a guide to writing user-friendly CLIs in Python, just enough Cython to be useful, a cross-platform TUI and ASCII animation package, and code for running black
on Python code blocks in documentation files.
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:
News:
Topic Links:
list
and tuple
are similar and how they’re different, including storage and speed differences and how to choose between them.argparse
, Click
, Typer
, Docopt
, and Fire
.Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Do you wonder if you’re taking the right approach when shaping data in pandas? Is your Jupyter workflow getting out of hand? This week on the show, Matt Harrison talks about his new book, “Effective Pandas: Patterns for Data Manipulation.”
Matt discusses working as a corporate consultant and migrating Excel users toward Python. We explore several “NumPy-isms” that beginners get stuck on. Matt shares advice about chaining operations in pandas, which some developers find controversial.
Course Spotlight: Sorting Data in Python With Pandas
In this video course, you’ll learn how to sort data in a pandas DataFrame using the pandas sort functions sort_values()
and sort_index()
. You’ll learn how to sort by one or more columns and by index in ascending or descending order.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Would you like to build visualizations that allow your audience to play with data? How do you effectively use Python’s assert statement during development? This week on the show, Christopher Trudeau is here, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We talk about an article that shows how to build interactive visualizations with pandas, seaborn, and ipywidgets. These widgets allow you to add sliders, buttons, and dropdown menus to your Jupyter Notebooks.
Christopher shares the Real Python article “Python’s assert: Debug and Test Your Code Like a Pro”. It covers how to use assert
statements to document, debug, and test code while in development.
We cover several other articles and projects from the Python community, including a news roundup, code review guidelines for data science teams, a project to manage your to-do lists using Python and Django, a Python 4 dream list, a static site generator based on Django, and a book of practical Python projects.
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:
News:
Topic Links:
assert
statement to document, debug, and test code in development.Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
There are many ways to get Python installed on your computer. If you were going to start fresh, what tools would you use? What if you need to manage multiple versions of Python and virtual environments? What about all the additional tools that make your coding workflow complete? This week on the show, Calvin Hendryx-Parker is here to talk about bootstrapping your Python environment.
Calvin is the co-founder and CTO of Six Feet Up and a Python Web Conference co-organizer. As a consultant, Calvin has set up countless machines to run Python. He configures environments that can scale from in-office projects to distributed cloud-based applications.
We cover tools for installing Python, managing multiple language versions, and configuring virtual environments. Calvin talks about setting up command-line applications in isolated environments. We also discuss traveling with Python on an iPad.
Course Spotlight: Start Managing Multiple Python Versions With pyenv
In this step-by-step course, you’ll learn how to install multiple Python versions and switch between them, including project-specific virtual environments, with ease with pyenv.
Topics:
requirements.txt
files and moving from pipenv to piptoolsShow Links:
Level up your Python skills with our expert-led courses:
How do you define Python functions that accept optional arguments or default values? Are you wondering how to go beyond being a beginner with Python? This week on the show, Christopher Trudeau is here, and he’s brought another batch of PyCoder’s Weekly articles and projects.
Christopher shares a Real Python article, “Defining Python Functions With Optional Arguments.” We talk about function flexibility, specifying default values, and using args
& kwargs
.
We discuss resources for a Python beginner to move beyond the basics and become more competent. Both of us share our experiences moving past these hurdles.
We cover several other articles and projects from the Python community, including a news roundup, ten tools you may have wished you knew when you started working with Python, Python’s zipfile
for manipulating your zip files efficiently, how one company optimized Python API server code by 100x, a dependency-free Python library for downloading YouTube videos, and how to use Python on the command line with other shell commands.
Course Spotlight: Defining Python Functions With Optional Arguments
In this video course, you’ll learn about Python optional arguments and how to define functions with default values. You’ll also learn how to create functions that accept any number of arguments using args and kwargs.
Topics:
News:
TypeVar
-based approach specified in PEP 484 but is more concise and easier to follow. Related Twitter thread by core dev Raymond Hettinger.Topics:
*args
and **kwargs
.Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Have you thought about what authentication system you want to use for your Python project? Should you use an existing Python library or a third-party service? This week on the show, Dan Moore is here to talk about authentication systems and OAuth 2.
Dan is the head of developer relations at FusionAuth. He shares advice about setting up an authentication system, setting up device grants, using social login, and addressing privacy issues. Dan also provides multiple resources to learn much more about the topic.
Course Spotlight: Using Google Login With Flask
In this course, you’ll create a Flask application that lets users sign in using their Google login. You’ll learn about OAuth 2 and OpenID Connect and also find out how to implement some code to handle user session management.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you been wanting to explore fractals and complex numbers in Python? Would you like to practice working with APIs in Python through a new project? This week on the show, Christopher Trudeau is here, and he’s taking on the task of curating new issues of PyCoder’s Weekly going forward. He’ll be joining me as a cohost every other week and bringing a fresh batch of PyCoder’s Weekly articles and projects.
We discuss a Real Python article about drawing the Mandelbrot set in Python. The tutorial guides you through creating fractal art using Matplotlib and Pillow. We also share a new step-by-step project building a weather-reporting command-line interface (CLI) app.
We cover several other articles and projects from the Python community, including a news roundup, a better Pygame main loop, ways to work with static and media files in Django, and a library for pleasing console output.
Course Spotlight: Make a 2D Side-Scroller Game With Pygame
In this step-by-step course, you’ll learn how to use Pygame. This library allows you to create games and rich multimedia programs in Python. You’ll learn how to draw items on your screen, implement collision detection, handle user input, and much more!
Topics:
News:
debug
template tag and a denial-of-service possibility in file uploads.Articles:
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
How often have you thought about your Developer Experience (DX)? How do you improve your workflow, find documentation, and simplify code formatting? This week on the show, Adam Johnson is here to talk about his new book, “Boost Your Django DX.”
Adam provides advice on improving your developer experience, specifically inside Django and within Python. We discuss tools to simplify code formatting and linting.
Adam shares a couple of his own Django tools designed to simplify development and keep your projects updated. He also covers documentation resources for finding answers quickly.
Course Spotlight: Django View Authorization: Restricting Access
This course covers how to restrict your web pages to users with different roles through Django view authorization. You’ll learn about HttpRequest.user
objects, decorators that authenticate views, and ways to notify your users with the Django messages framework.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Would you like to experiment with analyzing or manipulating audio with Python? This week on the show, we have Braden Riggs from DolbyIO to discuss extracting audio features and Python libraries for reshaping audio. Braden shares techniques from his recent talk at PyData Global, “Unlocking More From Your Audio Data!”
We share several articles, tutorials, and Python libraries to get you started working with audio. We begin with a quick introduction to audio digitization and feature extraction. After discussing modifying audio files, we share tools and techniques for exploring audio analysis through data science.
Braden talks about speech-to-text conversion, sentiment analysis, and Natural Language Toolkit (NLTK). He also shares a valuable collection of audio technology resources for developers.
Course Spotlight: Playing and Recording Sound in Python
In this course, you’ll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. You’ll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
How can you can speed up Python? Have you thought of using a JIT (Just-In-Time Compiler)? This week on the show, we have Real Python author and previous guest Anthony Shaw to talk about his project Pyjion, a drop-in JIT compiler for CPython 3.10.
Anthony has been working on Pyjion over the past year and recently released version 1.0. He talks about how he took over the project from Brett Cannon and Dino Viehland. He covers the background on compilers and assembly that he needed to take on this project.
We discuss where a tool like this can speed up your Python code, and we consider alternative solutions. We also talk about his desire to make the project as deeply compatible with Python code as possible.
Anthony talks about how his dive into writing the CPython Internals book led him into the project. We talk about what type of developer would benefit from exploring the book.
We also cover his recent Real Python article, titled “Advanced Visual Studio Code for Python Developers.” It’s an excellent resource that VS Code users should bookmark to revisit as they grow with the tool.
Spotlight: CPython Internals Book: Your Guided Tour Through the Python 3 Interpreter
Unlock the inner workings of the Python language, compile the Python interpreter from source code, and participate in the development of CPython.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you looking for a project to practice your Django skills? Designing the fundamental interactions of a social network is an instructive way to explore models and relationships while learning advanced Django skills. This week on the show, we talk with previous guest Martin Breuss about his new four-part series, “Build a Social Network With Django”.
Martin talks about the design process and ways to include user-focused features. He shares a handy CSS library to make your front end look modern with minimal effort.
We digress into a discussion of personal vs professional use of social networks. We also talk about the additional Real Python resources to help you build out the rest of your project.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Would you like a simple command to launch your Python programs using the newest version of the language installed on your machine? This week on the show, we continue our conversation with Brett Cannon. Brett discusses his project, the Python Launcher for Unix.
We dive into Brett’s workflow to set up projects, virtual environments, and prepare for distribution. He shares some of the tools he employs and reasons for keeping things simple.
We also talk about PEP 665, which specifies a file format to list an application’s Python package installation requirements. Brett shares why he co-authored the PEP and a bit of the community’s reaction. It leads to a deeper conversation about going beyond ‘requirements.txt’ to lock files.
Course Spotlight: Data Visualization Interfaces in Python With Dash
In this course, you’ll learn how to build a dashboard using Python and Dash. Dash is a framework for building data visualization interfaces. It helps data scientists build fully interactive web applications quickly.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
A year ago, we had Brett Cannon on the show to discuss his blog series about unravelling Python’s syntactic sugar. Brett has written 15 more entries in the series, and he returns to the show this week to continue our conversation. We dive into unravelling ‘async’ and ‘await’ statements and their relationship with Python’s generators.
While working through the series, he has uncovered some issues lying under the surface of CPython. We discuss a couple of these discoveries and how the core developers resolved them.
Brett was recently re-elected to the Python Steering Council, and he talks about how the current direction of the council is shifting. We also discuss how Brett uses Twitter polls to gauge community sentiment and factors it into development decisions.
This conversation covered so many topics that we split it into two episodes. Next week’s episode will continue our discussion.
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:
__iter__()
for an iterator?Show Links:
Level up your Python skills with our expert-led courses:
It’s been a year of change at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python articles this year. We also added many new members to the team, updated the site’s features, and created new styles of tutorials and projects.
Two members of the Real Python team join us this week, Martin Breuss and Sadie Parker. We wanted to share a year-end wrap-up with a collection of articles and step-by-step projects that showcase what our team created this year.
Sadie and Martin 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.
We hope you enjoy this review! Programming note, there won’t be an episode next week, but we will be back in January and look forward to bringing you a year full of great guests, articles, and topics.
Course Spotlight: Using Pygame to Build an Asteroids Game in Python
In this course, you’ll learn the basics of creating powerful web applications with 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:
Show Links:
Additional Links:
Level up your Python skills with our expert-led courses:
The Python community continually grows, with many users coming from different languages and backgrounds. This week on the show, we talk with developer Hugh Tipping about his Python journey. Hugh is also a member of the Real Python community.
Hugh has a background in programming C and Perl and started to use Python in a cyber security job. He explains the way he used Python to search for malware. Hugh provides some suggestions for security packages and tools.
Recently Hugh has been working with Amazon Web Services (AWS) and using the Boto3 library to automate services and manage credentials. We also discuss his affinity for test-driven development and the use of pytest.
Course Spotlight: Host Your Django Project on Heroku
In this course, you’ll learn how to host your Django project in the cloud for free and with little hassle. You’ll use Heroku, which takes the burden of infrastructure management off your shoulders.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you ready to break open the first days of puzzles from the annual Advent of Code challenge? Advent of Code is an advent calendar of twenty-five programming puzzles published each December. Practicing solving puzzles is a great way to build your Python skills. This week on the show, we have previous guest and Real Python author Geir Arne Hjelle to discuss his recent article titled, “Advent of Code: Solving Your Puzzles With Python.”
We discuss the history of this online Advent calendar and the creator Eric Wastl. Geir Arne covers techniques to help you organize your code and test when solving the puzzles. He shares additional Python tools for parsing text, managing puzzle data, and visualizing your program output. We also talk about even more places you can practice solving programming puzzles.
Course Spotlight: Regular Expressions and Building Regexes in Python
In this course, you’ll learn how to perform more complex string pattern matching using regular expressions, or regexes, in Python. You’ll also explore more advanced regex tools and techniques that are available in Python.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
There seem to be three kinds of Python developers: those unaware of type hints or have no opinion, ones that embrace them, and others who have an allergic reaction at the mention of them. Python is famously a dynamically typed language, but there are advantages to adding type hints to your code. This week on the show, we have Luciano Ramalho to discuss his recent talk titled, “Type hints, protocols, and good sense.”
Luciano was not a fan of type hints. He’s only recently come around to their potential with the introduction of protocols in PEP 544. Python has adopted a gradual type system that is optional at all levels. We discuss the advantages, pitfalls, and recent developments around type hinting in Python.
We also talk about the second edition of Luciano’s book Fluent Python. He researched type hints in-depth for the book, which led to his recent conference talks on the subject. He also shares his experience with adding opinionated asides to the book in a fun and unique way.
Course Spotlight: Python Type Checking
In this course, you’ll look at Python type checking. Traditionally, types have been handled by the Python interpreter in a flexible but implicit way. Recent versions of Python allow you to specify explicit type hints that can be used by different tools to help you develop your code more efficiently.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you wanted to work with RSS feeds in Python? Maybe you’re looking for a new project to build for your portfolio that uses Django, unit tests, and custom commands. This week on the show, we have Real Python author Ricky White to talk about his recent step-by-step project titled, “Build a Content Aggregator in Python.”
Ricky has been authoring the Real Python interview series for several years and was formerly our Community Manager. He talks about what inspired him to create this project and the Python technology and libraries to build it. He also shares advice about adding tests to personal portfolio projects.
We start the show by discussing Python’s GIL (Global Interpreter Lock) and the efforts to potentially remove it in future versions of Python. This change could make a significant impact on Python code running on multi-core processors. We talk about two recent articles covering the developments.
Course Spotlight: Get Started With Django: Build a Portfolio App
In this course, you’ll learn the basics of creating powerful web applications with Django, a Python web framework. You’ll build a portfolio website to showcase your web development projects, complete with a fully functioning blog.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Do you remember the One Laptop Per Child program? What went wrong, and what can we learn from the program’s failure? What are the potential pitfalls of charismatic technology, and how can we avoid them when introducing students to programming? This week on the show, former guest Al Sweigart and author Morgan Ames are here to talk about her book “The Charisma Machine - The Life, Death, and Legacy of One Laptop per Child.”
We discuss the OLPC program and how idealized visions of our programming backgrounds can become traps. Morgan explains how these utopian visions are still used to attempt to disrupt education. Along with this cautionary tale, we also talk about educational programs that are working and how entry points to programming are changing.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Are you getting the most out of the Django framework? It’s a powerful web framework if you’re not interested in reinventing the wheel. Django includes a useful template system with inheritance for composing reusable HTML. This week on the show, we have previous guest and Real Python author Christopher Trudeau to talk about his recent articles and courses about Django.
Christopher explains how Django templates help you avoid rewriting large portions of HTML for your web applications. His first article covers the built-in tags and filters provided by the framework. The second one dives into how customize and implement your own filters and tags. Christopher also talks about his process for choosing topics for articles and courses.
We start the episode by covering a recent article by CPython Developer in Residence, Łukasz Langa. We talked in a previous episode about his plan to study where all the Python core developer activity goes. He’s gathered several years of GitHub data, and we discuss the post.
Course Spotlight: Building With Django REST Framework
This course will get you ready to build with Django REST Framework. The Django REST framework (DRF) is a toolkit built on top of the Django web framework that reduces the amount of code you need to write to create REST interfaces.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you wanted to generate PDFs from your Python project? Many of the current libraries require designing the document down at the pixel level. Would you be interested in a tool that lets you specify the page layout while it handles the specific details of laying out the text? This week on the show, we talk with Joris Schellekens about his library for creating and manipulating PDFs named borb.
borb is a pure Python library that can read, write and manipulate PDFs. You can use it to build fillable forms, invoices with attached data files, and multiple column document layouts. We discuss the extensive example repository Joris has created for the library.
Joris shares his background in working with PDFs. He talks about starting the project and the challenges he had to overcome. We also talk about licensing and maintaining an open-source library.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Are you interested in sharing your Python project with the broader world? Would you like to make it easily installable using pip? How do you create Python packages that share your code in a scalable and maintainable way? This week on the show, Real Python author and former guest Dane Hillard returns to talk about his new book, “Publishing Python Packages.”
Dane shares his research into creating Python packages. We talk about the tools, techniques, and potential pitfalls of publishing your packages. Dane also discusses his experiences unraveling projects and determining dependencies.
We also talk about Dane’s recent conference talk at PyGotham titled “Keeping code safe and modern with semantic searches.” He shares some security tools and practices.
Course Spotlight: Documenting Python Code: A Complete Guide
This course will get you up to speed with how to document your Python code. Documenting your code is an important step to help developers and users fully understand its usage and purpose.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Earlier this year, the Python Software Foundation announced the creation of the Developer in Residence role. The first Visionary Sponsors of the PSF have provided funding for this new role for one year. What development responsibilities does this job address? This week on the show, we talk to previous guest Łukasz Langa about becoming the first CPython Developer in Residence.
We talk about how the first months in this role are shaping up. Łukasz discusses the need to address the backlog of open issues and pull requests. He also talks about how he is working to help the project’s volunteers move their contributions forward.
We cover his PyCon 2021 talk about generating real-time FM audio synthesis in Python. He also shares his experience developing a similar synthesis engine for an embedded hardware project.
Course Spotlight: Speech Recognition With Python
In this course, you’ll cover the fundamentals of speech recognition with Python. You’ll learn which speech recognition library gives the best results and build a full-featured “Guess The Word” game with it.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Python 3.10 is here! This week on the show, two former guests and Real Python authors return to talk about the new version. Geir Arne Hjelle’s article was posted to the site Monday, and it’s titled “Python 3.10: Cool New Features for You to Try”. Christopher Trudeau’s video course came out on Tuesday, and it covers the topics from the article with multiple visual examples of Python 3.10 code.
Geir Arne and Christopher worked together to create code examples of the new features used in both. We talk about more user-friendly error messages, structural pattern matching, enhancements to Python’s type system, and much more.
Geir Arne and Christopher not only cover the new features but they offer advice about ways you might incorporate them into your code. We also discuss what you should think about before running the new version for your projects.
Course Spotlight: Cool New Features in Python 3.10
In this course, you’ll explore some of the coolest and most useful features in Python 3.10. You’ll appreciate more user-friendly error messages, learn about how you can handle complicated data structures with structural pattern matching, and explore new enhancements to Python’s type system.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you wanted to create a Python application that goes further than a command-line interface? You would like it to have a friendly interface but don’t want to make a GUI (Graphical User Interface) or web application. Maybe a TUI (Text User Interface)would be a perfect fit for the project. This week on the show, we have Will McGugan to talk about his projects Textual and Rich.
Rich is a Python library for writing rich text to the terminal with color and style. It’s a great tool if you want to display advanced content such as tables, markdown, and syntax-highlighted code. We talk about how Will started on the project and how it’s developed over the years.
We also talk about Will’s new project Textual, a TUI using much of Rich at its core. He shares how the project is coming along and what are challenges in developing this type of application. We discuss how a TUI has more in common with CSS and web development than command line or graphical interfaces.
We also have a quick announcement at the top of the show from CPython Developer in Residence Łukasz Langa about next week’s release of Python 3.10.
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:
Show Links
object.__repr__ (self)
: Python docsLevel up your Python skills with our expert-led courses:
Where are you along the path of learning Python? Do you feel like you’re making progress? What are ways you can put the learning path into a more precise focus? This week on the show, we talk with previous guest Martin Breuss about his recent article “How Long Does It Take to Learn Python?”
Martin discusses methods for measuring your progress and the various reasons for learning the language. We talk about how different backgrounds will affect your approach. We also suggest resources to help you on your path.
We share a couple of recent Python projects to round out the episode. The first is a library to draw stylized maps from OpenStreetMap data. The other is a framework for the analysis and visualization of trees, which includes a set of phylogenomic tools.
Course Spotlight: Using the Python return Statement Effectively
In this step-by-step course, you’ll learn how to use the Python return statement when writing functions. Additionally, you’ll cover some good programming practices related to the use of return. With this knowledge, you’ll be able to write readable, robust, and maintainable functions in Python.
Topics:
Show Links:
Projects:
Level up your Python skills with our expert-led courses:
Are you a visual learner? Does it help to have programming concepts shared with concrete examples and images? Would you like to see if your child might be interested in programming? This week on the show, we talk with author Shari Eskenas about her books, “A Day in Code - Python: Learn to Code in Python Through an Illustrated Story” and “Learn Python Through Nursery Rhymes & Fairy Tales.”
We talk about the books and what inspired her to bring programming to picture books. Shari discusses her goal of providing a fun way for beginners to experience learning to code.
Shari is also an electrical engineer with multiple patents and the founder of Sundae Electronics. We talk briefly about SoundBrake, which is an audio device that alerts headphone users to outside sounds.
Shari’s programming background is primarily in C, and we cover her path to Python. We also discuss how she is using Python and the Raspberry Pi to prototype new projects.
Course Spotlight: Reading and Writing Files With Pandas
In this course, you’ll learn about the Pandas IO tools API and how you can use it to read and write files. You’ll use the Pandas read_csv() function to work with CSV files. You’ll also cover similar methods for efficiently working with Excel, CSV, JSON, HTML, SQL, pickle, and big data files.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you a beginner or intermediate Python programmer who has made it through some of the fundamentals? Have you tried to tackle a big project but got stuck and frustrated? Completing some small projects might be the answer. This week on the show, we have author Al Sweigart and talk about his new book, “The Big Book of Small Python Projects.”
We discuss the advantages of sometimes thinking small in terms of Python programs. We talk about completing projects and the benefits of manually copying code by typing it in yourself. Al also has suggestions about tools for beginners and intermediate developers.
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:
Show Links:
Level up your Python skills with our expert-led courses:
How well do you know Python’s math module? Maybe you’ve used a few of the constants or arithmetic functions. You may be surprised by the amount of functionality hiding within this built-in library, and perhaps you don’t need to reach for an additional outside library. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We discuss a recent video course about the math module. David shares a recent article about implementing efficient queues and stacks with Python’s deque (double-ended queue) class. We also talk about an article that shares 25 Pandas functions you may not have known to exist.
We cover several other articles and projects from the Python community including, visualization and interactive dashboards in Python with HoloViz, designing a camera with Python and PyRayT, graphing data science with Python and networkx, another useful Python pdf library, and runtime software verification and automated testing for scientific software in Python with a project named paranoidscientist.
Course Spotlight: Exploring the Python math Module
In this step-by-step course, you’ll learn all about Python’s math module for higher-level mathematical functions. Whether you’re working on a scientific project, a financial application, or any other type of programming endeavor, you just can’t escape the need for math!
Topics:
Show Links:
Python’s deque: Implement Efficient Queues and Stacks – In this step-by-step tutorial, you’ll learn about Python’s deque
and how to use it to perform efficient pop and append operations on both ends of your sequences. Deques are commonly used to build queues and stacks.
Visualization and Interactive Dashboard in Python – Have you ever heard of HoloViz? It’s a set of Python visualization and plotting tools for browser-based data visualization and presentation. In this article, Sophia Yang — a senior data scientist at Anaconda — explains why she loves HoloViz and what her workflow looks like when using it.
Design a Camera with Python and PyRayT – Camera lenses are more complex than you might think. If you cut open a camera to look at a cross-section, you’d see that a lens is actually made up of several smaller lenses. This article explores how camera lenses work using a new Python raytracing project called PyRayT that’s designed for designing optical systems.
25 Pandas Functions You Didn’t Know Existed – Did you know that you can style the pandas DataFrame output in a notebook? This listicle covers twenty-five pandas functions that you may not have heard of, including .explode()
, .squeeze()
, and the pandas DataFrame styler. There’s something in this article for everyone, so read it to find out how you can take your pandas skills to the next level.
Graph Data Science With Python and NetworkX – Graph theory network analysis can yield deep data insights that are difficult to tease out via alternative methods. Get a taste of what graph analysis can do in this quick, hands-on tutorial that uses NetworkX to create and analyze a graph.
Exploring the Python math Module – In this step-by-step course, you’ll learn all about Python’s math
module for higher-level mathematical functions. Whether you’re working on a scientific project, a financial application, or any other type of programming endeavor, you just can’t escape the need for math!
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Can you make a version of Python that fits within the memory constraints of a microcontroller and have it still feel like Python? That is the intention behind CircuitPython. This week on the show, we have Scott Shawcroft, who is the project lead for CircuitPython.
We talk about all things CircuitPython. While working with the language on several projects I have developed many of my own questions to ask Scott. Scott answers my questions about boot loaders, packages, the bundle, and bluetooth low energy (BLE).
He also talks about the struggle of fitting the language and board specific libraries within tiny memory constraints. We discuss projects and boards for beginners, and many resources to learn more.
Course Spotlight: Getting Started With MicroPython
Are you interested in the Internet of Things, home automation, and connected devices? If so, then you’re in luck! In this course, you’ll learn about MicroPython and the world of electronics hardware. You’ll set up your board, write your code, and deploy a MicroPython project to your own device.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you started to use Python’s assignment expression in your code? Maybe you have heard them called the walrus operator. Now that the controversy over the introduction in Python 3.8 has settled down, how can you use assignment expressions effectively in your code? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David shares a recent article by previous guest Brett Cannon about what to do if you botch a release to PyPI. It’s a valuable resource to keep bookmarked for when things go sideways. We also talk about a recent project by Brett, a Python launcher for Unix based operating systems.
We cover several other articles and projects from the Python community including, a Python framework with a built-in database and authorization support from Replit, do coders learn how to use entire libraries just from the documentation, how to use sleep()
to code a Python uptime bot, monitor your home’s temperature and humidity with Raspberry Pis and Prometheus, and a fast Settlers of Catan Python implementation with a strong AI player.
Course Spotlight: Using sleep() to Code a Python Uptime Bot
In this course, you’ll learn how to add time delays to your Python programs. You’ll use the built-in time module to add Python sleep() calls to your code. To practice, you’ll use time.sleep() when making an uptime bot that checks whether a website is still live.
Topics:
Show Links:
The Walrus Operator: Python 3.8 Assignment Expressions – In this tutorial, 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 new feature.
Replit.web: A Python Framework With Built-in Database and Auth Support – The folks over at replit have released a new Python web framework with built-in authentication and database support and, more interestingly, hosting. In a few lines of code, you can have a Python web app connected to a database, authenticating users, and hosted on replit. This could be a great tool for quickly building and hosting prototypes or experimental projects.
Do Coders Really Learn How to Use Entire Libraries Just From the Documentation? – How do you learn a new library? Do you start with the docs? What do you do if the documentation is lacking? Or do you first search for video lessons or written tutorials?
Using sleep() to Code a Python Uptime Bot – Learn how to add time delays to your Python programs. You’ll use the built-in time module to add Python sleep()
calls to your code. To practice, you’ll use time.sleep()
when making an uptime bot that checks whether a website is still live.
Monitor Your Home’s Temperature and Humidity With Raspberry Pis and Prometheus – Do you enjoy collecting and analyzing data, or are you looking for a fun project to improve your data skills? Do you also enjoy tinkering with hardware? Then this project might be a fun one for you to check out! Learn how to set up a RaspberryPi using Prometheus to collect and monitor temperature sensor data.
What to Do When You Botch a Release on PyPI – Mistakes happen to everyone. But what do you do if you make a mistake when releasing a package to PyPI? Don’t panic! There are a number of things you can do to fix a bad release. This article walks you through several scenarios and suggested solutions.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
How do you define open source software? What are the challenges an open source project and maintainers face? How do maintainers receive financial, legal, security, or other types of help? This week on the show, we have Josh Simmons from Tidelift and the Open Source Initiative to help answer these questions.
Josh does open source ecosystem strategy for Tidelift. We talk about what Tidelift is and how they support maintainers. We also discuss the types of support maintainers need and the barriers that can block that support.
Josh also serves as President of the Open Source Initiative. OSI is actively involved in open source community-building and education. He talks about how collectives and foundations can be powerful tools in the open source ecosystem.
Course Spotlight: Python Inner Functions
In this step-by-step course, you’ll learn what inner functions are in Python, how to define them, and what their main use cases are. You’ll see how to write helper functions, create closure factory functions, and how to add behavior to existing functions with decorators.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you heard of FastAPI? An application programming interface is vital to make your software accessible to users across the internet. FastAPI is an excellent option for quickly creating a web API that implements best practices. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We share an introduction to FastAPI written by the framework’s author, Sebastián Ramírez. The goal behind the article is to get you started creating production-ready APIs.
David covers an article about the Python import system and how it remains a mystery for many Python developers. We share some additional Real Python resources on the import system and statements.
We cover several other articles and projects from the Python community including, a buffet of specialized data types with Python’s collections module, maps with Django using GeoDjango, PostGIS, and Leaflet, moving SciPy to the Meson build system, what’s new in Python 3.11, a community-maintained Python framework for creating mathematical animations, and easily make PDFs with pdfme.
Course Spotlight: Python Modules and Packages: An Introduction
In this course, you’ll explore Python modules and Python packages, two mechanisms that facilitate modular programming. See how to write and import modules so you can optimize the structure of your own programs and make them more maintainable.
Topics:
Show Links:
Python’s collections: A Buffet of Specialized Data Types – Python has a number of useful data types beyond the built-in lists, tuples, dicts, and sets. In this tutorial, you’ll learn all about the series of specialized container data types in the collections
module from the Python standard library. Learning the collections
module is a great way to level up your Python programming knowledge!
Maps With Django: GeoDjango, PostGIS, and Leaflet – This quickstart guide shows you how to create a web map using Django’s GeoDjango module. Data for the map is stored in a PostgreSQL database using the PostGIS extension, and Leaflet, a lightweight JavaScript library for interactive maps, is used on the front-end. You’ll not only learn how to set up the Django application and display the map but also add markers to the map and automatically center the map on the application user’s location.
Moving SciPy to the Meson Build System – In accordance with PEP 632, distutils
will be deprecated in Python 3.10 and in Python 3.12 it will be removed. This posed a big problem for SciPy, since it’s build system depends on NumPy’s distutils
module — an extension of Python’s built-in distutils
. The SciPy maintainers set out to find a new build system and settled on Meson, which solves a number of build issues and even scores a 4x speed-up on build times!
What’s New In Python 3.11 – Python 3.10 is still in beta, but work on Python 3.11 has already begun. Big changes include some major improvements to tracebacks as well as a new cube root function in the math
module.
Behind the Scenes: How the Python Import System Works – Importing a Python module is probably one of the most used language features. But Python’s import system remains a mystery to many Python developers, even folks with years of experience. This in-depth article explores how the import system works from the top down. You’ll learn everything from the difference is between absolute and relative imports to how Python searches for modules and packages and resolves naming conflicts.
Using FastAPI to Build Python Web APIs – In this guide, written by FastAPI creator Sebastián Ramírez, 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.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Are you still sprinkling print statements throughout your code while writing it? Print statements are often clunky and offer only a limited view of the state of your code. Have you thought there must be a better way? This week on the show, we have Nina Zakharenko to discuss her conference talk titled “Goodbye Print, Hello Debugger.”
We talk about how to get started debugging your code by adding a single keyword. Nina discusses the differences between debugging on the command line vs using the tools included with an Integrated Development Environment(IDE). She also shares tricks and best practices. If you haven’t seen Nina’s conference talk, it’s a great starting point.
We also talk about working through the last 18 months and how to recharge your creative batteries. We briefly discuss two other presentations Nina gave about CircuitPython and getting started with electronics and Python.
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:
Show Links:
Level up your Python skills with our expert-led courses:
How is Python being used today, and what can you do with the language? Do you want to develop software, dive into data science and math, automate parts of your job and digital life, or work with electronics? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We talk about a Real Python article that covers the incredible variety of ways you can use Python. David shares an article about the pythonic way to count objects using the Counter class from the collections module. We discuss the ways it can lead to cleaner and more efficient code.
We cover several other articles and projects from the Python community including, the inaugural CPython developer-in-residence, typeclasses in Python, GitHub Copilot writes a text-based game, friendlier tracebacks in REPLs (including Jupyter), 120+ interactive interview challenges, a module that helps you build complex pipelines of batch jobs, and a tool for plotting in the terminal.
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 a list comprehension in Python and how to create them effectively.
Topics:
Show Links:
Łukasz Langa Is the Inaugural CPython Developer-in-Residence
What Can I Do With Python? – You’ve finished a course or finally made it to the end of a book that teaches you the basics of programming with Python. You’ve learned about variables, lists, tuples, dictionaries, for and while loops, conditional statements, object-oriented concepts, and more. So, what’s next? What can you do with Python nowadays?
Typeclasses in Python – Sometimes you need to change the behavior of a function based on the type of argument passed to it. This is a classic example of polymorphism in programming. In this article, you’ll learn how this is typically done in Python, compare that to polymorphism in other languages, and see how the new classes library can make the whole process easier.
Copilot Writes a Text-Based Game in Python – GitHub’s new Copilot feature has a lot of people talking. The project’s goal is to be an AI pair programmer — a tool that can suggest entire lines of code or even entire functions! In this amusing article, one developer who gained access to Copilot’s technical preview shares how the AI wrote an entire text-based adventure game that turned out to be the solution to an exercise from a Python instructional book.
Python’s Counter: The Pythonic Way to Count Objects– In this step-by-step tutorial, you’ll learn how to use Python’s Counter
to count several repeated objects at once. You’ll also learn how to use Counter
objects to enhance other computations that you do in Python.
Friendlier Tracebacks in REPLs (Including Jupyter) – Tracebacks are often the start of any Python debugging journey. But tracebacks can be difficult to read and confusing to beginners. The friendly-traceback project aims to lift the veil of confusion for tracebacks by providing more helpful error messages with lots of context. New updates to the project include better tracebacks in Jupyter Notebooks!
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Do you wonder what the future may hold for the Python language? Are there speed improvements coming soon? What if you could be in the room while the core developers discuss Python’s future? This week on the show, we have Joanna Jablonski, who was invited to the Python Language Summit 2021 as a journalist to summarize and document the event.
A small group of core developers from the Python community gather to work toward a healthy future for the language. Through presentations and group discussions, they share insights, ideas, and potential problems.
Joanna has been the executive editor at Real Python and she was invited to write a series of blog posts for the Python Software Foundation (PSF) that summarize the presentations and deeper conversations of the summit. We walk through the two days and discuss the topics covered.
Several of the presentations focused on performance and speeding up CPython. There were conversations about packaging, documentation, the standard library, handling exceptions, testing, and more.
Course Spotlight: Defining and Calling Python Functions
In this course, you’ll learn how to define and call your own Python function. You’ll also learn about passing data to your function and returning data from your function back to its calling environment.
Topics:
Show Links:
Additional Links:
Level up your Python skills with our expert-led courses:
Are you ready to expand your Python knowledge into the intermediate to advanced territory? What tools are awaiting your discovery inside Python’s functools module? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We discuss an article about the functools module, which adds functionality for caching, function overloading, better definitions for decorated functions, and more. David talks about a new Real Python article about working with complex numbers in Python. We also cover a tutorial about troubleshooting memory problems in Python.
We cover several other articles and projects from the Python community including, DevOps interview questions, correlation analysis in Python, pivot and plot data with pandas, how to use Python and OpenCV to play online chess with a real chessboard, and generating hardware pinout diagrams as SVG images.
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:
Show Links:
The Future of FastAPI and Pydantic Is Bright – Not long ago there was some chatter on the internet about a change in Python 3.10 that would impact Python projects that check types at runtime. The discussion centered around FastAPI and Pydantic and had some folks worried about the future of those projects. In this article, FastAPI’s creator explains what the discussion was all about and why the future of FastAPI and Pydantic remains bright.
Simplify Complex Numbers With Python – In this tutorial, you’ll learn about the unique treatment of complex numbers in Python. Complex numbers are a convenient tool for solving scientific and engineering problems. You’ll experience the elegance of using complex numbers in Python with several hands-on examples.
Functools: The Power of Higher-Order Functions in Python – The functools
module is one of the “hidden gems” of the Python standard library. This article takes you on a tour of everything in functools
. You’ll learn how to implement caching, function overloading, and a whole lot more.
How to Pivot and Plot Data With Pandas – One of the challenges of working with data is knowing how to manipulate the data format for a particular analysis. And there’s no single correct format. You need to know how to melt, pivot, and transpose data into a format that fits whatever you’re analyzing. If you enjoy this article, be sure to also check out Stefanie’s Pandas Workshop.
devops-exercises: DevOps Interview Questions
Correlation Analysis 101 in Python – Correlation analysis is a useful part of exploratory data analysis. It can help you identify potential relationships between various features of your data. In this helpful guide, you’ll learn how to do correlation analysis in a pandas DataFrame
. You’ll see how to display a correlation matrix as a heatmap and explore some guidelines for identifying when correlation might imply causation.
How to Troubleshoot Memory Problems in Python – Memory problems can be frustrating. They’re hard to diagnose and fix, and memory issues in Python applications can be especially frustrating thanks to the language’s garbage collection system. In this article, you’ll learn a six-step process for troubleshooting memory problems that the EvalML team used to solve a tricky problem with their library.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
How well do you know your software supply chain? When you PIP install a package, what steps can you take to minimize the risk of installing something malicious? This week on the show, we have Dustin Ingram, a director of the Python Software Foundation (PSF) and a maintainer of the Python Package Index (PyPI).
We talk about Dustin’s PyCon 2021 talk titled “Secure Software Supply Chains for Python”. Dustin shares the types of attacks you should be aware of and how you can make your supply chain more trustworthy. We cover tools, techniques, and best practices.
Dustin also discusses what it takes to keep the Python Package Index running and the players working to keep it going into the future.
Course Spotlight: A Beginner’s Guide to Pip
This course is a great introduction to pip for those who are getting started Python, and for those who want to understand more about what is happening when you install new packages into your environment. It’s a worthy investment of your time to understand the fundamentals of pip.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you ready to practice your Python skills some more? There is a new set of practice problems prepared for you to tackle, and this time they’re based on working with CSV files. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David shares an article about functional programming with a focus on the “filter” function. The tutorial covers how to process an iterable and extract the items that satisfy a given condition. It also covers combining filter with other functional tools, and compares it to coding with Pythonic tools like list comprehensions and generator expressions.
We cover several other articles and projects from the Python community including, Excel, Python, and the future of data science, a Bayesian analysis of Lego prices in Python, why can’t comments appear after a line continuation character, teaching Python on the Raspberry Pi400 at the public library, a cross-platform editor designed for writing novels built with Python and Qt, and a text user interface with rich as the renderer.
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:
Show Links:
Excel, Python, and the Future of Data Science – What’s the most widely used tool in data science? Is it pandas or NumPy? Is it the Python language itself? Not really. It’s Excel. You might argue that data scientists aren’t using Excel as their primary tool, and you might be right. But Excel enables non-technical users, like small business owners, to gain insights into their data. In this article, Anaconda CEO Peter Wang discusses his goal of making Python and PyData the “conceptual successor” to Excel.
Python Practice Problems: Parsing CSV Files – In this tutorial, you’ll prepare for future interviews by working through a set of Python practice problems that involve CSV files. You’ll work through the problems yourself and then compare your results with solutions developed by the Real Python team.
A Bayesian Analysis of Lego Prices in Python With PyMC3 – Follow along with this in-depth analysis of LEGO prices to see Bayesian analysis in action. Along the way, you’ll how pooled and unpooled linear models can be used to determine if a LEGO set is fairly priced. The article is quite technical, so experience with Bayesian statistics is recommended.
Why Can’t Comments Appear After a Line Continuation Character? – Chaining together many object methods can create long tines that break the PEP 8 79-character line length recommendation. You can use \
to break the chain of methods onto individual lines, but if you want to leave comments at the end of some of the lines, you’re out of luck. There’s another pattern, though, that solves this.
Python’s filter(): Extract Values From Iterables – In this step-by-step tutorial, you’ll learn how Python’s filter()
works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace filter()
and make your code more Pythonic.
How I Teach Python on the Raspberry Pi 400 at the Public Library – Community-based programming courses are a great way to introduce folks to computer programming that otherwise may not have the means to do so. One of the barriers to learning to code is cost. You need a computer to program on, after all. But with the advent of tiny computers like the Raspberry Pi, computers aimed at education are more affordable than ever.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
The popularity of Python is continuing to grow Developers across the globe are embracing the language. How is Python being used in all of these different countries? How does an organization like the Python Software Foundation (PSF) work toward the goals in its mission statement for supporting and growing this international community? This week on the show, we have Marlene Mhangami, a PSF board member and part of the Diversity and Inclusion Work Group.
Marlene lives in Zimbabwe on the continent of Africa. She has been organizing events not only locally in Zimbabwe but across all of Africa. She is the chair of Pycon Africa and has given talks at Pycon US, Pycon UK, and Pycon India.
She has been working locally as an organizer and educator. We talk about the challenges of teaching technology and programming to a population of young people. Some of these students don’t have access to computers.
She is also currently pursuing a computer science degree with the University of London. Along with her studies, she is also interning with NVidia. She is working with them on the RAPIDS project with a focus on the cuDF library.
Spotlight: Introduction to Sorting Algorithms in Python
In this course, you’ll learn all about five different sorting algorithms in Python from both a theoretical and a practical standpoint. You’ll also learn several related and important concepts, including Big O notation and recursion.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you looking for an in-depth data science project to practice your skills on? Perhaps you would like to add new tools to your Python web development projects instead? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David shares an article about how to go about detecting deforestation from satellite images. He covers how a data science team built a machine learning (ML) solution to do just that, using FastAI for the modeling and Streamlit to create a dashboard.
We also discuss a Real Python article about building a blog using Django, Vue.js, and GraphQL. GraphQL is a great tool to enhance your API to make it more flexible. The step by step project walks you through turning your Django blog data models into a GraphQL API.
We cover several other articles and projects from the Python community including, the tools and tech used to run a one-woman hardware company, visualizing data in Python using plt.scatter(), why the sad face when using Black, how to iterate over dataframe rows (and should you?), pipx is now a PyPA member project, and real-time lossless audio compression in Python with pyFLAC.
Spotlight: Explore Your Dataset With Pandas
In this step-by-step course, you’ll learn how to start exploring a dataset with Pandas and Python. You’ll learn how to access specific rows and columns to answer questions about your data. You’ll also see how to handle missing values and prepare to visualize your dataset in a Jupyter Notebook.
Topics:
Show Links:
Build a Blog Using Django, Vue, and GraphQL – In this step-by-step project, you’ll build a blog from the ground up. You’ll turn your Django blog data models into a GraphQL API and consume it in a Vue application for users to read. You’ll end up with an admin site and a user-facing site you can continue to refine for your own use.
Detecting Deforestation From Satellite Images – How would you go about detecting deforestation — a contributor to climate change — from satellite images? In this article, you’ll learn how one team built a machine learning (ML) solution to do just that, using FastAI for the modeling and Streamlit to create a dashboard. The article discusses methodology and results, and is a great read about building an ML solution. The project code is available on GitHub.
The Tools and Tech I Use to Run a One-Woman Hardware Company – Winterbloom makes open-source, boutique synthesizers. There’s a lot that goes into running a hardware company. Someone has to design the hardware, code the firmware, write the documentation, not to mention administrate the company. Winterbloom does all of this with just one engineer — Stargirl Flowers. Learn what tools and tech Stargirl uses to run her company, and how Python fits into the big picture in more ways than one.
Visualizing Data in Python Using plt.scatter() – In this tutorial, you’ll learn how to create scatter plots in Python, which are a key part of many data visualization applications. You’ll get an introduction to plt.scatter(), a versatile function in the Matplotlib module for creating scatter plots.
Why the Sad Face? – The Black autoformatter adopts some conventions that might surprise you the first time you use it. One of those conventions — the “sadface dedent” — moves closing parentheses in function signatures and other block headers to their own lines. This creates a line containing nothing but “):”, which looks like a sad face emoji. Łukasz Langa, Black’s creator, explains why Black does this.
How to Iterate Over DataFrame Rows (And Should You?) – How to iterate over pandas DataFrame rows is one of the top voted questions with the pandas tag on Stack Overflow. That question is also the most copied answer with a code block on the entire site. Clearly, lots of people want to iterate over the rows in a DataFrame. But should you do this, or are there better options?
Projects
Additional Links:
Level up your Python skills with our expert-led courses:
What if you could create an application and deploy it to the web with just Python? Wouldn’t it be nice to skip the additional full-stack development steps of learning three different languages in addition to Python? That’s the idea behind Anvil. This week on the show, we have Meredydd Luff, co-founder of Anvil.
We talk about the history of Anvil and how the founders wanted to simplify web app creation. We discuss their choice to make the project open source and how it benefited the project’s development. We also cover creating a portfolio of projects and things that employers look for in the hiring process.
Course Spotlight: Python’s map() Function: Transforming Iterables
In this step-by-step course, you’ll learn how Python’s map() works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace map() in a Pythonic and efficient way.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
How do you know you’re using the correct data structure for your Python project? There are so many built into Python and even more that are importable from the collections module. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects. We discuss a recent three-part video course on selecting the ideal data structure.
Along with comparing the types of dictionaries, data records, arrays, stacks, and more, David covers a recent Real Python article about the namedtuple. This deep dive covers how to use the namedtuple to write cleaner code.
We also discuss new articles from previous guest Brett Cannon. He has added two posts to his Python syntactic sugar series about unravelling the pass
and with
statement.
We cover several other articles and projects from the Python community including, async in Flask 2.0, Python projects on Github that are examples of best practices and good architecture, how SpaceX sort of lands starship, the new ti-84 calculator with Python, and building a Python spell checker.
Spotlight: Stacks and Queues: Selecting the Ideal Data Structure
In this course, you’ll learn about three of Python’s data structures: stacks, queue and priority queues. You’ll look at multiple types and classes for all of these and learn which implementations are best for your specific use cases.
Topics:
Show Links:
Write Pythonic and Clean Code With namedtuple – In this step-by-step tutorial, 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.
Unravelling the pass Statement – When you need to indicate that a bit of code intentionally does nothing, then you need to reach for Python’s pass
statement. In the latest installment of Brett’s “Syntactic Sugar” series, you’ll learn how pass
works, when to use it, and why it’s a uniquely Python concept.
Unravelling the with statement
Async in Flask 2.0 – This article looks at Flask 2.0’s new async functionality and how to leverage it in your Flask projects. You’ll learn how Flask processes requests asynchronously using a traditional WSGI server, instead of the ASGI server used by many other async web frameworks. You’ll also learn how to simulate Flask 2.0 async in Flask 1.X applications.
Python Projects on Github That Are Examples of Best Practices and Good Architecture – This Reddit thread is full of GitHub repos that might make for some good code reading.
How SpaceX Lands Starship (Sort Of) – While waiting for SN15 to launch, Thomas Goddard set out to pull together a 2-dimensional simulation of the Starship landing. Tying together knowledge of trajectory optimization, Thomas modeled the landing in Python with the CasADI library and used Matplotlib to generate an animation which, when played side-by-side with the footage of the landing, results in remarkable similarity to the actual landing dynamics.
Stacks and Queues: Selecting the Ideal Data Structure – Learn about three of Python’s data structures: stacks, queue and priority queues. You’ll look at multiple types and classes for all of these and learn which implementations are best for your specific use cases.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Would you move your data science project from a laptop to the cloud? Would you also like to have snapshots of your project saved along the way so that you can go back in time or share the state of your project with another team member? This week on the show, we have Savin Goyal from Netflix. Savin is the technical lead for machine learning infrastructure at Netflix. He joins us to talk about Metaflow, an open-source tool to simplify building, managing, and scaling data science projects.
Metaflow addresses the needs of the numerous data scientists who work at Netflix. Machine learning is key strength for the streaming service. They tried several existing tools to scale their own internal infrastructure and after this experimentation developed Metaflow.
We talk about the history of the project and how someone could get started with the open-source version. Savin also contrasts the cost of infrastructure as compared to data scientists and the cost of their time.
Course Spotlight: Simplify Python GUI Development With PySimpleGUI
In this step-by-step course, you’ll learn how to create a cross-platform graphical user interface (GUI) using Python and PySimpleGUI. A graphical user interface is an application that has buttons, windows, and lots of other elements that the user can use to interact with your application.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Did you know the Python Software Foundation is hiring! With the recent support of three Visionary Sponsors, the PSF has been able to open positions for a developer-in-residence and a Python packaging project manager. Real Python now has a monthly Python news article. Frequent guest of the show, David Amos compiles and summarizes the biggest Python news from the past month.
This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects. We discuss David’s news article from the last month. We also discuss previous guest Jon Fincher’s new step-by-step tutorial about creating a platform game with the arcade framework.
We cover several other articles and projects from the Python community including, how to use ipywidgets to make your Jupyter notebook interactive, the hidden performance overhead of Python C extensions, adding else to for loops, film simulations from scratch using Python, a gradual programming language named Hedy, and a Python raytracer.
Spotlight: CPython Internals: Your Guide to the Python 3 Interpreter
Unlock the Inner Workings of the Python Language, Compile the Python Interpreter From Source Code, And Participate in the Development of CPython
Topics:
Show Links:
How to Use ipywidgets to Make Your Jupyter Notebook Interactive – Jupyter Notebooks are great for exploratory data analysis. They’re also a good way to share results and analysis with other people, who can alter the notebook to further explore the data themselves. But there are some limitations to notebook interactivity. That’s where ipywidgets
comes in! In this tutorial you’ll learn how to create widgets like check boxes, drop-down menus, sliders, and how to handle events like button clicks.
Build a Platform Game in Python With arcade – Building games can be a fun way to learn new Python concepts and practice techniques you’ve already learned. Plus, they make for great projects to share! This step-by-step tutorial shows you how to build a platform game using the arcade
library. You’ll learn techniques for designing levels, sourcing assets, and implementing advanced features
The Hidden Performance Overhead of Python C Extensions – It’s no secret that Python is slower than compiled languages like C, C++, and Rust. If you need a performance boost, you can write compiled Python C extensions. But there are some hidden performance costs that you should be aware of if you decide to do this. This article explains two ways that Python C extensions can actually be slower than pure Python and discusses some solutions and work around for them.
For-Else: A Weird but Useful Feature in Python – Python for
loops have an unusual feature: they support an else
block that only executes if there is no break in the loop. The pattern isn’t used very often with the argument against it being that it is a bit weird and potentially difficult to understand. But there may be times when for/else
makes sense. This article presents three situations where for/else
is useful and argues that, in these situations, the pattern makes the code more readable.
Python News: What’s New From April 2021? – April 2021 was an eventful month in the world of Python. In this article, you’ll get up to speed on everything that happened in the past month, including new sponsorships for the PSF, changes to Python error messages, and a community-led discussion over the future of type annotations.
Film Simulations From Scratch Using Python – In analog photography, you can achieve different “looks” for your photographs by selecting different kinds of film to shoot with. Digital camera manufacturers often include different presets to simulate different kinds of film. In this article, you’ll learn how to simulate different films on your own images using color lookup tables, or CLUTs, using NumPy and the Pillow image library.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Are you interested in learning more about Django? Would you like to meet other professionals and learn how they are using Django? DjangoCon Europe 2021 is virtual this year, and you can join in from anywhere in the world. This week on the show, we have Miguel Magalhães and David Vaz, two of the organizers of the conference.
We discuss what makes DjangoCon Europe unique. David and Miguel talk about how they got involved and how the conference passes between different countries. They also cover the struggle of upending their plans for hosting the conference in Porto Portugal last year and how this year could use some extra support.
Tickets are available now. DjangoCon Europe is looking for additional sponsors. If you work for an organization that can help, get in contact with them.
Course Spotlight: Get Started With Django: Build a Portfolio App
In this course, you’ll learn the basics of creating powerful web applications with Django, a Python web framework. You’ll build a portfolio website to showcase your web development projects, complete with a fully functioning blog.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
This week’s show is a bit different. We are taking a well-deserved short break, but we still wanted to share an episode with you. This rewind episode highlights clips from the many interviews over the past year or so of the show.
We also hear from many new listeners who have just discovered the show. Welcome aboard! We wanted to provide a sample of guests, topics, and questions we feature on the show.
For long-time listeners, this will be a brisk walk through past episodes and guests. We’ve talked with many guests, and it was hard to narrow it down to the sample provided here. We hope you enjoy this podcast rewind, and look forward to sharing a fantastic slate of upcoming guests.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Are you interested in creating video games but feel limited in what you can accomplish within Python? Is there a platform where you can take advantage of your Python skills and provide the benefits of a dedicated game engine? This week on the show, we have Paweł Fertyk. Paweł is a Real Python author and has been creating games as Miskatonic Studio for several years now.
Paweł has worked with PyGame. We recently featured his article on creating a clone of Asteroids in a previous episode. After working with PyGame for a while, he also tried a visual novel engine named Ren’Py, and Panda3D.
After struggling within these Python libraries, he started to look for an open-source game engine that could help him create the types of games he was striving to create. He found Godot and its Python-like scripting language of GDScript. We talk about his creations, the tools, and how game development is not exactly like most other types of development.
Course Spotlight: Make a 2D Side-Scroller Game With PyGame
In this step-by-step course, you’ll learn how to use PyGame. This library allows you to create games and rich multimedia programs in Python. You’ll learn how to draw items on your screen, implement collision detection, handle user input, and much more!
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you looking for a bit of order when working with dictionaries in Python? Are you aware that the Python dict has changed over the last several versions and now keeps items in order? Could you learn more about object-oriented programming in Python by comparing it to another language? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David covers a Real Python article about the differences between the OrderedDict versus a standard dictionary. We discuss a recent video course about how object-oriented programming in Python compares to Java.
We cover several other articles and projects from the Python community including, what is Werkzeug, building a full-text search engine in 150 lines of Python code, loading SQL data into pandas without running out of memory, how to beat the Berlin rental market with a Python script, replacing print with ice cream, and the new version of CircuitPython and Mu.
Course Spotlight: Python vs Java: Object Oriented Programming
In this step-by-step course, you’ll learn about the practical differences in Python vs Java for object-oriented programming. By the end, you’ll be able to apply your knowledge to Python, understand how to reinterpret your understanding of Java objects to Python, and use objects in a Pythonic way.
Topics:
Show Links:
OrderedDict vs dict in Python: The Right Tool for the Job – In this step-by-step tutorial, you’ll learn what Python’s OrderedDict is and how to use it in your code. You’ll also learn about the main differences between regular dictionaries and ordered dictionaries.
What is Werkzeug? – Have you ever noticed that when you install Flask a dependency called Werkzeug is also installed? Werkzeug provides a set of utilities for building a WSGI interface in Python, which is an important part of any web application. This article will take you on a deep dive of Werkzeug and show you exactly how it works so you can have a deeper understanding of Flask applications.
Building a Full-Text Search Engine in 150 Lines of Python Code – Go from data preparation to search engine in just a few lines of Python.
Loading SQL Data Into Pandas Without Running Out of Memory – If you need to load a bunch of SQL query results into a Pandas DataFrame, then you might run into a problem if there are enough rows in the SQL query’s results: it won’t fit in RAM. Panda’s read_sql() function has a batching option, but it loads all of the data into memory, too. So, how do you handle larger-than-memory queries with Pandas? This article will show you how!
How I Beat the Berlin Rental Market With a Python Script – Learn how one Python developer used a Python script to analyze the housing market in Berlin and predict when a property would be sold or when the price would be decreased. While the article doesn’t include a lot of technical details, it’s a great case study of how Python, its rich ecosystem, and a little creativity can turn solving a banal problem — like searching for a new house in a crowded market — into something fun and intellectually rewarding!
Python vs Java: Object Oriented Programming – You may have heard that “everything is an object in Python.” But what does that mean for doing object oriented programming? If you’re coming to Python with a Java background, you’ll want to check out this course to learn how to reinterpret your understanding of Java objects to Python, and use objects in a Pythonic way.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Do you think it’s time to refactor your Python code? What should you think about before starting this task? This week on the show, we have Brendan Maginnis and Nick Thapen from Sourcery. Sourcery is an automated refactoring tool that integrates into your IDE and suggests improvements to your code.
Nick and Brendan provide advice on how to start refactoring and setting achievable code objectives. We discuss setting up unit testing and building confidence that you aren’t changing your code’s fundamental meaning. We also talk about technical debt and how it can creep into your organization’s projects.
Course Spotlight: Python Booleans: Leveraging the Values of Truth
In this course, you’ll learn about the built-in Python Boolean data type, which is used to represent the truth value of an expression. You’ll see how to use Booleans to compare values, check for identity and membership, and control the flow of your programs with conditionals.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Do you know how a neural network functions? What goes into building one from scratch using Python? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David talks about a recent Real Python article titled “Python AI: How to Build a Neural Network & Make Predictions.” This article covers how to train a neural network and create a linear regression model.
We also cover several articles about testing in Python including, writing unit tests, testing code in Jupyter notebooks, and a testing style guide.
We cover several other articles and projects from the Python community including, how to build an Asteroids game with Python and Pygame, a 5-point framework for Python performance management, how it helps to know a Python programmer if you want a vaccination appointment, a Flask mega-tutorial, and the new release of SQLAlchemy.
Course 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:
Show Links:
Build an Asteroids Game With Python and Pygame – 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.
Python AI: How to Build a Neural Network & Make Predictions – 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 accurate predictions based on a given dataset.
How to Write Unit Tests in Python, Part 1: Fizz Buzz – Get an introduction to unit testing in Python from the author of the Flask Megatutorial.
A 5-Point Framework For Python Performance Management – “Performance testing — like sailboat racing — depends on the conditions along the racecourse.”
Unit Testing Python Code in Jupyter Notebooks – Even if you code in Jupyter notebooks, there’s no excuse to not be testing your code!
Python Testing Style Guide – Need a quick yet thorough guide to testing? This excellent resource is for you.
Want a vaccination appointment? It helps to know a Python programmer – Programmers are writing scripts to help find vaccine appointments for those who are eligible.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
If you haven’t visited the website lately, then you’re missing out on the updates to realpython.com! The site features a completely refreshed layout with multiple sections to help you take advantage of even more great educational Python content. This week on the show, we have Dan Bader, the person behind Real Python, and all these architectural changes.
Among the features changed are a new bookmarking system, a section to keep track of what you’ve been learning lately, and a much more advanced way to search the site. A new tile system makes it easier to explore learning paths, quizzes, office hours, and other sections of the site.
Dan shares details about the website technology stack and why he started using Python for the core content management system. He also talks about the struggle of being the sole maintainer and feature architect.
Spotlight: Python Basics: A Practical Introduction to Python 3
Go from beginner to intermediate in Python with this complete curriculum, up-to-date for Python 3.9. Python Basics includes exercises, interactive quizzes, and sample projects, so you’ll always know what to focus on next in order to build a strong Python foundation. Paperback copies are available now.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you heard about NoSQL databases, or wondered how to use one with Python? How does MongoDB store information and what packages can you use to connect this type of database to your Python project? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David talks about a recent Real Python video course about managing namespaces in Python. We also look at a few recent stories about the Python packaging ecosystem.
We cover several other articles and projects from the Python community including, generating customizable PDF reports with Python, how semantic versioning will not save you, PEP 621 is final, a user hits the Python community with 4,000 fake modules, making a synth with Python, and what is running on the Mars helicopter.
Course Spotlight: Navigating Namespaces and Scope in Python
In this course, you’ll learn about Python namespaces, the structures used to store and organize the symbolic names created during execution of a Python program. You’ll learn when namespaces are created, how they are implemented, and how they define variable scope.
Topics:
Show Links:
Generate Customizable PDF Reports With Python – Learn how to generate custom PDF reports using reportlab and pdfrw with a PyQt GUI.
Semantic Versioning Will Not Save You – Semantic versioning aims to both communicate the version of software as well as promise that certain versions won’t break anything. Sounds great, right? In a lot of cases it is, but a blind reliance on semantic versioning can come back to haunt you.
PEP 621 Is Final – In the near future, you’ll be able to store project metadata in pyproject.toml. Brett Cannon
Poison Packages: User Hits Python Community With 4000 Fake Modules – Recently, a PyPI user going by the name “Remind Supply Chain Risks” uploaded nearly 4,000 fake modules to the index, many of which were named as common misspellings of popular packages. Learn about the incident in this article, and read all the way to the end for four tips every Python developer should follow.
Python and MongoDB: Connecting to NoSQL Databases – Learn how to use Python to interface with the NoSQL database system MongoDB. You’ll get an overview of the differences between SQL and NoSQL, and you’ll also learn about related tools, including PyMongo and MongoEngine.
Navigating Namespaces and Scope in Python – Learn about Python namespaces, the structures used to store and organize the symbolic names created during the execution of a Python program. You’ll learn when namespaces are created, how they are implemented, and how they define variable scope.
Projects:
Making a Synth With Python: Oscillators – Learn how to create oscillators using Python as a foundation for creating your own software synthesizers. This article is one of a three-part series. The other articles cover modulators and controllers.
Python Is Running on the Mars Helicopter
How the First Helicopter on Mars Uses Off-the-Shelf Hardware and Linux
Additional Links:
Level up your Python skills with our expert-led courses:
What goes into the decision of how to host your Python code or application in the cloud? Which technology stack is the right size for your project? This week on the show, we have Calvin Hendryx-Parker. Calvin talks about cloud hosting options, infrastructure choices, and deployment tools.
Calvin is the co-founder and CTO of Six Feet Up, and co-organizer of the Python Web Conference. We talk about finding the right tools for clients. He also discusses the Python platform they created for hosting a virtual conference.
We also discuss hosting personal portfolio projects. That conversation leads to the question, what types of skills you can showcase through creating a hosted project.
Course Spotlight: Creating PyQt Layouts for GUI Applications
In this step-by-step course, you’ll learn how to use PyQt layouts to arrange and manage the graphical components on your GUI applications. With the help of PyQt’s layout managers, you’ll be able to create polished and professional GUIs with minimal effort.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you wanted to get your Python code to consume data from web-based APIs? Maybe you’ve dabbled with the requests package, but you don’t know what steps to take next. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
We discuss an article titled, “Python’s APIs: A Winning Combo for Reading Public Data”. David shares another Real Python article about creating microservices using Google Remote Procedure Calls (gRPC).
We also cover several other articles and projects from the Python community including, making a difficult data analysis question easy with pandas, efficiently cleaning text with pandas, the tricky bits of Python concurrency, building rich terminal dashboards, making better assertions for Python tests, and building and managing real-life data science projects with metaflow.
Course Spotlight: Making HTTP Requests With Python
The “requests” library is the de facto standard for making HTTP requests in Python. It abstracts the complexities of making requests behind a beautiful, simple API so that you can focus on interacting with services and consuming data in your application. This course shows you how to work effectively with “requests”, from start to finish.
Topics:
Show Links:
Python Microservices With gRPC – Learn how to build a robust and developer-friendly Python microservices infrastructure using gRPC and Kubernetes. You’ll also explore advanced topics such as interceptors and integration testing.
Python’s APIs: A Winning Combo for Reading Public Data – Learn what APIs are and how to consume them using Python. You’ll also learn some core concepts for working with APIs, such as status codes, HTTP methods, using the requests library, and much more.
Making a Difficult Data Analysis Question Easy With Pandas – A great strategy to use when faced with a tricky data analysis problem is to reshape the dataset into a format that turns it into an easy problem. In this article, you’ll look at an example involving a simple calculation and extensive reshaping in pandas.
Efficiently Cleaning Text With Pandas – In this article, you’ll see some examples of cleaning text fields in a large data file and learn several strategies for efficiently cleaning unstructured text fields using Python and pandas.
Python Concurrency: The Tricky Bits – An exploration of threads, processes, and coroutines in Python, with interesting examples that illuminate the differences between each.
Building Rich Terminal Dashboards – Learn how to use the Rich CLI library’s new terminal dashboard feature.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
What’s the difference between writing code for yourself and developing for others? What new considerations do you need to take into account as a professional Python developer? This week on the show, we talk to Dane Hillard about his book “Practices of the Python Pro”.
Dane discusses his philosophy on the design principles that go into writing code. We talk about namespaces, object-oriented design, and how to keep your code extensible. We also consider the how and when of code optimization.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Do you know the initial steps to get your Python script hosted on the web? You may have built something with Flask, but how would you stand it up so that you can share it with others? This week on the show, we have the previous guest Martin Breuss back on the show. Martin shares his recent article titled, “Python Web Applications: Deploy Your Script as a Flask App”. David Amos also returns, and he’s brought another batch of PyCoder’s Weekly articles and projects.
David shares a recent mathematical Real Python article about the stochastic gradient descent algorithm with Python. Stochastic gradient descent is an optimization algorithm often used in machine learning applications to find ideal model parameters.
We also cover several other articles and projects from the Python community including, property-based testing with hypothesis, Python’s tug of war between beginner-friendly features and support for advanced users, how Python integers work, the steering council accepts PEP 634, a magical full-stack framework for Django named django-unicorn, and a visual programming environment called Math Inspector.
Course Spotlight: Simulating Real-World Processes in Python With SimPy
In this step-by-step course, you’ll see how you can use the SimPy package to model real-world processes with a high potential for congestion. You’ll create an algorithm to approximate a complex system, and then you’ll design and run a simulation of that system in Python.
Topics:
Show Links:
Property-Based Testing With hypothesis, and Associated Use Cases – Testing software is hard. Property-based testing can help you create more effective tests. Learn how to do property-based testing with the hypothesis
framework by looking at some real-world use cases.
Python’s Tug of War Between Beginner-Friendly Features and Support for Advanced Users – Python has made some big improvements to tracebacks in recent versions. See how tracebacks have evolved over the last couple of major releases and where there’s still some work left to be done. Check out the discussion on Hacker News.
How Python Integers Work – Python’s integer datatype is pretty different from most other languages because they allow arbitrary precision. Learn how integers work under the hood in this in-depth article.
Python Steering Council Accepts PEP 634 – Pattern matching, which adds a kind of switch-case statement to Python, has been accepted.
Stochastic Gradient Descent Algorithm With Python and NumPy – Learn what the stochastic gradient descent algorithm is, how it works, and how to implement it with Python and NumPy.
Python Web Applications: Deploy Your Script as a Flask App – In this tutorial, you’ll learn how to go from a local Python script to a fully deployed Flask web application that you can share with the world.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Do you feel like you understand how Python works under the hood? What is syntactic sugar, and how much of it should be in Python? This week on the show, we have Brett Cannon. Brett is a Python core developer and he’s been working on a series of articles where he is unraveling the syntax of Python. His series is a fantastic resource for those wanting to learn how Python is structured and works at its core.
Brett wants to see a version of Python that can run in web browsers, so he started to breakdown Python into its syntactic elements to try to answer the question, what are core elements of Python? His detailed series takes the reader along for the ride.
Brett also works at Microsoft as the dev manager for the Python extension for VS Code. Brett is also serving his third term on the Python steering council, and we discuss recent Python enhancement proposals (PEP) that the council is considering.
Course Spotlight: Cool New Features in Python 3.9
In this course, you’ll explore some of the coolest and most useful features in the newly released Python 3.9. You’ll learn how Python 3.9 makes it easier to work with time zones, dictionaries, decorators, and several other techniques that will make your code cleaner and more efficient.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you interested in building interactive dashboards with Python? How about a project that takes a flat data file all the way to a web-hosted interactive dashboard? This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
Along with the Real Python article about data visualizations using Dash, David covers an article designed to help Python developers understand the fundamentals of C. We discuss a couple of articles about Excel and using Python with Microsoft Office.
We also cover several other articles and projects from the Python community including, out-of-memory crashes in Python, updating all packages with pip-review, data science notebooks for teams, and a command-line tool for looking up colors, shades, and palettes.
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:
Show Links:
C for Python Programmers – In this tutorial, you’ll learn the basics of the C language, which is used in the source code for CPython, the most popular Python implementation. Learning C is important for Python programmers interested in contributing to CPython.
Dying, Fast and Slow: Out-Of-Memory Crashes in Python – Learn about the different ways that memory issues can manifest in your Python programs, and how you can debug and fix them.
Automating Excel File Creation and Distribution With Pandas And Outlook – See how a little bit of Python can go a long way to automating manual processes and save businesses valuable time.
Update All Packages With pip-review – Keeping track of Python dependencies and updates can be tricky. The pip-review
tool automates a lot of this process in a convenient command-line interface.
Ditching Excel for Python: Lessons Learned From a Legacy Industry – Learn how Python is revolutionizing an industry that’s notoriously resistant to change and fraught with every programmer’s most dreaded tool: Excel spreadsheets.
Develop Data Visualization Interfaces in Python With Dash – Learn how to build a dashboard using Python and Dash. Dash is a framework for building data visualization interfaces. It helps data scientists build fully interactive web applications quickly.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Are you interested in processing images in Python? Do you need to load and modify images for your Flask or Django website or CMS? Then you most likely will be working with Pillow, the friendly fork of PIL, the Python imaging library. This week on the show, we have Mike Driscoll, who is writing a new book about image processing in Python.
We dive deep into the types of processing Pillow provides. Mike talks about creating Python GUI applications to take advantage of all the library has to offer. We also talk about his PyDev of the week series and his Python Interviews book.
Course Spotlight: Editing Excel Spreadsheets in Python With openpyxl
In this course, you’ll learn how to handle spreadsheets in Python using the openpyxl package. You’ll learn how to manipulate Excel spreadsheets, extract information from spreadsheets, create simple or more complex spreadsheets, including adding styles, charts, and so on.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
How do you create a virtual conference that retains the interactivity of an in-person event? What are the tools needed for talk submissions, ticketing, and live hosting? Can you find those tools written in Python? This week on the show, we have several of the organizers of the PyCascades 2021 conference. They share the process of restructuring a Python conference to meet those challenges.
Nina Zakharenko and Seb Vetter are co-chairs, and Ashia Zawaduk is the conference program chair. PyCascades will be held online from February 19th through 21st, with a day of virtual social events, one of live-streamed talks, and another of mentored sprints.
We discuss ways to recreate the elusive feel of the “hallway” track virtually. They share advice about submitting a talk proposal and ways that you can volunteer for conferences.
Tickets are available now. PyCascades is looking for additional sponsors. If you work for an organization that can help, get in contact with them.
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:
Show Links:
Level up your Python skills with our expert-led courses:
What is it like to design a Python library for three different audiences? This week on the show, we have Nir Aides, creator of Jupylet. His new library is designed for deep reinforcement learning researchers, musicians interested in live music coding, and kids interested in learning to program. Everything is designed to run inside of a Jupyter notebook.
Nir’s initial goal was to create a framework to study deep reinforcement learning, and this led to building a framework for 2D and 3D games and graphics. As he continued the development, he realized that this interactive environment could be a useful tool for learning Python.
We also talk about how he got interested in live music coding and the advanced mathematics of sound synthesis. Nir also shares some resources for finding graphic assets and tools for creating 3D models.
Course Spotlight: Using Jupyter Notebooks
In this step-by-step course, you learn how to get started with the Jupyter Notebook, an open source web application that you can use to create and share documents that contain live code, equations, visualizations, and text.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you familiar with the role data engineers play in the modern landscape of data science and Python? Data engineering is a sub-discipline that focuses on the transportation, transformation, and storage of data. This week on the show, David Amos is back, and he’s brought another batch of PyCoder’s Weekly articles and projects.
Along with the Real Python article on data engineering, we talk about a project where researchers downloaded 10 million Jupyter notebooks from Github to gather insights about the current state of data science technology.
We also discuss an article about validating data in Python with the package Cerberus. And this led us to a conversation about a set of coding challenges from Advent of Code.
We also cover several other articles and projects from the Python community including, building my own chess engine, the visual guide to NumPy, a free and open-source alternative to SAP, a library for working with STL files and 3D objects, and is Python really a bottleneck?
Course Spotlight: Building With Django REST Framework
This course will get you ready to build with Django REST Framework. The Django REST framework (DRF) is a toolkit built on top of the Django web framework that reduces the amount of code you need to write to create REST interfaces.
Topics:
Show Links:
What Is Data Engineering and Is It Right for You? — In this article, you’ll get an overview of the discipline of data engineering. You’ll learn what is and isn’t part of a data engineer’s job, who data engineers work with, and why data engineers play a crucial role in many industries.
Building My Own Chess Engine — Writing your own chess engine is a great way to explore computational complexity and combinatorial aspects of programming. Not to mention it’s pretty fun! Follow along with this reflection on how one coder created his own Chess engine from scratch.
We Downloaded 10,000,000 Jupyter Notebooks From Github: This Is What We Learned — The JetBrains Datalore team downloaded ten million Jupyter Notebooks and analyzed them to determine things like which languages were the most popular, what kinds of content are in notebook cells, and how consistently notebooks can be reproduced. It’s a fascinating look into trends in data science technology!
Is Python Really a Bottleneck? — Python is slow. From one perspective, that is. But what are the true bottlenecks in the data engineering/data processing space, and how does Python compare to other technologies when those factors are considered?
Validating Data in Python With Cerberus — Thanks to an Advent of Code challenge, author Hector Castro was exposed to the Cerberus Python package for data validation. Get a quick introduction to Cerberus and see Hector’s solution to an Advent of Code challenge in this quick-yet-informative read.
NumPy Illustrated: The Visual Guide to NumPy — This illustrated guide to NumPy is a great way to learn NumPy or brush up on the package. Full of great visual aides, this tutorial covers all the basics and more!
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
It’s been quite the year! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python articles this year. We also upgraded the site and membership with office hours, transcripts, this podcast, and much more.
We are joined by two members of the Real Python team, David Amos and Joanna Jablonski. We wanted to share a year-end wrap-up with a collection of articles that showcase a diversity of Python topics and the quality of what our team created this year.
Joanna and David help to shepherd articles through the multi-stage editing process. They make sure articles not only impart crucial Python knowledge but also provide a thorough didactic experience.
We hope you enjoy this review and as a programming note, there won’t be an episode next week, but we will be back the following week, and look forward to bringing you a year full of great guests, topics, articles, and projects.
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:
Show links:
Learning Paths Referenced:
Podcast Episodes Referenced:
Additional Links:
Level up your Python skills with our expert-led courses:
Have you wondered how Python manages memory? How are your variables stored in memory, and when do they get deleted? This week on the show, David Amos is here, and he has brought another batch of PyCoder’s Weekly articles and projects.
Along with the Real Python article on Python memory management, we also talk about another article about creating even and non-even spaced arrays in Python with np.linspace.
We share an article titled “The Unholy Way of Using Virtual Environments”. This leads to a discussion on how to structure the directories around a virtual environment.
We also cover several other articles and projects from the Python community including, storing a list in an int, why you should use an ORM (Object Relational Manager), unraveling not
in Python, an open-source Python fuzzer, and Python static website generators.
Course Spotlight: How Python Manages Memory
Get ready for a deep dive into the internals of Python to understand how it handles memory management. By the end of this course, you’ll know more about low-level computing, understand how Python abstracts lower-level operations, and find out about Python’s internal memory management algorithms.
Topics:
np.linspace()
: Create Evenly or Non-Evenly Spaced ArraysShow Links:
np.linspace()
: Create Evenly or Non-Evenly Spaced Arrays – In this tutorial, you’ll learn how to use NumPy’s np.linspace()
effectively to create an evenly or non-evenly spaced range of numbers. You’ll explore several practical examples of the function’s many uses in numerical applications.
The Unholy Way of Using Virtual Environments – If you’ve used virtual environments before, you may have created a venv/
folder inside the root directory of your project. This is standard, but has some downsides. Have you every thought about reversing this and putting your project inside your venv/
folder?
Storing a list in an int – For a fun exercise, learn how you can leverage Python’s unlimited integer precision to encode and store lists of any size as a single integer. Because, why not?
Why Should You Use an ORM (Object Relational Mapper)? – Budding web developers learning Model-View-Controller frameworks are taught that they should use an Object Relational Mapper (ORM) to interface with their databases. But the “why” is often brushed aside or omitted entirely, leaving a fledgling programmer with burning questions like “What are ORMs, anyway?” and “What problems do they solve?”
Unravelling not
in Python – In the next blog post in his series about Python’s syntactic sugar, Brett Cannon tackles what would seem to be a very simple bit of syntax, but which actually requires diving into multiple layers to fully implement: not
.
How Python Manages Memory – Get ready for a deep dive into the internals of Python to understand how it handles memory management. By the end of this course, you’ll know more about low-level computing, understand how Python abstracts lower-level operations, and find out about Python’s internal memory management algorithms.
Announcing the Atheris Python Fuzzer – Get started with fuzzing, a technique for automatically finding bugs in Python code by repeatedly trying various inputs to your program, using Google’s newly open-sourced Python fuzzer called Atheris.
Project Links:
Additional Links:
numpy.ndarray
Level up your Python skills with our expert-led courses:
Have you started to use generators in Python? Are you unsure why you would even use one over a regular function? How do you use the special “send” method and the “yield from” syntax? This week on the show, we have Reuven Lerner to talk about his PyCon Africa 2020 talk titled “Generators, coroutines, and nanoservices.”
Reuven helps developers around the world become more fluent in Python. We talk about some of his teaching techniques and also how he continues to learn. Reuven is a believer in the continued practice of Python through exercises. We discuss his book “Python Workout” and his Weekly Python Exercise courses.
Course Spotlight: Python Generators 101
In this step-by-step course, you’ll learn about generators and yielding in Python. You’ll create generator functions and generator expressions using multiple Python yield statements. You’ll also learn how to build data pipelines that take advantage of these Pythonic tools.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
If you’re coming to Python from a different language, you may not know about a useful tool for working with loops, Python’s built-in enumerate function. This week on the show, David Amos is here, and he has brought another batch of PyCoder’s Weekly articles and projects.
Along with the Real Python article covering the details of the enumerate function, we also talk about another article about constructing Python graphical user interface elements in PyQt.
David shares a couple of resources for data scientists, including an article about skills not taught in data science boot camps, and a project for creating synthetic data.
We also cover several other articles and projects from the Python community including, an update about youtubedl, hunting for malicious packages on PyPI, using Python’s bisect module, 73 examples to help you master f-strings, and game programming in Jupyter notebooks.
Course Spotlight: Formatting Python Strings
In this course, you’ll see two items to add to your Python string formatting toolkit. You’ll learn about Python’s string format method and the formatted string literal, or f-string. You’ll learn about these formatting techniques in detail and add them to your Python string formatting toolkit.
Topics:
Show Links:
Python enumerate(): Simplify Looping With Counters – 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 tutorial, you’ll learn all about Python’s built-in enumerate(), where it’s used, and how you can emulate its behavior.
Hunting for Malicious Packages on PyPI – Jordan Wright installed every package on PyPI to look for malicious content. And he didn’t just inspect code, he actually ran the packages. Brave soul! Learn how he set-up this project and what he learned on his adventure.
Using Python’s bisect module – Python’s bisect module has tools for searching and inserting values into sorted lists. It’s one of his “batteries-included” features that often gets overlooked, but can be a great tool for optimizing certain kinds of code.
73 Examples to Help You Master Python’s f-Strings – f-Strings might be one of the most beloved features in Python 3.6+. Here are 73 examples of how to use f-strings to improve your Python code.
10 Python Skills They Don’t Teach in Bootcamp – Here are ten practical and little-known pandas tips to help you take your skills to the next level.
Python and PyQt: Creating Menus, Toolbars, and Status Bars – In this step-by-step tutorial, you’ll learn how to create, customize, and use Python menus, toolbars, and status bars for creating GUI applications using PyQt.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
One of the best ways to learn something well is to teach it. This week on the show, we have Kelly Schuster-Paredes and Sean Tibor from the Teaching Python podcast.
Sean and Kelly teach middle school students Python and share their art and science of teaching Python on their podcast. They wanted to come on the show to talk about the Real Python articles, quizzes, and other resources they use when teaching their students.
We also talk about teaching students how to research topics and use things like advanced search with Google. We discuss using cloud-based tools like collaborative notebooks and some of the core Python concepts students need for a solid foundation.
Kelly and Sean also talk about how the changes to teaching over the past year have had some unexpected benefits. They also talk about a few recent guests and topics covered on their podcast.
Course Spotlight: Basic Data Types in Python
In this course, you’ll learn the basic data types that are built into Python, like numbers, strings, and Booleans. You’ll also get an overview of Python’s built-in functions.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Are you interested in learning more about Natural Language Processing? Have you heard of sentiment analysis? This week on the show, Kyle Stratis returns to talk about his new article titled, Use Sentiment Analysis With Python to Classify Movie Reviews. David Amos is also here, and all of us cover another batch of PyCoder’s Weekly articles and projects.
Kyle discusses an article about distance metrics for machine learning. David shares a Real Python article about Python signal processing and Fourier transforms with scipy.fft. We also cover several other articles and projects from the Python community including, simulating real-world processes in Python with SimPy, working with Microsoft Excel using Python and OpenPyXL, why running code during import is a bad idea, what I wish I knew as a junior dev, the Raspberry Pi 400 personal computer, dynamic sky replacement and harmonization in videos with SkyAR.
Course Spotlight: Simulating Real-World Processes in Python With SimPy
In this step-by-step course, you’ll see how you can use the SimPy package to model real-world processes with a high potential for congestion. You’ll create an algorithm to approximate a complex system, and then you’ll design and run a simulation of that system in Python.
Topics:
Show Links:
Use Sentiment Analysis With Python to Classify Movie Reviews – In this tutorial, you’ll learn about sentiment analysis and how it works in Python. You’ll then build your own sentiment analysis classifier with spaCy that can predict whether a movie review is positive or negative.
OpenPyXL: Working with Microsoft Excel Using Python – Ah, Excel. Everyone loves to hate it. But let’s face it. Excel is one of the most popular pieces of software ever written. But you love Python, not Excel, which is why you might want to learn OpenPyXL.
An Illustration of Why Running Code During Import Is a Bad Idea (And How It Happens Anyway) – Code that runs when a module is imported is usually a code smell. But sometimes there’s no way around it.
Distance Metrics for Machine Learning – Many machine learning algorithms can be summarized as transforming data to n-dimensional vectors and computing similarity between points by means of some distance metric. This article explores four of these metrics—the Euclidean, Manhattan, Minkowski, and Hamming distances—and how to compute them with Python.
What I Wish I Knew as a Junior Dev – Some of these are things even senior devs need to be reminded of sometimes!
Fourier Transforms With scipy.fft: Python Signal Processing – In this tutorial, you’ll learn how to use the Fourier transform, a powerful tool for analyzing signals with applications ranging from audio processing to image compression. You’ll explore several different transforms provided by Python’s scipy.fft module.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
So you built a web application in Python. Now how are you going to authorize users? Security goes beyond authentication. Who gets to do what, where, and when? This week on the show, we have Sam Scott, chief technology officer from Oso. Oso is an open-source policy engine for authorization that you embed in your application.
Sam talks about the typical security and authorization challenges developers face. He discusses building an engine on top of your existing Flask or Django app. We cover the concept of policies, business logic, and some common paradigms.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Are you ready to move beyond flat files for your data in Python? Maybe you’re not sure where to start with databases and SQL. This week on the show, David Amos returns with another batch of PyCoder’s Weekly articles and projects. We cover a Real Python article about managing data with SQLite and SQLAlchemy.
David explores the intricacies of using the modulo operator (%). We also cover several other articles and projects from the Python community including, how to shoot yourself in the foot with python, exploring fractals on a cloud computer, the DMCA takedown request for youtube-dl, python for feature film, an online multiplayer text-based game framework, and a sorting algorithms visualizer.
Course Spotlight: Playing and Recording Sound in Python
In this course, you’ll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. You’ll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats.
Topics:
Show Links:
How to Shoot Yourself in the Foot With Python, Part 1 – If you’re new to Python, you might find yourself confused by some of the situations described in this article. Learn about five mistakes you could make, why they happen, and how to fix them.
Data Management With Python, SQLite, and SQLAlchemy – In this tutorial, 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.
Exploring Fractals on a Cloud Computer – Fractals might be some of the most interesting mathematical structures to study and to visualize. Learn what fractals are and how to create beautiful fractal animations with Python.
The youtube-dl GitHub Repo Has Received a DMCA Takedown Request From the RIAA
Python Modulo in Practice: How to Use the % Operator – In this tutorial, you’ll learn about the Python modulo operator (%). You’ll look at the mathematical concepts behind the modulo operation and how the modulo operator is used with Python’s numeric types. You’ll also see ways to use the modulo operator in your own code.
Python For Feature Film – A look into how Python is used to bring your favorite movies to the big screen.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
You probably have heard of the bestselling Python book, “Automate the Boring Stuff with Python.” What are the next steps after starting to dabble in the Python basics? Maybe you’ve completed some tutorials, created a few scripts, and automated repetitive tasks in your life. This week on the show, we have author Al Sweigart to talk about his new book, “Beyond the Basic Stuff with Python: Best Practices for Writing Clean Code.”
We discuss several topics covered in his new book, including using the command line, setting environment variables, formatting code, naming, and starting with version control. We talk about learning Python by creating games and highlight a couple of Python myths. I also ask Al about his earlier books, and about his idea of creating a curriculum around conference talks.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Do you have gaps in your Python learning path? If you’re like me, you may have followed a completely random route to learn Python. This week on the show, David Amos is here to talk about the release of the Real Python book, “Python Basics: A Practical Introduction to Python 3”. The book is designed not only to get beginners up to speed but also to help fill in the gaps many intermediate learners may still have.
David has been working on the book for the last two years, and we dive into all the resources that come with it. These include code challenges, quizzes, and multiple projects that are designed to help you cement your learning. We also discuss the people and processes involved in creating, reviewing, and updating the book.
Spotlight: Python Basics: A Practical Introduction to Python 3
Go from beginner to intermediate in Python with this complete curriculum, up-to-date for Python 3.9. Python Basics includes exercises, interactive quizzes, and sample projects, so you’ll always know what to focus on next in order to build a strong Python foundation.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
The Python return statement is such a fundamental part of writing functions. Is it possible you missed some best practices when writing your own return statements? This week on the show, David Amos returns with another batch of PyCoder’s Weekly articles and projects. We also talk functional programming again with an article on the Python map function and processing iterables without a loop.
We cover several other articles and projects from the Python community including, interactive data visualization with Pygal, everything you need to know about namedtuples, PEP 638 syntactic macros, python for kids, the new Nvidia Jetson board, and a reinforcement learning project named football.
Topics:
Show Links:
Interactive Data Visualization in Python With Pygal – Pygal is an overlooked library for creating interactive plots that can be turned into SVGs with an optimal resolution for printing or displaying on webpages. Learn how it works in this introductory tutorial.
Python’s map(): Processing Iterables Without a Loop – In this step-by-step tutorial, you’ll learn how Python’s map() works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace map() in a Pythonic and efficient way.
Everything You Need to Know About Python’s NamedTuples – Are you using NamedTuple in your code? If you aren’t, learn what they are and why you should consider using them in this comprehensive tutorial.
PEP 638: Syntactic Macros – This brand new PEP, which is still in draft mode, proposes adding support for syntactic macros to Python. Syntactic macros are compile-time functions that extend the language’s syntax without adding any new complexity to the language as a whole.
The Python return Statement: Usage and Best Practices – In this step-by-step tutorial, you’ll learn how to use the Python return statement when writing functions. Additionally, you’ll cover some good programming practices related to the use of return. With this knowledge, you’ll be able to write readable, robust, and maintainable functions in Python.
Python for Kids – In this ten part series, senior software engineer Kevin Thomas presents a kid-friendly comprehensive Python development tutorial utilizing a micro:bit development board. The GitHub repo contains all of the sample code as well as links to each tutorial in the series on LinkedIn. The first seven parts are published and the last three are coming soon!
Projects:
Build a Face Recognition System With the Nvidia Jetson Nano 2GB and Python – The Nvidia Jetson Nano is a single board computer similar to a Raspberry Pi. The Jetson Nano really packs a punch, however, thanks to its onboard Nvidia Maxwell GPU.
football: Reinforcement Learning Environment Where Agents Learn to Play Football
Additional Links:
Level up your Python skills with our expert-led courses:
Python 3.9 has arrived! This week on the show, former guest and Real Python author Geir Arne Hjelle returns to talk about his recent article, “Python 3.9: Cool New Features for You to Try”. Also joining the conversation is Real Python video course instructor and author Christopher Trudeau. Christopher has created a video course, which was released this week also, based on Geir Arne’s article. We talk about time zones, merging dictionaries, the new parser, type hints, and more.
Geir Arne and Christopher not only cover the new features, but they also offer advice about ways you might incorporate them into your code. We discuss what you should think about before updating your code.
Course Spotlight: Cool New Features in Python 3.9
In this course, you’ll explore some of the coolest and most useful features in the newly released Python 3.9. You’ll learn how Python 3.9 makes it easier to work with time zones, dictionaries, decorators, and several other techniques that will make your code cleaner and more efficient.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
If you use Python, then you probably have used pip to install additional packages from the Python package index. Part of the magic behind pip is the dependency resolver, and there is a new version of it in the latest version of pip. This week on the show, we have Sumana Harihareswara and Georgia Bullen, who have been working on the recent releases of pip. Sumana is the project manager for pip, and Georgia has been working on pip’s user experience (UX).
The resolver is how pip determines what to install, and in what order, based on package requirements. We talk about how you can help, from updating to the latest release, testing out the new resolver with your projects, and answering surveys about your experiences. A ton of work has gone into making the updates this year. We also talk about the funding of projects like this in the open-source community.
Course Spotlight: A Beginner’s Guide to Pip
This course is a great introduction to pip for those who are getting started Python, and for those who want to understand more about what is happening when you install new packages into your environment. It’s a worthy investment of your time to understand the fundamentals of pip.
Show Topics:
Show Links:
Level up your Python skills with our expert-led courses:
A big decision a developer has to make is what tool to use to write code? Would you like an editor that understands Python, and is there to help with suggestions, definitions, and analysis of your code? For many developers, its the free tool, Visual Studio Code. This week on the show, we have Savannah Ostrowski, program manager for the Python Language Server and Python in Visual Studio. We discuss Pylance, a new language server with fast, feature-rich language support for Python in VS Code.
Savannah explains what a language server is and the types of features it can provide. This includes type information, code completion, automatic-imports, dead code analysis, code navigation, and more. We also have a discussion about type checking in Python, which led to how Pylance leverages the static type checking tool Pyright, and what are type stubs (.pyi files).
Course Spotlight: Python Type Checking
In this course, you’ll look at Python type checking. Traditionally, types have been handled by the Python interpreter in a flexible but implicit way. Recent versions of Python allow you to specify explicit type hints that can be used by different tools to help you develop your code more efficiently.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
What is an effective way to prepare for a Python interview? Would you like a set of problems that increase in difficulty to practice and hone your Python skills? This week on the show, we have Jim Anderson to talk about his new Real Python article, “Python Practice Problems: Get Ready for Your Next Interview.” This article provides several problems, which include skeleton code, unit tests, and solutions for you to compare your work.
David Amos also joins us this week, and he has brought another batch of PyCoder’s Weekly articles and projects from the Python community. We cover these topics: Structural Pattern Matching, Common Python Data Structures, A Tax Attorney Uses Python, Discover the Role of Python in Space Exploration, and Five Pairs of Magic Methods in Python That You Should Know.
Course Spotlight: How to Implement a Python Stack
In this course, you’ll learn how to implement a Python stack. You’ll see how to recognize when a stack is a good choice for data structures, how to decide which implementation is best for a program, and what extra considerations to make about stacks in a threading or multiprocessing environment.
Topics:
Show Links:
Python Practice Problems: Get Ready for Your Next Interview – Are you a Python developer brushing up on your skills before an interview? If so, then this tutorial will usher you through a series of Python practice problems meant to simulate common coding test scenarios.
“Structural Pattern Matching”; for Python, Part 2 – The saga of PEP 622 continues with updates to the proposed structure of the match
statement—which has some similarities to a switch
statement—and a discussion on the best way to document objections to a PEP.
Common Python Data Structures (Guide) – In this tutorial, you’ll learn about Python’s data structures. You’ll look at several implementations of abstract data types and learn which implementations are best for your specific use cases.
A Tax Attorney Uses Python – See how one tax attorney uses Python to automate grueling and repetitive tasks and improve his business. While the article is non-technical, it’s always fun to see how Python is used in diverse fields.
Discover the Role of Python in Space Exploration – In this learning path from Microsoft, you’ll get an introduction to Python, and be inspired to learn, discover, and create using Python-based data science and machine learning to help generate knowledge about the world beyond Earth.
5 Pairs of Magic Methods in Python That You Should Know – Magic, or “dunder,” methods are an important part of creating custom classes in Python. Learn about some commonly used magic methods by exploring hem in pairs that are frequently used together.
python-adventure: Original Colossal Caves Adventure Game, but in Python 3
clifford: Geometric Algebra for Python
pippi: Computer Music With Python
Additional Links:
Level up your Python skills with our expert-led courses:
Why is Python pulling in so many new programmers? Maybe some of that growth is from Python being a full-spectrum language. This week on the show we have Michael Kennedy, the host of the podcast “Talk Python to Me”. Michael reflects on five years of podcasting about Python, and many of the changes he has seen in the Python landscape.
We discuss several stories about the different ways Python is being used, and how that is drawing in many new programmers. Michael covers some potential Python stumbling blocks of Async, the Python Global Interpreter Lock (GIL), building desktop apps, and type checking. We also talk about how podcasts can act as a form of language immersion.
Course Spotlight: Editing Excel Spreadsheets in Python With openpyxl
In this course, you’ll learn how to handle spreadsheets in Python using the openpyxl package. You’ll learn how to manipulate Excel spreadsheets, extract information from spreadsheets, create simple or more complex spreadsheets, including adding styles, charts, and so on.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Wouldn’t it be nice to a use a form of version control for data? Something that would allow you to track and version your datasets and models. Well, that’s what the tool called DVC is designed to do. This week on the show, David Amos is here and he’s brought another batch of PyCoder’s Weekly articles and projects.
David starts with a Real Python article titled, “Data Version Control With Python and DVC”. We also cover several other articles and projects from the Python community including: where to get exposure to well-written code, delegation – composition and inheritance, good Python project ideas for high school students, never run Python in your downloads folder, and more.
We also have a special guest this week. I talk to Sadie Parker, who recently joined the Real Python team to help create and edit transcripts for all the Real Python video courses. We talk about how to take advantage of all the features this new resource provides. Sadie also discusses how she uses Python to speed up and simplify the editing process. The transcripts and closed captions are now live on the website for all new courses, and we are working through the back catalog.
Course Spotlight: Parallel Iteration With Python’s zip() Function
In this course, you’ll learn how to use the Python zip() function to solve common programming problems. You’ll learn how to traverse multiple iterables in parallel and create dictionaries with just a few lines of code.
Topics:
Show Links:
Data Version Control With Python and DVC – In this tutorial, you’ll learn to use DVC, a powerful tool that solves many problems encountered in machine learning and data science. You’ll find out how data version control helps you to track your data, share development machines with your team, and create easily reproducible experiments!
Where Do You Go to Get Exposure to Well-Written Code? – Maybe someone needs to start a Python reading club…
Delegation: Composition and Inheritance in Object-Oriented Programming – Delegation is often considered one of the three pillars of object-oriented programming. Learn how to use this powerful concept in Python.
What Are Some Good Python Project Ideas for High School Students? – Honestly, some of these ideas are good for any beginning Pythonista!
Never Run Python in Your Downloads Folder – Learn about security issues that exploit how Python interacts with PATH
and why you should always think twice about your current working directory.
present: A Terminal-Based Presentation Tool With Colors and Effects
Mini Raspberry Pi Boston Dynamics–inspired Robot – See how one Redditor taught themselves robotics by building a miniature version of a Boston Dynamic’s robot dog “Spot” using a Raspberry Pi, C++, and Python.
Additional Links:
Level up your Python skills with our expert-led courses:
Have you wondered, how should I package my Python code? You’ve written the application, but now you need to distribute it to the machines it’s intended to run on. It depends on what the code is, the libraries it depends on, and with whom do you want to share it. This week on the show we have Itamar Turner-Trauring, creator of the website pythonspeed.com. We discuss his article “Options for Packaging Your Python Code: Wheels, Conda, Docker, and More,” covering the how of sharing your code.
Itamar also briefly discusses his Python memory profiler named Fil. We talk about his recent PyCon 2020 presentation, “Small Big Data: What to do When Your Data Doesn’t Fit in Memory.” We also cover several of the resources available on his website for data scientists that want to get deeper into Docker.
Course 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:
Show Links:
Level up your Python skills with our expert-led courses:
Have you wondered what are Python wheels? How are they used to package Python code? Does Python use pass by value or pass by reference? This week on the show, David Amos is here to help answer these questions, and he has brought another batch of PyCoder’s Weekly articles and projects.
We talk about an article called “What are Python Wheels, and Why Should You Care.” David talks about a Real Python article about pass by reference in Python. We cover several other articles and projects from the Python community including: transcribing speech to text, 4 powerful features Python is still missing, 10 awesome pythonic one-liners, and even more options for packaging your Python code.
Course Spotlight: Practical Recipes for Working With Files in Python
In this course, you’ll learn how you can work with files in Python by using built-in modules to perform practical tasks that involve groups of files, like renaming them, moving them around, archiving them, and getting their metadata.
Topics:
Show Links:
4 Powerful Features Python Is Still Missing – Python doesn’t have true constants, nor does it implement features like tail recursion optimization that many compiled languages employ. Find out what other features Python is “missing” when compared to other languages, and why the core developers haven’t added these features to the language.
What Are Python Wheels and Why Should You Care? – In this tutorial, you’ll learn what Python wheels are and why you should care as both a developer and end user of Python packages. You’ll see how the wheel format has gained momentum over the last decade and how it has made the package installation process faster and more stable.
10 Awesome Pythonic One-Liners Explained – Some things in Python are just better on one line.
How to Transcribe Speech Recordings Into Text With Python – Learn to transcribe speech in recordings like MP3s into text with Python and AssemblyAI’s API
Pass by Reference in Python: Background and Best Practices – In this tutorial, you’ll explore the concept of passing by reference and learn how it relates to Python’s own system for handling function arguments. You’ll look at several use cases for passing by reference and learn some best practices for implementing pass-by-reference constructs in Python.
Options for Packaging Your Python Code: Wheels, Conda, Docker, and More – There’s a lot of ways to package your Python code. Find out which one is right for you.
PyOxidizer: A Modern Python Application Packaging and Distribution Tool
Python and PDF: A Review of Existing Tools – The ultimate list of PDF tools in Python.
Additional Links:
Level up your Python skills with our expert-led courses:
Do you want to distribute your Python applications to other users who don’t have or even use Python? Maybe you’re interested in seeing your Python application run on iOS or Android mobile devices. This week on the show we have Russell Keith-Magee, the founder and maintainer of the BeeWare project. Russell talks about Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices.
We spend some time digging into BeeWare’s cross-platform widget toolkit named Toga. Russell talks about some of the intricacies of converting graphical user interface components from across multiple computing platforms. If you’re interested in contributing to an open source project, he discusses how you could get involved in the project. We also talk about the struggle of getting funding for open source projects.
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:
Show Links:
Level up your Python skills with our expert-led courses:
Do you want to learn the how and when of implementing K-means clustering in Python? Would you like to practice your pandas skills with a real-world project? This week on the show, David Amos is back with another batch of PyCoder’s Weekly articles and projects.
David talks about a Real Python article about how to perform K-means clustering in Python. We also talk about a new project based article on the site about how to create a gradebook using pandas, practicing the skills of importing, merging, and calculating across groups of data. We cover several other articles and projects from the Python community including: JPEG image decoding, object-oriented development with interfaces and mixins, sparking joy with Python, five package picks from Real Python authors, and more.
Course Spotlight: Reading and Writing CSV Files
This course teaches how to read and write data to CSV files using Python’s built in csv
module and the pandas library. You’ll learn how to handle standard and non-standard data such as CSV files without headers, or files containing delimiters in the data.
Topics:
Show Links:
Understanding and Decoding a JPEG Image Using Python – Learn about the JPEG compression algorithm in this comprehensive guide to decoding JPEGs with Python.
K-Means Clustering in Python: A Practical Guide – Learn how to perform k-means clustering in Python. You’ll review evaluation metrics for choosing an appropriate number of clusters and build an end-to-end k-means clustering pipeline in scikit-learn
.
Pandas Project: Make a Gradebook With Pandas – With this follow-along 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.
Interfaces, Mixins and Building Powerful Custom Data Structures in Python – How to supercharge Python’s built-in data structures and build powerful custom data structures with mixin classes.
Sparking Joy With Python – After a fling with TypeScript, one Python programmer shares some thoughts on keeping the flame alive with Python.
Python Packages: Five Real Python Favorites – In this tutorial, several Real Python authors share Python packages we like to use as alternatives to modules in the standard library. You’ll get to know a number of useful packages, including pudb
, requests
, parse
, dateutil
, and typer
.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Have you wanted to generate advanced reports as PDFs using Python? Maybe you want to build documents with tables, images, or fillable forms. This week on the show we have Mike Driscoll to talk about his book “ReportLab - PDF Processing with Python.”
Mike is an author of multiple books about Python, and has recently re-written his Python 101 book. He is also a member of the Real Python team and has written several articles for the site. Along with our discussion about ReportLab and PDFs, Mike talks about being a self-published author. We also talk briefly about his favorite Python GUI framework.
Course Spotlight: How to Work With a PDF in Python
In this step-by-step course, you’ll learn how to work with a PDF in Python. You’ll see how to extract metadata from preexisting PDFs. You’ll also learn how to merge, split, watermark, and rotate pages in PDFs using Python and PyPDF2.
Topics:
Show links:
Level up your Python skills with our expert-led courses:
Would you like to clearly understand what’s happening when you use the Python import keyword? Do you want to use modules more effectively to structure your code? Or maybe you’re ready to move to the next level with your Django project by adding user management. This week on the show, David Amos is back with another batch of PyCoder’s Weekly articles and projects.
We discuss a Real Python article about advanced techniques and tips for using the Python import keyword. David also talks about another recent article on the site about managing users in Django. We cover several other articles and projects from the Python community including: robot programming in Python, f-strings vs .format(), the rise of Python malware, a hardware Python keyboard, and more.
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:
Show Links:
The (Non-)Return of the Python Print Statement – Guido van Rossum recently proposed re-introducing the Python print statement. He was completely serious and even though the idea didn’t gain traction, it’s interesting to know why he made the proposal.
Python Malware on the Rise – Python’s low barrier to entry, enormous ecosystem, and rapid development process has made it one of he most desired programming languages for millions of developers around he globe—including malicious actors. Read the article at the link above and follow the discussion on Hacker News.
Get Started With Django Part 2: Django User Management – In this step-by-step tutorial, you’ll learn how to extend your Django application with a user management system, complete with email sending and third-party authentication.
Why Do People Use .format() When f-Strings Exist? – f-Strings aren’t exactly a drop-in replacement for .format().
A Beginner’s Guide to Robot Programming With Python – Get a crash course in programming autonomous robots with Python. Don’t have a robot laying around? No problem! Use this open-source simulator to get started.
Python import: Advanced Techniques and Tips – The Python import system is as powerful as it is useful. In this in-depth tutorial, you’ll learn how to harness this power to improve the structure and maintainability of your code.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
This week on the show we have Armin Ronacher to talk about the first 10 years of Flask. Armin talks about the origins of Flask and the components that make up the framework. He talks about what goes into documenting a framework or API. He also talks about the community working on the ongoing development of Flask.
He also shares his thoughts about Python, and how it contrasts with Rust and TypeScript. Armin talks about what he would do differently if he were to start development of a project like Flask now.
Course Spotlight: Documenting Python Code: A Complete Guide
This course will get you up to speed with how to document your Python code. Documenting your code is an important step to help developers and users fully understand its usage and purpose.
Topics:
Show links:
Level up your Python skills with our expert-led courses:
Are you familiar with linear programming, and how it can be used to solve resource optimization problems? Would you like to free your Python code from a clunky command line and start making convenient graphical interfaces for your users? This week on the show, David Amos is back with another batch of PyCoder’s Weekly articles and projects.
David talks about a recent Real Python article about linear programming in Python. We discuss an article titled “PySimpleGUI: The Simple Way to Create a GUI With Python.” We also cover several other articles and projects from the Python community including: Python’s reduce() function, flaws in the pickle module, advanced pytest techniques, and how to trick a neural network.
Course Spotlight: Parallel Iteration With Python’s zip() Function
This course will get you up to speed with Python’s zip()
function. In this course, you’ll discover the logic behind zip()
and how you can use it to consistently solve common programming problems, like creating dictionaries.
Topics:
Show Links:
Python’s reduce(): From Functional to Pythonic Style – In this step-by-step tutorial, you’ll learn how Python’s reduce() works and how to use it effectively in your programs. You’ll also learn some more modern, efficient, and Pythonic ways to gently replace reduce() in your programs.
Hands-On Linear Programming: Optimization With Python – In this tutorial, you’ll learn about implementing optimization in Python with linear programming libraries. Linear programming is one of the fundamental mathematical optimization techniques. You’ll use SciPy and PuLP to solve linear programming problems.
Pickle’s Nine Flaws – “Python’s pickle
module is a very convenient way to serialize and de-serialize objects. It needs no schema, and can handle arbitrary Python objects. But it has problems. This post briefly explains the problems.”
Advanced pytest
Techniques I Learned While Contributing to pandas
– Contributing to open-source projects is a great way to learn new techniques and level up your skills. Martin Winkel shares five advanced pytest
techniques he learned while contributing to the pandas project.
PySimpleGUI: The Simple Way to Create a GUI With Python – In this step-by-step tutorial, you’ll learn how to create a cross-platform graphical user interface (GUI) using Python and PySimpleGUI. A graphical user interface is an application that has buttons, windows, and lots of other elements that the user can use to interact with your application.
How to Trick a Neural Network in Python 3 – Is that a corgi or a goldfish?
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Are you using the Python library Pandas the right way? Do you wonder about getting better performance, or how to optimize your data for analysis? What does normalization mean? This week on the show we have Hannah Stepanek to discuss her new book “Thinking in Pandas”.
The inspiration behind Hannah’s book came out of her talk at PyCon US 2019 titled “Thinking Like a Panda: Everything You Need to Know to Use Pandas the Right Way.” We discuss several core concepts covered in the book. She shares techniques for getting more performance when working with your data in Pandas. We also talk about her recent PyCon US 2020 online presentation about databases and migration.
Course Spotlight: Finding the Perfect Python Code Editor
Find your perfect Python development setup with this review of Python IDEs and code editors. With this course you’ll get an overview of the most common Python coding environments to help you make an informed decision.
Topics:
Links:
Level up your Python skills with our expert-led courses:
Have you wanted to learn Regular Expressions in Python, but don’t know where to start? Have you stumbled into the dreaded pink SettingWithCopyWarning in Pandas? This week on the show, we have David Amos from the Real Python team to discuss a recent two-part series on Regex in Python. We also talk about another recent article on the site about views vs copies in Pandas. David also brings a few other articles and projects from the wider Python community for us to discuss.
David searches for the latest Python news, links, and articles to produce PyCoder’s Weekly with Dan Bader. PyCoder’s Weekly is a free email newsletter for those interested in Python development. Along with the previously mentioned Real Python articles, we also discuss articles from the community about: getting machine learning to production, combining Flask and Vue, space science with Python, and the fastest way to flatten a list in Python.
Course Spotlight: Reading and Writing Files in Python
This course will get you up to speed with reading and writing files in Python. You’ll cover everything from what a file is made up of, to which libraries can help you along that way. You’ll also take a look at some basic scenarios of file usage as well as some advanced techniques.
Topics:
Show Links:
SettingWithCopyWarning in Pandas: Views vs Copies – In this tutorial, you’ll learn about views and copies in NumPy and Pandas. You’ll see why the SettingWithCopyWarning occurs in Pandas and how to properly write code that avoids it.
Fastest Way to Flatten a List in Python – Explore six different was to flatten a list of lists in Python and how their performance compares. The fastest of the six methods mentioned might surprise you!
Combining Flask and Vue – Learn about three ways to combine Flask and Vue, the pros and cons of each, and some guidelines for when to use each method.
Regular Expressions: Regexes in Python (Part 2) – In the previous tutorial in this series, you learned how to perform sophisticated pattern matching using regular expressions, or regexes, in Python. This tutorial explores more regex tools and techniques that are available in Python.
Space Science With Python – Explore and analyze the wonders and mysteries of space… with Python!
Getting Machine Learning to Production – Millions of web apps get deployed to production every day. But machine learning models aren’t web apps. And very few people are talking about deployment. Learn how tools like Streamlit can help take the edge off deploying your machine learning models.
Projects:
Additional Links:
Level up your Python skills with our expert-led courses:
Would you like to run your Python code in the cloud without having to become an infrastructure engineer? Do you want to have Python functions that run when triggered by specific events? This week on the show we have Anthony Chu to discuss serverless computing and running python functions in the cloud. Anthony Chu is program manager for Microsoft’s Azure Functions.
We discuss the advantages of serverless computing over virtual machines, containers, and other infrastructure options for running your Python code in the cloud. Anthony also talks about the types of projects suited for this type of platform, including data science, machine learning, and creating APIs.
Course Spotlight: A Beginner’s Guide to Pip
This course is a great introduction to pip for those who are getting started Python, and for those who want to understand more about what is happening when you install new packages into your environment. It’s a worthy investment of your time to understand the fundamentals of pip.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
Have you wanted to work with PDF files in Python? Maybe you want to extract text, merge and concatenate files, or even create PDFs from scratch. Are you interested in building hardware projects using a Raspberry Pi? This week on the show we have David Amos from the Real Python team to discuss his recent article on working with PDFs. David also brings a few other articles from the wider Python community for us to discuss.
David searches for the latest Python news, links, and articles to produce PyCoder’s Weekly with Dan Bader. PyCoder’s Weekly is a free email newsletter for those interested in Python development. Along with David’s article on PDFs, we discuss another recent Real Python article about building physical projects with the Raspberry Pi. We also discuss articles from the community about: the PEPs of Python 3.9, why you should stop using datetime.now
, Python dependency tools, and several ways to pass code to Python from the terminal.
Course Spotlight: Cool New Features in Python 3.8
This course will get you up to speed with the new features of the latest release of Python. You’ll learn about using assignment expressions, how to enforce postional-only arguments, more precise type hints, and using f-strings for simpler debugging. It’s a worthy investment of your time to understand what the most recent release of Python provides before moving on to the next version this fall.
Topics:
datetime.now
Topic Links:
The Many Ways to Pass Code to Python From the Terminal – You might know about pointing Python to a file path, or using -m
to execute a module. But did you know that Python can execute a directory? Or a .zip
file?
The PEPs of Python 3.9 – The first Python 3.9 beta release is upon us! Learn what to expect in the final October release by taking a tour of the Python Enhancement Proposals (PEPs) that were accepted for Python 3.9.
Creating and Modifying PDF Files in Python – Explore the different ways of creating and modifying PDF files in Python. You’ll learn how to read and extract text, merge and concatenate files, crop and rotate pages, encrypt and decrypt files, and even create PDFs from scratch.
Overview of Python Dependency Management Tools – While pip
is often considered the de facto Python package manager, the dependency management ecosystem has really grown over that last few years. Learn about the different tools available and how they fit into this ecosystem.
Stop Using datetime.now
! (With Dependency Injection) – How do you test a function that relies on datetime.now()
or date.today()
? You could use libraries like FreezeGun or libfaketime, but not every project can afford the luxury of reaching for third-party solutions. Learn how dependency injection can help you write code that is more testable, maintainable, and practical.
Build Physical Projects With Python on the Raspberry Pi – In this tutorial, you’ll learn to use Python on the Raspberry Pi. The Raspberry Pi is one of the leading physical computing boards on the market and a great way to get started using Python to interact with the physical world.
Additional Links:
Level up your Python skills with our expert-led courses:
Do you want to get started with web scraping using Python? Are you concerned about the potential legal implications? What are the tools required and what are some of the best practices? This week on the show we have Kimberly Fessel to discuss her excellent tutorial created for PyCon 2020 online titled “It’s Officially Legal so Let’s Scrape the Web.”
We discuss getting started with web scraping, and cover tools and techniques. Kimberly gives advice on finding elements inside of the html, and techniques for cleaning your data. She also notes a recent change to the legal landscape regarding scraping the web.
Kimberly is a Senior Data Scientist at Metis Data Science Bootcamp in New York City. She holds a Ph.D. in applied mathematics. We talk about her switch from academia to data science, and discuss her passion for data storytelling and visualizations.
Course Spotlight: Defining Main Functions in Python
This course will get you up to speed with defining a starting point for the execution of a program, and helps you to understand what goes into the main()
function. Prepare for a deep dive as you go through the sections. It’s a worthy investment of your time to understand this vital entry point for your Python scripts and applications!
Topics:
Show Links:
JavaScript charting detour:
Level up your Python skills with our expert-led courses:
Have you wanted to get started with testing in Python? Maybe you feel a little nervous about diving in deeper than just confirming your code runs. What are the tools needed and what would be the next steps to level up your Python testing? This week on the show we have Anthony Shaw to discuss his article on this subject. Anthony is a member of the Real Python team and has written several articles for the site.
We discuss getting started with built-in Python features for testing and the advantages of a tool like pytest. Anthony talks about his plug-ins for pytest, and we touch on the next level of testing involving continuous integration.
Anthony recently finished a talk for PyCon 2020 Online, titled “Why is Python Slow?” He had the idea for the talk while he was working on his upcoming book about the CPython source code.
I also want to give an update on last weeks episode with Kyle Stratis, where we discussed Kyle being let go from his job due to the pandemic. Here’s some good news, Kyle will be joining a Boston startup called Vizit, as a senior data engineer. Congratulations Kyle!
Course Spotlight: The Python print()
Function: Go Beyond the Basics
This course will get you up to speed with using Python print()
effectively. Prepare for a deep dive as you go through the sections. You may be surprised how much print()
has to offer!
Topics:
Show links:
Level up your Python skills with our expert-led courses:
Do you know someone in the Python community who recently was let go from their job due to the pandemic? What does the job landscape currently look like? What are skills and techniques that will help you in your job search? This week we have Kyle Stratis on the show to discuss how he is managing his job search after just being let go from his data engineering job. Kyle is a member of the Real Python team and has written several articles for the site.
We discuss Kyle’s career and the skills that he’s developed, which are currently helping him in his job search. Kyle left academia to work as a data engineer. His background helps him to communicate between teams of scientists and engineers.
We also talk about Kyle’s recent article on combining data in Pandas. Kyle shares a tip on Pandas efficiency, and hints at some lesser known features of Python generators.
Topics:
Show Links:
Level up your Python skills with our expert-led courses:
In your quest to become a better developer, how do you find Python code that is at your reading level? What are good code bases or projects to study? What are the things holding you back from leveling up your Python literacy? This week we have Cecil Phillip on the show to discuss all of these common questions. Cecil is a Senior Cloud Advocate at Microsoft.
Cecil has been learning Python in the open on Twitch with Brian Clark. They run a weekly event on Twitch, where they are live-streaming an interactive Python course. Cecil has a background in multiple languages and technologies, and now he’s learning Python, bringing an audience along the way!
We start things off with a listener question and jump into a conversation about building up your Python skills. Then we’ll discuss common Python language stumbling blocks. Next we consider the importance of making personal projects, and documenting that code.
We also touch on some unique skills employers are looking for. And we discuss working through impostor syndrome. Cecil talks about his podcast “Away from the Keyboard” and his plans to start it back up.
In the show notes this week you’ll find links to resources we discuss, and several more that we didn’t have time to cover individually.
Want your question featured on the show? Send us your question at realpython.com/podcast-question and we might feature it on a future episode of the show.
Topics:
Show links:
Suggested project reading list:
Level up your Python skills with our expert-led courses:
Docker is a common tool for Python developers creating and deploying applications, but what do you need to know if you want to use Docker for data science and machine learning? What are the best practices if you want to start using containers for your scientific projects? This week we have Tania Allard on the show. She is a Sr. Developer Advocate at Microsoft focusing on Machine Learning, scientific computing, research and open source.
Tania has created a talk for the PyCon US 2020 which is now online. The talk is titled “Docker and Python: Making them Play Nicely and Securely for Data Science and ML.” Her talk draws on her expertise in the improvement of processes, reproducibility and transparency in research and data science. We discuss a variety of tools for making your containers more secure and results reproducible.
Tania is passionate about mentoring, open-source, and its community. She is an organizer for Mentored Sprints for Diverse Beginners, and she talks about the upcoming online sprints for PyCon US 2020. We also discuss her plans to start a podcast.
Topics:
Show links:
Level up your Python skills with our expert-led courses:
Want to learn more about AsyncIO in Python, with an example where you can see and hear events being triggered in real-time? This week we have Łukasz Langa on the show. Łukasz has created a talk for PyCon 2020 online about using AsyncIO with Music.
In his talk he shows live examples of coroutines, gathering, the event loop and events being triggered to create a piece of music. We also talk about his role as the release manager for Python 3.8 and 3.9. Łukasz provides background on the origins of his very popular, uncompromising code formatter, Black, and the types of problems it can solve inside of an organization.
Łukasz previously worked for Facebook, which is where he started Black. He talks about recently moving back to Poland. We discuss his current work for Edge DB, building a new generation object-relational database.
Topics:
Show links:
Level up your Python skills with our expert-led courses:
Are you interested in building REST APIs with Flask and SQLAlchemy? This week we have Doug Farrell on the show. We talk about his four-part Real Python article series on Python REST APIs.
We discuss the various Python tools and libraries used in the series. Doug also shares his practices for continuous learning. Doug has worked in process control, embedded systems, and has a long background in software development.
He’s currently a developer at ShutterFly, and discusses developing tools for his internal customers. He also teaches Python to kids at a STEM school near where he lives.
Doug is writing a book for Manning Publications, “The Well-Grounded Python Developer”. The book is currently available in an early access state. And as always please check out all the additional resources and tools that Doug discusses, they are all gathered for you in the show notes.
Topics:
Show links:
Level up your Python skills with our expert-led courses:
Have you ever wanted to explore using Python with electronics? CircuitPython is a great platform to get started with. This week we have Thea Flowers on the show. Thea has been creating several hardware projects based around CircuitPython, and she talks about getting started on the platform.
She also answers questions about how she taught herself to design and prototype printed circuit boards. Thea discusses several of her open source projects, including Nox, ConductHotline, and getting involved with CircuitPython.
Thea was the conference co-chair for PyCascades, and we talk about how someone could get involved in volunteering for conferences. We also discuss building diversity in the community.
This episode was initially recorded at an earlier date, so we asked Thea to come back for a few minutes to discuss updates on her projects and about a recent honor she received.
Topics:
Show links:
Level up your Python skills with our expert-led courses:
Do you get upset and frustrated when you experience errors running your Python code? This week we have Martin Breuss on the show. We discuss how to learn Python through errors, and how errors really are your friends.
Martin is a video course creator here at Real Python, and we talk briefly about several courses he’s created. We focus on his course about getting started with Django, as a jumping off point for the discussion.
Martin talks about his work with Coding Nomads, and teaching Python around the world. He also provides some tips on debugging and writing good questions.
This episode was recorded at an earlier date, and because of recent events Martin came back to discuss a new #StayAtHome Mentorship Program he’s working on. The program is meant not only for learners but also for those who want to try their hand at being a mentor. We also answer our first listener submitted question.
Topics:
Show links:
Music to code to links:
Level up your Python skills with our expert-led courses:
Have you been using Python for a while, but want to be more effective with your code? This week we have Brett Slatkin on the show. We talk about the 2nd edition of his book Effective Python.
Brett talks about the revisions he made for the book, and updating it for the newest versions of Python 3. He answers questions about who is the intended developer for the book.
Brett also discusses working on Google App Engine, and what it’s like to develop and maintain Python applications at Google Scale. Brett mentions a brief anecdote about working with Guido van Rossum, while they both worked at Google. He also provides advice about maintaining a large and aging Python code base.
Topics:
Show links:
What are you excited about in the world of Python?
Brett’s Pick:
Level up your Python skills with our expert-led courses:
Is game programming a good way to develop your Python programming skills? This week we have Jon Fincher on the show. Jon is an author on the Real Python team, and we talk about his recent articles on PyGame and Arcade.
Jon talks about his background working at Microsoft. We discuss if a game would make a good portfolio piece. We compare and contrasts the two popular Python game libraries of Arcade and PyGame. Jon also reveals ways to find assets for your own creations.
Want your question featured on the show? Here’s a new thing we’re trying out. Send us your question at realpython.com/podcast-question and we might feature it on a future episode of the show.
Topics:
Show links:
What are you excited about in the world of Python?
Jon’s pick:
Chris’s pick:
Level up your Python skills with our expert-led courses:
Do you want to learn more about Python decorators? Have you ever wondered what goes on behind the scenes to create a Real Python article? In this first episode, We have Geir Arne Hjelle from the Real Python team on the show.
You’ll learn about Geir Arne’s background as a Pythonista and PyCon speaker, the tutorials he’s written for the site, how Python decorators can help you write better code, and what Real Python’s tutorial publishing process looks like behind the scenes.
Note: This episode was recorded earlier. We discuss PyCon US 2020 and Geir Arne’s planned tutorial. At the time this episode was released PyCon US 2020 was currently looking at re-scheduling or a potential cancelation. Updates will be provided in upcoming episodes.
Topics:
Links from the show:
Level up your Python skills with our expert-led courses:
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 to hear what’s new in the world of Python programming and become a better coder.
Level up your Python skills with our expert-led courses:
En liten tjänst av I'm With Friends. Finns även på engelska.