python

105 posts tagged “python”.

  1. 2023
  2. Decorators with optional arguments

    sqlite-utils provides a decorator for registering custom Python functions that looks like this: I wanted to add an optional deterministic=True parameter to the decorator.

    1 min read
  3. Building a specific version of SQLite with pysqlite on macOS/Linux

    I wanted the ability to test my Python software against specific version of SQLite on macOS. I found a way to do that using pysqlite3.

    1 min read
  4. Using uv to develop Python command-line applications

    I finally figured out a process that works for me for hacking on Python CLI utilities using uv to manage my development environment, thanks to a little bit of help from Charlie Marsh.

    3 min read
  5. A tip for debugging pytest-httpx

    I use pytest-httpx in a bunch of my projects. Occasionally I run into test failures like this one, which can sometimes be really hard to figure out: Today I figured out a pattern for investigating…

    1 min read
  6. A simple Python implementation of the ReAct pattern for LLMs

    A popular nightmare scenario for AI is giving it access to tools, so it can make API calls and execute its own code and generally break free of the constraints of its initial environment.

    1 min read