Issue #471

Python C Extensions Can Be Slow, How To Make Jupyter Notebooks Interactive, Building a Platform Game in Python, and More

May 4, 2021

Python C Extensions Can Be Slow, How To Make Jupyter Notebooks Interactive, Building a Platform Game in Python, and More
#471 – MAY 4, 2021 VIEW IN BROWSER
The PyCoder’s Weekly Logo
The Hidden Performance Overhead of Python C Extensions
It’s no secret that Python is slower than compiled languages like C, C++, and Rust. If you need a performance boost, you can write compiled Python C extensions. But there are some hidden performance costs that you should be aware of if you decide to do this. This article explains two ways that Python C extensions can actually be slower than pure Python and discusses some solutions and work around for them.
ITAMAR TURNER-TRAURING

How to Use ipywidgets to Make Your Jupyter Notebook Interactive
Jupyter Notebooks are great for exploratory data analysis. They’re also a good way to share results and analysis with other people, who can alter the notebook to further explore the data themselves. But there are some limitations to notebook interactivity. That’s where ipywidgets comes in! In this tutorial you’ll learn how to create widgets like check boxes, drop-down menus, sliders, and how to handle events like button clicks.
MATT WRIGHT

Rapidly Identify Bottlenecks in Your Python Applications with Datadog APM.
Datadog’s Continuous Profiler allows you to find the most resource-consuming parts in your production code all the time, at any scale, with minimal overhead. Debug and optimize your code, enhancing application performance before your customers notice. Try Datadog APM today →
DATADOGsponsor

Build a Platform Game in Python With arcade
Building games can be a fun way to learn new Python concepts and practice techniques you’ve already learned. Plus, they make for great projects to share! This step-by-step tutorial shows you how to build a platform game using the arcade library. You’ll learn techniques for designing levels, sourcing assets, and implementing advanced features.
REAL PYTHON

Python 3.10.0b1 Is Now Available
Python 3.8.10 and 3.9.5 have also been released.
CPYTHON DEV BLOG

Microsoft Becomes the Third PSF Visionary Sponsor
MICROSOFT.COM

EuroPython 2021: Call for Sponsors
EUROPYTHON.EU

Django Security Releases Issued: 3.2.1, 3.1.9, and 2.2.21
DJANGO SOFTWARE FOUNDATION


Discussions


“WARNING: Value for scheme.data Does Not Match” When I Try to Update Pip or Install Packages
Are you seeing warnings about scheme.data, scheme.platlib, and other scheme.* items when installing with pip? While these warnings don’t affect the pip installation, they are noisy and annoying. Fortunately, the pip team has fixed them in the latest patch release, so upgrading to pip 21.1.1 or later should get rid of them for you.
STACK OVERFLOW

The Most Copied Comment on Stack Overflow Is on How to Resize Figures in Matplotlib
In a recent blog post, Stack Overflow analyzed data the obtained during an April Fools gag about how people copy and paste code from their platform. One of the results from the data set indicates that to most copied comment comes from an answer about resizing figures in Matplotlib.
REDDIT


Python Jobs


Senior Full Stack Engineer (USA)
YONDER

Software Engineer (New York, NY, USA)
TRUVERIS

Software Engineer (Remote)
SAGEBEANS RPO

PL/SQL Developer with Python (Remote)
DOTCOM TEAM, LLC

More Python Jobs >>>


Articles & Tutorials


Film Simulations From Scratch Using Python
In analog photography, you can achieve different “looks” for your photographs by selecting different kinds of film to shoot with. Digital camera manufacturers often include different presets to simulate different kinds of film. In this article, you’ll learn how to simulate different films on your own images using color lookup tables, or CLUTs, using NumPy and the Pillow image library.
KEVIN MARTIN JOSE

Simplify Python GUI Development With PySimpleGUI
In this step-by-step course, you’ll learn how to create a cross-platform graphical user interface (GUI) using Python and PySimpleGUI. A graphical user interface is an application that has buttons, windows, and lots of other elements that the user can use to interact with your application.
REAL PYTHON course

Are You Up For the Ubiq Ramen Challenge?
PyCoder’s listen up! We want to show you how simple and fast it is to build encryption directly into any application. We think… faster than it takes to make a bowl of ramen. Enter our Ubiq Ramen Challenge and you could win a year’s supply of Ramen and a $500 Amazon gift card →
UBIQ SECURITYsponsor

Declarative Validation
Validating user input is one of the most common programming tasks. There are a number of approaches to validation and a host of third-party Python packages available on PyPI. One of these approaches that is common in the functional programming paradigm is applicative-style validation, which the author of this article calls declarative validation. In this short-yet-informative article, you’ll learn how declarative validation works and how to cook up a small validation library.
DREW OLSON

Python News: What’s New From April 2021?
April 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 new sponsorships for the PSF, changes to Python error messages, and a community-led discussion over the future of type annotations.
REAL PYTHON

Dockerizing FastAPI with Postgres, Uvicorn, and Traefik
FastAPI is quickly gaining popularity in the world of asynchronous Python web frameworks. With more and more users flocking to the framework, the demand for Dockerized development and production workflows is growing. In this step-by-step tutorial, you’ll learn how to dockerize a FastAPI application using Postgres, Uvicorn, and Traefik.
AMAL SHAJI • Shared by Amal Shaji

Podcast Rewind With Guest Highlights for 2020-2021
This week’s episode of the Real Python podcast is a bit different. Take a look back in this rewind episode featuring highlights from the many interviews over the past year or so of the show.
REAL PYTHON podcast


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 →

tablib: Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &C
GITHUB.COM/JAZZBAND

wasmer-python: WebAssembly Runtime for Python
GITHUB.COM/WASMERIO

gradio: Create UIs for Prototyping Your Machine Learning Model in 3 Minutes
GITHUB.COM/GRADIO-APP

tortoise-orm: Familiar Asyncio ORM for Python, Built With Relations in Mind
GITHUB.COM/TORTOISE

mongo-arrow: Easily Move Data Between MongoDB and Apache Arrow
GITHUB.COM/MONGODB-LABS

📆🐍 Upcoming Python Events


⋅ Real Python Office Hours (Virtual) May 5, 2021

⋅ PyCon 2021 (Virtual) May 12 – 18, 2021

⋅ DjangoCon Europe 2021 (Virtual) June 2 – 6, 2021

⋅ EuroPython 2021 (Virtual) July 26 – August 1, 2021

⋅ PyCon India 2021 September 17 – 20, 2021
Happy Pythoning!
Copyright © 2021 PyCoder’s Weekly, All rights reserved.