Issue #512

Unit Test Docs, Python zipfile, Django Runs Black, and More

Feb. 15, 2022

Unit Test Docs, Python zipfile, Django Runs Black, and More
#512 – FEBRUARY 15, 2022 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Documentation Unit Tests
Interesting approach to keeping documentation and code in sync: introspecting the code to figure out what needs to be documented, then parsing the documentation to see if each item has been covered.
SIMON WILLISON

Improving Your Django and Python Developer Experience
How often have you thought about your Developer Experience (DX)? How do you improve your workflow, find documentation, and simplify code formatting? This week on the show, Adam Johnson is here to talk about his new book, “Boost Your Django DX.”
REAL PYTHON podcast

Monitoring and Distributed Tracing for Python Applications With Datadog APM
Optimize Python app performance by tracing requests across service boundaries and troubleshooting bottlenecks by drilling into individual traces end-to-end using Datadog’s flame graphs. Plus, correlate Python traces with relevant logs and metrics without switching tools for context. Try Datadog APM →
DATADOGsponsor

Python’s zipfile: Manipulate Your ZIP Files Efficiently
In this guided tutorial, you’ll learn how to manipulate ZIP files using Python’s zipfile module from the standard library. Through hands-on examples, you’ll learn how to read, write, compress, and extract files from your ZIP files quickly.
REAL PYTHON

PEP 673: Self Type Was Accepted
This PEP introduces a simple and intuitive way to annotate methods that return an instance of their class. This behaves the same as the TypeVar-based approach specified in PEP 484 but is more concise and easier to follow. Related Twitter thread by core dev Raymond Hettinger.
PYTHON.ORG

Twisted 22.1.0 Released
Twisted, the event framework for internet applications, has announced the release of 22.1.0. Mainly a bugfix release.
TWISTEDMATRIX.COM

Django Project Reformats Entire Codebase With Black
Related discussion on Hacker News.
GITHUB.COM/DJANGO


Discussions


Python Type Hints Guidelines
Are type-hints overused? Discussion on if sometimes they’re too much.
HACKER NEWS

What Have You Recently Automated at Work Using Python?
From mouse-wiggling scripts to make Teams look active to RNC automation.
REDDIT


Python Jobs


Python Software Engineer
FLASHPOINT 📍 ANYWHERE

Mid/Senior Django Developer
TYPE/CODE 📍 BROOKLYN, NY, USA

Sr Python Engineer
FLASHPOINT 📍 ANYWHERE

Senior Backend Engineer Django
DATAPANE 📍 UK, EUROPE

Backend Software Engineer
CATALPA INTERNATIONAL 📍 ASIA PACIFIC REGION

Senior Full-Stack Web Developer
MONETIZEMORE 📍 ANYWHERE

Python Engineer Web Scraping
NEWSCATCHER 📍 ASIA, TX, AMERICA

Python Trainer
PHYSIKALISCH-TECHNISCHE BUNDESANSTALT 📍 JAKARTA, INDONESIA

More Python Jobs >>>


Articles & Tutorials


Upcoming Python Feature PEPs
“These PEPs are a great way of getting the freshest info about what might be included in the upcoming Python releases. So, in this article we will go over all the proposals that are going to bring some exciting new Python features in a near future!”
MARTIN HEINZ

K-Nearest Neighbors in Python
A beginner-friendly guide to the K-Nearest Neighbor algorithm implemented in Python using Scikit-Learn. The tutorial assumes no prior knowledge of machine learning and guides through developing a classifier, evaluating its performance, and hyper-parameter tuning.
NIK PIEPENBREIER • Shared by Nik Piepenbreier

Performance Monitoring Built for Developers, by Developers
Scout APM is an application performance monitoring tool that ties performance anomalies directly to endpoints, saving developers hours of time spent on troubleshooting and debugging. See why Scout is a developer’s best friend with a free 14-day trial, no credit card required →
SCOUT APMsponsor

Python’s all(): Check Your Iterables for Truthiness
Learn how to use Python’s all() function to check if all the items in an iterable are truthy. You’ll also code various examples that showcase a few interesting use cases of all() and highlight how you can use this function in Python.
REAL PYTHON

How to Check if Numbers Are Prime Concurrently in Python
“The ProcessPoolExecutor class in Python can be used to check if multiple numbers are prime at the same time. This can dramatically speed-up your program compared to checking if numbers are prime, one-by-one.”
JASON BROWNLEE

Ways I Use Testing as a Data Scientist
“Knowing what to test requires some experience in knowing what can go wrong.” Peter describes testing with a Data Scientist’s perspective.
PETER BAUMGARTNER

Structural Subtyping in Python
Along with nominal typing, Protocol classes now allow you to take advantage of structural subyping in Python. This post explores that.
REDOWAN DELOWAR • Shared by Redowan Delowar

How to Pickle and Unpickle Objects in Python
Learn how to serialize and deserialize data in Python with the pickle module, including working with serialization in Pandas.
MOHAMMAD WASEEM

A Comprehensive Guide to Slicing in Python
Introduction to slicing in Python, covers slices, negative indexes, slice(), and how to make your own classes slice-able.
BAS STEINS

Find Your Next Tech Job Through Hired
Hired has 1000s of companies ranging from startups to Fortune 500s who are actively hiring developers, data scientists, mobile engineers, & more. Its simple: create a profile with your skills for hiring managers to reach you directly. Sign up today!
HIREDsponsor

The Ins and Outs of Logging in Python
A multi-part guide to using logging in Python. The fundamental concepts are discussed and illustrated with simple examples.
CESAR URIBE • Shared by Erin McLaughlin

Chaining Comparison Operators
“Learn the ins and outs of comparison operator chaining, and especially the cases you should avoid.”
RODRIGO GIRÃO SERRÃO


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 →

Django REST Framework Cheat Sheets
CDRF.CO

PaddleOCR: Multilingual OCR Toolkits Based on PaddlePaddle
GITHUB.COM/PADDLEPADDLE

pytube: Dependency-Free Python Library for Downloading YouTube Videos
GITHUB.COM/PYTUBE

YT-Spammer-Purge: Scan and Delete by Comments by User on YouTube
GITHUB.COM/THIOJOE

plane-notify: Notify if a Plane Has Taken Off or Landed
GITHUB.COM/JXCK-S

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
February 16, 2022

Dominican Republic Python User Group
February 15 to February 16, 2022

PyCon Iran 2022
February 16 to February 19, 2022

PyLadies Dublin
February 17, 2022

PyCon Sri Lanka 2022
February 22 to February 23, 2022
Happy Pythoning!
Copyright © 2022 PyCoder’s Weekly, All rights reserved.