Random Web App Ports, unittest, TypeIs vs TypeGuard, and More

#628 – MAY 7, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
TypeIs Does What I Thought TypeGuard Would Do in Python
In this post, Redowan discusses the fact that TypeGuard has always confused him, and that the newer TypeIs feature does what he thought TypeGuard should do. Read on to learn about them both.
REDOWAN DELOWAR

Python’s unittest: Writing Unit Tests for Your Code
In this tutorial, you’ll learn how to use the unittest framework to create unit tests for your Python code. Along the way, you’ll also learn how to create test cases, fixtures, test suites, and more.
REAL PYTHON

Webinar - Make Open Source Suck Less
Tired of dependency conflicts, corrupted environments and “works on my machine” issues? Learn the shortfalls of standard package and environment tools (i.e. pip and venv), and how you can achieve reproducibility, dependency management and security at scale - Watch the Webinar On-Demand →
ACTIVESTATEsponsor

Avoid Conflicts and Let Your OS Select a Python Web App Port
Hard-coded port numbers can be problematic during development because they prevent you from running multiple instances of the same server process in parallel. This article explains how to work around this issue by letting your operating system automatically select a random port number.
CHRISTOPH SCHIESSL • Shared by Christoph Schiessl

Quiz: The Python Calendar Module
In this quiz, you’ll test your understanding of the calendar module in Python. It’ll evaluate your proficiency in manipulating, customizing, and displaying calendars directly within your terminal. By working through this quiz, you’ll revisit the fundamental functions and methods provided by the calendar module.
REAL PYTHON

Quiz: What Is the __pycache__ Folder in Python?
In this quiz, you’ll have the opportunity to test your knowledge of the __pycache__ folder, including when, where, and why Python creates these folders.
REAL PYTHON

Pydantic v2.7.0 Released
GITHUB.COM/PYDANTIC


Discussions


Everything Google’s Python Team Were Responsible For
Google recently laid off the majority of their internal Python team. This post to HN, from one of the former team members, covers just what that team was responsible for. The ensuing discussion also includes comments from others on that team as well.
HACKER NEWS


Python Jobs


Senior Python Engineer: Generative AI, Social Media x Web3
CREATOR.BID 📍 ANYWHERE

More Python Jobs >>>


Articles & Tutorials


Working With Global Variables in Python Functions
In this video course, you’ll learn how to use global variables in Python functions using the global keyword or the built-in globals() function. You’ll also learn a few strategies to avoid relying on global variables because they can lead to code that’s difficult to understand, debug, and maintain.
REAL PYTHON course

Embarking on a Relaxed and Friendly Python Coding Journey
Do you get stressed while trying to learn Python? Do you prefer to build small programs or projects as you continue your coding journey? This week on the show, Real Python author Stephen Gruppetta is here to talk about his new book, “The Python Coding Book.”
REAL PYTHON podcast

How to Watermark a Graph With Matplotlib
“Matplotlib is one of the most popular data visualization packages for the Python programming language. It allows you to create many different charts and graphs.” With it you can even put a watermark on your charts, this tutorial shows you how.
MIKE DRISCOLL

Software Friction
Friction is everywhere in software development. Two setbacks are more than twice as bad as one setback. This article discusses the sources of software friction and what you can do about it.
HILLEL WAYNE

The Magician’s Sleight of Hand
Even functions in Python are objects and can be re-assigned and manipulated. This article shows a problem that at first looks impossible, but can be handled with a few key re-assigments.
STEPHEN GRUPPETTA • Shared by Stephen Gruppetta

4 Software Design Principles I Learned the Hard Way
Leonardo talks about four principles of software engineering he’s learned though his career. Some are against common practice: DRY may not be you friend.
LEONARDO CREED

Isolating Risk in the CPython Release Process
This is a quick summary of the changes to the CPython build process to help reduce the risks caused by extra dependencies.
SETH LARSON

Building Reusable Components in Django
This tutorial looks at how to build server-side, reusable UI components in Django using the django-viewcomponent library.
MICHAEL YIN • Shared by Michael Herman


Projects & Code


Brought to you by Real Python for Teamssponsor
Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed →

vet: A Poetry Plugin for Establishing Chain of Trust
GITHUB.COM/IRGOLIC

octarine: WGPU-based 3D Viewer
GITHUB.COM/SCHLEGELP

Python Turtle Bingo
DANIEL ANDERSON

