Upgrading Python Packages (pip-tools and uv)

The django project announced some important security releases today. I have a few production applications running django, and while none of them were due for a release today, these updates seem like they could be necessary for me. And I had to look up how to update these when I’m not changing a version constraint, so I’m writing it down here in hopes that I’ll make it more memorable.
Read more →

Python Bindings for Ammonia (HTML sanitization library)

It’s not a super-frequent need for me, but sometimes I’d like to be able to accept markdown from users and include the rendered output on my site. This is risky, because markdown can include arbitrary html, and libraries that process it may not focus on making sure it’s safe to include in a site. For a while, bleach was the common recommendation, but it’s deprecated. Since then, the ammonia library, which is written in rust, has emerged as a good functional equivalent of bleach, with a very similar interface. Python bindings are available for that in NH3.
Read more →

xlsx-dict-reader 0.2.0, or, publishing to pypi in 2024

For the first time in quite a while, I caught the urge to publish a package to pypi today. The happy path for publishing a pure python package felt less obvious than I think it should’ve. Here’s what I did.
Read more →

Working on a Dependency Locally

My first open source contributions are old enough to have a beer in the US by now, as is my first python code. But I’ve always found it awkward and disruptive to patch, and contribute a patch back to a library that I’m using in a python project, especially when I’m working with virtualenv or similar setups. With poetry and git, I’ve finally settled on one I like, and I’m capturing it here for easy reference next time.

Poetry is, by quite some distance, my favorite way to manage python dependencies these days. But for modifying open source dependencies and contributing changes back, my workflow has always been awkward. I’ve often resorted to temporarily “vendoring” a project, or to awkward virtual environment manipulations. Here’s an easier way.

Read more →

A Nice Regex Tester I Keep Needing To Search For

About every two or three months I need to write a regular expression that’s complex enough I don’t get it correct on my first try. Then I search for this site, and wish I’d just started writing my expression there. I hope that writing it down and posting it here will help me remember that next time. If you’re havin' perl problems…
Read more →

Learning FastAPI (3): “Stock Toolkit”

“Stock Toolkit 3:” the front-end. Wherein I put together a relatively low-rent front-end for the API I just built using svelte and Tailwind CSS, still served up through uvicorn.
Read more →

Learning FastAPI (2): “Stock Toolkit”

I’m working on a small application to monitor and inspect stocks to learn some new-to-me development tools. Here are some details about that.
Read more →

FastAPI + Svelte

As I’ve been trying to update the tools I lean on for quick web things, I am really enjoying using FastAPI with Svelte. These are notes about the development setup that I currently like. Fair warning: this is not battle hardened yet. I’ve used it to make a couple of toys and like how it’s shaping up, though.
Read more →

Python and Google Sheets

Some pointers for accessing and manipulating Google Sheets using python in 2020
Read more →

A Comfortable Arduino Development Environment

Arduinos are fun, but the default software stack is frustrating. This is better.
Read more →