The Real Python Podcast

Real Python
undefined
Nov 27, 2020 • 50min

Teaching Python and Finding Resources for Students

Kelly Schuster-Paredes and Sean Tibor from the Teaching Python podcast share their experiences teaching Python to middle school students. They discuss using Real Python resources, Google for research, cloud-based tools, and core Python concepts. They also talk about recent podcast topics and the benefits of teaching Python in a changing educational landscape.
undefined
Nov 20, 2020 • 57min

Sentiment Analysis, Fourier Transforms, and More Python Data Science

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: 00:00:00 – Introduction 00:02:56 – Use Sentiment Analysis With Python to Classify Movie Reviews 00:09:49 – OpenPyXL: Working with Microsoft Excel Using Python 00:12:41 – An Illustration of Why Running Code During Import Is a Bad Idea 00:16:52 – Distance Metrics for Machine Learning 00:22:52 – Sponsor: linode.com 00:22:52 – What I Wish I Knew as a Junior Dev 00:35:29 – Fourier Transforms With scipy.fft: Python Signal Processing 00:39:44 – Simulating Real-World Processes in Python With SimPy 00:43:30 – Video Course Spotlight 00:44:35 – Raspberry Pi 400 Personal Computer Kit Now Available 00:49:55 – SkyAR: Dynamic Sky Replacement and Harmonization in Videos 00:52:04 – Creating an Idea Factory with Roam Research 00:56:02 – Thanks and goodbye 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: Simulating Real-World Processes in Python With SimPy Raspberry Pi 400 Personal Computer Kit Now Available SkyAR: Dynamic Sky Replacement and Harmonization in Videos Additional Links: Python Job Hunting in a Pandemic: RPP Episode 10 Natural language processing: Wikipedia spaCy: Industrial-Strength Natural Language Processing in Python Natural Language Processing With spaCy in Python Natural Language Toolkit Building PDFs in Python with ReportLab: RPP Episode 20 Mouse vs Python: Mike Driscoll Blog Python 101: 2nd Edition openpyxl - A Python library to read/write Excel 2010 xlsx/xlsm files Editing Excel Spreadsheets in Python With openpyxl How to Read a Book: The Ultimate Guide by Mortimer Adler import antigravity: The History of Python Blog How to Take Smart Notes by Sönke Ahrens - Summary Kyle Stratis’ YouTube Channel Creating an Idea Factory with Roam Research Level up your Python skills with our expert-led courses: Simulating Real-World Processes in Python With SimPy Python Coding Interviews: Tips & Best Practices Editing Excel Spreadsheets in Python With openpyxl Support the podcast & join our community of Pythonistas
undefined
Nov 13, 2020 • 52min

Security and Authorization in Your Python Web Applications

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: 00:00:00 – Introduction 00:01:32 – Sam’s math background 00:03:11 – What is Sage? 00:04:24 – What is post-quantum cryptography? 00:05:19 – Getting Oso started, authentication vs authorization. 00:10:01 – What is a policy engine? 00:12:57 – Confusing business logic with authorization 00:17:09 – Sponsor: Techmeme Ride Home Podcast 00:17:38 – Pip installing Oso, adding to Flask or Django 00:21:15 – What are common security concerns for developers? 00:25:41 – What are security concerns users have? 00:27:14 – What are the worst security issues you’ve found in a Python app? 00:30:12 – Video Course Spotlight 00:31:32 – What are other common authorization “gotchas”? 00:37:16 – Additional Oso resources 00:39:36 – What does writing in Polar look like? 00:42:00 – Are there authorization paradigms? 00:46:02 – What are you excited about in the world of Python? 00:50:05 – What do you want to learn next? 00:50:49 – Thanks and goodbye Show Links: oso on twitter Sam on twitter oso: an open source policy engine for authorization oso Django Docs oso Flask Docs oso Python Library Docs oso Source Code oso Debugger Docs Adding authorization to your Flask app with oso: oso blog Building a Django app with data access controls in 30 min: oso blog Generating Django Queryset filters from oso policies: oso blog Polar Adventure: a text-based adventure game written in Polar Lighting talk on access controls: oso blog SageMath: A free open-source mathematics software system Post-quantum cryptography: Wikipedia article 327: Exploits of a Mom : XKCD Comic Little Bobby Tables: Explain XKCD Snyk: Developer-first Cloud Native Application Security Geekle’s python Universe WEB Edition: 19 November 2020 WebAssembly(WASM) Level up your Python skills with our expert-led courses: Exploring HTTPS and Cryptography in Python Using Google Login With Flask Getting Started With Django: Building a Portfolio App Support the podcast & join our community of Pythonistas
undefined
Nov 6, 2020 • 53min

