Python Weekly (Issue 768 October 22 2026)

Welcome to issue 768 of Python Weekly. Let's get straight to the links this week.

The Agentic Engineering Playbook top engineers are using

Most engineers are stuck babysitting AI one prompt at a time. A handful have figured out how to build agents that plan, execute, and self-correct on their own. Sign up for The Code and get The Complete Playbook for Agentic Engineering. Claude Code, subagents, MCP, all of it.


News

JFrog researchers uncover a supply-chain attack affecting all seven PyPI wheels of LiteLLM 1.107.0, which contain malicious code that steals credentials and enables remote code execution without requiring applications to import LiteLLM. The attack exploits Python's .pth files and sitecustomize.py to execute during interpreter startup, while hiding the malicious payloads from the published source distribution.


Articles, Tutorials and Talks

This talk explores using GraalVM to enable seamless interoperability between Scala 3 and Python 3 code, focusing on generating idiomatic Scala facades for Python libraries. It details strategies for handling dynamic Python concepts, such as type hints, structural typing, and decorators, within the static and nominal type system of Scala.

Artem Golubin highlights a supply chain security risk in Python's packaging ecosystem: binary wheels uploaded to PyPI can contain malicious code that differs from their accompanying source distributions. Since most security scanners focus on source code rather than compiled binaries, attackers could hide malware in prebuilt wheels that pip installs by default.

Elon Litman demonstrates how a malicious PyTorch loss function can report a value of zero while secretly manipulating model weights through the backward pass. By exploiting differences between floating-point arithmetic and automatic differentiation, he shows how gradient descent can execute arbitrary computations inside a neural network, creating a potential attack vector for AI training pipelines.

Explore seven powerful Python features, including properties, dataclasses, caching, decorators, async, pattern matching, and slots, that can make code harder to understand and maintain when misused. Learn the trade-offs of each feature and when using it improves code clarity, design, and maintainability.

Learn how to build AI decision models that return calibrated probabilities for classification, scoring, and routing tasks without generating text, using Hugging Face Transformers and the /v1/systemone API. The guide covers custom option tokens, model fine-tuning, probability calibration, and tree batching to improve accuracy, reduce latency, and lower inference costs.

A video tutorial on how Apache Iceberg's manifests, snapshots, and catalog turn a folder of Parquet files into a table with ACID transactions, hidden partitioning, time travel, and schema evolution. Tutorial uses the data on NYC taxi trips along with PyIceberg, Polars, and DuckDB.

TorchTPU is an open source collaboration between Google and Meta that introduces a native and principled PyTorch backend for Google TPUs. It enables seamless out-of-the-box model execution and TPU migration while delivering industry-competitive inference and training performance through eager execution optimizations, torch.compile integration, and native hardware acceleration.

Adam Johnson demonstrates how to use norwegianblue, a command-line tool powered by endoflife.date, to check release cycles and support deadlines for Django, Python, PostgreSQL, and other software. The tool displays version compatibility, end-of-life dates, and upcoming support deadlines in a color-coded table, helping developers identify unsupported versions and plan upgrades.

Learn how to improve technical SEO in Django applications by implementing canonical URLs, XML sitemaps, robots.txt, structured data, and proper redirects. The guide includes practical Django code examples for controlling search engine indexing, preventing duplicate content, optimizing page performance, and monitoring results with Google Search Console.

Astral introduces experimental integration between uv and ty, enabling dependency-aware type checking for Python scripts with PEP 723 inline metadata and a new uv check command that automatically prepares project environments and runs ty. The integration also supports workspace-wide type checking and consistent ty versions through uv's lockfile, bringing Python development tools closer to a unified workflow.

This video demonstrates how to build a Python AI agent that automates the entire video creation pipeline, including speech-to-text, scriptwriting, image generation, voice synthesis, and video rendering. By using OpenRouter as a unified API, the project shows how to integrate multiple AI models efficiently while tracking individual operation costs.

Learn how to use django-lifecycle as an alternative to Django signals, with declarative hooks that run when models are created, updated, deleted, or saved. The package also supports conditional hooks that trigger only when specific fields change or transition between particular values.

Daniel Lemire introduces fastpybase64, a Python library built on SIMD-accelerated simdutf that provides a drop-in alternative to Python's standard base64 module. In single-threaded benchmarks decoding Base64 data containing line breaks, it achieves over 13 GB/s throughput, approximately 27 times faster than the standard library and four times faster than pybase64.

PyTorch and AWS introduce TorchNeuron, an open-source backend that lets developers run PyTorch models natively on AWS Trainium2 and Trainium3 accelerators with minimal code changes. Now available in public beta, it supports eager execution, torch.compile, distributed training, custom kernels through the Neuron Kernel Interface (NKI), and performance profiling using familiar PyTorch APIs.

Learn how Django's ORM and migration system work by building a coffee and tea store, covering model relationships, database queries, and the differences between makemigrations and migrate. The tutorial demonstrates how to backfill required fields, roll back migrations, resolve conflicting migration histories, and use Django 6.1's new FETCH_PEERS mode to reduce N+1 database queries.


Interesting Projects, Tools, and Libraries

TokenSpeed is a speed-of-light LLM inference engine.

State of the art inference performance with modern accelerators on Kubernetes

DeepInfer is the high-performance inference framework that powers DeepSeek's large-scale production services.

A lightweight, config-driven framework for unified vision-language model inference across local and cloud backends, built on LiteLLM and Transformers.

SQL transformation framework with custom compile-time checks, end-to-end testing and safe renames that keep your table history.

Headless-Ghidra toolkit for reverse engineering 32-bit DOS and Win32 games (1993-2010): own LE/LX loader, Watcom calling conventions, library signatures, MCP server

TutorLoom is an open-source, self-hosted learning management system built with Django, React, and Flutter, featuring course management, quizzes, grading, progress tracking, and multi-tenant support.


Upcoming Events and Webinars

There will be a talk, xarray-spatial: In and Out of the Raster-verse.

There will be a talk, A Deep Seek into LLM Architecture.

There will be following talks

  • Autonomous Enterprise: Reference Architecture for Multi-Agent AI Platforms

  • Choosing the right method for Multi-Source Information Fusion

There will be following talks

  • One Platform to Rule Them All. How Databricks Is Taking the Data Market by Storm?

  • AI in the Enterprise: From harness to governance

There will be a talk, Correlation vs Causation: Why does it matter?

There will be a talk, Webscraping tooling, approaches and obsession with white whale datasets.


Our Other Newsletters

Programmer Weekly - A free weekly newsletter for programmers.

Founder Weekly - A free weekly newsletter for entrepreneurs featuring best curated content, must read articles, how to guides, tips and tricks, resources, events and more.