Posts tagged: python

All posts with the tag "python"

268 posts latest post 2026-03-31
Publishing rhythm
Jan 2026 | 3 posts

astral silently dropped a clever uvx.sh to help builders reach a wider audience, no longer does a user need to have python installed prior to installing a python cli. It does have a hard requirement on having curl or wget available.

I really wish I would have got this right a few years ago. Theres a couple of flags I had to use to get mdformat to do hard wraps at 80 characters and not wreck tables. This mix of flags and plugins is workign really well for me so far.

mdfmt() { uvx \ --with "mdformat-ruff" \ --with "mdformat-beautysh" \ --with "mdformat-web" \ --with "mdformat-config" \ --with "mdformat-gfm" \ --with "mdformat-front-matters" \ --with "mdformat-wikilink" \ --with "mdformat-simple-breaks" \ mdformat \ --wrap 80 \ --end-of-line lf \ --codeformatters python \ --codeformatters bash \ "$@" }

And as pre-commmit.

My First Agentic Workflow

In early 2026 I’m trying to lean more in to agentic workflows. The tools are not only better than they were a year ago, but available to me now unlike they were 6 months ago.

At home I’m using opencode, the tooling here is fantastic. LSP incide of these things is incredible, mcp is fine when its needed. The free models it gives you are impressively good for free models, but they are still not the big models from the big providers. I’m using what work gives me, they give me a tool with access to good models, the models are great, the tools kinda suck. I’m being vaugue here because I dont share real work details.

I’ve been skeptical the whole way, I see ai being a very useful tool. I remain 2 min read

Dont Trust Users Tokens

User states: Upon picking up an old project and trying to install pip says “cannot find a version to satisfy”

I’ve got this, I’ve had this a hundred times before it’s a python version, a rogue package, maybe a yank from the pinned deps. I pop open the project get us on the same commit. I get a different error, make a few updates and we are good, except the user gets the same error from the start.

They never saw the error I did, and my fix did not magically resolve their error. We circle all the things it could be for hours. I consistently wipe my venv, and recreate with ease, send them the commands I ran to no avail. Something is up and I can’t put my finger on it. We’ve checked all the things and inched as close as we can to running everything exactly the same.

...

2 min read

Characters

Character Profile

Name: Graybeard McGee
Age: 64 years old
Role: Senior Systems Architect (counting down to retirement)

Background

...

Og-Sample

I’m making an effort to make my og images better yet again, I’m going for that next 10% better. I really like my og images, but there are some title sizes that overflow. This page is a page to help debug. How I make these og images is for another day.

I use my own static site generator markata. I can use it to generate a list of posts wrapped in their og image. I use itertools to do a groupby so that I can do roughly every 5 characters larger, and see a wide variety of sizes.

from markata import Markata from itertools import groupby markata = Markata() lens = [{'length':...

...

1 min read

One Year Of Shots

I’ve been running my shot scraper api for a year now. It creates og images for my website and thumbnails for my [[ reader ]] using a headless chrome instance.

a histogram of shot counts by day

You can see in the histogram that I’ve had a few big spike days, This has been mostly for days that I’ve integrated into a new service or changed the endpoint. On February 13, 2025 I swapped over from using the post to using template specific to open graph images.

...

2 min read

Workspaces V1

I’ve been using the same workflow since 2020, my post How I navigate tmux in 2021 is still very accurate to my workflow. It’s been great, but is a starting to feel like it needs some work. It feels like enough time has passed that I can make some significant improvements.

1 min read

setting COLUMNS env var to a number greater than 0 will make the terminal resize to that number of columns.

COLUMNS=80 uvx --from rich-cli rich myscript.py

I discovered this when I was trying to make a low effort readme generated from the code, but did not depend on the size of terminal it was ran on.

I found an interesting side effect of manually running my script to generate [[ stars ]] posts is that you get notified when one gets renamed. Today I noticed that Ned Batchelder created a coveragepy org.

Today I learned how to use AliasChoices with pydantic settings to setup common aliases for the same field. I’m bad about remembering these things, and hate looking up the docs. I like things to be intuitive and just do the thing I want it to do. Especially when they get configured through something like yaml and do not have a direct lsp look up right from my editor. I figured out how to support what might be common aliases for a storage directory. These can be set up as environment variables and used by config.

Mcat Anything

I’ve long looked for a way to cat anything in the terminal. I’m am terminally in the terminal. I manage all of my projects, code, website, notes, files, servers, infrastructure, almost everything from the terminal. I occasionally open a file manager, mostly at home, only so that I can browse images.

Compounding my issue, I’m a tmux user. It works great for me, and I barely have to think about it at this point. The keybindings are second nature to me. I can go between server, terminal, nvim, and between projects instantly, no loader, no lag, no animation, it just works for everything that really matters to me for really getting things done.

mcat is a new tool that seems like it can cat anything in the terminal, code, files, images, markdown, markdown with images, and even video, without leaving tmux!

...

2 min read

Missing Thoughts

No one is perfect, this is why we have things like checkpoints or gates in the form of pull requests, linting, type checking, and tests. What happens when you work on small side projects by yourself that try to be content focused? What happens when you end up building a lot of the tech under that site and build it on the bleeding edge of all the tech you make? They are likely missing these things and occasionally there are some periods of regression. This is one reason I really like the term digital garden to describe one’s small corner of the internet where they share their thoughts.

There will be regressions

There were signs, signs I did not notice

...

3 min read

Rules

There is no such thing as magic Be ready to roll back live deployments If CI was too fast be suspicious
1 min read

I often want to run an s3 sync in an isolated environment, I don’t want to set any environment variables, I don’t want anything secret in my history, and I don’t want to change my dotenv into something that exports variables, I just want s3 sync to work. dotenv run is the tool that I’ve been using for this, and this uv one liner lets it run fully isolated from the project.

uv tool run --from 'python-dotenv[cli]' dotenv run -- uv tool run --from awscli aws s3 sync s3://bucket data

multi-line #

same thing formatted for readability

uv tool run \ --from 'python-dotenv[cli]' \ dotenv run -- \ uv tool run \ --from awscli \ aws s3 sync s3://dropper data

There are probably 10 ways to skin this cat, but this is what I did, if you have a better way let me know, I’ll link you below.