The Python Modulo Operator & Managing Data With SQLite and SQLAlchemy

Topics discussed in this podcast include managing data with SQLite and SQLAlchemy, exploring the modulo operator in Python, shooting yourself in the foot with Python, fractals on a cloud computer, DMCA takedown request for youtube-dl, using Python for feature film, and a sorting algorithms visualizer.
undefined
Oct 30, 2020 • 1h 27min

Going Beyond the Basic Stuff With Python and Al Sweigart

Author Al Sweigart discusses his new book 'Beyond the Basic Stuff with Python' covering command line usage, code formatting, naming conventions, and version control. He also talks about learning Python through games and dispelling Python myths. The episode touches on creating a curriculum around conference talks and offers insights into handling character encodings and Unicode in Python.
undefined
Oct 23, 2020 • 51min

Our New "Python Basics" Book & Filling the Gaps in Your Learning Path

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: 00:00:00 – Introduction 00:01:36 – Python Basics: A Practical Introduction to Python 3 00:02:39 – How has feedback helped the process? 00:04:17 – Who is the intended audience? 00:06:02 – Covering how to get Python installed on different platforms? 00:11:05 – What topics does the book cover? 00:14:12 – What can be previewed on Real Python? 00:15:03 – What format can you get the book in? 00:18:30 – Code challenges included! 00:21:33 – What other resources are provided to help with cementing your learning? 00:22:41 – What versions of Python are covered? 00:23:08 – How does the book fit into the Real Python learning eco-system? 00:29:35 – Spotlight: How to get a preview of the book! 00:30:38 – What has the writing process been like? 00:33:21 – What does didactic mean, in terms of reviewing materials? 00:39:23 – What were areas you were excited about updating? 00:41:29 – Were there important things you felt needed to be added? 00:45:55 – Who worked on the book? 00:47:13 – What are you excited about in the world of Python? 00:48:13 – What do you want to learn next? 00:49:40 – Thanks and goodbye Show Links: Python Basics: A Practical Introduction to Python 3 Python 3 Installation & Setup Guide Create and Modify PDF Files in Python Python GUI Programming With Tkinter Object-Oriented Programming (OOP) in Python 3 A Practical Introduction to Web Scraping in Python Level up your Python skills with our expert-led courses: Grow Your Python Portfolio With 13 Intermediate Project Ideas Cool New Features in Python 3.9 Unicode in Python: Working With Character Encodings Support the podcast & join our community of Pythonistas
undefined
Oct 16, 2020 • 47min

Python Return Statement Best Practices and Working With the map() Function

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: 00:00:00 – Introduction 00:01:33 – Interactive Data Visualization in Python With Pygal 00:06:40 – Python’s map(): Processing Iterables Without a Loop 00:12:51 – Everything You Need to Know About Python’s NamedTuples 00:19:46 – PEP 638: Syntactic Macros 00:26:43 – Video Course Spotlight 00:27:57 – The Python return Statement: Usage and Best Practices 00:34:42 – Python for Kids 00:38:03 – Build a Face Recognition System With the Nvidia Jetson Nano 00:42:32 – football: Reinforcement Learning Environment 00:45:51 – Thanks and goodbye 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: Pygal: Sexy python charting Bokeh: Interactive visualization library Common Python Data Structures (Guide) - Real Python article The Ultimate Guide to Data Classes in Python 3.7 - Real Python article PEP 572 – Assignment Expressions - Walrus Operator Python’s reduce(): From Functional to Pythonic Style - Real Python article NVIDIA Jetson Nano Google Research Football with Manchester City F.C. Level up your Python skills with our expert-led courses: Command Line Interfaces in Python Exploring Basic Data Types in Python Defining Main Functions in Python Support the podcast & join our community of Pythonistas
undefined
Oct 9, 2020 • 1h 15min

