Posts tagged: python

All posts with the tag "python"

311 posts latest post 2026-07-10
Publishing rhythm
Feb 2026 | 1 posts
shot-scraper: automated screenshots for documentation, built on Playwright shot-scraper is a new tool that I’ve built to help automate the process of keeping screenshots up-to-date in my documentation. It also doubles as a scraping tool—hence the name—which I … Simon Willison’s Weblog · simonwillison.net An interesting way to build automatically annotaatd docs with arrows pointing to elements on a webpage.
External Link stackoverflow.com I went down the route of leveraging the extention in htmx, but later realized that this completely breaks browsers/users who do not wish to use javascript. While most of the web would feel quite broken with javascript disabled, I don’t want to contribute to that without good reason. Taking a second look into this issue, rather than using, and using as_form to get form data into a model keeps the nice DX fo everything being a pydantic model, but the site still works without js. with js htmx kicks in, you get a spa like experience by loading partials onto the page, and without, you just get a full page reload. the implementation # copied from https://stackoverflow.com/questions/60127234/how-to-use-a-pydantic-model-with-form-data-in-fastapi And the usage looks like
`ValueError: Constraint must have a name` in alembic 1.10.0 · Issue #1195 · sqlalchemy/alembic Describe the bug ValueError: Constraint must have a name in alembic 1.10.0. Expected behavior Migration succeeds. To Reproduce Please try to provide a Minimal, Complete, and Verifiable example, wit... GitHub · github.com After a nasty time with alembic upgrades, thoughts is about to get a new users table. This may have came from incorrectly setting up alembic for sqlite from the start, but I was able to fix the issue with this GitHub issue. The change I needed to make to get my migration to run.
DuckDB vs. MotherDuck: When to Move to the Cloud | Kestra DuckDB is fast and free. MotherDuck adds cloud storage, collaboration, and scale. Here kestra.io duckdb is a new in process database that has been making its rounds in analytics for its high performance in those applications. Mother duck is a centeralized server that brings manages storage, data sharing and an ide to duckdb.
Textual - Center things Textual is a TUI framework for Python, inspired by modern web development. Textual Documentation · textual.textualize.io How to center things in textual. Textual has a very unique way of styling text user interfaces for the terminal using css. If you know css it feels natural. @willmcgugan, has put together a great article on how to center things in textual here the final result
Textual - Using Rich Inspect to interrogate Python objects Textual is a TUI framework for Python, inspired by modern web development. Textual Documentation · textual.textualize.io I love rich inspect. It’s one of my most often used features of rich. It gives you a great human readable insight into python object instances. I have a pyflyby entry for it so that I can just run it ang get automatic imports. To not clash with the standard library inspect, which is quite useful on it’s own, I have aliased it to.
Header Parameters - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com Getting request headers in fastapi has a pretty nice stetup, it allows you to get headers values as function arguments, I was able to use headers to detect if a request was made from htmx or not. If the request was made from htmx, then we want a html format, otherwise I’m probably hitting the api programatically from something like or
sqlite-utils now supports plugins sqlite-utils 3.34 is out with a major new feature: support for plugins. sqlite-utils is my combination Python library and command-line tool for manipulating SQLite databases. It recently celebrated... Simon Willison’s Weblog · simonwillison.net As the title states sqlite-utils now supports plugins. I dug in just a bit and Simon implemented this completely with entrypoints, no framework or library at all.