Issue #451

Bitwise Operators, mypy Exhaustiveness Checking, Job Scheduling, and More

Dec. 15, 2020

Bitwise Operators, mypy Exhaustiveness Checking, Job Scheduling, and More
#451 – DECEMBER 15, 2020 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Bitwise Operators in Python
In this tutorial, you’ll learn how to use Python’s bitwise operators to manipulate individual bits of data at the most granular level. With the help of hands-on examples, you’ll see how you can apply bitmasks and overload bitwise operators to control binary data in your code.
REAL PYTHON

Exhaustiveness Checking With mypy
What if mypy could warn you about possible problems at “compile time”? In this article, you’ll learn a little trick to get mypy to fail when a value in an enumeration type is left unhandled.
HAKI BENITA

Scheduling All Kinds of Recurring Jobs With Python
Every software developer, data scientist, and sysadmin must, at some point, schedule jobs to run. In this article, you’ll learn how to do this with Python. You’ll encounter a number of methods for scheduling jobs, from using the standard library to leveraging third-party packages.
TOWARDSDATASCIENCE.COM • Shared by Martin Heinz

How Python’s Object System Works
The Python object system is one of the most important parts of the Python language. Mastering it is essential to mastering the Python language. Learn how the object system works by examining the CPython source code in this detailed tutorial.
VICTOR

Python Developers Are in Demand on Vettery
Get discovered by top companies using Vettery to actively grow their tech teams with Python developers (like you). Here’s how it works: create a profile, name your salary, and connect with hiring managers at startups to Fortune 500 companies. Sign up today - it’s completely free for job-seekers →
VETTERYsponsor

What Is Data Engineering and Is It Right for You?
In this article, you’ll get an overview of the discipline of data engineering. You’ll learn what is and isn’t part of a data engineer’s job, who data engineers work with, and why data engineers play a crucial role in many industries.
REAL PYTHON

Python Software Foundation 2020 Fundraiser
Help the PSF recover funds lost due to COVID-19.
PYTHON.ORG

PyTorch 1.7.1 Released: Updated Binaries for Python 3.9
GITHUB.COM/PYTORCH

Python 3.9.1 Final Released
PYTHON.ORG

Qt 6.0 Released
QT.IO • Shared by Bartosz Zaczyński


Discussions


Why Is Plus-Equals Valid for List and Dictionary?
The docs for the .__iadd__() special method don’t make it clear why it works for collections like lists and dictionaries. Time to peruse some CPython source code!
STACK OVERFLOW


Python Jobs


Advanced Python Engineer
RESEARCH AFFILIATES 📍 NEWPORT BEACH, CA, USA

Backend Engineer
FEATHER 📍 BERLIN, GERMANY

Senior Data Engineer
SEMANTICBITS 📍 REMOTE

Software Developer Lead
PNC FINANCIAL SERVICES GROUP 📍 REMOTE

More Python Jobs >>>


Articles & Tutorials


Python Structural Pattern Matching Morphs Again
Follow the saga of PEP 622 which proposes to add a new structural pattern matching feature to Python. There have been a number of updates to the PEP, as well as some animated discussion in the Python-dev mailing list.
JAKE EDGE

Generators, Coroutines, and Learning Python Through Exercises
Have you started to use generators in Python? Are you unsure why you would even use one over a regular function? How do you use the special “send” method and the “yield from” syntax? This week on the show, we have Reuven Lerner to talk about his PyCon Africa 2020 talk titled “Generators, coroutines, and nanoservices.”
REAL PYTHON podcast

Become a Python Guru With PyCharm
PyCharm is the Python IDE for Professional Developers by JetBrains providing a complete set of tools for productive Python, Web and scientific development. Be more productive and save time while PyCharm takes care of the routine →
JETBRAINSsponsor

Python Turtle for Beginners
In this step-by-step course, you’ll learn the basics of Python programming with the help of a simple and interactive Python library called turtle. If you’re a beginner to Python, then this course will definitely help you on your journey as you take your first steps into the world of programming.
REAL PYTHON course

My Evolution Writing JSON-REST APIs
After writing JSON-REST APIs for a number of years, Philip Jones noticed that there were shortcomings with documenting API structure and validating data sent and received. In this article, Philip discusses how he solved both of these issues with the quart-schema package.
PHILIP JONES

Maps With Django: GeoDjango, SpatiaLite and Leaflet
In part one of this series, you’ll get a quickstart guide to creating web maps with the Python-based web framework Django using its module GeoDjango, the SQLite database with its spatial extension SpatiaLite and Leaflet, a JavaScript library for interactive maps.
PAOLO MELCHIORRE

Distributed Spatial Data Operations in Open Source CockroachDB
Where is the nearest gas station? Is the house I want to buy located in a flood plain? Build apps that answer questions like these with CockroachDB’s open source spatial tools are free and compatible with PostGIS.
COCKROACH LABSsponsor

Implementing Rust’s dbg! in Python
Rust’s dbg macro is a useful expression printer that adds the source line to what is printed. In this article, Raphael shows you how to implement a similar function in Python and discusses many of the intricacies involved with inspecting code states.
RAPHAEL

Speed Up Python With Concurrency
Learn what concurrency means in Python and why you might want to use it. You’ll see a simple, non-concurrent approach and then look into why you’d want threading, asyncio, or multiprocessing.
REAL PYTHON course

GraphQL Authorization With Graphene, SQLAlchemy and oso
Learn how to set up a GraphQL authorization layer between Graphene and SQLAlchemy using oso’s open-source authorization library and the sqlalchemy-oso package.
DAVID HATCH • Shared by Stephie Glaser


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 →

dirsearch: Web Path Scanner
GITHUB.COM/MAUROSORIA

visidata: A Terminal Spreadsheet Multitool for Discovering and Arranging Data
GITHUB.COM/SAULPW

asv: A Benchmarking Tool With Web-Based Reporting
GITHUB.COM/AIRSPEED-VELOCITY

py-applescript: An Easy-To-Use Python Wrapper for NSAppleScript
GITHUB.COM/RDHYEE

sqlalchemy-oso: Open-Source Policy Engince for Authorization
GITHUB.COM/OSOHQ

beartype: Unbearably Fast O(1) Runtime Type-Checking in Pure Python
GITHUB.COM/BEARTYPE

quart-schema: Schema Validation and Auto Documentation for Quart
GITLAB.COM/PGJONES

📆🐍 Upcoming Python Events


Real Python Office Hours (Virtual)
December 16, 2020

BelPy
January 30 – 31, 2021

PyCascades 2021
February 19 – 21, 2021

PyCon 2021
May 12 – 18, 2021
Happy Pythoning!
Copyright © 2020 PyCoder’s Weekly, All rights reserved.