Simon Willison’s Weblog

Newsletter
Atom feed

Elsewhere

Filters: Sorted by date

None
TIL Helper function for pagination using AWS boto3 — I noticed that a lot of my boto3 code in [s3-credentials](https://github.com/simonw/s3-credentials) looked like this:
None
TIL json_extract() path syntax in SQLite — Several of the [SQLite JSON functions](), such as `json_extract()` and `json_array_length()`, take a path argument. This uses custom syntax along the lines of `$.a[2].b`, as described [in the documentation here](https://sqlite.org/json1.html#path_arguments).
Release s3-credentials 0.9 — A tool for creating credentials for accessing S3 buckets
None
TIL Streaming indented output of a JSON array — I wanted to produce the following output from a command-line tool:
None
TIL JavaScript date objects — A few notes on JavaScript `Date` object, based on trying to do some basic things with them in Observable notebooks.
None
TIL Configuring Dependabot for a Python project — GitHub's Dependabot can automatically file PRs with bumps to dependencies when new versions of them are available.
Sighting 4:06 PM – 4:18 PM — Common Raven, Willet, in San Mateo County, CA, US
Common Raven
Common Raven
Common Raven
Common Raven
Willet
Willet
Willet
Willet
Release datasette-pretty-traces 0.4 — Prettier formatting for ?_trace=1 traces
Release datasette 0.60 — An open source multi-tool for exploring and publishing data
Release datasette-graphql 2.0.1 — Datasette plugin providing an automatic GraphQL API for your SQLite databases
Release sqlite-utils 3.22 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 3.21 — Python CLI utility and library for manipulating SQLite databases
None
TIL Testing a Click app with streaming input — For [sqlite-utils#364](https://github.com/simonw/sqlite-utils/issues/364) I needed to write a test for a [Click](https://click.palletsprojects.com/) app which dealt with input streamed to standard input. I needed to run some assertions during that process, which ruled out the usual [CliRunner.invoke()](https://click.palletsprojects.com/en/8.0.x/testing/) testing tool since that works by running the command until completion.
None
TIL Writing pytest tests against tools written with argparse — I usually build command-line tools using [Click](https://click.palletsprojects.com/) (and my [click-app](https://github.com/simonw/click-app) cookiecutter template), which includes a really nice [set of tools](https://click.palletsprojects.com/en/8.0.x/testing/) for writing tests.
Release stream-delay 0.1 — Stream a file or stdin one line at a time with a delay
Sighting 4:43 PM – 5:30 PM — Northern Elephant Seal, Brewer's Blackbird, in Año Nuevo State Reserve, CA, US
Brewer's Blackbird
Brewer's Blackbird
Northern Elephant Seal
Northern Elephant Seal
Northern Elephant Seal
Northern Elephant Seal
Northern Elephant Seal
Northern Elephant Seal
Release sqlite-utils 3.20 — Python CLI utility and library for manipulating SQLite databases
None
TIL Adding a CORS policy to an S3 bucket — Amazon S3 buckets that are configured to work as public websites can support CORS, allowing assets such as JavaScript modules to be loaded by JavaScript running on other domains.
Sighting 11:58 AM – 12:16 PM — Northern Elephant Seal, Southern Sea Otter, in Monterey Bay Area, CA, US
Northern Elephant Seal
Northern Elephant Seal
Southern Sea Otter
Southern Sea Otter
A two story orange-pink-brown building with a sign that says Shakespeare Socity of America, New Shakespeare Sanctuary
Museum Shakespeare Society of America — 7981 Moss Landing Road, Moss Landing, CA 95039
Sighting 11:16 AM – 2:25 PM — Southern Sea Otter, Harbor Seal, Snowy Egret, Turkey Vulture, Great Egret, in Monterey Bay Area, CA, US
Harbor Seal
Harbor Seal
Snowy Egret
Snowy Egret
Southern Sea Otter
Southern Sea Otter
Southern Sea Otter
Southern Sea Otter
Turkey Vulture
Turkey Vulture
Great Egret
Great Egret
Sighting 12:06 PM – 4:23 PM — Humpback Whale, California Sea Lion, Great Blue Heron, in Monterey Bay Area, CA, US
Humpback Whale
Humpback Whale
Humpback Whale
Humpback Whale
California Sea Lion
California Sea Lion
Great Blue Heron
Great Blue Heron
None
TIL WebAuthn browser support — I [started exploring](https://twitter.com/simonw/status/1476249939516616704) **[WebAuthn](https://webauthn.guide/)** today - a set of browser standards that adds support for both Yubikey 2FA hardware devices and "platform" authentication using things like Touch ID and Face ID.
None
TIL kubectl proxy — Learned about this today as a way of accessing the Kubernetes REST API.
None
TIL Transferring a GitHub issue from a private to a public repository — I have my own private `notes` repository where I sometimes create research threads. Occasionally I want to transfer these to a public repository to publish their contents.
Release datasette-tiddlywiki 0.1 — Run TiddlyWiki in Datasette and save Tiddlers to a SQLite database
None
TIL Adding a robots.txt using Cloudflare workers — I got an unexpected traffic spike to https://russian-ira-facebook-ads.datasettes.com/ - which runs on Cloud Run - and decided to use `robots.txt` to block crawlers.
Release asyncinject 0.2 — Run async workflows using pytest-fixtures-style dependency injection
None
TIL Annotated explanation of David Beazley's dataklasses — David Beazley [on Twitter](https://twitter.com/dabeaz/status/1472742536649351173):