Loading…

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.

 

#151

Lessons Learned From Four Years Programming With Python

What are the core lessons you’ve learned along your Python development journey? What are key takeaways you would share with new users of the language? This week on the show, Duarte Oliveira e Carmo is here to discuss his recent talk, “Four Years of Python.” Duarte works at the crossroads of machine learning, data science, and software engineering. He began using Python in his graduate studies and never looked back. In 2021, he wrote a blog post about some of the valuable lessons he’s learned. Then he decided the lessons and concepts in the post might make a good conference talk. We cover the steps in his process of crafting the presentation, practicing it at a smaller conference, and finally presenting it at PyCon Italia last year. We also dig into the four major themes of the talk. Along the way, we share a collection of resources to help you continue learning on your Python journey. Course Spotlight: [Building a URL Shortener With FastAPI and Python] (https://realpython.com/courses/url-shortener-fastapi/) In this video course, you’ll build an app to create and manage shortened URLs. Your Python URL shortener can receive a full target URL and return a shortened URL. You’ll also use the automatically created documentation of FastAPI to try out your API endpoints. Topics: ---00:00:00 – Introduction ---00:02:38 – Four years of Python ---00:04:18 – Why did you create a blog? ---00:06:19 – A singular vs wide focus for the blog ---00:09:19 – Pitching the talk to conferences ---00:13:02 – Resources for preparing your talk ---00:16:03 – What was your programming and Python background? ---00:19:00 – Sponsor: InfluxData ---00:19:47 – Reading is better than Googling ---00:26:23 – What are some of your favorite docs? ---00:28:48 – Thoughts on GPT and Copilot ---00:31:45 – Keep it stupid simple ---00:36:07 – What’s extensible code? ---00:38:29 – Video Course Spotlight ---00:39:54 – Learning testing techniques & testing data science code ---00:46:05 – Continuous learning ---00:51:46 – What do you use for RSS? ---00:53:06 – Resources for machine learning ---00:57:20 – What are you excited about in the world of Python? ---00:58:57 – What do you want to learn next? ---01:00:55 – How can people follow the work you do? ---01:01:20 – Thanks and goodbye Show Links: --- [Four years of Python - Duarte O.Carmo] (https://duarteocarmo.com/blog/four-years-python) --- [Four years of Python - Duarte Carmo - YouTube] (https://www.youtube.com/watch?v=zB_Hr-05Stc) --- [Practices of the Python Pro] (https://www.manning.com/books/practices-of-the-python-pro) --- [Pelican 4.8.0] (https://docs.getpelican.com/en/latest/index.html) --- [“One for Them, One for Me” - Blank Check Movies From Famous Directors] (https://collider.com/blank-check-movies/) --- [PyData] (https://pydata.org/) --- [NumFOCUS: A Nonprofit Supporting Open Code for Better Science] (https://numfocus.org/) --- [Proposing a Talk - PyCon US 2023] (https://us.pycon.org/2023/speaking/talks/) --- [pandas documentation - pandas 1.5.3 documentation] (https://pandas.pydata.org/docs/) --- [scikit-learn 1.2.2 - User guide - documentation] (https://scikit-learn.org/stable/user_guide.html) --- [FastAPI - Tutorial - User Guide] (https://fastapi.tiangolo.com/tutorial/) --- [Using FastAPI to Build Python Web APIs - Real Python] (https://realpython.com/fastapi-python-web-apis/) --- [Python 3.11.2 Documentation] (https://docs.python.org/3/) --- [Kindle Highlights Newsletter] (https://kindle-highlights.email/) --- [Reeder 5] (https://www.reederapp.com/) --- [Welcome to Feedly] (https://feedly.com/) --- [Normconf: The Normcore Tech Conference] (https://normconf.com/) --- [Tech Blog - ★❤✰ Vicki Boykis ★❤✰] (https://vickiboykis.com/) --- [Sebastian Raschka - Blog] (https://sebastianraschka.com/blog/) --- [Blog of a data person. - koaning.io] (https://koaning.io/) --- [Machine Learning Design Patterns - Book] (https://www.oreilly.com/library/view/machine-learning-design/9781098115777/) --- [The Practical AI Podcast - Changelog] (https://changelog.com/practicalai) --- [tidytuesday: Official repo for the #tidytuesday project] (https://github.com/rfordatascience/tidytuesday) --- [PyCon.DE & PyData Berlin, 2023 - PyConDE & PyData Berlin 2023] (https://2023.pycon.de/) --- [PyCon Italia - 2023] (https://pycon.it/en) --- [ruff - PyPI] (https://pypi.org/project/ruff/) --- [Effective Python › The Book: Second Edition] (https://effectivepython.com/) --- [Episode #3: Effective Python and Python at Google Scale - The Real Python Podcast] (https://realpython.com/podcasts/rpp/3/) --- [Duarte O.Carmo] (https://duarteocarmo.com/) --- [Talks - Duarte O.Carmo] (https://duarteocarmo.com/talks) --- [Duarte O.Carmo - LinkedIn] (https://www.linkedin.com/in/duarteocarmo/) Level up your Python skills with our expert-led courses: --- [Splitting Datasets With scikit-learn and train_test_split()] (https://realpython.com/courses/splitting-datasets-scikit-learn-train-test-split/) --- [Python REST APIs With FastAPI] (https://realpython.com/courses/python-rest-apis-with-fastapi/) --- [Building a URL Shortener With FastAPI and Python] (https://realpython.com/courses/url-shortener-fastapi/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

Yesterday

1 HR 02 MINS

1:02:21

Yesterday


#150

Coding With namedtuple & Python's Dynamic Superpowers

Have you explored Python’s collections module? Within it, you’ll find a powerful factory function called namedtuple(), which provides multiple enhancements over the standard tuple for writing clearer and cleaner code. This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects. Christopher discusses his Real Python video course about writing more Pythonic code using namedtuple(). With namedtuple(), you can create immutable sequence types that allow you to access their values using descriptive field names and dot notation instead of clunky integer indices. We also discuss metaprogramming and the unique advantages of Python’s dynamism. Christopher shares potential paths for this type of coding from web applications, testing, and AST techniques. We share several other articles and projects from the Python community, including a news update, the Arrow revolution happening in pandas 2.0, a new PEP for inlined comprehensions, tips and techniques for modern Flask apps, a Python helper tool for building and running a REPL with custom commands, and a project to turn a pandas DataFrame into a Tableau-style UI. Course Spotlight: [Writing Clean, Pythonic Code With namedtuple] (https://realpython.com/courses/python-namedtuple/) In this video course, you’ll learn what Python’s namedtuple is and how to use it in your code. You’ll also learn about the main differences between named tuples and other data structures, such as dictionaries, data classes, and typed named tuples. Topics: ---00:00:00 – Introduction ---00:02:17 – Python 3.12.0 alpha 6 released ---00:02:40 – Django Developers Survey 2022 Results ---00:03:12 – Writing Clean, Pythonic Code With namedtuple ---00:07:40 – pandas 2.0 and the Arrow Revolution (Part I) ---00:17:21 – Sponsor: RevSys ---00:18:10 – PEP 709: Inlined Comprehensions ---00:20:51 – 13 Tips and Techniques for Modern Flask Apps ---00:25:54 – Video Course Spotlight ---00:27:24 – Discussion: Python’s “Disappointing” Superpowers ---00:47:54 – replbuilder: Python helper tool for building and running a REPL with custom commands ---00:49:58 – pygwalker: Turn pandas Into a Tableau-Style UI ---00:52:15 – Thanks and goodbye News: --- [Python Insider: Python 3.12.0 alpha 6 released] (https://pythoninsider.blogspot.com/2023/03/python-3120-alpha-6-released.html) --- [Django Developers Survey 2022 Results - Django Weblog] (https://www.djangoproject.com/weblog/2023/mar/09/django-developers-survey-2022-results/?utm_campaign=Django%2BNewsletter&utm_medium=email&utm_source=Django_Newsletter_170) Show Links: --- [Writing Clean, Pythonic Code With namedtuple] (https://realpython.com/courses/python-namedtuple/) – In this video course, you’ll learn what Python’s namedtuple is and how to use it in your code. You’ll also learn about the main differences between named tuples and other data structures, such as dictionaries, data classes, and typed named tuples. --- [pandas 2.0 and the Arrow Revolution (Part I)] (https://datapythonista.me/blog/pandas-20-and-the-arrow-revolution-part-i) – This article details the changes in the pandas 2.0 release, with emphasis on the underlying adoption of Apache Arrow. --- [PEP 709: Inlined Comprehensions] (https://peps.python.org/pep-0709/) – Python Enhancement Proposal 709 covers a change to how comprehensions are handled. Currently, they’re compiled as nested functions. Benchmarking shows that treating list, dict, and set comprehensions as inline code can result in a 2x speedup on the comprehension. --- [13 Tips and Techniques for Modern Flask Apps] (https://pgjones.dev/blog/modern-flask-2023/) – Flask is approaching its 13th birthday, and to celebrate, Phillip has written 13 tips for writing modern Flask apps. It covers dealing with JSON, environment-based configuration, auto-generated docs, and more. Discussion: --- [Python’s “Disappointing” Superpowers - lukeplant.me.uk] (https://lukeplant.me.uk/blog/posts/pythons-disappointing-superpowers/) --- [I am disappointed by dynamic typing - Buttondown] (https://buttondown.email/hillelwayne/archive/i-am-disappointed-by-dynamic-typing/) --- [Python’s “Disappointing” superpowers - Hacker News] (https://news.ycombinator.com/item?id=34611969) --- [Python’s “Disappointing” Superpowers - Lobsters] (https://lobste.rs/s/9w7ylg/python_s_disappointing_superpowers) Projects: --- [replbuilder: Python helper tool for building and running a repl with custom commands] (https://github.com/Aperocky/replbuilder) --- [pygwalker: Turn pandas Into a Tableau-Style UI] (https://github.com/Kanaries/pygwalker) Additional Links: --- [Write Pythonic and Clean Code With namedtuple – Real Python] (https://realpython.com/python-namedtuple/) --- [Episode #146: Using NumPy and Linear Algebra for Faster Python Code – The Real Python Podcast] (https://realpython.com/podcasts/rpp/146/) --- [Apache Arrow and the “10 Things I Hate About pandas” - Wes McKinney] (https://wesmckinney.com/blog/apache-arrow-pandas-internals/) --- [Data science without borders - Wes McKinney (Two Sigma Investments) - YouTube] (https://www.youtube.com/watch?v=wdmf1msbtVs) --- [Joining Forces for an Arrow-Native Future - Wes McKinney] (https://wesmckinney.com/blog/from-ursa-to-voltrondata/) --- [pandas arrays, scalars, and data types — pandas 2.1.0.dev0+171.gc293caf2e9 documentation] (https://pandas.pydata.org/docs/dev/reference/arrays.html?highlight=arrowdtype#pyarrow) --- [Episode #18: Ten Years of Flask: Conversation With Creator Armin Ronacher – The Real Python Podcast] (https://realpython.com/podcasts/rpp/18/) --- [Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 1 – Real Python] (https://realpython.com/flask-connexion-rest-api/) --- [Python Metaclasses – Real Python] (https://realpython.com/python-metaclasses/) --- [Kanaries AI enhanced data exploration] (https://kanaries.net/) Level up your Python skills with our expert-led courses: --- [Lists and Tuples in Python] (https://realpython.com/courses/lists-tuples-python/) --- [Data Cleaning With pandas and NumPy] (https://realpython.com/courses/data-cleaning-with-pandas-and-numpy/) --- [Writing Clean, Pythonic Code With namedtuple] (https://realpython.com/courses/python-namedtuple/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

17 Mar 2023

53 MINS

53:17

17 Mar 2023


#149

Sharing Your Python App Across Platforms With BeeWare

Are you interested in deploying your Python project everywhere? This week on the show, Russell Keith-Magee, founder and maintainer of the BeeWare project, returns. Russell shares recent updates to Briefcase, a tool that converts a Python application into native installers on macOS, Windows, Linux, and mobile devices. We cover how Anaconda hired him last year to work full-time on the BeeWare project. He shares how this has helped him focus his efforts and move the project forward. We also discuss his recent talk at DjangoCon US 2022 on how to turn your website into an app (and why maybe you shouldn’t). Russell details the problems of converting from the Web to a mobile platform. We also contrast WebAssembly System Interface (WASI) with the tools that his team works on. Course Spotlight: [Managing Attributes With Python’s property()] (https://realpython.com/courses/property-python/) In this video course, you’ll learn how to create managed attributes, also known as properties, using Python’s property() in your custom classes. Topics: ---00:00:00 – Introduction ---00:02:06 – BeeWare project update and open-source funding ---00:06:47 – What are BeeWare and Briefcase? ---00:08:19 – Toga GUI and contributions ---00:10:47 – Pace of the project now ---00:12:47 – PEP 517 and binary packages with C or Rust ---00:17:29 – WASM and Briefcase for Web ---00:22:22 – Sponsor: InfluxData ---00:23:10 – How to turn your Website into an App - Talk ---00:28:14 – Bridging libraries that access platform hardware ---00:40:56 – Video Course Spotlight ---00:42:27 – WASI - WebAssembly System Interface ---00:48:18 – Do you need an app or a website? ---00:54:23 – Getting started with BeeWare ---01:00:06 – What to do first if interested in contributing? ---01:02:33 – Channels for the project ---01:04:55 – Upcoming conference talks ---01:05:26 – What are you excited about in the world of Python? ---01:06:42 – What do you want to learn next? ---01:09:28 – How can people follow your work online? ---01:10:10 – Thanks and goodbye Show Links: --- [Write once. Deploy everywhere. — BeeWare] (https://beeware.org/) --- [Russell Keith-Magee - Keynote - PyCon 2019 - YouTube] (https://www.youtube.com/watch?v=ftP5BQh1-YM) --- [Anaconda - Open Source] (https://www.anaconda.com/open-source) --- [PyScript - Run Python in your HTML] (https://pyscript.net/) --- [Episode #22: Create Cross-Platform Python GUI Apps With BeeWare – The Real Python Podcast] (https://realpython.com/podcasts/rpp/22/) --- [How to turn your Website into an App (and why maybe you shouldn’t!) with Russell Keith Magee - YouTube] (https://www.youtube.com/watch?v=ewwDcRRE4z0) --- [PEP 517 – A build-system independent format for source trees - peps.python.org] (https://peps.python.org/pep-0517/) --- [rubicon-objc - PyPI] (https://pypi.org/project/rubicon-objc/) --- [Chaquopy – Python SDK for Android] (https://chaquo.com/chaquopy/) --- [WASI.dev] (https://wasi.dev/) --- [CAP theorem - Wikipedia] (https://en.wikipedia.org/wiki/CAP_theorem) --- [BeeWare Tutorial] (https://docs.beeware.org/en/latest/) --- [The Buzz - BeeWare Blog] (https://beeware.org/news/buzz/) --- [You can take it with you: Packaging your Python code with Briefcase - PyCon US 2023] (https://us.pycon.org/2023/schedule/presentation/20/) --- [BeeWare (@PyBeeWare) - Twitter] (https://twitter.com/PyBeeWare/) --- [Russell Keith-Magee (@freakboy3742@cloudisland.nz) - Mastodon] (https://fosstodon.org/@freakboy3742@cloudisland.nz) Level up your Python skills with our expert-led courses: --- [Managing Attributes With Python's property()] (https://realpython.com/courses/property-python/) --- [Everyday Project Packaging With pyproject.toml] (https://realpython.com/courses/packaging-with-pyproject-toml/) --- [Getters and Setters in Python] (https://realpython.com/courses/getters-and-setters-python/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

10 Mar 2023

1 HR 11 MINS

1:11:16

10 Mar 2023


#148

Django Deployment Strategies & Preparing for PyCascades 2023

Have you decided how you’re going to deploy your Django project? Should you use a VPS or a PaaS? Christopher Trudeau is back this week, bringing another batch of PyCoder’s Weekly articles and projects. We also have organizers from PyCascades to share details about this year’s hybrid in-person and virtual conference. Christopher shares an article about selecting an appropriate Django project deployment strategy. The guide compares VPS (virtual private server) and PaaS (platform as a service) systems. He also covers hosting providers for each and highlights potential pitfalls. We share several other articles and projects from the Python community, including a news update, what’s new in SQLAlchemy 2.0, how to flush the output of the Python print function, the dangers behind image resizing for machine learning, a project that visualizes pathfinding algorithms, and a runtime executor project. We also have three special guests from PyCascades 2023 to dig into the details of the conference. Conference chair Eliza Sarobhasa is CTO at Women Who Drone and Leadership Fellow (Python Track) & Python Developer Advocate at Women Who Code. Sprints chair Chethana Gopinath is a Software Engineer at realtor.com and a Senior Lead at Women Who Code Python. Speaker Support Chair Jolene Wong is a Senior Software Engineer at Cisco based in Vancouver. We discuss hosting a hybrid conference, participating in open-source sprints, and finding a local Python community. Course Spotlight: [The Python print() Function: Go Beyond the Basics] (https://realpython.com/courses/python-print/) In this step-by-step course, you’ll learn about the print() function in Python and discover some of its lesser-known features. Avoid common mistakes, take your “hello world” to the next level, and know when to use a better alternative. Topics: ---00:00:00 – Introduction ---00:02:47 – Django 4.2 beta 1 released ---00:03:04 – What’s New in SQLAlchemy 2.0? ---00:06:42 – How to Flush the Output of the Python Print Function ---00:14:30 – The Essential Django Deployment Guide ---00:21:37 – Sponsor: Snyk ---00:22:30 – The Dangers Behind Image Resizing ---00:29:40 – Pathfinding-Visualizer: Visualize Pathfinding With Pygame ---00:32:40 – rtx: Runtime Executor (asdf Rust Clone) ---00:36:19 – Video Course Spotlight ---00:37:31 – PyCascades 2023 Details ---00:38:53 – Hybrid conference ---00:41:11 – How did Chethana get involved? ---00:42:30 – Open-source sprints ---00:45:19 – How did Jolene get involved? ---00:46:31 – How did Eliza get involved? ---00:50:21 – Venue details ---00:52:32 – Scheduled talks ---00:56:13 – Conference sponsors ---00:57:48 – Advice for attendees ---01:00:46 – Tickets and virtual platform ---01:03:01 – What are you excited about in the world of Python? ---01:06:13 – Thanks and goodbye News: --- [Django 4.2 beta 1 released | Weblog | Django] (https://www.djangoproject.com/weblog/2023/feb/20/django-42-beta-1-released/) --- [SQLAlchemy 2.0 Released] (https://www.sqlalchemy.org/blog/2023/01/26/sqlalchemy-2.0.0-released/) Show Links: --- [What’s New in SQLAlchemy 2.0?] (https://blog.miguelgrinberg.com/post/what-s-new-in-sqlalchemy-2-0) – SQLAlchemy 2.0 was launched in January. This article reviews the latest changes, whether it is worth the upgrade, and how to go about it. --- [How to Flush the Output of the Python Print Function] (https://realpython.com/python-flush-print-output/) – In this tutorial, you’ll learn how to flush the output of Python’s print function. You’ll explore output stream buffering in Python using code examples and learn that output streams are block-buffered by default, and that print() with its default arguments executes line-buffered when interactive. --- [The Essential Django Deployment Guide] (https://www.saaspegasus.com/guides/django-deployment/) – Going from “it works on my machine” to deploying to the public can be a daunting task. This guide details the choices between VPS and PaaS systems, how to choose, what the options are, and what you need to know to get your Django code live. --- [The Dangers Behind Image Resizing] (https://zuru.tech/blog/the-dangers-behind-image-resizing) – When training an ML model on image data you likely want smaller, consistently sized images. That means image processing in your pipeline, but the expectation that image resizing is the same across libraries can cause unforeseen problems. Projects: --- [Pathfinding-Visualizer: Visualize Pathfinding With Pygame] (https://github.com/Tauseef-Hilal/Pathfinding-Visualizer) --- [rtx: Runtime Executor (asdf Rust Clone)] (https://github.com/jdxcode/rtx) PyCascades Links: --- [Home - PyCascades 2023] (https://2023.pycascades.com/) --- [The Team - PyCascades 2023] (https://2023.pycascades.com/about/team/) --- [Schedule - PyCascades 2023] (https://2023.pycascades.com/program/schedule/) --- [Sprints - PyCascades 2023] (https://2023.pycascades.com/program/sprints/) --- [PyCascades 2023 - Sprints Sign Up Form] (https://docs.google.com/forms/d/e/1FAIpQLSf9wxA1Q4Nx6ZahmkOw_39G66ORRhAe7oJsDSi2D9ebXiTdrA/viewform) --- [COVID Policy - PyCascades 2023] (https://2023.pycascades.com/about/covid/) --- [Venueless - PyCascades 2023] (https://2023.pycascades.com/program/venueless/) --- [Become A Sponsor - PyCascades 2023] (https://2023.pycascades.com/sponsors/become-a-sponsor/) --- [PyCascades - YouTube] (https://www.youtube.com/c/PyCascades) --- [Episode #44: Creating an Interactive Online Python Conference for PyCascades 2021 – The Real Python Podcast] (https://realpython.com/podcasts/rpp/44/#t=207) Additional Links: --- [File Object - Glossary - Python Documentation] (https://docs.python.org/3/glossary.html#term-file-like-object) --- [The Python print() Function: Go Beyond the Basics – Real Python] (https://realpython.com/courses/python-print/) --- [functools — Higher-order functions and operations on callable objects — Python 3.11.2 documentation] (https://docs.python.org/3/library/functools.html?highlight=functools%20partial#functools.partial) --- [Python - Women Who Code] (https://www.womenwhocode.com/python) --- [WWCodePython - Tiktok Creator & Bio Links - Beacons] (https://beacons.ai/wwcodepython) --- [PyLadies – Women Who Love Coding in Python] (https://pyladies.com/) --- [PyLadies Vancouver (Vancouver, BC) | Meetup] (https://www.meetup.com/pyladies-vancouver/) Level up your Python skills with our expert-led courses: --- [The Python print() Function: Go Beyond the Basics] (https://realpython.com/courses/python-print/) --- [SQLite and SQLAlchemy in Python: Moving Your Data Beyond Flat Files] (https://realpython.com/courses/sqlite-sqlalchemy-python/) --- [Deploy a Django App With Gunicorn and Nginx] (https://realpython.com/courses/django-app-with-gunicorn-nginx/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

03 Mar 2023

1 HR 07 MINS

1:07:41

03 Mar 2023


#147

Using NumPy and Linear Algebra for Faster Python Code

Are you still using loops and lists to process your data in Python? Have you heard of a Python library with optimized data structures and built-in operations that can speed up your data science code? This week on the show, Jodie Burchell, developer advocate for data science at JetBrains, returns to share secrets for harnessing linear algebra and NumPy for your projects. Jodie details how most people begin their data science journey using loops to iterate over values and apply operations sequentially. We talk about how loops are friendly for beginners, being clear to read and easy to debug, but unfortunately don’t scale well, especially with large amounts of data. Jodie shares some of the basics of linear algebra and how to organize data into vectors. We talk about how the NumPy library leverages those concepts to improve data processing. We discuss how the library includes operations for vector and matrix addition and subtraction, and why these operations are more efficient than loops. We also cover how NumPy stores arrays in memory and when working with them is faster vs when it’s not. Course Spotlight: [Data Cleaning With pandas and NumPy] (https://realpython.com/courses/data-cleaning-with-pandas-and-numpy/) In this video course, you’ll learn how to clean up messy data using pandas and NumPy. You’ll become equipped to deal with a range of problems, such as missing values, inconsistent formatting, malformed records, and nonsensical outliers. Topics: ---00:00:00 – Introduction ---00:02:35 – Vectorize all the things! - PyCon UK 2022 Talk ---00:06:39 – Becoming familiar with linear algebra ---00:09:05 – Beginners start with loops ---00:11:25 – Starting with basic linear algebra ---00:12:25 – The basic unit of a vector ---00:18:06 – NumPy representing vectors in Python ---00:23:25 – Sponsor: InfluxDB ---00:24:13 – Block management ---00:25:54 – Replacing a loop with vector-based operations ---00:34:06 – NumPy broadcasting ---00:38:52 – Approximating nearest neighbors ---00:43:49 – Video Course Spotlight ---00:45:15 – Solving the problem ---00:46:44 – Getting rid of nested loops ---00:48:54 – A peek under the hood ---00:53:28 – How arrays vs lists are stored in memory ---01:00:24 – Considering a GPU ---01:03:37 – Real Python resources on the subject ---01:04:08 – Upcoming talks and conferences ---01:07:31 – Thanks and goodbye Show Links: --- [Vectorize all the things! How basic linear algebra can speed up your data science code - YouTube] (https://www.youtube.com/watch?v=9_mhjjlKjDo) --- [Introduction to Linear Algebra, 5th Edition] (https://math.mit.edu/~gs/linearalgebra/ila5/indexila5.html) --- [Linear Algebra - Mathematics - MIT OpenCourseWare] (https://ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/) --- [Linear Algebra and Learning from Data] (https://math.mit.edu/~gs/learningfromdata/) --- [Linear Algebra in Python: Matrix Inverses and Least Squares] (https://realpython.com/python-linear-algebra/) --- [NumPy: the absolute basics for beginners - NumPy Manual] (https://numpy.org/doc/stable/user/absolute_beginners.html) --- [Broadcasting — NumPy v1.24 Manual] (https://numpy.org/doc/stable/user/basics.broadcasting.html) --- [spotify/annoy: Approximate Nearest Neighbors in C++/Python optimized] (https://github.com/spotify/annoy) --- [Look Ma, No For-Loops: Array Programming With NumPy – Real Python] (https://realpython.com/numpy-array-programming/) --- [NumPy Tutorial: Your First Steps Into Data Science in Python – Real Python] (https://realpython.com/numpy-tutorial/) --- [How to Iterate Over Rows in pandas, and Why You Shouldn’t – Real Python] (https://realpython.com/pandas-iterate-over-rows/) --- [RADAR: Thrive in the era of data - DataCamp] (https://www.datacamp.com/radar-2023) --- [Vectorize all the things! Using linear algebra and NumPy to make your Python code lightning fast. - Python Web Conference 2023] (https://2023.pythonwebconf.com/presentations/vectorize-all-the-things-using-linear-algebra-and-numpy-to-make-your-python-code-lightning-fast) --- [Jodie Burchell - PyCon US 2023] (https://us.pycon.org/2023/schedule/presentation/140/) --- [Jodie Burchell’s Blog - Standard error] (https://t-redactyl.io/) --- [Jodie Burchell 🇦🇺🇩🇪 (@t_redactyl) - Twitter] (https://twitter.com/t_redactyl) --- [Jodie Burchell 🇦🇺🇩🇪 (@t_redactyl@fosstodon.org) - Fosstodon] (https://fosstodon.org/@t_redactyl#) --- [JetBrains: Essential tools for software developers and teams] (https://www.jetbrains.com/) Level up your Python skills with our expert-led courses: --- [Python Histogram Plotting: NumPy, Matplotlib, Pandas & Seaborn] (https://realpython.com/courses/python-histograms/) --- [Using NumPy's np.arange() Effectively] (https://realpython.com/courses/numpy-arange/) --- [Data Cleaning With pandas and NumPy] (https://realpython.com/courses/data-cleaning-with-pandas-and-numpy/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

24 Feb 2023

1 HR 08 MINS

1:08:37

24 Feb 2023


#146

Creating a Python Wordle Clone & Testing Environments With Nox

Would you like to practice your Python skills while building a challenging word game? Have you been wanting to learn more about creating command-line interfaces and making them colorful and interactive? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&rsquo;s Weekly articles and projects. We share a recent Real Python step-by-step project about creating a clone of Wordle. In the project, you&rsquo;ll practice building a terminal application, validating user input, and refactoring code into functions. Christopher shares an article that compares two popular testing tools, Nox and Tox. He discusses how each framework approaches test environment configuration and why the author leans toward using Nox&rsquo;s Python decorator&ndash;based format. We share several other articles and projects from the Python community, including a news update, a guide to trying out code and ideas quickly with the Python REPL, a PEP about requiring virtual environments by default, a discussion about lessons learned in twenty years as a software engineer, a project for a spreadsheet GUI inside of JupyterLab notebooks, and adding C-style for loops to Python. Course Spotlight: [Getters and Setters in Python] (https://realpython.com/courses/getters-and-setters-python/) In this video course, you&rsquo;ll learn what getter and setter methods are, how Python properties are preferred over getters and setters when dealing with attribute access and mutation, and when to use getter and setter methods instead of properties in Python. Topics: ---00:00:00 &ndash; Introduction ---00:02:21 &ndash; Django Security Releases Issued ---00:02:43 &ndash; PSF Is Hiring a Security Developer-in-Residence ---00:03:44 &ndash; Python 3.11.2, Python 3.10.10 and 3.12.0 alpha 5 are available ---00:04:02 &ndash; Build a Wordle Clone With Python and Rich ---00:10:05 &ndash; Why I Like Nox ---00:16:44 &ndash; Sponsor: Anaconda Cloud ---00:17:26 &ndash; PEP 704: Require Virtual Environments by Default ---00:27:17 &ndash; The Python Standard REPL: Try Out Code and Ideas Quickly ---00:33:08 &ndash; Video Course Spotlight ---00:34:35 &ndash; 20 Things I&rsquo;ve Learned in My 20 Years as a Software Engineer ---00:47:50 &ndash; Mito: A Spreadsheet Inside Your JupyterLab Notebooks ---00:51:37 &ndash; How I Added C-Style for-Loops to Python ---00:58:08 &ndash; Thanks and goodbye News: --- [Django Security Releases Issued: 4.1.6, 4.0.9, and 3.2.17] (https://www.djangoproject.com/weblog/2023/feb/01/security-releases/) --- [PSF Is Hiring a Security Developer-in-Residence] (https://pyfound.blogspot.com/2023/01/the-psf-is-hiring-security-developer-in.html) --- [Python Insider: Python 3.11.2, Python 3.10.10 and 3.12.0 alpha 5 are available] (https://pythoninsider.blogspot.com/2023/02/python-3112-python-31010-and-3120-alpha.html) Show Links: --- [Build a Wordle Clone With Python and Rich] (https://realpython.com/python-wordle-clone/) &ndash; In this step-by-step project, you&rsquo;ll build your own Wordle clone with Python. Your game will run in the terminal, and you&rsquo;ll use Rich to ensure your word-guessing app looks good. Learn how to build a command-line application from scratch and then challenge your friends to a wordly competition! --- [Why I Like Nox] (https://hynek.me/articles/why-i-like-nox/) &ndash; Both Nox and Tox are multi-environment testing tools. This opinion piece by Hynek compares and contrasts them and explains why he is increasingly using Nox. --- [PEP 704: Require Virtual Environments by Default] (https://peps.python.org/pep-0704/) --- [The Python Standard REPL: Try Out Code and Ideas Quickly] (https://realpython.com/python-repl/) &ndash; In this tutorial, you&rsquo;ll learn how to use the Python standard REPL (Read-Eval-Print Loop) to run your code interactively. This tool will allow you to test new ideas, explore and experiment with new tools and libraries, refactor and debug your code, try out examples, and more. Discussion --- [20 Things I&rsquo;ve Learned in My 20 Years as a Software Engineer] (https://www.simplethread.com/20-things-ive-learned-in-my-20-years-as-a-software-engineer/) &ndash; Justin writes a list of things he&rsquo;s learned over his past twenty years in development. He starts by stating how context is important and that his lessons are from small teams that emphasize productivity and are tool agnostic. --- [The 10x Programmer Myth - Simple Thread] (https://www.simplethread.com/the-10x-programmer-myth/) Projects: --- [Mito: A Spreadsheet Inside Your JupyterLab Notebooks] (https://github.com/mito-ds/monorepo) --- [How I Added C-Style for-Loops to Python] (https://sadh.life/post/cursed-for/) &ndash; Ever wanted a C-style for loop in Python? No? Well, you can have one anyway. See how Tushar implemented with for (i := var(0), i < 10, i + 2): Additional Links: --- [Alpha-Omega - Open Source Security Foundation] (https://openssf.org/community/alpha-omega/) --- [Welcome to Nox - Nox 2022.11.21 documentation] (https://nox.thea.codes/en/latest/) --- [Classifying Python Virtual Environment Workflows] (https://snarky.ca/classifying-python-virtual-environment-workflows/) --- [PEP 704 - Require virtual environments by default for package installers - Discourse on Python.org] (https://discuss.python.org/t/pep-704-require-virtual-environments-by-default-for-package-installers/22846/5) --- [Creating Virtual Environments - Python Packaging User Guide] (https://packaging.python.org/en/latest/tutorials/installing-packages/#creating-virtual-environments) --- [Python Virtual Environments: A Primer – Real Python] (https://realpython.com/python-virtual-environments-a-primer/) Level up your Python skills with our expert-led courses: --- [Intro to Object-Oriented Programming (OOP) in Python] (https://realpython.com/courses/intro-object-oriented-programming-oop-python/) --- [Python Basics: Object-Oriented Programming] (https://realpython.com/courses/python-basics-oop/) --- [Getters and Setters in Python] (https://realpython.com/courses/getters-and-setters-python/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

17 Feb 2023

59 MINS

59:10

17 Feb 2023


#145

Wrangling Business Process Models With Python and SpiffWorkflow

Can you describe your business processes with flowcharts? What if you could define the steps in a standard notation and implement the workflows in pure Python? This week on the show, Dan Funk from Sartography is here to discuss SpiffWorkflow. SpiffWorkflow is a Python tool for translating Business Process Model and Notation (BPMN) diagrams into a workflow engine. You can manipulate this visual chain of events to suit your team&rsquo;s business requirements. Individual events in the workflow can contain blocks or scripts of Python code to be executed. We discuss the concept of low-code software tools. Dan also talks about how SpiffWorkflow aims at getting non-developers within an organization involved in development. Course Spotlight: [Cool New Features in Python 3.11 – Real Python] (https://realpython.com/courses/new-features-python-311/) In this video course, you&rsquo;ll explore what Python 3.11 brings to the table. You&rsquo;ll learn how Python 3.11 is the fastest and most user-friendly version of CPython yet, and learn about improvements to the typing system and to the asynchronous features of Python. Topics: ---00:00:00 &ndash; Introduction ---00:02:14 &ndash; What is SpiffWorkflow? ---00:03:12 &ndash; What is BPMN? ---00:06:29 &ndash; What did you need to add to the project? ---00:07:12 &ndash; What are the components of a diagram? ---00:12:42 &ndash; Examples of workflow ---00:13:54 &ndash; Sponsor: TelemetryHub ---00:14:29 &ndash; What types of industries use BPMN? ---00:18:02 &ndash; Decision Model and Notation (DMN) ---00:19:34 &ndash; What is low-code? ---00:27:02 &ndash; How could someone get involved? ---00:28:02 &ndash; How do you host a workflow? ---00:29:43 &ndash; Video Course Spotlight ---00:31:05 &ndash; What has the project taught you as a developer? ---00:37:29 &ndash; Empowering more members of the organization ---00:42:07 &ndash; Project direction for the next year ---00:42:51 &ndash; Where to start with SpiffWorkflow? ---00:43:15 &ndash; What are you excited about in the world of Python? ---00:45:59 &ndash; What do you want to learn next? ---00:51:06 &ndash; Thanks and goodbye Show Links: --- [SpiffWorkflow] (https://www.spiffworkflow.org/) --- [Overview SpiffWorkflow 1.2.1 documentation] (https://spiffworkflow.readthedocs.io/en/latest/intro.html) --- [SpiffWorkflow: A powerful workflow engine implemented in pure Python - GitHub] (https://github.com/sartography/SpiffWorkflow) --- [Sartography] (https://sartography.com/) --- [Business Process Model and Notation - Wikipedia] (https://en.wikipedia.org/wiki/Business_Process_Model_and_Notation) --- [Decision Model and Notation™ (DMN™) | Object Management Group] (https://www.omg.org/dmn/) --- [Web-based tooling for BPMN, DMN, CMMN, and Forms | bpmn.io] (https://bpmn.io/) --- [Creating a Low-Code Business Process Execution Platform With Python, BPMN, and DMN - IEEE Software] (https://www.computer.org/csdl/magazine/so/2023/01/09994228/1JgvNO5CqwU) --- [The Low Code Wall, SpiffWorkflow] (https://www.spiffworkflow.org/posts/articles/low_code/) --- [SpiffArena, SpiffWorkflow] (https://www.spiffworkflow.org/pages/spiffarena/) --- [Install SpiffArena then build and run your first diagram - YouTube] (https://www.youtube.com/watch?v=Fjdqb2tdxHg) --- [MindTrails - University of Virginia] (https://mindtrails.virginia.edu/) --- [Practices of the Python Pro] (https://www.manning.com/books/practices-of-the-python-pro) --- [Episode #49: The Challenges of Developing Into a Python Professional – The Real Python Podcast] (https://realpython.com/podcasts/rpp/49/) --- [PEP 678: Exceptions can be enriched with notes - Python 3.11.1 documentation] (https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep678) --- [Building a Ship in a Bottle. : 14 Steps (with Pictures) - Instructables] (https://www.instructables.com/Building-A-Ship-In-A-Bottle/) --- [Status - Private, Secure Communication] (https://status.im/) --- [Dan Funk - LinkedIn] (https://www.linkedin.com/in/funkdan/) --- [SpiffWorkflow (@SpiffWorkflow) - Twitter] (https://twitter.com/SpiffWorkflow) Level up your Python skills with our expert-led courses: --- [Editing Excel Spreadsheets in Python With openpyxl] (https://realpython.com/courses/editing-excel-python-openpyxl/) --- [Building Python Project Documentation With MkDocs] (https://realpython.com/courses/building-project-documentation-mkdocs/) --- [Cool New Features in Python 3.11] (https://realpython.com/courses/new-features-python-311/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

10 Feb 2023

52 MINS

52:17

10 Feb 2023


#144

Create Interactive Maps & Geospatial Data Visualizations With Python

Would you like to quickly add data to a map with Python? Have you wanted to create beautiful interactive maps and export them as a stand-alone static web page? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&rsquo;s Weekly articles and projects. We share a recent Real Python tutorial about using Python Folium to create geospatial data visualizations. Folium harnesses the power of the JavaScript library Leaflet. The project shares how to combine this graphical power with Python&rsquo;s data-wrangling strength. Christopher shares a recent Python Enhancement Proposal (PEP) about the Global Interpreter Lock (GIL) in CPython. The PEP proposes a change to the build process that implements a flag for optionally building a GIL-less interpreter. We share several other articles and projects from the Python community, including a news update, a YAML document from hell, a set of logging practices to follow, a discussion about the discourse surrounding the recent Python packaging user survey, a modern Python UI library based on Tkinter, and a lightweight tool kit for bounding boxes. Course Spotlight: [Everyday Project Packaging With pyproject.toml] (https://realpython.com/courses/packaging-with-pyproject-toml/) In this Code Conversation video course, you&rsquo;ll learn how to package your everyday projects with pyproject.toml. Playing on the same team as the import system means you can call your project from anywhere, ensure consistent imports, and have one file that&rsquo;ll work for many build systems. Topics: ---00:00:00 &ndash; Introduction ---00:02:33 &ndash; Bleach 6.0.0 release and deprecation ---00:05:03 &ndash; Python Folium: Create Web Maps From Your Data ---00:10:37 &ndash; PEP 703: Making the GIL Optional in CPython ---00:15:36 &ndash; Sponsor: Influxdata ---00:16:24 &ndash; The YAML Document From Hell ---00:27:53 &ndash; Logging Practices I Follow ---00:32:08 &ndash; How to improve Python packaging ---00:36:55 &ndash; Video Course Spotlight ---00:38:25 &ndash; Thoughts on the Python packaging ecosystem ---00:58:16 &ndash; CustomTkinter: Python UI library Based on Tkinter ---01:00:16 &ndash; pybboxes: Lightweight Tool Kit for Bounding Boxes ---01:01:36 &ndash; Thanks and goodbye News: --- [Bleach 6.0.0 release and deprecation - Will&rsquo;s Blog] (https://bluesock.org/~willkg/blog/dev/bleach_6_0_0_deprecation.html) Show Links: --- [Python Folium: Create Web Maps From Your Data] (https://realpython.com/python-folium-web-maps-from-data/) &ndash; You&rsquo;ll learn how to create web maps from data using Folium. The package combines Python&rsquo;s data-wrangling strengths with the data-visualization power of the JavaScript library Leaflet. In this tutorial, you&rsquo;ll create and style a choropleth world map that shows the ecological footprint per country. --- [PEP 703: Making the GIL Optional in CPython] (https://peps.python.org/pep-0703/) &ndash; This PEP proposes changes to the CPython build process that would allow you to build a GIL-less interpreter. This kind of interpreter would not be ABI compatible with the GIL-based one, and the programmer would become responsible for some locking situations in C-extensions. If implemented, this would lead the way to being able to operate without the GIL in cases where backward-compatibility issues aren&rsquo;t important. --- [The yaml Document From Hell] (https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell) &ndash; As a data format, YAML is extremely complicated and it has many footguns. In this post, Ruud explains some of those pitfalls by means of an example and suggests a few simpler and safer YAML alternatives. --- [Logging Practices I Follow] (https://www.16elt.com/2023/01/06/logging-practices-I-follow/) &ndash; &ldquo;No matter what kind of software you&rsquo;re developing, you most definitely leverage logging to some extent, probably every single day.&rdquo; This article outlines good cross-language logging practices, making it easier to find bugs and understand what has happened in your software. Discussion: --- [How to improve Python packaging, or why fourteen tools are at least twelve too many - Chris Warrick] (https://chriswarrick.com/blog/2023/01/15/how-to-improve-python-packaging/) --- [Thoughts on the Python packaging ecosystem - Pradyun Gedam] (https://pradyunsg.me/blog/2023/01/21/thoughts-on-python-packaging/) --- [Python Packaging User Survey - Results PDF] (https://drive.google.com/file/d/1U5d5SiXLVkzDpS0i1dJIA4Hu5Qg704T9/view) --- [Python Packaging Strategy Discussion - Part 1 - Packaging - Discussions on Python.org] (https://discuss.python.org/t/python-packaging-strategy-discussion-part-1/22420?u=pradyunsg) --- [Thoughts on the Python packaging ecosystem | Hacker News] (https://news.ycombinator.com/item?id=34467952) --- [Stargirl: &ldquo;So You Want to Solve Python Packaging&rdquo; - Fosstodon] (https://fosstodon.org/@stargirl@hachyderm.io/109697057987690007) --- [xkcd: Standards] (https://xkcd.com/927/) Projects: --- [CustomTkinter: Python UI Library Based on Tkinter] (https://github.com/TomSchimansky/CustomTkinter) --- [pybboxes: Lightweight Tool Kit for Bounding Boxes] (https://github.com/devrimcavusoglu/pybboxes) Additional Links: --- [PEP 554 – Multiple Interpreters in the Stdlib - peps.python.org] (https://peps.python.org/pep-0554/) --- [YAML: The Missing Battery in Python – Real Python] (https://realpython.com/python-yaml/) --- [Python and TOML: New Best Friends – Real Python] (https://realpython.com/python-toml/) --- [PEP 665 – A file format to list Python dependencies for reproducibility of an application - peps.python.org] (https://peps.python.org/pep-0665/) --- [tkinter — Python interface to Tcl/Tk — Python 3.11.1 docs] (https://docs.python.org/3/library/tkinter.html?highlight=tkinter#module-tkinter) --- [Python GUI Programming With Tkinter – Real Python] (https://realpython.com/python-gui-tkinter/) Level up your Python skills with our expert-led courses: --- [Logging in Python] (https://realpython.com/courses/logging-python/) --- [Graph Your Data With Python and ggplot] (https://realpython.com/courses/graph-data-with-python-and-ggplot/) --- [Everyday Project Packaging With pyproject.toml] (https://realpython.com/courses/packaging-with-pyproject-toml/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

03 Feb 2023

1 HR 02 MINS

1:02:46

03 Feb 2023


#143

Orchestrating Large and Small Projects With Apache Airflow

Have you worked on a project that needed an orchestration tool? How do you define the workflow of an entire data pipeline or a messaging system with Python? This week on the show, Calvin Hendryx-Parker is back to talk about using Apache Airflow and orchestrating Python projects. Calvin is the co-founder and CTO of Six Feet Up and a Python Web Conference co-organizer. He&rsquo;s recently been working on a massive project that requires thousands of jobs involving transferring and transforming data. Through his research into orchestration systems, he found Apache Airflow. Airflow is an open-source tool to define, schedule, and monitor workflows. The platform is pure Python and integrates with a wide variety of services. We discuss how workflows are defined by creating directed acyclic graphs (DAG). Calvin talks about how a recent project outgrew the system and how his team built a clever solution using Python. We also discuss the upcoming Python Web Conference and what virtual attendees can expect. Course Spotlight: [Python Basics: Object-Oriented Programming] (https://realpython.com/courses/python-basics-oop/) In this video course, you&rsquo;ll get to know OOP, or object-oriented programming. You&rsquo;ll learn how to create a class, use classes to create new objects, and instantiate classes with attributes. Topics: ---00:00:00 &ndash; Introduction ---00:02:24 &ndash; Describing the large data pipeline ---00:04:38 &ndash; What format was the data in? ---00:06:04 &ndash; Was the format of the data changed for storage? ---00:09:34 &ndash; Data engineering and describing sources and targets ---00:11:29 &ndash; Apache Airflow orchestration and hitting limitations ---00:18:12 &ndash; Sponsor: CData Software ---00:18:54 &ndash; DAG: Directed acyclic graphs ---00:22:29 &ndash; Streaming data and other tool choices ---00:25:38 &ndash; Overcoming DAG Factory limitations ---00:31:49 &ndash; Another industry example for Airflow ---00:34:24 &ndash; Finding solutions as a consultancy ---00:35:12 &ndash; Is there a minimum-size project for Airflow? ---00:37:37 &ndash; Django under the hood ---00:38:31 &ndash; Video Course Spotlight ---00:39:58 &ndash; The Python Web Conference 2023 ---00:44:24 &ndash; Do you have any upcoming conference talks? ---00:45:53 &ndash; How can people follow your work online? ---00:46:52 &ndash; IndyPy talk by Mariatta Wijaya ---00:48:01 &ndash; What are you excited about in the world of Python? ---00:51:45 &ndash; What do you want to learn next? ---00:53:22 &ndash; Thanks and goodbye Show Links: --- [Apache Airflow - Documentation] (https://airflow.apache.org/docs/) --- [Too Big for DAG Factories? — Six Feet Up] (https://sixfeetup.com/blog/too-big-for-dag-factories) --- [Directed acyclic graph - Wikipedia] (https://en.wikipedia.org/wiki/Directed_acyclic_graph) --- [DAGs — Airflow Documentation] (https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dags.html) --- [Dynamically generating DAGs in Airflow - Astronomer Documentation] (https://docs.astronomer.io/learn/dynamically-generating-dags) --- [Data Lakehouse Architecture and AI Company - Databricks] (https://www.databricks.com/) --- [Episode #10: Python Job Hunting in a Pandemic – The Real Python Podcast] (https://realpython.com/podcasts/rpp/10/) --- [Episode #124: Exploring Recursion in Python With Al Sweigart – The Real Python Podcast] (https://realpython.com/podcasts/rpp/124/) --- [The Recursive Book of Recursion] (https://inventwithpython.com/recursion/) --- [Episode #61: Scaling Data Science and Machine Learning Infrastructure Like Netflix – The Real Python Podcast] (https://realpython.com/podcasts/rpp/61/) --- [IndyPy — Indiana Python User Group] (https://indypy.org/#) --- [Contributing to Python - Mariatta Wijaya - Python Core Developer - YouTube] (https://www.youtube.com/watch?v=zEIPTg22OYE&list=PLt4L3V8wVnF6JgEz7BLuRIZSS6Qsx_AFn) --- [Home Assistant] (https://www.home-assistant.io/) --- [Arturia - MicroFreak] (https://www.arturia.com/products/hardware-synths/microfreak/details) --- [Arturia - Pigments] (https://www.arturia.com/products/software-instruments/pigments/overview) --- [CalvinHP (@calvinhp@fosstodon.org) - Fosstodon] (https://fosstodon.org/@calvinhp) --- [calvinhp - Twitter] (https://twitter.com/calvinhp) --- [Six Feet Up - Blog] (https://sixfeetup.com/blog) --- [Python Web Conference 2023] (https://2023.pythonwebconf.com/) Level up your Python skills with our expert-led courses: --- [Intro to Object-Oriented Programming (OOP) in Python] (https://realpython.com/courses/intro-object-oriented-programming-oop-python/) --- [Data Cleaning With pandas and NumPy] (https://realpython.com/courses/data-cleaning-with-pandas-and-numpy/) --- [Python Basics: Object-Oriented Programming] (https://realpython.com/courses/python-basics-oop/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

27 Jan 2023

54 MINS

54:24

27 Jan 2023


#142

Exploring Python With bpython & Formalizing f-String Grammar

Have you used the Python Read-Eval-Print Loop (REPL) to explore the language and learn about how it operates? Would it help if it provided syntax highlighting, definitions, and code completion and behaved more like an IDE? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder&rsquo;s Weekly articles and projects. We discuss the drop-in REPL replacement bpython. bpython enhances the interactivity of a Python REPL session. It&rsquo;s also a powerful teaching tool for instructors and students to experiment with and explore Python code. Christopher shares a recent Python Enhancement Proposal (PEP) about formalizing the grammar for f-strings. The PEP describes a reduction in the underlying parser code complexity and provides for future features like comments in multiline f-strings. We share several other articles and projects from the Python community, including a news roundup, a collection of surveys to classify Python virtual environment workflows, a course about context managers and Python&rsquo;s with statement, a discussion about microfeatures that we would like to see adopted in Python, a Python terminal music player, and an infinite array powered by AI. Course Spotlight: [Context Managers and Python&rsquo;s with Statement] (https://realpython.com/courses/with-statement-python/) In this video course, you&rsquo;ll learn what the Python with statement is and how to use it with existing context managers. You&rsquo;ll also learn how to create your own context managers. Topics: ---00:00:00 &ndash; Introduction ---00:02:21 &ndash; Pillow 9.4.0 Released ---00:02:47 &ndash; Django Bugfix Release: 4.1.5 ---00:02:56 &ndash; Plone 6.0 Released ---00:03:16 &ndash; PyCon Italia 2023 ---00:03:54 &ndash; Discover bpython: A Python REPL With IDE-Like Features ---00:13:55 &ndash; PEP 701: Syntactic Formalization of f-Strings ---00:17:07 &ndash; Sponsor: Influx Data ---00:17:57 &ndash; Classifying Python Virtual Environment Workflows ---00:30:26 &ndash; Context Managers and Python&rsquo;s with Statement ---00:36:32 &ndash; Video Course Spotlight ---00:37:47 &ndash; Microfeatures I&rsquo;d Like to See in More Languages ---00:49:34 &ndash; Python Terminal Music Player ---00:51:19 &ndash; Infinite AI Array ---00:55:05 &ndash; Thanks and goodbye News: --- [Pillow 9.4.0 Released] (https://pillow.readthedocs.io/en/stable/releasenotes/9.4.0.html) --- [Django Bugfix Release: 4.1.5] (https://www.djangoproject.com/weblog/2023/jan/02/bugfix-release/) --- [Plone 6.0 Released] (https://plone.org/news-and-events/news/2022/plone-6-0-released) --- [PyCon Italia 2023] (https://pycon.it/en) Show Links: --- [Discover bpython: A Python REPL With IDE-Like Features] (https://realpython.com/bpython-alternative-python-repl/) &ndash; In this tutorial, you&rsquo;ll learn about bpython, an alternative Python REPL that brings code suggestions and many other IDE-like features to the terminal. Once you discover how much bpython can improve your productivity, you&rsquo;ll never want to return to using the vanilla Python REPL again. --- [PEP 701: Syntactic Formalization of f-Strings] (https://peps.python.org/pep-0701/) &ndash; This Python Enhancement Proposal describes the formalization of a grammar for f-strings, allowing a reduction in the underlying parser code complexity and providing future features like comments in multiline f-strings. --- [Classifying Python Virtual Environment Workflows] (https://snarky.ca/classifying-python-virtual-environment-workflows/) &ndash; This article discusses the various ways of creating and managing Python virtual environments, including what kinds of tools you could use. It categorizes the different styles and describes how the choices that you make affect your workflow. --- [Context Managers and Python&rsquo;s with Statement] (https://realpython.com/courses/with-statement-python/) &ndash; In this video course, you&rsquo;ll learn what the Python with statement is and how to use it with existing context managers. You&rsquo;ll also learn how to create your own context managers. --- [Microfeatures I&rsquo;d Like to See in More Languages] (https://buttondown.email/hillelwayne/archive/microfeatures-id-like-to-see-in-more-languages/) &ndash; Some language features are intrinsic to the language. Others are syntactic sugar that other programming languages could easily borrow. This opinion piece from Hillel highlights some features that the mainstream should steal from more obscure languages. Two Python features that he&rsquo;d like to see in more languages are chained evaluations (2 <= x < 10) and numbers with separators (1000000 == 1_000_000). Projects: --- [Python Terminal Music Player] (https://github.com/bmwant/pypod) --- [Infinite AI Array] (https://ianbicking.org/blog/2023/01/infinite-ai-array.html) &ndash; Learn about an insane library containing special lists and dicts so that any missed calls automatically go to GPT3 and add a predictive value in its place. Additional Links: --- [Christopher Trudeau&rsquo;s - Act function for virtual environments] (https://twitter.com/cltrudeau/status/1616445805036195844) Level up your Python skills with our expert-led courses: --- [Working With Python Virtual Environments] (https://realpython.com/courses/working-python-virtual-environments/) --- [Python 3's f-Strings: An Improved String Formatting Syntax] (https://realpython.com/courses/python-3-f-strings-improved-string-formatting-syntax/) --- [Context Managers and Python's with Statement] (https://realpython.com/courses/with-statement-python/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

20 Jan 2023

56 MINS

56:06

20 Jan 2023


#141

Speeding Up Your DataFrames With Polars

How can you get more performance from your existing data science infrastructure? What if a DataFrame library could take advantage of your machine&rsquo;s available cores and provide built-in methods for handling larger-than-RAM datasets? This week on the show, Liam Brannigan is here to discuss Polars. Liam is an experienced data scientist working in finance, technology, and environmental analysis. He&rsquo;s recently started contributing to the documentation for Polars and developing a training course for the library. We talk about the library&rsquo;s overall speed and lack of additional dependencies. Liam explains the advantages of lazy vs eager mode and which to choose when performing data exploration or attempting to load a dataset larger than your RAM. We also discuss potential barriers to switching to Polars from a pandas workflow. Across our conversation, we explore several other libraries and technologies, including Apache Arrow, DuckDB, query optimization, and the &ldquo;rustification&rdquo; of Python tools. Course Spotlight: [Graph Your Data With Python and ggplot] (https://realpython.com/courses/graph-data-with-python-and-ggplot/) In this course, you&rsquo;ll learn how to use ggplot in Python to build data visualizations with plotnine. You&rsquo;ll discover what a grammar of graphics is and how it can help you create plots in a very concise and consistent way. Show Topics: ---00:00:00 &ndash; Introduction ---00:02:06 &ndash; Liam&rsquo;s background and intro to Polars ---00:03:37 &ndash; Hurdles to switching to Polars ---00:05:23 &ndash; Creating training resources ---00:08:15 &ndash; No index ---00:09:46 &ndash; Data science 2025 predictions ---00:12:02 &ndash; Contributions to Polars ---00:15:07 &ndash; Eager vs lazy mode & query optimization ---00:19:25 &ndash; Sponsor: Anaconda Nucleus ---00:20:00 &ndash; Apache Arrow and parquet ---00:24:43 &ndash; DuckDB and column orientation ---00:29:27 &ndash; The &ldquo;rustification&rdquo; of libraries ---00:34:49 &ndash; Video Course Spotlight ---00:36:16 &ndash; GPUs and memory requirements ---00:45:49 &ndash; No additional library requirements ---00:47:37 &ndash; Development of the ecosystem ---00:51:33 &ndash; Chaining operations ---00:53:39 &ndash; How can people follow your work? ---00:54:51 &ndash; What are you excited about in the world of Python? ---00:56:09 &ndash; What do you want to learn next? ---00:56:58 &ndash; Thanks and goodbye Show Links: --- [Liam Brannigan - Data Scientist] (http://braaannigan.github.io//) --- [Polars] (https://www.pola.rs/) --- [polars - PyPI] (https://pypi.org/project/polars/) --- [Coming from Pandas - Polars - User Guide] (https://pola-rs.github.io/polars-book/user-guide/coming_from_pandas.html) --- [Rho-Signal Data Analytics - YouTube] (https://www.youtube.com/channel/UC-J3uR0g7CxCSnx0YFE6R_g) --- [Cheatsheet for Pandas to Polars - Rho Signal] (https://www.rhosignal.com/posts/polars-pandas-cheatsheet/) --- [Data Analysis with Polars - Udemy] (https://www.udemy.com/course/data-analysis-with-polars/?couponCode=POLARS-DISCOUNT) --- [I wrote one of the fastest DataFrame libraries - Polars] (https://www.pola.rs/posts/i-wrote-one-of-the-fastest-dataframe-libraries/) --- [Database-like ops benchmark comparison] (https://h2oai.github.io/db-benchmark/) --- [Data science 2025 - Liam Brannigan] (https://braaannigan.github.io/software/2022/11/07/data-science-2025.html) --- [DuckDB - An in-process SQL OLAP database management system] (https://duckdb.org/) --- [The great Python DataFrame showdown, part 1: Demystifying Apache Arrow] (https://www.orchest.io/blog/the-great-python-dataframe-showdown-part-1-demystifying-apache-arrow) --- [Apache Arrow] (https://arrow.apache.org/) --- [Learn Rust - Rust Programming Language] (https://www.rust-lang.org/learn) --- [Modern Polars] (https://kevinheavey.github.io/modern-polars/) --- [Anaconda - PyScript Updates: Bytecode Alliance, Pyodide, and MicroPython] (https://www.anaconda.com/blog/pyscript-updates-bytecode-alliance-pyodide-and-micropython) --- [Jupytext - Jupyter Notebooks as Markdown Documents, Julia, Python or R Scripts] (https://jupytext.readthedocs.io/en/latest/) --- [Polars up and running - Liam Brannigan] (https://braaannigan.github.io/software/2022/10/25/polars-up-and-running.html) --- [Liam Brannigan - Data Scientist - Blog] (https://braaannigan.github.io/blog/blog_index.html) --- [Liam Brannigan (@braaannigan) - Twitter] (https://twitter.com/braaannigan) --- [Liam Brannigan - LinkedIn] (https://www.linkedin.com/in/liam-brannigan-9080b214a/) Level up your Python skills with our expert-led courses: --- [Threading in Python] (https://realpython.com/courses/threading-python/) --- [Reading and Writing Files With Pandas] (https://realpython.com/courses/reading-writing-files-pandas/) --- [Graph Your Data With Python and ggplot] (https://realpython.com/courses/graph-data-with-python-and-ggplot/) [Support the podcast & join our community of Pythonistas] (https://realpython.com/join) ... Read more

13 Jan 2023

57 MINS

57:57

13 Jan 2023