The top 333 Python articles in 2023

From the ~one thousand articles shared by PyCoders Weekly in 2023, this is the top third as measured by the number of backlinks (the number of other articles that link to them).

Google OSS Project Python Style Guide

This is the style guide for any Google-originated open-source projects.

Regex Crossword: Learn Regexes With This Game

Innovate Faster With Ready-Made Edge AI Reference Kits

Build AI solutions that run efficiently at the edge. Raise throughput, lower latency, and speed up AI inference with the OpenVINO toolkit and our Edge AI Reference Kits.

The Python Standard REPL: Try Out Code and Ideas Quickly

In this tutorial, you’ll learn how to use the Python standard REPL (Read-Eval-Print Loop) to run your code interactively. This tool will allow you to test new ideas, explore and experiment with new tools and libraries, refactor and debug your code, try out examples, and more.

Comprehensive Python Cheatsheet

Bullets of Vaguely Silvery Hue

Fred Brooks wrote “No Silver Bullet” in the mid-1980’s, explaining why the massive improvements in hardware speed were not reflected as a massive improvement in software productivity. This article is still argued about today, and James deconstructs it, walking you through what is still relevant.

Confusing git Terminology

Julia is working on a doc that explains git and in doing so polled some people about what git terminology they found confusing. This post covers the most common responses and attempts to clear up the confusion.

PEP 723: Embedding pyproject.toml in Single-File Scripts

This PEP proposes a metadata format which a single-file script can use to specify dependency and tool information for IDEs and external development tools. It replaces PEP 722.

EU’s Proposed CRA Consequences for Python Ecosystem

Examples of Great URL Design

URLs are everywhere, but some sites spend more time thinking about what they mean and how visitors read them. This blog post covers some of Jim’s favorite examples of good URL designs.

Python 3.12 Preview: Support for the Linux Perf Profiler

Python 3.12 will be released in October 2023. In this tutorial, you’ll preview one of its upcoming features: support for the Linux perf profiler, which will give you a holistic view of your application’s performance, including system-level and hardware-level events.

An Open Letter to the Python Software Foundation

Death by a Thousand Microservices

The software industry is learning once again that complexity kills and trending back towards monoliths and larger services.

I’m Mr. Null. My Name Makes Me Invisible to Computers

NULL is a magic word in many computer languages. This article is by someone who has Null as a last name, and the consequences that entails. See also this Radiolab Podcast Episode for a similar topic.

Build a Hangman Game for the Command Line in Python

In this step-by-step project, you’ll learn how to write the game of Hangman in Python for both the console and GUI. You will see how to structure the game, port it to use a GUI, and add enhancements once the game is complete.

What Is the Standard Library For?

This posting summarizes a conversation at the Python Language Summit proposing that guidelines be defined for when something should be added to the standard library.

PEP 709: Inlined Comprehensions

Python Enhancement Proposal 709 covers a change to how comprehensions are handled. Currently they are compiled as nested functions. Benchmarking shows that treating list, dict, and set comprehensions as in-line code can result in a 2x speedup on the comprehension.

Altering Python Attribute Handling for Modules

There have been a couple of PEPs proposing additions to how imports look for members of a module. This article discusses their meaning and why some aren’t making it into the language. Associated HN discussion.

Exploring Code Reviews in Python and Automating the Process

What goes into a code review in Python? Is there a difference in how a large organization practices code review compared to a smaller one? What do you do if you’re a solo developer? This week on the show, Brendan Maginnis and Nick Thapen from Sourcery return to talk about code review and automated code assistance.

Why You Should Still Read the Docs

Do you feel you’re fighting your tools? Do you feel you’re relying too much on autocomplete and inline documentation? tl;dr: Most good documentation won’t show up in your IDE – rather, it is about how to use the library, and the problem the library is solving.

Build a Hangman Game With Python and PySimpleGUI

In this step-by-step tutorial, you’ll learn how to write the game of hangman in Python with a PySimpleGUI-based interface. You’ll see how to structure the game, build its GUI, and program the game’s logic and rules.

How to Sort Unicode Strings Alphabetically in Python

In this tutorial, you’ll learn how to correctly sort Unicode strings in Python while avoiding common pitfalls. You’ll explore powerful third-party libraries implementing the complete Unicode Collation Algorithm (UCA), as well as standard library modules and a few handmade solutions.

Compromised PyTorch-nightly Dependency Chain

The nightly PyTorch build was compromised between December 25 and 30th. This article describes what happened. Stable release branches were not effected. There is also an associated Hacker New Discussion.

