Issue #676

Bytearray, Underground Scripts, DjangoCon, and More

April 8, 2025

Bytearray, Underground Scripts, DjangoCon, and More
#676 – APRIL 8, 2025 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Python’s Bytearray: A Mutable Sequence of Bytes
In this tutorial, you’ll learn about Python’s bytearray, a mutable sequence of bytes for efficient binary data manipulation. You’ll explore how it differs from bytes, how to create and modify bytearray objects, and when to use them in tasks like processing binary files and network protocols.
REAL PYTHON

Quiz: Python’s Bytearray
REAL PYTHON

10 Insane Underground Python Scripts
Imagine if your Python script could cover its tracks after execution or silently capture the screen. This post has 10 short scripts that do tricky things.
DEV.TONAPPY TUTS

A Dev’s Guide to Surviving Python’s Error zoo 🐍
Exceptions happen—but they don’t have to wreck your app (or your day). This Sentry guide breaks down common Python errors, how to handle them cleanly, and how to monitor your app in production—without digging through logs or duct-taping try/excepts everywhere →
SENTRYsponsor

Talks I Want to See at DjangoCon US 2025
Looking for a talk idea for DjangoCon US? Tim’s post discusses things he’d like to see at the conference.
TIM SCHILLING

Django Security Releases: 5.1.8 and 5.0.14
DJANGO SOFTWARE FOUNDATION

Django 5.2 Released
DJANGO SOFTWARE FOUNDATION

Quiz: How to Strip Characters From a Python String
REAL PYTHON


Articles & Tutorials


REST in Peace? Django’s Framework Problem
The Django Rest Framework (DRF) has recently locked down access to its issues and discussion boards due to being overwhelmed. What does this mean for larger open source projects that become the victims of their own success? The article’s good points notwithstanding, the DRF is still doing releases.
DANLAMANNA.COM

Developing and Testing Python Packages With uv
Structuring Python projects can be confusing. Where do tests go? Should you use a src folder? How do you import and test your code cleanly? In this post, Michael shares how he typically structures Python packages using uv, clarifying common setup and import pitfalls.
PYBITES • Shared by Bob Belderbos

Building a Code Image Generator With Python
In this step-by-step video course, you’ll build a code image generator that creates nice-looking images of your code snippets to share on social media. Your code image generator will be powered by the Flask web framework and include exciting packages like Pygments and Playwright.
REAL PYTHON course

Algorithms for High Performance Terminal Apps
This post by one of the creators of Textual talks about how to write high performing terminal applications. You may also be interested in the Talk Python interview on the same topic.
WILL MCGUGAN

Migrate Django ID Field From int to big int
If you’re responsible for a project based on an older version of Django, you may be using int based primary keys. This post talks about how to transition to a 4-byte integer, used in more recent versions of Django, with minimal down time.
CHARLES OLIVEIRA

Shadowing in Python Gave an UnboundLocalError
Reusing a variable name to shadow earlier definitions normally isn’t a problem, but due to how Python scopes, it occasionally gives you an exception. This post shows you just such a case and why it happened.
NICOLE TIETZ-SOKOLSKAYA

If I Were Starting Out Now…
Carlton Gibson gives advice and what he’d do if he was starting his development career now. It even starts with the caveat about why you maybe shouldn’t listen to him?
CARLTON GIBSON

Terrible Horrible No Good Very Bad Python
This quick post shows some questionable code and asks you to predict what it does. Don’t forget to click the paragraphs at the bottom if you want to see the answers.
JYNN NELSON

How to Report a Security Issue in an Open Source Project
So you’ve found a security issue in an open source project – or maybe just a weird problem that you think might be a security problem. What should you do next?
JACOB KAPLAN-MOSS


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 →

fastmcp: Build Model Context Protocol Servers
GITHUB.COM/JLOWIN

coredumpy: Saves Your Crash Site for Post-Mortem Debugging
GITHUB.COM/GAOGAOTIANTIAN • Shared by Tian Gao

System-Wide Package Discovery, Validation, and Allow-Listing
GITHUB.COM/FETTER-IO • Shared by Christopher Ariza

django-typer: Use Typer for Django Management Commands
GITHUB.COM/DJANGO-COMMONS

Wikipedia-API: Python Wrapper for Wikipedia
GITHUB.COM/MARTIN-MAJLIS

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
April 9, 2025

Python Atlanta
April 10 to April 11, 2025

PyTexas 2025
April 11 to April 14, 2025

SpaceCon 2025
April 11 to April 12, 2025

DFW Pythoneers 2nd Saturday Teaching Meeting
April 12, 2025

Workshop: Creating Python Communities
April 15 to April 16, 2025
Happy Pythoning!
Copyright © 2025 PyCoder’s Weekly, All rights reserved.