The Real Python Podcast podcast

The Real Python Podcast

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.

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.

 

#232

Good Python Programming Practices When New to the Language

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] (https://realpython.com/courses/writing-beautiful-python-code-pep-8/) Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators. This course outlines the key guidelines laid out in PEP 8. It’s aimed at beginner to intermediate programmers. Topics: ---00:00:00 – Introduction ---00:02:17 – Python 3.14.0 Alpha 2 Released ---00:02:35 – Take the 2024 Django Developers Survey ---00:03:17 – NumPy Practical Examples: Useful Techniques ---00:07:09 – Loop Targets ---00:09:19 – Python Dependency Management Is a Dumpster Fire ---00:23:15 – Sponsor: AssemblyAI ---00:24:00 – Package Compatibility With Free-Threading and Subinterpreters ---00:27:02 – Suggestions for good programming practices? ---00:37:59 – Video Course Spotlight ---00:39:24 – terminal-tree: Experimental Filesystem Navigator in Textual ---00:43:56 – django-tasks: Background Workers Reference Implementation ---00:49:44 – Thanks and goodbye News: --- [Python 3.14.0 Alpha 2 Released] (https://pythoninsider.blogspot.com/2024/11/python-3140-alpha-2-released.html) --- [Take the 2024 Django Developers Survey] (https://www.djangoproject.com/weblog/2024/nov/21/2024-django-developers-survey/) Topics: --- [NumPy Practical Examples: Useful Techniques] (https://realpython.com/numpy-example/) – In this tutorial, you’ll learn how to use NumPy by exploring several interesting examples. You’ll read data from a file into an array and analyze structured arrays to perform a reconciliation. You’ll also learn how to quickly chart an analysis and turn a custom function into a vectorized function. --- [Loop Targets] (https://nedbatchelder.com/blog/202411/loop_targets.html) – Loop assignment allows you to assign to a dict item in a for loop. This post covers what that means and that it is no more costly than regular assignment. --- [Python Dependency Management Is a Dumpster Fire] (https://nielscautaerts.xyz/python-dependency-management-is-a-dumpster-fire.html) – Managing dependencies in Python can be a bit of a challenge. This deep dive article shows you all the problems and how the problems are mitigated if not solved. --- [Package Compatibility With Free-Threading and Subinterpreters] (https://parallel.python.tips/) – This tracker tests the compatibility of the 500 most popular packages with Python 3.13’s free-threading and subinterpreter features. Discussion: --- [Suggestions for good programming practices?] (https://groups.google.com/g/comp.lang.python/c/kqWrUMSYhrY?pli=1) --- [Python Best Practices – Real Python] (https://realpython.com/tutorials/best-practices/) --- [PEP 8 – Style Guide for Python Code] (https://peps.python.org/pep-0008/) Projects: --- [terminal-tree: Experimental Filesystem Navigator in Textual] (https://github.com/willmcgugan/terminal-tree) --- [django-tasks: Background Workers Reference Implementation] (https://github.com/RealOrangeOne/django-tasks) Additional Links: --- [Episode #146: Using NumPy and Linear Algebra for Faster Python Code – The Real Python Podcast] (https://realpython.com/podcasts/rpp/146/) --- [How to Write Beautiful Python Code With PEP 8 – Real Python] (https://realpython.com/python-pep8/) --- [Writing Idiomatic Python – Real Python] (https://realpython.com/courses/writing-idiomatic-python/) --- [Namespaces and Scope in Python – Real Python] (https://realpython.com/python-namespaces-scope/) --- [How to Install Python on Your System: A Guide – Real Python] (https://realpython.com/installing-python/) --- [Python Virtual Environments: A Primer – Real Python] (https://realpython.com/python-virtual-environments-a-primer/) --- [Sourcery - Instant Code Review for Faster Velocity] (https://sourcery.ai/) --- [Episode #183: Exploring Code Reviews in Python and Automating the Process] (https://realpython.com/podcasts/rpp/183/) --- [Textual] (https://github.com/textualize/textual) --- [uv - An extremely fast Python package and project manager, written in Rust.] (https://docs.astral.sh/uv/) --- [DEP 0014: Background workers - GitHub] (https://github.com/django/deps/blob/main/accepted/0014-background-workers.rst) --- [PyCoder’s Weekly - Have a Project You Want to Share? - Submit a Link] (https://pycoders.com/submissions) Level up your Python skills with our expert-led courses: --- [Navigating Namespaces and Scope in Python] (https://realpython.com/courses/navigate-namespaces-scope/) --- [Writing Idiomatic Python] (https://realpython.com/courses/writing-idiomatic-python/) --- [Writing Beautiful Pythonic Code With PEP 8] (https://realpython.com/courses/writing-beautiful-python-code-pep-8/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

06 Dec 2024

51 MINS

51:26

06 Dec 2024


#231

marimo: Reactive Notebooks and Deployable Web Apps in Python

What are common issues with using notebooks for Python development? How do you know the current state, share reproducible results, or create interactive applications? This week on the show, we speak with Akshay Agrawal about the open-source reactive marimo notebook for Python. Before writing any code, Akshay wrote a 2,500-word design document. He wanted to create a maintainable and reproducible tool that avoided the hidden state of traditional notebooks. We discuss solving the hidden state problem by building the notebook as a directed acyclic graph (DAG). Akshay shares how marimo notebooks are stored as pure Python files, which makes them easy to read, importable, and git-friendly. We discuss serializing package requirements using PEP 723 inline metadata to create standalone reproducible notebooks. We also cover how marimo notebooks can be deployed as a web app or dashboard using Pyodide. Course Spotlight: [Navigating Namespaces and Scope in Python] (https://realpython.com/courses/navigate-namespaces-scope/) In this course, you’ll learn about Python namespaces, the structures used to store and organize the symbolic names created during execution of a Python program. You’ll learn when namespaces are created, how they are implemented, and how they define variable scope. Topics: ---00:00:00 – Introduction ---00:02:06 – Akshay’s background and studies ---00:04:14 – Work at Google and PhD program ---00:06:29 – Sharing notebooks ---00:08:18 – Starting work on marimo 2 years ago ---00:12:48 – Avoiding notebook issues and building a DAG ---00:18:39 – The difference of reactivity ---00:20:39 – What is a marimo notebook? ---00:23:39 – Video Course Spotlight ---00:24:50 – Reproducibility and managing package requirements ---00:27:49 – Using decorators for cells ---00:30:23 – Writing a design document before any coding ---00:34:08 – Interactivity and UI widgets ---00:38:20 – Design decisions and built-in widgets ---00:42:05 – Creating a deployable web application ---00:44:34 – Exploring examples and tutorials ---00:46:13 – Supporting DataFrame libraries with narwhals ---00:48:00 – Migrating from a Jupyter notebook ---00:52:02 – Working with cells and not running code ---00:54:30 – A couple favorite tutorials ---00:56:17 – What are you excited about in the world of Python? ---00:57:39 – What do you want to learn next? ---00:59:34 – How can people follow the project and yourself? ---01:00:12 – Thanks and goodbye Show Links: --- [marimo - a next-generation Python notebook] (https://marimo.io/) --- [marimo: an open-source reactive notebook for Python - Akshay Agrawal (Nbpy2024) - YouTube] (https://www.youtube.com/watch?v=9R2cQygaoxQ) --- [TensorFlow] (https://www.tensorflow.org/) --- [Made with marimo - marimo] (https://marimo.io/gallery) --- [FAQ - marimo] (https://docs.marimo.io/faq.html#faq-problems) --- [Pluto.jl — interactive Julia programming environment] (https://plutojl.org/) --- [Observable: Build expressive charts and dashboards with code] (https://observablehq.com/) --- [We Downloaded 10,000,000 Jupyter Notebooks From Github – This Is What We Learned - The Datalore Blog] (https://blog.jetbrains.com/datalore/2020/12/17/we-downloaded-10-000-000-jupyter-notebooks-from-github-this-is-what-we-learned/) --- [A Large-scale Study about Quality and Reproducibility of Jupyter Notebooks] (https://leomurta.github.io/papers/pimentel2019a.pdf) --- [Lessons learned reinventing the Python notebook - marimo] (https://marimo.io/blog/lessons-learned) --- [Episode #226: PySheets: Spreadsheets in the Browser Using PyScript] (https://realpython.com/podcasts/rpp/226/) --- [PEP 723 – Inline script metadata] (https://peps.python.org/pep-0723/) --- [Inline script metadata - Python Packaging User Guide] (https://packaging.python.org/en/latest/specifications/inline-script-metadata/#inline-script-metadata) --- [Serializing package requirements in marimo notebooks - marimo] (https://marimo.io/blog/sandboxed-notebooks) --- [uv: Unified Python packaging] (https://astral.sh/blog/uv-unified-python-packaging) --- [marimo Newsletter 7 - Jupyter to marimo] (https://marimo.io/blog/newsletter-7) --- [Custom UI elements - marimo] (https://docs.marimo.io/guides/integrating_with_marimo/custom_ui_plugins.html) --- [anywidget - anywidget] (https://anywidget.dev/) --- [Interactive elements - marimo] (https://docs.marimo.io/guides/interactivity.html) --- [Episode #224: Narwhals: Expanding DataFrame Compatibility Between Libraries] (https://realpython.com/podcasts/rpp/224/) --- [Calmcode - marimo: Introduction] (https://calmcode.io/course/marimo/introduction) --- [Join the marimo Discord] (https://marimo.io/discord) --- [marimo newsletter] (https://marimo.io/newsletter) --- [marimo on Twitter] (https://twitter.com/marimo_io) --- [marimo on LinkedIn] (https://www.linkedin.com/company/marimo-io/) --- [Akshay Agrawal’s website] (https://akshayagrawal.com/) --- [Aksahy on Twitter] (https://x.com/akshaykagrawal) Level up your Python skills with our expert-led courses: --- [Navigating Namespaces and Scope in Python] (https://realpython.com/courses/navigate-namespaces-scope/) --- [Python Decorators 101] (https://realpython.com/courses/python-decorators-101/) --- [Using Jupyter Notebooks] (https://realpython.com/courses/using-jupyter-notebooks/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

29 Nov 2024

1 HR 00 MINS

1:00:58

29 Nov 2024


#230

The Joy of Tinkering & Python Free-Threading Performance

What keeps your spark alive for developing software and learning Python? Do you like to try new frameworks, build toy projects, or collaborate with other developers? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects. We discuss the joy of tinkering with Python as a way to keep your developer skills sharp. We dig into our techniques for continuing to learn and build projects. Christopher shares an article that examines the performance of Python 3.13’s free-threading features. This piece uses a clever example to measure how the new features behave with large datasets and parallelization. We share several other articles and projects from the Python community, including a group of new releases, common use cases and examples for Python closures, finding the opposite of cloud-native, Python’s soft keywords, a command-line utility for taking automated screenshots of websites, and putting the Django admin in the terminal with Textual. This episode is sponsored by Windsurf. Course Spotlight: [Python Inner Functions] (https://realpython.com/courses/python-inner-functions/) In this step-by-step course, you’ll learn what inner functions are in Python, how to define them, and what their main use cases are. You’ll see how to write helper functions, create closure factory functions, and how to add behavior to existing functions with decorators. Topics: ---00:00:00 – Introduction ---00:02:18 – Django Bugfix Release Issued: 5.1.3 ---00:02:46 – Pillow Release 11.0.0 ---00:03:14 – Flask Version 3.1.0 ---00:03:30 – PyCon US 2025 (Pittsburgh) Call for Proposals ---00:03:46 – Python Closures: Common Use Cases and Examples ---00:09:20 – State of Python 3.13 Performance: Free-Threading ---00:15:42 – Sponsor: Windsurf ---00:16:32 – Opposite of Cloud Native Is…? ---00:22:36 – Python’s Soft Keywords ---00:24:50 – Video Course Spotlight ---00:26:11 – The Joy of Tinkering ---00:38:33 – shot-scraper: A command-line utility for taking automated screenshots of websites ---00:41:13 – django-admin-tui: Django Admin in the Terminal! ---00:42:37 – django-admin-dracula: Dracula Themes for the Django Admin ---00:44:21 – Thanks and goodbye News: --- [Django Bugfix Release Issued: 5.1.3] (https://docs.djangoproject.com/en/5.1/releases/5.1.3/) --- [Pillow Release 11.0.0] (https://github.com/python-pillow/Pillow/releases/tag/11.0.0) --- [Flask Version 3.1.0] (https://flask.palletsprojects.com/en/stable/changes/#version-3-1-0) --- [PyCon US 2025 (Pittsburgh) Call for Proposals] (https://pretalx.com/pyconus2025/) Show Links: --- [Python Closures: Common Use Cases and Examples] (https://realpython.com/python-closure/) – In this tutorial, you’ll learn about Python closures. A closure is a function-like object with an extended scope. You can use closures to create decorators, factory functions, stateful functions, and more. --- [State of Python 3.13 Performance: Free-Threading] (https://codspeed.io/blog/state-of-python-3-13-performance-free-threading) – This article does a comparison between code in single threaded, threaded, and multi-process versions under Python 3.12, 3.13, and 3.13 free-threaded with the GIL on and off. --- [Opposite of Cloud Native Is…?] (https://mkennedy.codes/posts/opposite-of-cloud-native-is-stack-native/) – Michael (from Talk Python fame) introduces the concept of “stack-native” as the opposite of “cloud-native”, and how it applies to Python web apps. Building applications with just enough full-stack building blocks to run reliably with minimal complexity, rather than relying on a multitude of cloud services. --- [Python’s soft keywords] (https://mathspp.com/blog/til/pythons-soft-keywords) – Python includes soft keywords: tokens that are important to the parser but can also be used as variable names. This article shows you what a soft keyword is and how to find them in Python 3.12 (both the easy and hard way). Discussion: --- [Habits of Great Software Engineers - The Joy of Tinkering] (https://vadimkravcenko.com/shorts/habits-of-great-software-engineers/) Projects: --- [shot-scraper: A command-line utility for taking automated screenshots of websites] (https://shot-scraper.datasette.io/en/stable/) --- [django-admin-tui: Django admin in the terminal!] (https://github.com/valberg/django-admin-tui) --- [django-admin-dracula: 🦇 Dracula themes for the Django admin] (https://github.com/sjbitcode/django-admin-dracula) Additional Projects: --- [Primer on Python Decorators – Real Python] (https://realpython.com/primer-on-python-decorators/) --- [We’ve moved to Hetzner - Talk Python Blog] (https://talkpython.fm/blog/posts/we-have-moved-to-hetzner/) --- [Talk Python rewritten in Quart (async Flask) - Talk Python Blog] (https://talkpython.fm/blog/posts/talk-python-rewritten-in-quart-async-flask/) --- [PyCoder’s Weekly - Have a Project You Want to Share? - Submit a Link] (https://pycoders.com/submissions) Level up your Python skills with our expert-led courses: --- [Python Decorators 101] (https://realpython.com/courses/python-decorators-101/) --- [Python Inner Functions] (https://realpython.com/courses/python-inner-functions/) --- [Defining and Calling Python Functions] (https://realpython.com/courses/defining-and-calling-functions/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

22 Nov 2024

45 MINS

45:50

22 Nov 2024


#229

Maintaining the Foundations of Python & Cautionary Tales

How do you build a sustainable open-source project and community? What lessons can be learned from Python’s history and the current mess that the WordPress community is going through? This week on the show, we speak with Paul Everitt from JetBrains about navigating open-source funding and the start of the Python Software Foundation. Paul has been an organizer in the Python community almost from the beginning. He shares how the project has navigated through multiple sponsors. We talk about the early governance models and the formation of the Python Software Foundation. We contrast this journey with the current drama unfolding in the WordPress community. We discuss the potential problems of having a benevolent dictator for life. We also dig into sponsorship models and ways to get companies to give back to the open-source projects they rely on. This episode is sponsored by Sentry. Course Spotlight: [Using pandas to Make a Gradebook in Python] (https://realpython.com/courses/gradebook-using-pandas-python/) With this course and Python project, you’ll build a script to calculate grades for a class using pandas. The script will quickly and accurately calculate grades from a variety of data sources. You’ll see examples of loading, merging, and saving data with pandas, as well as plotting some summary statistics. Topics: ---00:00:00 – Introduction ---00:01:55 – Meeting Jodie Burchell at PyCon 2022 ---00:02:51 – A non-traditional path into open-source ---00:07:09 – The current turmoil around WordPress ---00:13:49 – Keeping things fair in the age of extraction ---00:16:03 – Sponsor: Sentry ---00:17:07 – Early Python organizing history and conservation ---00:20:41 – The Python Software Activity precursor to PSF ---00:24:14 – Creating the Python Software Foundation ---00:27:24 – Keeping the perfect distance of business and project ---00:28:13 – Who gets to capture the value from open-source? ---00:31:07 – Sponsorships becoming more common ---00:33:24 – BDFL to a steering council ---00:34:58 – Video Course Spotlight ---00:36:16 – What is Plone? ---00:38:11 – Starting in Python and finding community ---00:50:07 – Companies contributing ---00:53:16 – Examples of how JetBrains contributes back ---00:55:41 – Understanding the support system ---00:58:09 – Talking to decision makers ---01:00:07 – Python 1994 talk and continuation ---01:01:49 – What are you excited about in the world of Python? ---01:03:06 – What do you want to learn next? ---01:04:17 – How can people follow your work online? ---01:07:16 – Thanks and goodbye Show Links: --- [JetBrains: Essential tools for software developers and teams] (https://www.jetbrains.com/) --- [PyCharm: the Python IDE for data science and web development] (https://www.jetbrains.com/pycharm/) --- [PyCon - Join us at PyCon] (https://pycon.org/) --- [Benevolent dictator for life - Wikipedia] (https://en.wikipedia.org/wiki/Benevolent_dictator_for_life) --- [The messy WordPress drama, explained - The Verge] (https://www.theverge.com/2024/9/27/24256361/wordpress-wp-engine-drama-explained-matt-mullenweg) --- [WordPress.org’s latest move involves taking control of a WP Engine plugin - The Verge] (https://www.theverge.com/2024/10/12/24268637/wordpress-org-matt-mullenweg-acf-fork-secure-custom-fields-wp-engine) --- [WP Engine asks court to stop Matt Mullenweg from blocking access to WordPress resources - The Verge] (https://www.theverge.com/2024/10/18/24273448/wp-engine-injunction-matt-mullenweg-wordpress-resources) --- [Podcast: Why the WordPress Chaos Matters - 404 Media] (https://www.404media.co/podcast-why-the-wordpress-chaos-matters/) --- [Zope - Wikipedia] (https://en.wikipedia.org/wiki/Zope) --- [Python Software Foundation] (https://www.python.org/psf-landing/) --- [PyLadies – Women Who Love Coding in Python] (https://pyladies.com/) --- [Django Software Foundation - Django] (https://www.djangoproject.com/foundation/) --- [OpenCV - About Page] (https://opencv.org/about/) --- [Plone Foundation] (https://plone.org/foundation) --- [FastHTML - Modern web applications in pure Python] (https://fastht.ml/) --- [Paul Everitt - Python 1994 - YouTube] (https://www.youtube.com/watch?v=vyz7zdGiPVY) --- [A Team at Microsoft is Helping Make Python Faster - Python] (https://devblogs.microsoft.com/python/python-311-faster-cpython-team/) --- [Velda Kiara] (https://veldakiara.notion.site/Velda-Kiara-46aec24028fd4e8dbdba003097c18b5b) --- [JetBrains Blog: The Drive to Develop] (https://blog.jetbrains.com/) --- [Paul Everitt (@pauleveritt@fosstodon.org) - Fosstodon] (https://fosstodon.org/@pauleveritt) --- [Guido van Rossum - Wikipedia] (https://en.wikipedia.org/wiki/Guido_van_Rossum) --- [The History of Python: Personal History - part 1, CWI] (https://python-history.blogspot.com/2009/01/personal-history-part-1-cwi.html) --- [Oral History of Guido van Rossum, part 1 - YouTube] (https://www.youtube.com/watch?v=Pzkdci2HDpU) Level up your Python skills with our expert-led courses: --- [Building Python Project Documentation With MkDocs] (https://realpython.com/courses/building-project-documentation-mkdocs/) --- [The pandas DataFrame: Working With Data Efficiently] (https://realpython.com/courses/pandas-dataframe-working-with-data/) --- [Using pandas to Make a Gradebook in Python] (https://realpython.com/courses/gradebook-using-pandas-python/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

15 Nov 2024

1 HR 09 MINS

1:09:09

15 Nov 2024


#228

New PEPs: Template Strings & External Wheel Hosting

Have you wanted the flexibility of f-strings but need safety checks in place? What if you could have deferred evaluation for logging or avoiding injection attacks? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects. We discuss a set of recent Python Enhancement Proposals (PEPs). The idea of template strings has been under consideration for a while, and PEP 750 describes a new way forward. PEP 759 proposes a way for projects on PyPI to safely host resources on external sites using a new package upload format called a .rim file. We share several other articles and projects from the Python community, including what didn’t make the headlines about Python 3.13, solving Sudoku with Python packaging, what’s sweet about Python’s syntactic sugar, creating database-generated columns using SQLite and Django, a discussion about mentoring, an adaptive web scraper, and a debugging tool for HTTP(S) client requests. This episode is sponsored by Sentry. Course Spotlight: [Using Pydantic to Simplify Python Data Validation] (https://realpython.com/courses/pydantic-simplify-data-validation/) Discover the power of Pydantic, Python’s most popular data parsing, validation, and serialization library. In this hands-on video course, you’ll learn how to make your code more robust, trustworthy, and easier to debug with Pydantic. Topics: ---00:00:00 – Introduction ---00:02:08 – Python 3.14.0 Alpha 1 Released ---00:02:38 – Python 3.13, What Didn’t Make the Headlines ---00:05:23 – What’s up Python? 3.13 is out, t-strings look awesome ---00:10:21 – Sponsor: Sentry ---00:11:25 – Sudoku in Python Packaging ---00:14:29 – Syntactic Sugar: Why Python Is Sweet and Pythonic ---00:22:31 – Database generated columns: Django & SQLite ---00:27:14 – Video Course Spotlight ---00:28:39 – Mentors ---00:42:23 – Scrapling: Lightning-Fast, Adaptive Web Scraping for Python ---00:44:14 – httpdbg: A tool for Python developers to easily debug the HTTP(S) client requests ---00:46:04 – Request for project submissions to PyCoders ---00:46:59 – Thanks and goodbye News: --- [Python 3.14.0 Alpha 1 Released] (https://pythoninsider.blogspot.com/2024/10/python-3140-alpha-1-is-now-available.html) Show Links: --- [Python 3.13, What Didn’t Make the Headlines] (https://www.bitecode.dev/p/python-313-what-didnt-make-the-headlines) – Bite Code summarizes some of the lesser covered changes to Python in the 3.13 release, including how some of the REPL improvements made it into pdb, improvements to shutil, and small additions to the asyncio library. --- [What’s up Python? 3.13 is out, t-strings look awesome, dep groups come in handy…] (https://www.bitecode.dev/p/whats-up-python-313-is-out-t-strings?utm_source=post-email-title&publication_id=1516188&post_id=150838079&utm_campaign=email-post-title&isFreemail=true&r=3ebaxe&triedRedirect=true&utm_medium=email) --- [Sudoku in Python Packaging] (https://simonwillison.net/2024/Oct/21/sudoku-in-python-packaging/) – Simon writes about a [Sudoku solver] (https://github.com/konstin/sudoku-in-python-packaging) written by Konstin that uses the Python packaging mechanisms to do Sudoku puzzles. The results are output using a requirements.txt file, where sudoku-0-3==5 represents the (0,3) cell’s answer of 5. --- [Syntactic Sugar: Why Python Is Sweet and Pythonic] (https://realpython.com/syntactic-sugar-python/) – In this tutorial, you’ll learn what syntactic sugar is and how Python uses it to help you create more readable, descriptive, clean, and Pythonic code. You’ll also learn how to replace a given piece of syntactic sugar with another syntax construct. --- [Database generated columns: Django & SQLite] (https://www.paulox.net/2023/11/07/database-generated-columns-part-1-django-and-sqlite/) – An introduction to database generated columns, using SQLite and the new GeneratedField added in Django 5.0 Discussion: --- [Mentors] (https://www.ryancheley.com/2024/09/16/mentors/) – Ryan just finished his second round of mentoring with the Djangonaut.Space program. This post talks about how you can help your mentor help you and how to be a good mentor. Projects: --- [Scrapling: Lightning-Fast, Adaptive Web Scraping for Python] (https://github.com/D4Vinci/Scrapling) --- [httpdbg: A tool for Python developers to easily debug the HTTP(S) client requests in a Python program] (https://github.com/cle-b/httpdbg) Additional Links: --- [PEP 750 – Template Strings] (https://peps.python.org/pep-0750/) --- [PEP 735 – Dependency Groups in pyproject.toml] (https://peps.python.org/pep-0735/) --- [PEP 759 – External Wheel Hosting] (https://peps.python.org/pep-0759/) --- [Episode #47: Unraveling Python’s Syntax to Its Core With Brett Cannon – The Real Python Podcast] (https://realpython.com/podcasts/rpp/47/) --- [Episode #92: Continuing to Unravel Python’s Syntactic Sugar With Brett Cannon – The Real Python Podcast] (https://realpython.com/podcasts/rpp/92/) --- [Episode #4: Learning Python Through Errors – The Real Python Podcast] (https://realpython.com/podcasts/rpp/4/) --- [PyCoder’s Weekly - Have a Project You Want to Share? - Submit a Link] (https://pycoders.com/submissions) Level up your Python skills with our expert-led courses: --- [Using Pydantic to Simplify Python Data Validation] (https://realpython.com/courses/pydantic-simplify-data-validation/) --- [Python Type Checking] (https://realpython.com/courses/python-type-checking/) --- [Using Type Hints for Multiple Return Types in Python] (https://realpython.com/courses/type-hints-multiple-return-types/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

08 Nov 2024

47 MINS

47:58

08 Nov 2024


#227

PySheets: Spreadsheets in the Browser Using PyScript

What goes into building a spreadsheet application in Python that runs in the browser? How do you make it launch quickly, and where do you store the cells of data? This week on the show, we speak with Chris Laffra about his project, PySheets, and his book “Communication for Engineers.” As a software engineer, Chris has worked at IBM, Google, Uber, and several financial institutions. He speaks about developer productivity and communication skills as an engineer. We begin our conversation by digging into his background, his approach to building engineering teams, and strategies for improving communication. Chris’ idea for PySheets is to have Excel inside Python with everything running locally in your browser. He was inspired by the success of Jupyter Notebooks but wanted to develop a tool more suited to a spreadsheet’s non-linear graph structure. PySheets is built to run locally in the user’s browser, taking advantage of PyScript. We discuss finding the right solution for storing data in the browser and developing a graphic toolkit to create the UI. Chris also shares the novel method he found to get the interface up and running while the larger assets are loading. This episode is sponsored by Sentry. Course Spotlight: [Understanding Python’s Global Interpreter Lock (GIL)] (https://realpython.com/courses/understanding-global-interpreter-lock-gil/) Python’s Global Interpreter Lock, or GIL, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter at any one time. In this video course, you’ll learn how the GIL affects the performance of your Python programs. Topics: ---00:00:00 – Introduction ---00:02:25 – Background with building engineering teams ---00:08:43 – Communication for Engineers book ---00:16:17 – What do customers want and experiences at IBM ---00:24:28 – Starting the development of PySheets ---00:27:19 – Working with the DOM ---00:29:41 – Success of Jupyter notebooks ---00:35:46 – Sponsor: Sentry ---00:36:52 – Little Toolkit for PyScript ---00:43:24 – Finding funding ---00:46:58 – Building a product before selling ---00:52:27 – Video Course Spotlight ---00:53:46 – Finding the right data storage in IndexedDB ---01:01:57 – Exploring the trial page and extensibility ---01:08:26 – Contributing to the project or forking ---01:11:56 – What are you excited about in the world of Python? ---01:16:20 – What do you want to learn next? ---01:17:25 – How can people follow your work online? ---01:18:05 – Thanks and goodbye Show Links: --- [Chris Laffra] (http://chrislaffra.com/) --- [C4E - Communication for Engineers (ePUB)] (https://chrislaffra.gumroad.com/l/cltwcl?layout=profile) --- [PySheets - Spreadsheet UI for Python] (https://pysheets.app/about) --- [PySheets: Source for PySheets] (https://github.com/PySheets/pysheets?tab=readme-ov-file#installation) --- [PyScript - Python in the browser - Chris Laffra - YouTube] (https://www.youtube.com/watch?v=5nseG-iU62g&list=PLXHJZN4UnprtCWGih6gSG_PvmgsvHue5y) --- [Python in Excel - Microsoft 365] (https://www.microsoft.com/en-us/microsoft-365/python-in-excel#footnote2) --- [pyscript/ltk: LTK is a little toolkit for writing UIs in PyScript] (https://github.com/pyscript/ltk) --- [LTK - Little Toolkit] (https://pyscript.github.io/ltk/) --- [PROCOL: a parallel object language with protocols - ACM SIGPLAN] (https://dl.acm.org/doi/abs/10.1145/74878.74888) --- [IndexedDB API - MDN] (https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) --- [First steps - PyScript] (https://docs.pyscript.net/2024.10.2/user-guide/first-steps/) --- [Pyodide — Version 0.26.3] (https://pyodide.org/en/stable/) --- [PyScript Updates: Bytecode Alliance, Pyodide, and MicroPython] (https://www.anaconda.com/blog/pyscript-updates-bytecode-alliance-pyodide-and-micropython) --- [MicroPython - Python for microcontrollers] (http://micropython.org/) --- [FreeCAD: Your own 3D parametric modeler] (https://www.freecad.org/) --- [Chris Laffra - How to become a Happy and Productive Engineer - YouTube] (https://www.youtube.com/playlist?list=PLXHJZN4UnprtCWGih6gSG_PvmgsvHue5y) Level up your Python skills with our expert-led courses: --- [What's New in Python 3.13] (https://realpython.com/courses/new-features-python-313/) --- [Python Plotting With Matplotlib] (https://realpython.com/courses/python-plotting-matplotlib/) --- [Understanding Python's Global Interpreter Lock (GIL)] (https://realpython.com/courses/understanding-global-interpreter-lock-gil/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

01 Nov 2024

1 HR 19 MINS

1:19:33

01 Nov 2024


#226

Python Getting Faster and Leaner & Ideas for Django Projects

What changes are happening under the hood in the latest versions of Python? How are these updates laying the groundwork for a faster Python in the coming years? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects. Christopher shares an article about Python’s recent performance improvements. The piece covers the specialized adaptive interpreter and explains what those terms mean. It also includes details about the experimental feature of the Just-In-Time (JIT) compiler added in 3.13. We dig into a collection of Django projects you can use to practice and develop your skills. The projects ramp up from detailed beginner tutorials to more advanced projects with guidelines on how to get started. We also discuss a collection of popular websites that use Django. We share several other articles and projects from the Python community, including a batch of recent Python Enhancement Protocols (PEPs), a couple of Python releases, using DuckDB in the browser with Pyodide, building a contact book app with Textual, generating a tiny status page with a Python script, and a grep-like tool that understands code. This episode is sponsored by AssemblyAI. Course Spotlight: [Building a Site Connectivity Checker] (https://realpython.com/courses/python-site-connectivity-checker/) In this video course, you’ll build a Python site connectivity checker for the command line. While building this app, you’ll integrate knowledge related to making HTTP requests with standard-library tools, creating command-line interfaces, and managing concurrency with asyncio and aiohttp. Topics: ---00:00:00 – Introduction ---00:03:11 – PEP 777: How to Re-Invent the Wheel ---00:04:22 – PEP 758: Allow except and except* Expressions Without Parentheses ---00:04:51 – PEP 760: No More Bare Excepts (Withdrawn) ---00:05:42 – PEP 735: Dependency Groups in pyproject.toml ---00:06:29 – PEP 761: Deprecating PGP Signatures for CPython Artifacts ---00:06:59 – Python 3.12.7 Released ---00:07:12 – Incremental GC and Pushing Back the 3.13.0 Release ---00:09:10 – DuckDB in the Browser With Pyodide ---00:15:35 – Sponsor: AssemblyAI ---00:16:18 – Build a Contact Book App With Python, Textual, and SQLite ---00:21:55 – Django Project Ideas ---00:28:42 – Video Course Spotlight ---00:30:00 – In the Making of Python Fitter and Faster ---00:35:13 – tinystatus: Tiny Status Page Generated by a Python Script ---00:38:06 – srgn: Grep-Like Tool That Understands Code ---00:42:01 – Thanks and goodbye News: --- [PEP 777: How to Re-Invent the Wheel] (https://peps.python.org/pep-0777/) – “The current wheel 1.0 specification was written over a decade ago, and has been extremely robust to changes in the Python packaging ecosystem… this PEP prescribes compatibility requirements on future wheel revisions.” --- [PEP 758: Allow except and except* Expressions Without Parentheses] (https://peps.python.org/pep-0758/) – “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.” --- [PEP 760: No More Bare Excepts (Withdrawn)] (https://peps.python.org/pep-0760/) --- [PEP 735: Dependency Groups in pyproject.toml (Accepted)] (https://peps.python.org/pep-0735/) --- [PEP 761: Deprecating PGP Signatures for CPython Artifacts] (https://peps.python.org/pep-0761/) – Since Python 3.11.0, CPython has provided two verifiable digital signatures for all CPython artifacts: PGP and sigstore. This PEP proposes moving to sigstore as the only way of signing artifacts. --- [Python 3.12.7 Released] (https://docs.python.org/release/3.12.7/whatsnew/changelog.html) --- [Python 3.13.0 Released] (https://docs.python.org/3.13/whatsnew/changelog.html) --- [Incremental GC and Pushing Back the 3.13.0 Release] (https://discuss.python.org/t/incremental-gc-and-pushing-back-the-3-13-0-release/65285) – Some last minute performance considerations delayed the release of Python 3.13 with one of the features being backed out. Show Links: --- [DuckDB in the Browser With Pyodide] (https://duckdb.org/2024/10/02/pyodide.html) – Learn how to run DuckDB in an in-browser Python environment to enable simple querying on remote files, interactive documentation, and easy to use training materials. --- [Build a Contact Book App With Python, Textual, and SQLite] (https://realpython.com/contact-book-python-textual/) – In this tutorial, you’ll be guided step by step through the process of building a basic contact book application. You’ll use Python and Textual to build the application’s text-based user interface (TUI), and then use SQLite to manage the database. --- [Django Project Ideas] (https://blog.jetbrains.com/pycharm/2024/09/django-project-ideas/) – Looking to experiment or build your portfolio? Discover creative Django project ideas for all skill levels, from beginner apps to advanced full-stack projects. --- [In the Making of Python Fitter and Faster] (https://sumercip.com/posts/making-python-fitter-and-faster/) – This post details how Python’s recent performance improvements work under the hood. It covers changes to the interpreter, better memory management, and the newly experimental JIT compiler. Projects: --- [tinystatus: Tiny Status Page Generated by a Python Script] (https://github.com/harsxv/tinystatus) --- [srgn: Grep-Like Tool That Understands Code] (https://github.com/alexpovel/srgn) Additional Links: --- [What Are Python Wheels and Why Should You Care? – Real Python] (https://realpython.com/python-wheels/) --- [Deploy your first JupyterLite website on GitHub Pages — JupyterLite 0.4.3 documentation] (https://jupyterlite.readthedocs.io/en/latest/quickstart/deploy.html) --- [rich: Python library for rich text and beautiful formatting in the terminal] (https://github.com/Textualize/rich) --- [The 10 Most Popular Websites Using Django] (https://djangostars.com/blog/10-popular-sites-made-on-django/) --- [Django in Action] (https://www.manning.com/books/django-in-action#reviews) --- [Django and htmx Tutorial: Easier Web Development - YouTube] (https://www.youtube.com/watch?v=i1eMxu_PR5Y) --- [Build a Site Connectivity Checker in Python – Real Python] (https://realpython.com/site-connectivity-checker-python/) --- [Refactoring Python with 🌳 Tree-sitter & Jedi | Jack’s blog] (https://jackevans.bearblog.dev/refactoring-python-with-tree-sitter-jedi/) Level up your Python skills with our expert-led courses: --- [Building a Site Connectivity Checker] (https://realpython.com/courses/python-site-connectivity-checker/) --- [How to Set Up a Django Project] (https://realpython.com/courses/set-up-django-project/) --- [Building Command Line Interfaces With argparse] (https://realpython.com/courses/python-argparse-command-line-interfaces/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

25 Oct 2024

43 MINS

43:04

25 Oct 2024


#225

Narwhals: Expanding DataFrame Compatibility Between Libraries

How does a Python tool support all types of DataFrames and their various features? Could a lightweight library be used to add compatibility for newer formats like Polars or PyArrow? This week on the show, we speak with Marco Gorelli about his project, Narwhals. Narwhals is a project aimed at library maintainers rather than end users. We discuss how the added compatibility benefits users by supporting modern features like lazy evaluation. We cover several projects Marco has been working with to implement Narwhals, including Altair, scikit-lego, and Ibis. We also discuss how Marco started contributing to open-source projects. Marco has contributed to both pandas and Polars, which helps explain his interest in growing compatibility between libraries. He also offers advice on making your first contribution. This episode is sponsored by CodeRabbit. Course Spotlight: [Differences Between Python’s Mutable and Immutable Types] (https://realpython.com/courses/differences-mutable-immutable-types/) In this video course, you’ll learn how Python’s mutable and immutable data types work internally and how you can take advantage of mutability or immutability to power your code. Topics: ---00:00:00 – Introduction ---00:02:02 – Euro SciPy 2024 and sprints ---00:04:04 – How did you get involved in open source? ---00:07:18 – Finding a good issue to get started ---00:09:25 – Discord and open-source projects ---00:11:12 – Who would you describe Narwhals? ---00:16:47 – Working on Polars ---00:19:17 – Apache Arrow and a data interchange protocol ---00:22:55 – Sponsor: CodeRabbit ---00:23:55 – Digging into eager vs lazy ---00:27:04 – Ibis DataFrame library ---00:28:57 – What do libraries need from Narwhals? ---00:34:57 – The scikit-lego library ---00:37:15 – Video Course Spotlight ---00:38:45 – Other libraries interested in Narwhals ---00:41:56 – Compatibility policy ---00:45:18 – What should an end user expect? ---00:46:32 – Have other projects that attempted this? ---00:47:54 – Keeping the project light and pure Python ---00:49:32 – Contributors and how to get involved ---00:54:42 – What are you excited about in the world of Python? ---00:57:18 – What do you want to learn next? ---00:59:05 – How can people follow your work online? ---00:59:27 – Thanks and goodbye Show Links: --- [Narwhals] (https://narwhals-dev.github.io/narwhals/) --- [EuroSciPy] (https://euroscipy.org/2024/) --- [narwhals: Lightweight and Extensible Compatibility Layer Between DataFrame Libraries! - GitHub] (https://github.com/narwhals-dev/narwhals?featured_on=talkpython) --- [DataFrame Interoperability - What’s Been Achieved, and What Comes Next? - PyCon Lithuania - YouTube] (https://www.youtube.com/watch?v=-mdx7Cn6_6E&t=343s) --- [How Narwhals Has Many End Users … That Never Use It Directly - YouTube] (https://www.youtube.com/watch?v=8hYdq4sWbbQ&list=PLSIzlWDI17bRULf7X_55ab7THqA9TJPxd) --- [Polars Has a New Lightweight Plotting Backend - Altair] (https://pola.rs/posts/lightweight_plotting/) --- [pandas - Python Data Analysis Library] (https://pandas.pydata.org/) --- [Polars — DataFrames for the new era] (https://pola.rs/) --- [great-tables - PyPI] (https://pypi.org/project/great-tables/) --- [Episode #214: Build Captivating Display Tables in Python With Great Tables] (https://realpython.com/podcasts/rpp/214/) --- [Ibis] (https://ibis-project.org/) --- [Episode #201: Decoupling Systems to Get Closer to the Data] (https://realpython.com/podcasts/rpp/201/) --- [Great Tables is Now BYODF (Bring Your Own DataFrame)] (https://posit-dev.github.io/great-tables/blog/bring-your-own-df/) --- [How Narwhals and scikit-lego Came Together to Achieve DataFrame-Agnosticism] (https://labs.quansight.org/blog/scikit-lego-narwhals) --- [Explore Using Narwhals in Plotly Express · Issue #4749 - GitHub] (https://github.com/plotly/plotly.py/issues/4749) --- [Fairlearn] (https://fairlearn.org/) --- [Perfect Backwards Compatibility Policy - Narwhals] (https://narwhals-dev.github.io/narwhals/backcompat/) --- [uv: Unified Python packaging] (https://astral.sh/blog/uv-unified-python-packaging) --- [pixi - Powerful Development Environments] (https://prefix.dev/) --- [Narwhals - Discord] (https://discord.com/invite/V3PqtB4VA4) --- [marcogorelli (@marcogorelli@fosstodon.org) - Fosstodon] (https://fosstodon.org/@marcogorelli) --- [Marco Gorelli - Quansight - LinkedIn] (https://www.linkedin.com/in/marcogorelli/?featured_on=talkpython) Level up your Python skills with our expert-led courses: --- [What's New in Python 3.13] (https://realpython.com/courses/new-features-python-313/) --- [pandas GroupBy: Grouping Real World Data in Python] (https://realpython.com/courses/pandas-groupby-real-world-data/) --- [The pandas DataFrame: Working With Data Efficiently] (https://realpython.com/courses/pandas-dataframe-working-with-data/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

18 Oct 2024

1 HR 00 MINS

1:00:33

18 Oct 2024


#224

Exploring the New Features of Python 3.13

Python 3.13 is here! Our regular guests, Geir Arne Hjelle and Christopher Trudeau, return to discuss the new version. This year, Geir Arne coordinated a series of preview articles with members of the Real Python team and a showcase tutorial, “Python 3.13: Cool New Features for You to Try.” Christopher’s video course “What’s New in Python 3.13” covers the topics from the article and shows the new features in action. Geir Arne and Christopher dug into the release to create code examples of the new features for the tutorial and course. We look at the options for disabling the Global Interpreter Lock (GIL) and enabling the Just-in-Time (JIT) compiler. We also discuss the new interactive interpreter, better error messages, multiple improvements to static typing, and additional performance improvements. We share our thoughts on the updates and offer advice about incorporating them into your projects. We also discuss when you should start running Python 3.13. This is episode is sponsored by Nvidia. Course Spotlight: [What’s New in Python 3.13] (https://realpython.com/courses/new-features-python-313/) In this video course, you’ll learn about the new features in Python 3.13. You’ll take a tour of the new REPL and error messages and see how you can try out the experimental free threading and JIT versions of Python 3.13 yourself. Topics: ---00:00:00 – Introduction ---00:03:14 – A Modern REPL ---00:08:54 – Making the Global Interpreter Lock Optional in CPython ---00:11:33 – JIT Compilation ---00:15:48 – More improved error messages ---00:18:30 – Sponsor: NVIDIA ---00:19:13 – Marking deprecations using the type system ---00:21:09 – Type Defaults for Type Parameters ---00:22:44 – Narrowing types with TypeIs ---00:25:24 – TypedDict: Read-only items ---00:27:50 – Random command line interface ---00:29:54 – New copy.replace() ---00:33:43 – Video Course Spotlight ---00:34:55 – Pathlib and globbing ---00:39:33 – Stripping docstrings ---00:41:28 – Import improvements ---00:41:56 – Dynamically import non-code files ---00:42:23 – Adding iOS as a supported platform ---00:43:32 – More consistency with local namespace ---00:44:30 – Support for deprecation in argparse ---00:45:00 – Better entry points for breakpoint or set_trace ---00:46:08 – Removing dead batteries ---00:47:43 – When to upgrade to 3.13? ---00:53:19 – core.py podcast ---00:54:14 – Thanks and goodbye Show Links: --- [Python 3.13: Cool New Features for You to Try] (https://realpython.com/python313-new-features/) --- [What’s New in Python 3.13] (https://realpython.com/courses/new-features-python-313/) --- [Python 3.13 Preview: A Modern REPL] (https://realpython.com/python313-repl/) --- [Python 3.13 Preview: Free Threading and a JIT Compiler] (https://realpython.com/python313-free-threading-jit/) --- [What’s New In Python 3.13 — Python 3.13.0rc2 documentation] (https://docs.python.org/3.13/whatsnew/3.13.html) --- [PEP 703 – Making the Global Interpreter Lock Optional in CPython] (https://peps.python.org/pep-0703/) --- [PEP 744 – JIT Compilation] (https://peps.python.org/pep-0744/) --- [PEP 702 – Marking deprecations using the type system] (https://peps.python.org/pep-0702/) --- [PEP 696 – Type Defaults for Type Parameters] (https://peps.python.org/pep-0696/) --- [PEP 742 – Narrowing types with TypeIs] (https://peps.python.org/pep-0742/) --- [PEP 705 – TypedDict: Read-only items] (https://peps.python.org/pep-0705/) --- [PEP 730 – Adding iOS as a supported platform] (https://peps.python.org/pep-0730/) --- [PEP 738 – Adding Android as a supported platform] (https://peps.python.org/pep-0738/) --- [PEP 667 – Consistent views of namespaces] (https://peps.python.org/pep-0667/) --- [PEP 594 – Removing dead batteries from the standard library] (https://peps.python.org/pep-0594/) --- [The Python Standard REPL: Try Out Code and Ideas Quickly] (https://realpython.com/python-repl/) --- [Unlock IPython’s Magical Toolbox for Your Coding Journey] (https://realpython.com/ipython-interactive-python-shell/) --- [core.py Podcast - Episode 14: Integration Events] (https://podcasters.spotify.com/pod/show/corepy/episodes/Episode-14-Integration-Events-e2nuru6) Level up your Python skills with our expert-led courses: --- [What's New in Python 3.13] (https://realpython.com/courses/new-features-python-313/) --- [Python Type Checking] (https://realpython.com/courses/python-type-checking/) --- [What's New in Python 3.12] (https://realpython.com/courses/new-features-python-312/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

11 Oct 2024

55 MINS

55:24

11 Oct 2024


#223

Using Virtual Environments in Docker & Comparing Python Dev Tools

Should you use a Python virtual environment in a Docker container? What are the advantages of using the same development practices locally and inside a container? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects. We share a recent post by Hynek Schlawack about building Python projects using Docker containers. Hynek argues for using virtual environments for these projects, like developing a local one. He’s found that keeping your code in an isolated, well-defined location and structure avoids confusion and complexity. We also discuss our development setups, including Python versions, code editors, virtual environment practices, terminals, and customizations. We dig into how your programming history affects the tools you use. We share several other articles and projects from the Python community, including a group of new releases, addressing the “why” in comments, comparing a data science workflow in Python and R, removing common problems from CSV files, and a project for creating HTML tables in Django. This episode is sponsored by InfluxData. Course Spotlight: [Advanced Python import Techniques] (https://realpython.com/courses/advanced-import-techniques/) The Python import system is as powerful as it is useful. In this in-depth video course, you’ll learn how to harness this power to improve the structure and maintainability of your code. Topics: ---00:00:00 – Introduction ---00:02:55 – Python Releases 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20 ---00:03:26 – Python Release Python 3.13.0rc2 ---00:04:07 – Django Security Releases Issued: 5.1.1, 5.0.9, and 4.2.16 ---00:04:36 – Polars Has a New Lightweight Plotting Backend ---00:05:49 – Why I Still Use Python Virtual Environments in Docker ---00:11:37 – How to Use Conditional Expressions With NumPy where() ---00:15:55 – Sponsor: InfluxData ---00:16:39 – PythonistR: A Match Made in Data Heaven ---00:23:44 – Why Not Comments ---00:26:48 – Video Course Spotlight ---00:28:10 – Discussion: Personal development setups ---00:51:01 – csv_trimming: Remove Common Ugliness From CSV Files ---00:53:01 – django-tables2: Create HTML Tables in Django ---00:54:39 – Thanks and goodbye News: --- [Python Releases 3.12.6, 3.11.10, 3.10.15, 3.9.20, and 3.8.20] (https://docs.python.org/release/3.12.6/whatsnew/changelog.html) --- [Python Release Python 3.13.0rc2] (https://www.python.org/downloads/release/python-3130rc2/) --- [Django Security Releases Issued: 5.1.1, 5.0.9, and 4.2.16] (https://www.djangoproject.com/weblog/2024/sep/03/security-releases/) Show Links: --- [Polars Has a New Lightweight Plotting Backend] (https://pola.rs/posts/lightweight_plotting/) – Polars 1.6 allows you to natively create beautiful plots without pandas, NumPy, or PyArrow. This is enabled by Narwhals, a lightweight compatibility layer between dataframe libraries. --- [Why I Still Use Python Virtual Environments in Docker] (https://hynek.me/articles/docker-virtualenv/) – Hynek often gets challenged when he suggests the use of virtual environments within Docker containers, and this post explains why he still does. --- [How to Use Conditional Expressions With NumPy where()] (https://realpython.com/numpy-where-conditional-expressions/) – This tutorial teaches you how to use the where() function to select elements from your NumPy arrays based on a condition. You’ll learn how to perform various operations on those elements and even replace them with elements from a separate array or arrays. --- [PythonistR: A Match Made in Data Heaven] (https://cosimameyer.com/post/2024-09-05-pythonistr-a-match-made-in-data-heaven/) – In data science you’ll sometimes hear a debate between R and Python. Cosima says ‘why not choose both?’ She outlines a data pipeline that uses the best tool for each job. --- [Why Not Comments] (https://buttondown.com/hillelwayne/archive/why-not-comments/) – This post talks about why you might want to include information in your code comments about why you didn’t take a particular approach. Discussion: --- [Editors & IDEs – Real Python] (https://realpython.com/tutorials/editors/) --- [Visual Studio Code - Code Editing. Redefined] (https://code.visualstudio.com/) --- [Project Jupyter - Home] (https://jupyter.org/) --- [vim online: welcome home] (https://www.vim.org/) --- [iTerm2 - macOS Terminal Replacement] (https://iterm2.com/) Projects: --- [csv_trimming: Remove Common Ugliness From CSV Files] (https://github.com/LucaCappelletti94/csv_trimming) --- [django-tables2: Create HTML Tables in Django] (https://github.com/jieter/django-tables2) Additional Links: --- [virtualenv Lives! - Hynek Schlawack - 2014] (https://hynek.me/articles/virtualenv-lives/) --- [Production-ready Python Docker Containers with uv - Hynek Schlawack] (https://hynek.me/articles/docker-uv/) --- [r-python-talk: 🦸🏼‍♀️ Contains material for talk on how to use Python and R together] (https://github.com/cosimameyer/r-python-talk) --- [Download RStudio - Posit] (https://posit.co/downloads/) --- [Logic for Programmers by Hillel Wayne - Leanpub] (https://leanpub.com/logic/) Level up your Python skills with our expert-led courses: --- [Using Jupyter Notebooks] (https://realpython.com/courses/using-jupyter-notebooks/) --- [Absolute vs Relative Imports in Python] (https://realpython.com/courses/absolute-vs-relative-imports-python/) --- [Advanced Python import Techniques] (https://realpython.com/courses/advanced-import-techniques/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

27 Sep 2024

55 MINS

55:46

27 Sep 2024


#222

Thriving as a Developer With ADHD

What are strategies for being a productive developer with ADHD? How can you help your team members with ADHD to succeed and complete projects? This week on the show, we speak with Chris Ferdinandi about his website and podcast “ADHD For the Win!” Chris struggled with productivity early in his career as a developer. He shares systems and strategies he’s discovered to harness the focusing power of ADHD. We discuss time management, meetings, and maintaining productivity in a hectic world. Chris also shares resources for learning more about defining ADHD, self-evaluation, and how to keep getting things done. This episode is sponsored by InfluxData. Course Spotlight: [Build a GUI Calculator With PyQt and Python] (https://realpython.com/courses/build-gui-calculator-pyqt/) In this video course, you’ll learn how to create graphical user interface (GUI) applications with Python and PyQt. Once you’ve covered the basics, you’ll build a fully functional desktop calculator that can respond to user events with concrete actions. Topics: ---00:00:00 – Introduction ---00:02:30 – Defining ADHD and how it aligns with coding ---00:05:47 – Analogy for focus ---00:06:51 – Can you sense the change in focus? ---00:07:46 – The challenge of meetings ---00:11:45 – Tips for managing time ---00:15:44 – Capturing notes and defragging ---00:18:48 – Sponsor: InfluxData ---00:19:33 – Downtime and interruptions ---00:25:26 – Remote work and focus ---00:33:16 – Sitting still and meetings ---00:37:39 – Video Course Spotlight ---00:39:13 – Anything worth doing is worth doing poorly ---00:47:36 – Prototypes and working on interesting things ---00:50:26 – Deadlines and pomodoro timers ---00:54:21 – Have your symptoms changed over time? ---00:56:18 – Starting ADHDftw.com ---00:59:12 – Decision to keep podcast episodes short ---01:00:01 – Deciding on medication ---01:02:02 – Resources available ---01:03:29 – What motivates you to continue to learn programming? ---01:04:06 – What do you want to learn next? ---01:04:55 – What are other ways to follow your work online? ---01:05:28 – Thanks and goodbye Show Links: --- [ADHD ftw! - Resources] (https://adhdftw.com/real-python/) --- [ADHD isn’t a deficit of attention (and doesn’t necessarily mean you’re hyperactive)] (https://adhdftw.com/adhd-isnt-a-deficit-of-attention-and-doesnt-neccessarily-mean-youre-hyperactive/) --- [Do I have ADHD?] (https://adhdftw.com/do-i-have-adhd/) --- [Snoot - Wikipedia] (https://en.wikipedia.org/wiki/Snoot) --- [Anything worth doing is worth doing poorly] (https://adhdftw.com/anything-worth-doing-is-worth-doing-poorly/) --- [Getting stuff done with ADHD: defrag your notebook - ADHD ftw!] (https://adhdftw.com/getting-shit-done-with-adhd-defrag-your-notebook/) --- [Go Make Things - About] (https://gomakethings.com/about/) --- [Chris Ferdinandi ⚓️ (@cferdinandi@mastodon.social) - Fosstodon] (https://fosstodon.org/@cferdinandi@mastodon.social) Level up your Python skills with our expert-led courses: --- [Creating PyQt Layouts for GUI Applications] (https://realpython.com/courses/creating-pyqt-layouts-gui-applications/) --- [Build a GUI Calculator With PyQt and Python] (https://realpython.com/courses/build-gui-calculator-pyqt/) --- [HTML and CSS Foundations for Python Developers] (https://realpython.com/courses/html-css-foundations/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

20 Sep 2024

1 HR 06 MINS

1:06:30

20 Sep 2024


#221

Configuring Git Pre-Commit Hooks & Estimating Software Projects

How do you take advantage of Git pre-commit hooks? How do you build custom software checks and rules that run every time you commit your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects. We share a trio of articles by previous guest Stefanie Molin about Git pre-commit hooks. Across the series, she provides step-by-step instructions for building your own hooks, managing them, and learning how they operate. We discuss the process of estimating software development projects. We dig into the art of “guesstimation,” rough calculation, and napkin math. Christopher shares his experience in agile scenarios and measuring projects by story counts. We share several other articles and projects from the Python community, including a news roundup, 10 Python programming optimization techniques, and building a blog in Django using GraphQL & Vue. We also explore experimenting with Python’s preprocessor, a toolkit for writing UIs in PyScript, and a couple of projects for working with Django Admin. This episode is sponsored by InfluxData. Course Spotlight: [Python mmap: Doing File I/O With Memory Mapping] (https://realpython.com/courses/python-mmap-io/) In this video course, you’ll learn how to use Python’s mmap module to improve your code’s performance when you’re working with files. You’ll get a quick overview of the different types of memory before diving into how and why memory mapping with mmap can make your file I/O operations faster. Topics: ---00:00:00 – Introduction ---00:02:28 – Python Top Language of 2024 ---00:02:59 – Python Developers Survey 2023 Results ---00:03:46 – How Pre-Commit Works ---00:10:00 – Build a Blog Using Django, GraphQL, and Vue ---00:13:38 – Sponsor: InfluxData ---00:14:23 – 10 Python Programming Optimization Techniques ---00:22:45 – Python’s Preprocessor ---00:26:42 – Video Course Spotlight ---00:28:16 – You don’t have to guess to estimate ---00:44:18 – LTK is a little toolkit for writing UIs in PyScript ---00:49:06 – django-admin-action-forms: Forms for Django Admin ---00:52:09 – django-public-admin: A Public and Read-Only Django Admin ---00:53:24 – Thanks and goodbye News: --- [Python Top Language of 2024] (https://spectrum.ieee.org/top-programming-languages-2024) – “Python continues to cement its overall dominance, buoyed by things like popular libraries for hot fields such as A.I.” Read the article to see where other languages have placed. --- [Python Developers Survey 2023 Results] (https://lp.jetbrains.com/python-developers-survey-2023/) – Official Python Developers Survey 2023 Results by Python Software Foundation and JetBrains: more than 25k responses from almost 200 countries. Show Links: --- [How Pre-Commit Works] (https://stefaniemolin.com/articles/devx/pre-commit/behind-the-scenes/) – As a user of pre-commit hooks, do you know what happens when you run pre-commit install or why you have to run it in the first place? How does pre-commit actually work with Git? In this article, Stefanie takes you behind the scenes of how your pre-commit setup works. --- [How to Set Up Pre-Commit Hooks - Stefanie Molin] (https://stefaniemolin.com/articles/devx/pre-commit/setup-guide/) --- [How to Create a Pre-Commit Hook - Stefanie Molin] (https://stefaniemolin.com/articles/devx/pre-commit/hook-creation-guide/) --- [Build a Blog Using Django, GraphQL, and Vue] (https://realpython.com/python-django-blog/) – In this step-by-step project, you’ll build a blog from the ground up. You’ll turn your Django blog data models into a GraphQL API and consume it in a Vue application for users to read. You’ll end up with an admin site and a user-facing site you can continue to refine for your own use. --- [10 Python Programming Optimization Techniques] (https://dev.to/jamesbright/10-python-programming-optimisation-techniques-5ckf) – Optimization should be your last step, but once you’re there, just what can you do? This article covers ten different techniques that address memory size and code performance. --- [Python’s Preprocessor] (https://pydong.org/posts/PythonsPreprocessor/) – Every now and then you hear outrageous claims such as “Python has no preprocessor,” well it is there if you’re willing to dig deep enough. Learn how to hack Python’s compile step. Discussion --- [You Don’t Have to Guess to Estimate] (https://www.simplermachines.com/estimates-arent-guesses/) --- [Habits of Great Software Engineers] (https://vadimkravcenko.com/shorts/habits-of-great-software-engineers/) Projects: --- [pyscript/ltk: LTK Is a Little Toolkit for Writing UIs in PyScript] (https://github.com/pyscript/ltk) --- [django-admin-action-forms: Forms for Django Admin] (https://github.com/michalpokusa/django-admin-action-forms) --- [django-public-admin: A Public and Read-Only Django Admin] (https://github.com/cuducos/django-public-admin) Additional Links: --- [Python mmap: Doing File I/O With Memory Mapping – Real Python] (https://realpython.com/courses/python-mmap-io/) --- [Caching in Python With lru_cache – Real Python] (https://realpython.com/courses/caching-python-lru/) --- [Episode #128: Using a Memory Profiler in Python & What It Can Teach You] (https://realpython.com/podcasts/rpp/128/) --- [Episode #172: Measuring Multiple Facets of Python Performance With Scalene – The Real Python Podcast] (https://realpython.com/podcasts/rpp/172/) --- [software development - Why are estimates treated like deadlines? - Project Management Stack Exchange] (https://pm.stackexchange.com/questions/12403/why-are-estimates-treated-like-deadlines) --- [Software Estimation Without Guessing: Effective Planning in an Imperfect World by George Dinwiddie] (https://pragprog.com/titles/gdestimate/software-estimation-without-guessing/) --- [Guesstimation - Princeton University Press] (https://press.princeton.edu/books/paperback/9780691129495/guesstimation?srsltid=AfmBOorl7xDtGC5o1EHNCUa_coR45mjv0I4UpG90BD5JAzwNGwAjd8DG) --- [Anaconda Toolbox for Excel — Anaconda documentation] (https://docs.anaconda.com/excel/toolbox/) --- [Anaconda Code — Anaconda documentation] (https://docs.anaconda.com/excel/code/) --- [PySheets - Spreadsheet UI for Python] (https://pysheets.app/about) Level up your Python skills with our expert-led courses: --- [Python mmap: Doing File I/O With Memory Mapping] (https://realpython.com/courses/python-mmap-io/) --- [Caching in Python With lru_cache] (https://realpython.com/courses/caching-python-lru/) --- [How Python Manages Memory] (https://realpython.com/courses/how-python-manages-memory/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

13 Sep 2024

54 MINS

54:26

13 Sep 2024