The Future of Data Science Told by 79,306 People

Data science is thought of as a growing field, but can you prove it? By using the results of both the 2021 and 2022 Python Developers survey, this article shows how the field is growing and changing.

Python’s yield and Generators Explained

Learn about yield and how generators can make your code more performant.

Python Basics: Modules and Packages

In this Python Basics video course, you’ll learn how to build an application by putting related code into separate files called modules. You’ll also use the import statement to use modules in another file.

Proposing a Struct Syntax for Python

Bret has been pondering a new keyword that would tackle some of the limitations of data classes while offering syntax improvement over named tuples. This is still in the “what if” stage, but he is willing to write up a PEP if he thinks it will get traction.

The Ruff Formatter: Python’s Fastest Formatter

You may have come across ruff the linter which has been on the scene for about a year, well it recently added formatting to its features. This article shows you how, including the configuration option to allow single-quote-style.

In a Git Repository, Where Do Your Files Live?

Write some Python to explore the data objects Git uses to store your content.

Progress on No-GIL CPython

This post sums up the progress and thinking on the no-GIL work in Python. It summarizes some of the PEPs involved as well as active conversations in the discussion groups.

Learning About Code Metrics in Python With Radon

Radon is a code metrics tool. This article introduces you to it and teaches you how you can improve your code based on its measurements.

The Technology Behind GitHub’s New Code Search

For the last year, GitHub has been making large changes to how you can search for code on their site. This article describes what went into building the world’s largest public code search index.

Migrating Netflix to GraphQL Safely

Netflix made a major architecture change, moving to GraphQL. Doing so for 100s of millions of customers without disruption was a challenge. This article details how they introduced the new pieces to the architecture and moved their developers to the new API.

Python Basics: Reading and Writing Files

In this video course, you’ll learn how to move data back and forth between your Python programs and external software by reading and writing files. You’ll practice reading and writing data stored in the CSV file format, one of the most widely supported file formats for transferring tabular data.

Python Memory-Safe Says Latest CISA Recommendations

The Python Rich Package: Unleash the Power of Console Text

Rich is a powerful library for constructing text-based user interfaces (TUIs) using Python. With it, you can make your code more readable by pretty-printing complex data structures, and you can make your app more attractive for your user with colored and formatted text, tables, animations, and more.

Learning Python During an AI Revolution

Has the current growth of artificial intelligence (AI) systems made you wonder what the future holds for Python developers? What are the hidden benefits of learning to program in Python and practicing computational thinking? This week on the show, we speak with author Lawrence Gray about his upcoming book “Mastering Python: A Problem Solving Approach.”

How Google Takes the Pain Out of Code Reviews

Google’s internal code review tool “Critique” includes AI-powered improvements, and has 97% dev satisfaction. This article attempts to discuss why as well as pointing to Google’s OSS equivalent.

Discussion on PEP 730: Adding iOS as a Supported Platform

The Changing “Guarantees” Given by Python’s GIL

This article covers the changes the Global Interpreter Lock has undergone since Python 3.9 and how that impacts the assumptions you can make in your code.

Advent of Code: Solving Puzzles With Python

Advent of Code is an online advent calendar that shares new programming puzzles each day from December 1 to the 25. In this Code Conversation, you’ll learn why solving programming puzzles can be beneficial and how you can get started with Advent of Code using Python.

Introducing Immortal Objects for Python

This article explains immortal objects (PEP 683) which are excluded from garbage collection. This causes performance and shared memory improvements for large architectures.

Python Gotcha: Comparisons

Comparing two numerical variables in Python can have surprising results if you aren’t aware of some common gotchas. This post covers a couple of the common ones.

78% MNIST Accuracy Using GZIP in Under 10 Lines of Code

MNIST is a collection of hand-written digits that is commonly used to play with classification algorithms. It turns out that some compression mechanisms can double as classification tools. This article covers a bit of why with the added code-golf goal of a small amount of code.

Embeddings and Vector Databases With ChromaDB

Vector databases are a crucial component of many NLP applications. This tutorial will give you hands-on experience with ChromaDB, an open-source vector database that’s quickly gaining traction. Along the way, you’ll learn what’s needed to understand vector databases with practical examples.

Guide to Hash Tables in Python

Hash tables offer an efficient and flexible method of storing and retrieving data, making them indispensable for tasks involving large data sets or requiring rapid access to stored items. Python’s dict is a hash, learn how it works and how it can help your code.