Exploring the New Features of Python 3.9

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: 00:00:00 – Introduction 00:02:02 – Proper Time Zone support 00:05:38 – What to do if your OS does not have tzdata? 00:07:11 – How do you add time zone info to your Python code? 00:08:24 – Historic changes to time zones 00:10:48 – New operators for updating dictionaries 00:15:44 – Geir Arne’s PyCon 2020 decorators tutorial 00:18:02 – Changes to decorator syntax 00:24:08 – Annotated type hints 00:32:36 – Video Course Spotlight 00:33:26 – The PEG parser 00:37:51 – Potential for new enhancements in upcoming releases 00:42:40 – String methods to remove prefixes and suffixes 00:44:22 – Type hint lists and dictionaries directly 00:47:29 – Topological Sort 00:52:03 – Greatest Common Divisor (GCD) and Least Common Multiple (LCM) 00:53:50 – New HTTP status codes 00:58:29 – Should you upgrade? 01:07:58 – Potential issue with Python 3.10 versioning 01:10:18 – What are you excited about in the world of Python? 01:12:52 – What do you want to learn next? 01:14:08 – Thanks and goodbyes Show Links: Python 3.9: Cool New Features for You to Try: Real Python article Cool New Features in Python 3.9: Real Python video course dateutil - Powerful extensions to datetime Paul Ganssle: Blog IANA - Internet Assigned Numbers Authority: Time Zone Database Dictionaries in Python: Real Python article PEP 584 – Add Union Operators To dict: python.org Primer on Python Decorators: Real Python article PEP 614 – Relaxing Grammar Restrictions On Decorators: python.org Introduction to Decorators: Power Up Your Python Code - PyCon 2020 Online Tutorial Python Type Checking (Guide) - Annotations:Real Python article PEP 484 – Type Hints: python.org PEP 593 – Flexible function and variable annotations: python.org PEP 617 – New PEG parser for CPython: python.org PEG Parsing Series Overview: Guido van Rossum PEP 622 – Structural Pattern Matching: python.org PEP 616 – String methods to remove prefixes and suffixes: python.org PEP 585 – Type Hinting Generics In Standard Collections: python.org Topological sorting: Wikipedia article graphlib — Functionality to operate with graph-like structures: docs.python.org Greatest common divisor: Wikipedia article Least common multiple: Wikipedia article Hypertext Transfer Protocol (HTTP) Status Code Registry Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) PEP 602 – Annual Release Cycle for Python: Łukasz Langa - python.org Porting to Python 3.9: docs.python.org CPython Internals: Your Guide to the Python3 Interpreter Panel: A high-level app and dashboarding solution for Python PyQt: GUI Library Pandas Python and PyQt: Building a GUI Desktop Calculator - Real Python article GIS in Python GeoPandas Level up your Python skills with our expert-led courses: Python Decorators 101 Cool New Features in Python 3.9 Python Type Checking Support the podcast & join our community of Pythonistas
undefined
Oct 2, 2020 • 1h 9min

