pwshub.com

The Real Python Podcast – Episode #222: Using Virtual Environments in Docker & Comparing Python Dev Tools

Real Python Podcast Episode #222 Title Artwork

The Real Python Podcast

Sep 27, 2024 55m

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.

Episode Sponsor:

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.

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:

Show Links:

  • Polars Has a New Lightweight Plotting Backend – 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 – 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() – 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 – 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 – 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:

Projects:

Additional Links:

Level Up Your Python Skills With These Courses:

Source: realpython.com

Related stories
1 month ago - Are you interested in practicing your Python skills while learning how to solve astrophysics and astronomy problems? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder's Weekly articles and projects.
1 month ago - 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...
3 weeks ago - 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...
4 days ago - 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...
1 month ago - Are you interested in learning robotics with Python? Can physical electronics-based projects grow a child's interest in coding? This week on the show, we speak with author Marwan Alsabbagh about his book "Build Your Own Robot - Using...
Other stories
1 hour ago - Calculate the ROI of your Applicant Tracking System (ATS) with this guide and make data-driven decisions about your HR technology strategy. The post How to Calculate the ROI of an ATS appeared first on Geekflare.
4 hours ago - VPS (Virtual Private Server) hosting helps businesses host websites, eCommerce, and digital services, as it provides a scalable yet affordable hosting option. It utilizes virtualization technology to break physical servers into multiple...
5 hours ago - SEO monitoring tools are essential for tracking website performance, identifying issues, and optimizing search rankings by providing real-time data and insights. They provide valuable insights into keyword effectiveness, competitor...
7 hours ago - Sarah Jacob shares how great products need to be supplemented with excellent storytelling, messaging, value propositions, and go-to-market. The post Leader Spotlight: Why building great products isn’t enough, with Sarah Jacob appeared...
12 hours ago - Ubuntu 24.10 may have only just been released, but development on the next version is getting underway and the codename for Ubuntu 25.04 revealed. Since codenames are alphabetical (as of Ubuntu 6.06 LTS; restarted at ‘A’ with 17.10) it...