Replacing a String in Python

In this video course, you’ll learn how to remove or replace a string or substring. You’ll go from the basic string method .replace() all the way up to a multi-layer regex pattern using the sub() function from Python’s re module.

Python 3.11 vs Python 3.12: Performance Testing

Włodzimierz ran over 90 benchmarks on both Python 3.11 and 3.12 on two different machines. This post shows the resulting data, and how the choice of processor can impact whether 3.11 or 3.12 is faster.

Building and Operating S3

This article is a very deep dive into how Amazon S3 Storage was created, and the complexities involved in operating a system at that scale.

Great Resources a Beginner Might Not Find So Easily

Are you having trouble making the modules work together in a larger project? Have you tried looking at popular projects as models, but were put off by their size and scope, or found it hard to see why they did the things they did? Resources about this do exist, but they’re scattered all over …unless you know where to look.

Kill a Developer in 4 Words or Less 😂

Some favourites: “Let’s deploy this Friday!”, “Works on my machine!”, “You’ve got merge conflicts”

Most Copied StackOverflow Snippet Is Flawed!

“In a recent study titled Usage and Attribution of Stack Overflow Code Snippets in GitHub Projects, an answer I wrote almost a decade ago was found to be the most copied snippet on Stack Overflow. Ironically it happens to be buggy.”

Hide Those Terminal Secrets!

Michael Kennedy of Talk Python fame does a lot of screen casts, and one of his concerns is accidentally exposing data from a terminal when doing so. This quick article covers the Warp terminal’s “redaction” feature for just this situation.

PEP 733: An Evaluation of Python’s Public C API

This is an informational PEP describing the shared public view of the C API in Python. It talks about why the C API exists, who the stakeholders are, and problems with the interface.

Fixit 2: Meta’s Next-Generation Auto-Fixing Linter

Meta has a large collection of plug-ins for linting, which makes some of the usual solutions problematic at scale. This article introduces Fixit 2, an open source, pluggable linter.

Python Gets Its First Community Communications Manager

This article recaps an interview with Marie Nordin, the PSF’s first Community Communications Manager.

Unlock IPython’s Magical Toolbox for Your Coding Journey

IPython is a powerful tool that can prove useful on your journey to mastering Python. Its friendly interface will enable you to comfortably take control of your learning. In this tutorial, you’ll cover the basic concepts of using IPython and learn how its features can make coding efficient.

Python Is a Compiled Language

Python is interpreted, but it interprets compiled code. This distinction can be confusing to students and this instructor does a deep dive on where the line between the concepts sit.

Building Predictive Models: Logistic Regression in Python

Want to learn how to build predictive models using logistic regression? This tutorial covers logistic regression in depth with theory, math, and code to help you build better models.

From Chaos to Cohesion: Architecting Your Own Monorepo

A monorepo approach means keeping the code from all your projects in one place. It requires changing your tooling approach, but means better dependency management. This article shows you how to build a simple python monorepo using GitHub Actions as a CI/CD tool.

GPT in 60 Lines of NumPy

Everybody is talking about GPT, this article is actually building one. Learn how to implement a GPT model from scratch in NumPy.

Pandas vs Julia: Cheat Sheet and Comparison

This is a Python/Pandas vs Julia cheatsheet and comparison. You can find what is the equivalent of Pandas in Julia or vice versa. With an associated Hacker News Discussion.

The Most Performant Timestamp Functions in Python

Explore the different ways of getting the current timestamp in Python and profile their respective execution times.

When I Met Guido Van Rossum

This personal blog post by Adarsh recounts his conversations with Guido at PyCasades back in the spring. They talked about the how to get better at Python and what it takes to become a core developer.

Autodiff Puzzles

“This notebook contains a series of self-contained puzzles for learning about derivatives in tensor libraries.”

Mojo SDK Released for Linux

The Eval Game: Test Your Python Skills

Understanding Linux cp and Implementing It in Python

Dive into the workings of the Linux cp command and learn how to replicate it in Python. This post breaks down the command’s process and shows you how the same could be accomplished using only Python.

StrictYAML: Type-Safe, Restricted Subset of the YAML

Debugging a Mixed Python and C Language Stack

Debugging is difficult. Debugging across multiple languages is especially challenging, and debugging across devices often requires a team with varying skill. This article describes the process one team uses to debug across a mixed Python/C stack.

Building a Small REPL in Python

Learn how to write your own REPL by building on top of the one that comes with Python. With a few lines of code you can customize Python’s REPL environment as your own.