Resolving Package Dependencies With the New Version of Pip

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: 00:00:00 – Introduction 00:01:41 – Pip updates and changes to dependency resolver 00:08:49 – Different types of wheels 00:11:12 – Pinning package dependencies 00:13:19 – Work on the user experience (UX) of pip 00:15:45 – Documentation at Python packaging authority and thanks to Thea Flowers 00:16:21 – Types of issues that need resolving 00:20:48 – Need for reporting issues 00:23:41 – Pip usability survey and dependency recipes to test 00:27:21 – Call out to open source maintainers to test 00:29:32 – Video Course Spotlight 00:30:43 – How is this UX work different from Simply Secure 00:34:59 – How do you present errors to users? 00:41:14 – Pip release timeline for 2020 and into 2021 00:46:38 – The dynamics of responsibility and power 00:49:43 – What’s involved in getting more funding into open source? 00:54:10 – Grant writing for the PSF 00:57:53 – Call to action: How to help with pip? 01:00:54 – What are you excited about in the world of Python? 01:04:52 – What do you want to learn next? 01:08:22 – Thanks and goodbyes Show Links: New pip resolver to roll out this year: Python Software Foundation Changes to the pip dependency resolver in 20.2 (2020): Python Packaging Authority Changes are coming to pip: YouTube Sign-up for pip UX Studies! Upgrade to pip 20.2, plus, changes coming in 20.3: Python Insider Pip team midyear report: July 13, 2020 An Overview of Packaging for Python: PyPA pip dependency resolver changes: Test & Code Podcast What Are Python Wheels and Why Should You Care?: Real Python article Python Wheels and Pass by Reference in Python: Real Python Podcast Ep23 Options for Packaging Your Python Application: Wheels, Docker, and More: Real Python Podcast Ep24 UX Research & Design: 2020 Work on Improving pip’s user experience Simple Secure: User Research Roadmap update for TUF (The Update Framework) support Exploring CircuitPython with Thea Flowers: Real Python Podcast Ep5 PyPA - Packaging Problems Issue Tracker: Github PEP 458 - Secure PyPI downloads with signed repository metadata Fixing conflicting dependencies: PyPA Finish dependency resolver for pip: Github Announcing the PSF Project Funding Working Group: PSF Sponsor PyPI and related projects Tidelift: Managed open source. Backed by maintainers. Apply for Grants To Fund Open Source Work: changeset Open collective: Make your community sustainable Sustain: Holding a space for conversations about sustaining Open Source Answer these surveys to improve pip’s usability: Python Software Foundation Breaking Release Bottlenecks – What Changeset Can Do On The Art of Python 2019 Python Grab Bag: A Set of Short Plays “Apply for Grants to Fund Open Source Work” - Sumana Harihareswara: PyOhio 2020 PyGotham TV: 2020 Get paid to write Free software: Cristina - PyGotham 2020 Level up your Python skills with our expert-led courses: A Beginner's Guide to pip How to Publish Your Own Python Package to PyPI Python Modules and Packages: An Introduction Support the podcast & join our community of Pythonistas
undefined
Sep 25, 2020 • 50min

Using Pylance to Write Better Python Inside of Visual Studio Code

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: 00:00:00 – Introduction 00:01:47 – Current Role at Microsoft 00:03:01 – Background with Python 00:04:21 – Origins of Pylance 00:06:53 – What is a language server? 00:09:56 – Diving deeper into the features individually 00:14:42 – Code navigation and diagnostics 00:15:43 – Methods of defining types and stub files 00:17:28 – What are examples of stub files? 00:21:16 – Comparing Pyright to Mypy 00:23:56 – Video Course Spotlight 00:25:02 – Auto-imports are a contentious feature 00:28:36 – Code actions and dead code analysis 00:31:46 – Pylance working with Jupyter notebooks in VSCode 00:33:30 – Multiple workspaces 00:36:16 – Why do you like to work on developer tools? 00:39:35 – How does a tool like Pylance help a beginner? 00:42:31 – What are you excited about in the world of Python? 00:46:25 – What do you want to learn next? 00:49:24 – Thanks and goodbyes Show Links: Announcing Pylance: Fast, feature-rich language support for Python in Visual Studio Code Pylance introduces five new features that enable type magic for Python developers Python in Visual Studio Code – September 2020 Release Pylance and Python in VS Code: Visual Studio Code v1.49 Release Party - YouTube Language Server Protocol Language Server Protocol: Github How the Language Server Protocol Affects the Future of IDEs typeshed: External type annotations for the Python standard library and Python builtins, as well as third party packages Pyright: Static type checker for Python PEP 561 – Distributing and Packaging Type Information Visual Studio IntelliCode: Provides AI-assisted development features for Python Creating Stubs For Python Modules Python Type Checking: Real Python video course Feather Huzzah: Adafruit Circuit Playground Express: Adafruit Circuit Python: The easiest way to program microcontrollers Big Honking Button: Winterbloom Arduino With Python: How to Get Started - Real Python video course Level up your Python skills with our expert-led courses: Arduino With Python: Getting Started Python Type Checking Finding the Perfect Python Code Editor Support the podcast & join our community of Pythonistas

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app