Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

None
TIL get-graphql-schema — The GraphQL schema language is a concise way to represent the available schema provided by a GraphQL endpoint. It looks something like this:
Sighting 3:43 PM — Hopkins' Rose Nudibranch, in Pescadero Point intertidal
Hopkins' Rose Nudibranch
Hopkins' Rose Nudibranch
None
TIL Opt-in integration tests with pytest --integration — For both [s3-credentials](https://github.com/simonw/s3-credentials) and [datasette-publish-fly](https://github.com/simonw/datasette-publish-fly) I have a need for real-world integration tests that actually interact with the underlying APIs (AWS or Fly) to create and destroy resources on those platforms.
Release sqlite-utils 3.22.1 — Python CLI utility and library for manipulating SQLite databases
Release s3-credentials 0.10 — A tool for creating credentials for accessing S3 buckets
Sighting 5:37 PM – 5:48 PM — Great Blue Heron, Great Egret, Common Raven, in San Mateo County, CA, US
Great Blue Heron
Great Blue Heron
Great Egret
Great Egret
Common Raven
Common Raven
Common Raven
Common Raven
None
TIL Using the undocumented Fly GraphQL API — [Fly](https://fly.io/) has a GraphQL API which is used by some of their own tools - I found it while [browsing around their code](https://github.com/superfly/flyctl/blob/603b0adccf5416188eabaa7dc73f9c0ec88fa6ca/api/resource_volumes.go#L5-L40) on GitHub.
Release datasette 0.60.1 — An open source multi-tool for exploring and publishing data
None
TIL Linking from /latest/ to /stable/ on Read The Docs — [Read The Docs](https://readthedocs.org/) has a handy feature where documentation for older versions will automatically link to the latest release, for example [on this page](https://docs.datasette.io/en/0.56/spatialite.html):
None
TIL Promoting the stable version of the documentation using rel=canonical — I was thinking about documentation SEO today. Like many projects, Datasette offers multiple versions of the documentation:
None
TIL Pixel editing a favicon with Pixelmator — I wanted to [add a favicon](https://github.com/simonw/datasette/issues/1603) to Datasette, using a PNG image served from `/favicon.ico` as suggested in [this article by Adam Johnson](https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-django-site/).
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.