Ideas: Support Multiple Divisors in divmod()

PEP 727: Documentation in Annotated Metadata

There is no standard for providing doc strings for parameters, return values, variables, or type aliases. Tools like Sphinx and numpydoc have their own mechanisms. This PEP proposes adding typing.Doc as part of the Annotated type syntax.

Rust vs. Go, Java, and Python in AWS Lambda Functions

A performance comparison of JSON parsing in AWS Lambda functions using Rust, Go, Java, and Python.

Building a Python Compiler and Interpreter

This article starts the journey of building a compiler and interpreter for the Python programming language, in Python. You’ll learn all about tokenizing, parsing, compiling, and interpreting.

5 Ways to Measure Execution Time in Python

There are several ways to measure the passing of time in Python, especially when determining the performance of your code. Read on to learn five functions from the time module and how to use them.

Let’s Make a Silly JSON-like Parser

This article goes into deep detail on how you would construct a JSON parser in Python. If you’re new to parsing, this is a great place to start.

Deploying Conda-Based Docker Images

Conda is a popular package manager for science, data science, and machine learning, however, using it to install packages can lead to large Docker images. Here are some steps to get it back down to a reasonable size.

11 Fun Python Libraries to Make Your Day Better

This article covers 11 libraries that the author had fun playing with, including PyGame, Asciimatics, Arcade, and more.

Deobfuscating World of Warships’ Python Scripts

An in-depth analysis of how World of Warships obfuscates its game scripts and how to mostly deobfuscate them automatically.

Wagtail 5.2 (LTS) Released

Tips for Solopreneur?

Check if a Python String Contains a Substring

In this video course, you’ll learn the best way to check whether a Python string contains a substring. You’ll also learn about idiomatic ways to inspect the substring further, match substrings with conditions using regular expressions, and search for substrings in pandas.

What’s It Like to Maintain an OSS Fork at Work?

How We Organise Our Very Large Python Monolith

Kraken Technologies is an environmental tech company that does a lot of Python development. One of their applications is a monolith with over 27k modules. This article outlines how they keep all this organized and running.

PyFlo: The Beginner’s Guide to Python

This is an online course with an interesting flow chart guiding you through lessons, with optional tangents and core concepts. It even includes an instructor’s guide.

Configure Your MicroPython Project With JSON Files

Learn how to get your microcontroller to remember your settings, so you can quickly get it back in working state even if it loses power or reboots!

What Is Wrong With TOML?

Some YAML people talk about why TOML is too limited.

Software Design by Example

This is CS 101 in a web friendly format. It covers the basic concepts of software design using examples, with a focus on self taught data scientists who want to bring their coding to the next level.

Building a Toy Programming Language in Python

Miguel thought it would be fun to write a small programming language using Python to implement it. This blog post is the first in a series covering how he did it.

Designing Pythonic Library APIs

This article summarizes principles that Ben has found useful when designing Python library APIs. Topics include: structure, naming, error handling, and type annotations.

Why I Like Nox

Both nox and tox are multi-environment testing tools. This opinion piece by Hynek compares and contrasts them and explains why increasingly he is using nox.

What’s the Deal With CPython, Pypy, MicroPython, Jython…?

This comprehensive article introduces you to all the different ways you can Python. CPython isn’t the only choice, learn what else is out there and why you might choose an alternative.

Infinite AI Array

Learn about an insane library containing special lists and dicts so that any missed calls automatically go to GPT3 and add a predictive value in its place.

Towards a New SymPy

SymPy is a Computer Algebra System, meaning it does math on symbolic concepts. This can provide for a lot more accuracy than typical floating point mathematics found in numeric based systems. This is part 1 of a multi-part article, explaining SymPy along with its recent improvements. Part 2 discusses how SymPy handles polynomials

The Right Way to Run Shell Commands From Python

These are all the options you have in Python for running other processes - the bad; the good; and most importantly, the right way to do it

Tips for Creating Effective Documentation?

Hidden Features of Python

Python is a powerful programming language that’s easy to learn and fun to play with. But beyond the basics, there are plenty of hidden features and tricks. This article covers debugging regexes, the ellipsis, dir(), chaining comparisons, and more little nuggets you may not know.

Future of Pydantic and FastAPI

This interview with Samuel Colvin from Pydantic and Sebastián Ramírez from FastAPI took place at PyCon 2023 and covers the changes to Pydantic as part of its 2.0 release along with the impacts that has on libraries built on top of it.