Issue #490

Practical PEP 8, Logging Best Practices, "async for", and More

Sept. 14, 2021

Practical PEP 8, Logging Best Practices, "async for", and More
#490 – SEPTEMBER 14, 2021 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Applying PEP 8 in Practice
“Two recent threads on the python-ideas mailing list have overlapped to a certain extent; both referred to Python’s [PEP 8] style guide, but the discussion indicates that the advice in it may have been stretched further than intended.”
JAKE EDGE

How to Log in Python Like a Pro
Learn what good logging is, and how you should implement it in Python. Comes with meaningful examples and rules of thumb on what and how to log.
GUILHERME LATROVA

Receive a $5 Donation to the OSS of Your Choice When You Start Your Free Scout APM Trial Today
Scout is an APM designed to provide the data insights necessary for any developer to become a performance pro. Find and fix observability issues before the customer ever sees them by connecting your error reporting and APM data on one platform, with Scout’s new error monitoring feature add-on →
SCOUT APMsponsor

Python News: What’s New From August 2021?
August 2021 was an eventful month in the world of Python. In this article, you’ll get up to speed on everything that happened in the past month, including three new Python releases.
REAL PYTHON

Unravelling async for Loops
Python’s async for statement allows convenient iteration over asynchronous iterators. In this article you’ll see how async for loops work behind the scenes.
BRETT CANNON

Introducing Pedalboard: Spotify’s Audio Effects Library for Python
SPOTIFY ENGINEERING BLOG


Discussions


Black Autoformatter Core Team AMA
The core team behind the popular Python autoformatter Black did an “ask me anything” (AMA) thread on Reddit.
REDDIT


Python Jobs


Senior Backend Software Engineer
CLAY 📍 REMOTE

Data Engineer Python & PostgreSQL
RESEARCH AFFILIATES 📍 NEWPORT BEACH, CA

Sr Backend Developer
GUTS TICKETS 📍 AMSTERDAM, NETHERLANDS

Lead Developer Python
OPTELLO 📍 REMOTE

More Python Jobs >>>


Articles & Tutorials


Python Is a Bad Programming Language
“I’ll say it again: Python is a bad programming language, and the only reason it’s so popular today is because Google pushed it so hard in the first decade of the 2000s.” Related discussion of this controversial article on Hacker News.
MICHAEL MORENO opinion

Using Data Classes in Python
One new and exciting feature that came out in Python 3.7 was the data class. A data class is a class typically containing mainly data, although there aren’t really any restrictions. With data classes, you don’t have to write boilerplate code to get proper initialization, representation, and comparisons for your objects.
REAL PYTHON video

Data Elixir: Data Science Newsletter
Data Elixir is an email newsletter that keeps you on top of the tools and trends in Data Science. Covers machine learning, data visualization, analytics, and strategy. Curated weekly with top picks from around the web →
DATA ELIXIRsponsor

Advantages of Completing Small Python Projects
Are you a beginner or intermediate Python programmer who has made it through some of the fundamentals? Have you tried to tackle a big project but got stuck and frustrated? Completing some small projects might be the answer. This week on the show, author Al Sweigart.
REAL PYTHON podcast

Common Ways for Parallelizing Python Code
This article reviews some common options for parallelizing Python code, including multiprocessing, specialized libraries, ipython parallel, and ray.
MICHAEL GALARNYK • Shared by Michael Galarnyk

A Python Guide to the Fibonacci Sequence
Explore the Fibonacci sequence in Python, which serves as an invaluable springboard into the world of recursion, and learn how to optimize recursive algorithms in the process.
REAL PYTHON

DataStax Astra DB – Built on Apache Cassandra. Get 80 Gigabytes of Storage Free Every Month
Need Global Scale on a Startup Budget? DataStax Astra DB is a multi-cloud DBaaS built on Apache Cassandra. Painless APIs, always free for developers, & no credit card required.
DATASTAXsponsor

All The Ways to Compress and Archive Files in Python
How to compress, decompress, and manage archives and files with Python in all the formats you might ever need.
MARTIN HEINZ • Shared by Martin Heinz

Writing Unit Tests for AWS Lambda Functions in Python
EMILY SHEA

How to Crawl the Web With Scrapy
MATT BASS

R vs Python: What’s the Real Difference Between R and Python?
SUSAN JOHNSON

Python 3.10 Simplifies Unions in Type Annotations
MIKE DRISCOLL

FastAPI With Async SQLAlchemy, SQLModel, and Alembic
MICHAEL HERMAN • 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 →

openskill.py: Python Implementation of Weng-Lin Bayesian Ranking
GITHUB.COM/OPENDEBATES

plusplus: Enable ++x and --x Expressions in Python
GITHUB.COM/BORZUNOV

huracan: Open Source Aircraft Engine Simulation Python Package
GITHUB.COM/ALOPEZRIVERA

klara: Automatic Test Case Generation for Python and Static Analysis Library
GITHUB.COM/USAGITONEKO97

Python Standalone Builds: Self-Contained, Highly-Portable Python Distributions
PYTHON-BUILD-STANDALONE.READTHEDOCS.IO

gamesbyexample: Collection of Text-Based Games in Python and Other Languages
GITHUB.COM/ASWEIGART

pyreports: Create Complex Report From Various Sources
GITHUB.COM/MATTEOGUADRINI • Shared by Matteo Guadrini

📆🐍 Upcoming Python Events


Real Python Office Hours Q&A (Virtual)
September 15, 2021

PyCon India 2021 (Virtual)
September 17 to September 21, 2021

PyWeek 32 Game Jam (Virtual)
September 19 to September 20, 2021
Happy Pythoning!
Copyright © 2021 PyCoder’s Weekly, All rights reserved.