Posts tagged: python

All posts with the tag "python"

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

Copier has a few quirks with vcs that I just discovered by trying to test out some changes. I may have some config that I have long forgotten about somewhere deep in my dotfiles, I don’t think so, but id love to be wrong and corrected, please reach out.

I tried throwing everything at this template to make it work. I tried a bunch of flags that did not work. I tried making commits to the local repo to get rid of the dirty warning. I really wanted to test new changes locally without committing and pushing untested and potentially broken changes.

uvx copier copy ../markata-blog-starter . uvx copier copy gh:waylonwalker/markata-blog-starter@develop . uvx copier copy ../markata-blog-starter . -wlg --trust

What Works - –vcs-ref #

Finally after trying everything to get the local copy to work, and my guess of @branch not working I found this to work. It does require me to go to the repo on my develop branch.

uvx copier copy gh:waylonwalker/markata-blog-starter --vcs-ref develop .

...

The rich console is themeable, I’ve been a long time user of rich and had no Idea. You can define your own theme keywords and use them just like you use normal rich keywords in square brackets like'[bold red]'.

I’m trying to replace my usage of google inline search apps with real apps, today I used a stopwatch to time some things out at work by opening stopwatch. This was something I just wanted running in a tab on another screen, it was not timing running code or anything, I was using it as a reminder to check browser caches every 5 minutes or so for some testing.

So tonight I whipped up a stopwatch, clock and timer, all of which are using the wakelock API to keep the screen on while the app is running.

m9a devlog 1

It’s sad to see textualize.io close the doors, but textual is still alive and maintained as a n open source project. I tried to use it very early, and struggled, this was before docs and tutorials really existed, before a lot of the widgets and components existed. Then as we all do I got busy and moved on to other things in life and did not have the capacity to build TUIs.

I like tuis, I like staying in the terminal. I use lf daily to move files around when I want something more than mv and cp. I use k9s hourly to...

...

fix feed descriptions

Today I fixed a bug in markata that has been occurring for a few months where the description for posts come out as None if coming from cache, the issue was a pretty simple check and pull properly from cache. This fixes all the descriptions in feeds and metadata on the post.

While in there we went ahead and improved our get_description to more accurately return plain text without escaped characters, remove cutoff words, and add an elipsis if the description cuts off the text.

While I was there I made longer form posts, til, blog-post use the super description of 500 characters instead of the regular 120 character description.

I’ve been using ruff to lint my python code for quite awhile now, I was pretty early to jump on it after release. Some of my projects have had a nice force-single-line setting and some have not. I dug into the docs and it was not clear what I needed to make it work.

[tool.ruff] select = ['I'] # you probably want others as well [tool.ruff.isort] force-single-line = true

Turns out I was missing Isort in the select list.

Astral is doing great things in the python industry. They are disrupting entire categories of tools with extremely fast, easy to use, and feature rich alternatives that make it really hard to keep using the incumbent. So far I am seeing no signs of evil, sometimes with such a disrupter there is some sort of downside that make it hard to want to do the switch. In the interview they even mention things like leaning on lsp so that it works across all editors rather than building out vscode integrations that work for most developers. As a neovim user I greatly apreciate this.

ty, has a playground running at types.ruff.rs. You can edit code in there and see what the type checker results would be in browser. This looks good, excited to see it running in my lsp.

Here is an example where a Optional may not be defined.

Checking for existance before using it resolves the issue.

I was looking back at my analytics page today and wondered what were my posts about back at the beginning. My blog is managed by markata so I looked at a few ways you could pull those posts up. Turns out it’s pretty simple to do, use the markata map with a filter.

from markata import Markata m.map('title, slug, date', filter='date.year==2016', sort='date')

Result #

[ ('⭐ jupyterlab jupyterlab',...

...

Astral is working on some great things around python, they have created a high standard for python tooling built on rust that works really well, runs fast and covers everything in the space it resides in. ty appears to be their linter coming soon.

portal-platformer-devlog-1

Here is the current state of my platformer yet to really be named, I want to make something in between hollow knight and portal.

I made one once in make code arcace on a pybadge. It was quick and dirty, but fun to work on. It had the basic of blocks that I could move, blocks i could put a portal onto, and a goal for each level. Some levels you can just walk through and some levels required you to really think about where to place the portal.

So this version of the game is a least 2 years in the making, I open it every few months give it a day or two and move on. Its mostly something that I work on with my son. He really likes to jump around on projects so its hard to make real progress on something, but we are hitting an age where he is able to come back to projects a little better.

...

I think I’m getting really close to having a good workflow setup for using pyapp. Such an amazing project to allow developers to create applications in python without passing on the hassle of python and managing installs to the user.

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).

...