Posts tagged: python

All posts with the tag "python"

275 posts latest post 2026-03-31
Publishing rhythm
Feb 2026 | 1 posts

I run tailwind for my personal blog, whenever I update it, pre-commit goes in and fixes end of file. I’m sick of these things fighting each other, since it is a generated app it is going to et ignored from pre-commit from now on.

python bindings for valkey, forked from redis.

one notable difference I see from redis is that you can install with libvalkey to autmatically get faster parsing support.

For faster performance, install valkey with libvalkey support, this provides a compiled response parser, and for most cases requires zero code changes. By default, if libvalkey >= 2.3.2 is available, valkey-py will attempt to use it for response parsing.

Markata DidYouMean

Coming in Markata 0.9.1 is far better documentation. i.e. Documentation that actually exists for everything. As part of poking around I realized that I often go to look up the docs for a plugin and forget that the path is /markta/plugins/feeds, sometimes I might try /markata/feeds or /plugins/feeds.py or /feeds or I might even forget the plugin name exactly and try something like feed and get a 404. So I added a didyoumean plugin to markata that takes care of this.

screenshot-2025-01-31T14-53-31-264Z.png

I made a quick recording of this early feature, pay close attention to the url as it...

...

2 min read

I came accross from_attributes today it allows creation of pydantic models from objects such as a sqlalchemy Base Model or while nesting pydantic models. I believe in the past I have ran into some inconsistencies with nesting pydantic models and I’ll bet one had from_attributes set and another did not.

Arbitrary class instances¶ (Formerly known as “ORM Mode”/from_orm).

Pydantic models can also be created from arbitrary class instances by reading the instance > attributes corresponding to the model field names. One common application of this functionality is integration with object-relational mappings (ORMs).

To do this, set the from_attributes config value to True (see the documentation on Configuration for more details).

...

nvim-manager

I recently built a cli application as a nearly-one-shot-app called nvim-manager. It manages your nvim dotfiles install.

screenshot-2025-01-31T21-21-40-707Z.png

nvim-manager allows you to install pinned versions of your dotfiles, your friends dotfiles, and distros in ~/.config. This allows you to have stable versions that will not break installed while you change things.

...

one-shot-s3-cleanup

So I made a mistake in an app I am working on and ended up creating thumbnails of thumbnails, and thumbnails of thumbnails of thumbnails… etc. I was able to delete them all, but I wanted to make a one-shot script to do it.

I got the idea of the one shot app from Simon Willison and replicated his setup in a chatgpt project

a mistake was made in my s3 bucket and I've created a bunch of extra files write a script that deletes all files that contain _thumb_thumb ⬢ [devtainer] ❯ aws s3 ls s3://dropper 2024-12-29 14:32:32 16158 02271f4c-be18-4bea-b23e-d00f9fe42b9f.webp 2025-01-11 14:20:49 2878 02271f4c-be18-4bea-b23e-d00f9fe42b9f_thumb.webp 2025-01-11 14:21:17 2858...

...

Great list of 4 tips for running fastapi applications.

Fat routers with all of the logic built in makes them hard to test, hard to refactor, causes lots of duplication, and makes it hard to reuse the business logic code later in something like a cli application.

I really like this advice! He reccommends deploying as early as you can get a healthcheck live in your application. I’ve found too many times developers build something that is really hard, or impossible to deploy, when if they had tried to deploy early they would have spotted some easy to fix issues. This is less important if you are building out of a template that your team commonly deploys from, but very important with new patterns.

https://youtu.be/XlnmN4BfCxw?si=ks1wvmgDyoQLgrv2&t=1093

I’ve kinda fallen out of using direnv now that a lot of my projects use hatch, I generally just hatch shell into them. I just need to make sure I go through all of them and make my installer uv. Now I’ve been thinking about making uv my only needed dependency to run a python project and leaning more to something like uv run --with . uvicorn myapp --reload

thoughts 0.0.4

This is such an improvement to the backend of my website it warrants a blog post of celebration. For far too long I’ve been dealing with a tiny ass edit form on thoughts. I tend to not edit them, and try to get them right in one go. This is kinda the point of a thought, its a quick post meant to be the size of a tweet, but sometimes I’m leaving thoughts on a video or long post and want to make sure I have a good save point, but I just keep the thing in draft and hope I don’t loose if for far too long.

Let’s see this change in action!!

This is the tiny ass form nested deeply in the flow of the feed. When I made it I naively just swapped out the post itself with the edit form, and swapped the post back in after edit.

...