Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

Release datasette-ripgrep 0.7 — Web interface for searching your code using ripgrep, built as a Datasette plugin
TIL Converting no-decimal-point latitudes and longitudes using jq — I had some data with weird co-ordinates in it:
TIL Flattening nested JSON objects with jq — I wanted to take a nested set of JSON objects and import them into a SQLite database using `sqlite-utils insert` - but I wanted to "flatten" some of the nested rows.
Release tableau-to-sqlite 0.2 — Fetch data from Tableau into a SQLite database
Release tableau-to-sqlite 0.1.1 — Fetch data from Tableau into a SQLite database
Release tableau-to-sqlite 0.1 — Fetch data from Tableau into a SQLite database
TIL Pretty-printing all read-only JSON in the Django admin — I have a bunch of models with JSON fields that are marked as read-only in the Django admin - usually because they're recording the raw JSON that was imported from an API somewhere to create an object, for debugging purposes.
TIL How to run MediaWiki with SQLite on a macOS laptop — Today I [got curious](https://twitter.com/simonw/status/1368414296888070146) about how MediaWiki records page history, so I started digging around and in the process figured out how to run it against a SQLite database on my macOS laptop!
TIL Show the timezone for datetimes in the Django admin — Django supports storing dates in a database as UTC but displaying them in some other timezone - which is good. But... by default datetimes are shown in the Django admin interface without any clue as to what timezone they are being displayed in.
TIL Writing tests for the Django admin with pytest-django — I'm using [pytest-django](https://pytest-django.readthedocs.io/) on a project and I wanted to write a test for a Django admin create form submission. Here's the pattern I came up with:
TIL Granting a PostgreSQL user read-only access to some tables — I wanted to grant a PostgreSQL user (or role) read-only access to a specific list of tables.
TIL Adding extra read-only information to a Django admin change page — I figured out this pattern today for adding templated extra blocks of information to the Django admin change page for an object.
Release flatten-single-item-arrays 0.1 — Given a JSON list of objects, flatten any keys which always contain single item arrays to just a single value
Release datasette-auth-github 0.13.1 — Datasette plugin that authenticates users against GitHub
Release datasette-block 0.1.1 — Block all access to specific path prefixes
Release datasette-block 0.1 — Block all access to specific path prefixes
Release github-contents 0.2 — Python class for reading and writing data to a GitHub repository
TIL Running tests against PostgreSQL in a service container — I wanted to run some Django tests - using `pytest-django` and with Django configured to pick up the `DATABASE_URL` environment variable via [dj-database-url](https://github.com/jacobian/dj-database-url) - against a PostgreSQL server running in GitHub Actions.
TIL Show the SQL schema for a PostgreSQL database — This took me longer to figure out than I care to admit.
Release csv-diff 1.1 — Python CLI tool and library for diffing CSV and JSON files
Release sqlite-transform 0.4 — Tool for running transformations on columns in a SQLite database
Release airtable-export 0.5 — Export Airtable data to YAML, JSON or SQLite files on disk
Release datasette-json-preview 0.3 — Preview of new JSON default format for Datasette
Release sqlite-utils 3.6 — Python CLI utility and library for manipulating SQLite databases
Release datasette 0.55 — An open source multi-tool for exploring and publishing data
Release datasette-graphql 1.4 — Datasette plugin providing an automatic GraphQL API for your SQLite databases
TIL Using sphinx.ext.extlinks for issue links — Datasette's [release notes](https://github.com/simonw/datasette/blob/main/docs/changelog.rst) are formatted using Sphinx. Almost every bullet point links to the corresponding GitHub issue, so they were full of lines that look like this:
TIL Loading radio.garden into SQLite using jq — http://radio.garden/ is an amazing website which displays a 3D globe covered in radio stations and lets you listen to any of them.
Release higher-lower 0.1 — Functions for finding numbers using higher/lower
Release download-tiles 0.4.1 — Download map tiles and store them in an MBTiles database

Beats

Years

Tags