Hi, I'm Anthony

Open-Source contributor, author, and Python Engineer at Microsoft. I write about Python performance, compiler internals, and low-level optimization. Currently researching a PhD in Computer Science at Macquarie University.

Anthony Shaw
CPython Internals Book

CPython Internals

Get your guided tour through the Python interpreter. Unlock the inner workings of the Python language, compile the interpreter from source, and participate in the development of CPython. Once you see how Python works at the interpreter level, you can optimize your applications and fully leverage the power of Python.

Best Seller Also in Korean and Mandarin Published 2021

Projects

Open-Source projects I'm currently working on

Blog

Sep 2, 2025 15 min read

Python has had async for 10 years — why isn't it more popular?

Async programming was introduced to Python in 2015 with asyncio. A decade later, most Python code is still synchronous. We explore the challenges, misconceptions, and ecosystem barriers that have limited async adoption.

Python Async
Jan 9, 2024 12 min read

Python 3.13 gets a JIT

CPython 3.13 introduces an experimental JIT compiler using a novel "copy-and-patch" technique. We break down how it works, what performance gains to expect, and what this means for the future of Python performance.

Python JIT Performance
Dec 20, 2023 18 min read

Fine Tuning Python WSGI and ASGI applications

Choosing the right worker count, timeout settings, and process model for Gunicorn, Uvicorn, and Hypercorn can dramatically impact your Flask, Django, or FastAPI application's performance. Here's how to tune them.

Django FastAPI Performance
Oct 4, 2024 20 min read

Embedding Python into your .NET project with CSnakes

A deep-dive into CSnakes, a new tool for embedding Python into C# applications. Learn how to call Python code from .NET with full type safety, NumPy integration, and seamless interop using Python's C-API.

Python .NET C#
Nov 18, 2023 14 min read

Running Python Parallel Applications with Sub Interpreters

Python 3.12 introduces per-interpreter GIL, enabling true parallelism. We explore how to use sub-interpreters for parallel web workers, the current limitations, and where this technology is headed.

Python Concurrency GIL
May 15, 2019 10 min read

Has the Python GIL been slain?

The Global Interpreter Lock has been Python's most controversial feature for decades. With sub-interpreters and free-threading on the horizon, we explore what's changing and whether the GIL's days are truly numbered.

Python GIL CPython
Nov 19, 2024 12 min read

Performance Benchmarking LLM Models

A comprehensive guide to benchmarking local LLM models. Compare throughput, latency, and resource usage across different models and hardware configurations.

LLM AI Performance
Nov 12, 2024 10 min read

Using LLMs in GitHub Actions

Learn how to integrate LLM capabilities directly into your CI/CD pipelines. Automate code reviews, generate documentation, and more with GitHub Actions.

LLM GitHub Actions DevOps
Aug 2024 15 min read

Using .NET Aspire Dashboard for Python OpenTelemetry

The .NET Aspire dashboard is a fantastic tool for visualizing OpenTelemetry data. Here's how to use it with your Python applications for distributed tracing.

Python OpenTelemetry .NET
2024 12 min read

CJK (Chinese, Japanese, Korean) LLM Best Practices

Working with LLMs in CJK languages presents unique challenges. Learn best practices for tokenization, prompting, and evaluation when building multilingual AI applications.

LLM i18n AI
2024 15 min read

Can Reasoning Models Optimize 20-Year-Old Code?

An experiment using modern AI reasoning models to optimize legacy Python code. Exploring the limits and capabilities of AI-assisted code refactoring.

AI Python Refactoring
May 17, 2022 10 min read

Python match statement

Python 3.10 introduced structural pattern matching with the match statement. Learn how to use it effectively for cleaner, more expressive code.

Python Python 3.10
Mar 10, 2022 12 min read

PyPy in Production

A real-world case study of deploying PyPy in production. Benchmarks, gotchas, and lessons learned from replacing CPython with PyPy.

Python PyPy Performance
Aug 5, 2021 8 min read

Async Test Patterns for Pytest

Testing async code can be tricky. Here are patterns and examples for testing async functions effectively with pytest and unittest.

Python Pytest Async
Nov 11, 2020 15 min read

Running Python on .NET 5

An update on the Pyjion project - plugging a JIT into CPython using the .NET 5 CLR JIT compiler. Performance results and implementation details.

Python .NET JIT
Aug 18, 2020 20 min read

Writing Python Extensions in Assembly

A deep-dive into writing CPython extensions in x86-64 assembly. Learn about the Python C-API, calling conventions, and low-level optimization techniques.

Python Assembly C-API
Jul 22, 2020 12 min read

XSS Exploitation in Django Applications

A deep-dive on XSS vulnerabilities in Django applications. How to find them, exploit them for testing, and most importantly - how to fix them.

Security Django XSS
Jun 11, 2020 5 min read

Azure Pipelines Autocomplete in JetBrains IDEs

Get autocomplete and validation for Azure Pipelines YAML files in PyCharm, IntelliJ, WebStorm, and other JetBrains IDEs.

DevOps Azure IDE
May 28, 2020 10 min read

Learning Python from Scratch

If you want to learn Python, where do you start? 10 recommended resources for beginners, from interactive tutorials to project-based learning.

Python Beginners
Apr 13, 2020 25 min read

Django on Azure - Beyond "Hello World"

A complete tutorial on deploying a production-ready Django application on Microsoft Azure. Database setup, static files, CI/CD, and monitoring.

Django Azure DevOps
Dec 19, 2019 8 min read

My Favourite Python Stories of 2019

A curated collection of the best Python articles, talks, and projects from 2019. From performance improvements to community highlights.

Python Community
Jan 19, 2019 6 min read

A Letter to the Python Community in Africa

Celebrating the amazing Python community across Africa. Stories from PyCon events, growing user groups, and inspiring developers.

Python Community Africa
Jan 2, 2019 15 min read

Azure Pipelines with Python - by Example

A practical tutorial on Microsoft Azure Pipelines for Python projects. Testing, linting, building, and deploying with real-world examples.

Python Azure CI/CD
Dec 26, 2018 8 min read

5 Coding Projects to Do with Kids

Fun and educational coding projects to do with your children. From Scratch games to Python adventures - activities for all ages.

Education Kids
Jul 16, 2018 12 min read

Why is Python so slow?

A deep dive into what makes Python slower than compiled languages. Dynamic typing, the GIL, interpretation overhead, and what you can do about it.

Python Performance
Jun 18, 2018 15 min read

10 Common Security Gotchas in Python

Common security vulnerabilities in Python applications and how to avoid them. Input validation, injection attacks, cryptography mistakes, and more.

Python Security
May 7, 2017 10 min read

Tips for Getting a Raise

How salary increases work at most companies, how to navigate them, and practical advice for convincing your manager to pay you more.

Career Advice
2020 8 min read

My VS Code Setup

A walkthrough of my VS Code configuration for Python development. Extensions, themes, settings, and productivity tips.

VS Code Python IDE

Podcasts

Talking about Python on other people's shows