Issue #602

Porting from setup.py, Hangman, Timestamp Performance, and More

Nov. 7, 2023

Porting from setup.py, Hangman, Timestamp Performance, and More
#602 – NOVEMBER 7, 2023 VIEW IN BROWSER
The PyCoder’s Weekly Logo
My User Experience Porting Off setup.py
It is no secret that packaging in Python is complicated. This post by Gregory runs through the challenges he had moving an existing package away from the setup.py based mechanism. Associated HN discussion.
GREGORY SZORC

Build a Hangman Game for the Command Line in Python
In this step-by-step project, you’ll learn how to write the game of Hangman in Python for both the console and GUI. You will see how to structure the game, port it to use a GUI, and add enhancements once the game is complete.
REAL PYTHON

See How Sourcery Can Be Your Pair Programmer - Anytime, Anywhere
Sourcery is your AI-powered pair programmer - helping you with everything from understanding a new project you’ve just started working on, to creating automated code reviews, to writing tests and docstrings and more. Start your free trial today →
SOURCERYsponsor

The Most Performant Timestamp Functions in Python
Explore the different ways of getting the current timestamp in Python and profile their respective execution times.
WILLIAM LAROCHE

Wagtail 5.2 (LTS) Released
WAGTAIL.ORG

Django Security Releases Issued: 4.2.7, 4.1.13, and 3.2.23
DJANGO SOFTWARE FOUNDATION


Discussions


Ideas: Syntactic Sugar to Encourage Use of Named Arguments
PYTHON.ORG


Articles & Tutorials


Improving Your Git Developer Experience in Python
Are you getting by with a few fundamental commands for Git when building your Python projects? Would you like to improve your version control techniques and become more efficient with the Git command line? This week on the show, Adam Johnson is back to talk about his new book, “Boost Your Git DX.”
REAL PYTHON podcast

Using the bpython Enhanced REPL
In this video course, you’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’ll never want to return to using the vanilla Python REPL again.
REAL PYTHON course

Master Python With Pybites PDM 🚀
Are you stuck in tutorial paralysis? Crush imposter syndrome with the 12-week Pybites PDM Program. Learn advanced Python, build impactful real world apps, and get 1:1 mentorship. Stand out in tech interviews and elevate your developer journey. Join a thriving Python community. Enroll today! 🐍👩‍💻
PYBITESsponsor

Customize the Django Admin to Differentiate Environments
A quick post about changing the color scheme of the Django Admin depending on what environment the code is deployed within. Although Django specific, this is a great idea – visually reminding your admins and developers whether they’re in dev, staging, or production.
MATTHIAS KESTENHOLZ

Vectorizing Wide PyTorch Expressions?
“In scientific computing, code is often naturally expressed as wide, tree-like expressions. Often different branches of that tree contain similar chunks of logic, so there is potential to run many different branches together in parallel vectorized operations.”
MARCUS LEWIS

How to Use Type Hints for Multiple Return Types in Python
In this tutorial, you’ll learn to specify multiple return types using type hints in Python. You’ll cover working with one or several pieces of data, defining type aliases, and type checking with a third-party static type checker tool.
REAL PYTHON

Do Not Use requirements.txt
This article discusses why using a requirements.txt file and pip is insufficient for handling dependencies on back end services. Miikka recommends Poetry instead.
MIIKKA KOSKINEN

Django Hotwire Tutorial
Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire.
MICHAEL YIN

{n} Times Faster Than C …with Python
SIMD instructions along with Python calling out to its extensions can provide pretty impressive speed-up. This article shows you one such case.
EDDIE ANTONIO

PEP 702: Marking Deprecations Using the Type System
Python 3.13 will include a decorator to indicate that content has been deprecated. This PEP outlines the specification and use case.
PYTHON.ORG

What Every Developer Should Know About GPU Computing
Understanding GPUs: From their architecture to execution models and partitioning resources and what that means for coding with them.
ABHINAV UPADHYAY

100% Test Coverage Is Not Enough
This post describes why Property-Based Testing is superior to simply achieving 100% code coverage and how it can catch more bugs.
ROBERT ROSKAM

Why Is the Django Admin “Ugly”?
When Vince was talking with people at Djangocon US, one question kept coming up: “why is the Django admin so ‘ugly’?”
VINCE SALVINO


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 →

prefect: Workflow Orchestration Tool
GITHUB.COM/PREFECTHQ

dlt: Data Load Tool Makes Data Loading Easy
GITHUB.COM/DLT-HUB

ΜDjango: Micro Django a Single File Project
PAOLO MELCHIORRE

rendercv: Create a CV in PDF From a YAML/JSON Input File
GITHUB.COM/SINAATALAY

whisper: Robust Speech Recognition via Large-Scale Weak Supervision
GITHUB.COM/OPENAI

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
November 80, 2023

PyCon Sweden
November 9 to November 11, 2023

Python Atlanta
November 10, 2023

PyCon Ireland 2023
November 11 to November 13, 2023

DFW Pythoneers 2nd Saturday Teaching Meeting
November 11, 2023

PyData Tel Aviv 2023
November 14 to November 15, 2023

PyCon ID 2023
November 18 to November 20, 2023
Happy Pythoning!
Copyright © 2023 PyCoder’s Weekly, All rights reserved.