pacemaker: For Controlling Time Per Iteration Loop in Python
GITHUB.COM/BROHRER

vulture: Find Dead Python Code
GITHUB.COM/JENDRIKSEIPP

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
May 8, 2024

Python Atlanta
May 9 to May 10, 2024

DFW Pythoneers 2nd Saturday Teaching Meeting
May 11, 2024

PiterPy Meetup
May 14, 2024

Leipzig Python User Group Meeting
May 14, 2024

IndyPy Monthly Meetup
May 14 to May 15, 2024

PyCon US 2024
May 15 to May 24, 2024

Flask Con 2024
May 17 to May 18, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.
You are receiving this email because you opted in on our website at pycoders.com
Our mailing address: DevCademy Media Inc. · #720-999 West Broadway, Vancouver BC V5Z 1K5, Canada

Unsubscribe | Update Email Address

Older messages

PEP 686, Lazy Evaluation, Serverless Python, and More

Tuesday, April 30, 2024

PEP 686: Make UTF-8 Mode Default #627 – APRIL 30, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo PEP 686: Make UTF-8 Mode Default This Python Enhancement Proposal outlines making UTF-8 the default

CTRL-C, Exceptions, Ruff Speed-up, and More

Tuesday, April 23, 2024

Asyncio Handle Control-C (SIGINT) #626 – APRIL 23, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Asyncio Handle Control-C (SIGINT) When the user presses CTRL-C on the keyboard, the OS raises an

Pydantic, Web Security, State of Python, and More

Tuesday, April 16, 2024

Pydantic: Simplifying Data Validation in Python #625 – APRIL 16, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Pydantic: Simplifying Data Validation in Python Discover the power of Pydantic,

Inline Dependencies, pipx, Multiplying Sequences, and More

Tuesday, April 9, 2024

Install and Execute Python Applications Using `pipx` #624 – APRIL 9, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Install and Execute Python Applications Using pipx In this tutorial, you'll

WAV Files, Reflex, Autopilot, and More

Tuesday, April 2, 2024

Reading and Writing WAV Files in Python #623 – APRIL 2, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Reading and Writing WAV Files in Python In this tutorial, you'll learn how to work with

You Might Also Like

This Week's Daily Tip Roundup

Sunday, May 19, 2024

Missed some of this week's tips? No problem. We've compiled all of them here in one convenient place for you to enjoy. Happy learning! iPhoneLife Logo View In Browser Your Tip of the Day is

Reading Beyond the Hype: Some Observations About OpenAI and Google’s Announcements

Sunday, May 19, 2024

Google vs. OpenAI is shaping up as one of the biggest rivarly of the generative AI era. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Final Reminder: Apple Issues "Update Now Warning"

Sunday, May 19, 2024

I wanted to send a final reminder — if you haven't already updated your iPhone to iOS 17.5, we strongly recommend you do so today. This is also your last chance to get access to our iOS 17.5 In-

Second Brain/Attention/Find Your Books

Sunday, May 19, 2024

Recomendo - issue #411 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Kotlin Weekly #407

Sunday, May 19, 2024

ISSUE #407 19th of May 2024 Hello Kotliners! The Google I/O just finished this week with a huge announcement for us, with Google supporting now Kotlin Multiplatform on Android, and the KotlinConf will

Learn How to Use AI to Reach Your Full Potential, newsletterest1!

Sunday, May 19, 2024

3 Ways AI Can Help Your Writing ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌

Software Testing Weekly - Issue 220

Saturday, May 18, 2024

Software Testing Conferences 📚 View on the Web Archives ISSUE 220 May 18th 2024 COMMENT Welcome to the 220th issue! Have you ever been to a testing conference? They're a great way to learn about

📶 Is a Cellular iPad Worth It? — How to Prevent YouTube From Taking Over Your Screensaver

Saturday, May 18, 2024

Also: This Robot Vacuum Can Clean Stairs, and More! How-To Geek Logo May 18, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your inbox by

Weekend Reading — Objection-oriented programming

Saturday, May 18, 2024

This week we find a power-up box, replace GitHub Actions with Maven XMLs, avoid the worst website in the world, revisit RTO policies, “listen” to OpenAI employees, watch our Slack private messages, do

Daily Coding Problem: Problem #1445 [Easy]

Saturday, May 18, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Jane Street. The United States uses the imperial system of weights and measures, which