Installing lxml for Python on an M1/M2 Mac
I ran into this error while trying to run on an M2 Mac, inside a virtual environment I had intitially created using : I eventually realized that this was using the system Python - - which doesn't have…
105 posts tagged “python”.
I ran into this error while trying to run on an M2 Mac, inside a virtual environment I had intitially created using : I eventually realized that this was using the system Python - - which doesn't have…
I hit a bug today where I had defined a Click option called but in doing so I replaced the Python bulit-in function: This inspired me to finally figure out how Click function argument names work.
I found myself wanting to compare the version numbers , and the in Python code, in order to mark a test as skipped if the installed version of Datasette was pre-1.0.
I wanted a mechanism to check if a given Python object was "callable" - could be called like a function - or "async callable" - could be called using .
I was researching password hashing for datasette-auth-passwords. I wanted very secure defaults that would work using the Python standard library without any extra dependencies.
GitHub Codespaces provides full development environments in your browser, and is free to use with anyone with a GitHub account.
When writing a test for datasette-leaflet-freedraw I realized I didn't have a simple tiny recipe for creating an in-memory SpatiaLite database in Python.
Datasette currently has a few API internals that return objects. I was thinking about how this might work in the future - if Datasette ever expands beyond SQLite (plugin-provided backends for…
TIL the Python standard library struct module defaults to interpreting binary strings using the endianness of your machine. Which means that this code: Behaves differently on big-endian v.s.
tree-sitter is a "parser generator tool and an incremental parsing library". It has a very good reputation these days.
I previously wrote about Packaging a Python CLI tool for Homebrew. I've now figured out a pattern for automatically updating those formulas over time, using GitHub Actions.
Take for example an API endpoint that returns something like this: I want to efficiently assert against the second two keys, but I don't want to hard-code the SQLite version into my test in case it…
I used to use a combination of and in all of my Python GitHub Actions projects in order to install Python dependencies via a cache, rather than hitting PyPI to download copies every time.
TLDR: Use I'm writing a Datasette plugin that handles an uploaded file, borrowing the Starlette mechanism for handling file uploads, documented here.
I used python-build-standalone for this, which provides a version of Python that is designed for easy of bundling - it's also used by PyOxidize.
I decided to enforce that all code examples in the Datasette documentation be formatted using Black. Here's issue 1718 where I researched the options for doing this. I found the blacken-docs tool.
I recently found out modern browsers include a JavaScript API for creating public/private keys for cryptography.
When building the –sniff option for (which attempts to detect the correct CSV delimiter and quote character by looking at the first 2048 bytes of a CSV file) I had the need to peek ahead in an…
— A one-liner to output details of the current Python's SQLite 2025-10-19 Farshid Ashouri TIL,sqlite In investigating llm/issues/164 I found myself needing to know more precise details of the Python…
I've been using Locust recently to run some load tests - most significantly these tests against SQLite running with Django and this test exercising Datasette and Gunicorn.