Issue #619

Duck Typing, IPython Jupyter Magic, Monkey Patching, and More

March 5, 2024

Duck Typing, IPython Jupyter Magic, Monkey Patching, and More
#619 – MARCH 5, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Duck Typing in Python: Writing Flexible and Decoupled Code
In this tutorial, you’ll learn about duck typing in Python. It’s a typing system based on objects’ behaviors rather than on inheritance. By taking advantage of duck typing, you can create flexible and decoupled sets of Python classes that you can use together or individually.
REAL PYTHON

Using IPython Jupyter Magic Commands
“IPython Jupyter Magic commands (e.g. lines in notebook cells starting with % or %%) can decorate a notebook cell, or line, to modify its behavior.” This article shows you how to define them and where they can be useful.
STEFAN KRAWCZYK

Posit Connect - Make Deployment the Easiest Part of Your Data Science Workflow
Data scientists use Posit Connect to securely share insights. Automate time-consuming tasks & distribute custom-built tools & solutions across teams. Publish data apps, docs, notebooks, & dashboards. Deploy models as APIs, & configure reports to run & get distributed on a custom schedule →
POSITsponsor

Monkeying Around With Python: A Guide to Monkey Patching
Monkey patching is the practice of modifying live code. This article shows you how its done and why and when to use the practice.
KARISHMA SHUKLA

DjangoCon US Call for Proposals
DJANGOCON

White House Recommends Use of Python
PYTHON SOFTWARE FOUNDATION

JupyterLab 4.1 and Notebook 7.1 Released
JUPYTER


Articles & Tutorials


Requests Maintainer Reflects on the Project After a Decade
One of the oldest active maintainers of the popular requests libraries reflects on the project’s good and bad parts over the last several years. He posits things that would improve the project and maintenance thereof. He also talks about what’s holding the project back right now. Associated Hacker News discussion.
IAN STAPLETON CORDASCO • Shared by nah

Improve the Architecture of Your Python Using import-linter
For large Python projects, managing dependency relationships between modules can be challenging. Using import-linter, this task can be made easier. This article provides a simple introduction to the import-linter tool and presents 6 practical ways to fix inappropriate dependencies.
PIGLEI • Shared by piglei

We’re Building the Future of Humanity Using Python No Other Language Will Give You Better Results
Today, you can build AI & data apps using only Python! This open-source Python end-to-end app builder helps you with it. Similar to Steamlit but designed to build production-ready apps, it offers some differences: scales as more users hit the app, can work with huge datasets, and is multi-user →
TAIPYsponsor

How to Read User Input From the Keyboard in Python
Reading user input from the keyboard is a valuable skill for a Python programmer, and you can create interactive and advanced programs that run on the terminal. In this tutorial, you’ll learn how to create robust user input programs, integrating error handling and multiple entries.
REAL PYTHON

Tracing System Calls in Python
This article shows you how to trace the system calls made when you run your Python program. It includes how you can use the Perfetto trace viewer to visualize the interactions.
MATT STUCHLIK

The Most Important Python News in 2023
Vita has put together a site using data from the PyCoder’s newsletter. The site itself is built using Python tools. If you missed something in 2023, you might find it here.
VITA MIDORI • Shared by Vita Midori

Django Login, Logout, Signup, Password Change and Reset
Learn how to implement a complete user authentication system in Django from scratch, consisting of login, logout, signup, password change, and password reset.
WILL VINCENT • Shared by Will Vincent

Why Python’s Integer Division Floors
This article on the Python History blog talks about why the decision was made to have integer division use floors, instead of truncation like C.
GUIDO VAN ROSSUM

Falsehoods Junior Developers Believe About Becoming Senior
This opinion piece by Vadim discusses how newer developers perceive what it means to be a senior developer, and how they’re often wrong.
VADIM KRAVCENKO

What’s in a Name?
An article about names in Python, and why they’re not the same as objects. The article discusses reference counts and namespaces.
STEPHEN GRUPPETTA • Shared by Stephen Gruppetta

Reduce, Reuse, Recycle: McDonald’s Reusable Workflows
This post on McDonald’s technology blog talks about how they take advantage of reusable workflows with GitHub Actions.
MICHAEL GORELIK

Popular git Config Options
This post covers some of the more popular options you can use when configuring git, and why you might choose them.
JULIA EVANS


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 →

logot: Test Whether Your Code Is Logging Correctly
GITHUB.COM/ETIANEN

hypofuzz: Adaptive Fuzzing of Hypothesis Tests
GITHUB.COM/ZAC-HD

cantok: Implementation of the “Cancellation Token” Pattern
GITHUB.COM/POMPONCHIK • Shared by Evgeniy Blinov

xonsh: Python-Powered, Cross-Platform, Unix-Gazing Shell
GITHUB.COM/XONSH

django-queryhunter: Find Your Expensive Queries
GITHUB.COM/PAULGILMARTIN • Shared by Paul

📆🐍 Upcoming Python Events


Eclipse Insights: How AI Is Transforming Solar Astronomy
March 5, 2024

Weekly Real Python Office Hours Q&A (Virtual)
March 6, 2024

Canberra Python Meetup
March 7, 2024

Sydney Python User Group (SyPy)
March 7, 2024

PyCon Pakistan 2024
March 9 to March 11, 2024

Django Girls CDO Workshop 2024
March 9 to March 10, 2024

PyCon SK 2024
March 15 to March 18, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.