Simon Willison’s Weblog

Subscribe

November 2021

60 posts: 5 entries, 9 links, 3 quotes, 43 beats

Nov. 1, 2021

Release datasette-jupyterlite 0.1a0 — JupyterLite as a Datasette plugin

Nov. 2, 2021

Release datasette-notebook 0.1a2 — A markdown wiki and dashboarding system for Datasette
Release datasette-notebook 0.2a0 — A markdown wiki and dashboarding system for Datasette

Nov. 3, 2021

TIL Using VCR and pytest with pytest-recording — [pytest-recording](https://github.com/kiwicom/pytest-recording) is a neat pytest plugin that makes it easy to use the [VCR library](https://vcrpy.readthedocs.io/), which helps write tests against HTTP resources by automatically capturing responses and baking them into a YAML file to be replayed during the tests.
TIL Quick and dirty mock testing with mock_calls — I needed to write a test that checked for a really complex sequence of mock calls for [s3-credentials#3](https://github.com/simonw/s3-credentials/issues/3).
Release s3-credentials 0.1 — A tool for creating credentials for accessing S3 buckets
Release s3-credentials 0.2 — A tool for creating credentials for accessing S3 buckets

s3-credentials: a tool for creating credentials for S3 buckets

Visit s3-credentials: a tool for creating credentials for S3 buckets

I’ve built a command-line tool called s3-credentials to solve a problem that’s been frustrating me for ages: how to quickly and easily create AWS credentials (an access key and secret key) that have permission to read or write from just a single S3 bucket.

[... 1,618 words]

Release s3-credentials 0.3 — A tool for creating credentials for accessing S3 buckets

Nov. 4, 2021

Release s3-credentials 0.4 — A tool for creating credentials for accessing S3 buckets

How to build, test and publish an open source Python library

Visit How to build, test and publish an open source Python library

At PyGotham this year I presented a ten minute workshop on how to package up a new open source Python library and publish it to the Python Package Index. Here is the video and accompanying notes, which should make sense even without watching the talk.

[... 2,055 words]

Nov. 5, 2021

Weeknotes: datasette-jupyterlite, s3-credentials and a Python packaging talk

Visit Weeknotes: datasette-jupyterlite, s3-credentials and a Python packaging talk

My big project this week was s3-credentials, described yesterday—but I also put together a fun expermiental Datasette plugin bundling JupyterLite and wrote up my PyGotham talk on Python packaging.

[... 476 words]

Release datasette-jupyterlite 0.1a1 — JupyterLite as a Datasette plugin

An oral history of Bank Python (via) Fascinating description of a very custom Python environment inside a large investment bank—where all of the code lives inside the Python environment itself, everything can be imported into the same process and a directed acyclic graph engine implements Excel-style reactive dependencies. Plenty of extra flavour from people who’ve worked with this (and related) Python systems in the Hacker News comments.

# 5:18 am / python

A half-hour to learn Rust. I haven’t tried to write any Rust yet but I occasionally find myself wanting to read it, and I find some of the syntax really difficult to get my head around. This article helped a lot: it provides a quick but thorough introduction to most of Rust’s syntax, with clearly explained snippet examples for each one.

# 5:21 am / rust

TIL Basic Datasette in Kubernetes — This recipe for deploying the official `datasetteproject/datasette` container in Kubernetes just worked for me. It uses an interesting (possibly nasty?) trick to install plugins and download a SQLite database file on container startup, without needing to bake a brand new container image.

Nov. 6, 2021

AWS IAM definitions in Datasette (via) As part of my ongoing quest to conquer IAM permissions, I built myself a Datasette instance that lets me run queries against all 10,441 permissions across 280 AWS services. It’s deployed by a build script running in GitHub Actions which downloads a 8.9MB JSON file from the Salesforce policy_sentry repository—policy_sentry itself creates that JSON file by running an HTML scraper against the official AWS documentation!

# 3:47 am / aws, datasette

Nov. 7, 2021

TIL Annotated code for a demo of WebSocket chat in Deno Deploy — Deno Deploy is a hosted Deno service that promises [a multi-tenant JavaScript engine running in 25 data centers across the world](https://deno.com/blog/deploy-beta1/).

Deno Deploy Beta 3 (via) I missed Deno Deploy when it first came out back in June: it’s a really interesting new hosting environment for scripts written in Deno, Node.js creator Ryan Dahl’s re-imagining of Node.js. Deno Deploy runs your code using v8 isolates running in 28 regions worldwide, with a clever BroadcastChannel mechanism (inspired by the browser API of the same name) that allows instances of the server-side code running in different regions to send each other messages. See the “via” link for my annotated version of a demo by Ondřej Žára that got me excited about what it can do.

# 1:51 am / javascript, ryan-dahl, v8, deno

Nov. 9, 2021

TIL Using Tesseract.js to OCR every image on a page — Pasting this code into a DevTools console should load [Tesseract.js](https://github.com/naptha/tesseract.js) from a CDN, loop through every image loaded by that page (every PNG, GIF, JPG or JPEG), run OCR on them and output the result to the DevTools console.

Nov. 10, 2021

One could never price a thirty year mortgage in bitcoin because its volatility makes it completely unpredictable and no sensible bank could calculate the risk of covering that debt. A world in which Elon Musk can tweet two emojis and your home depreciates 80% in value is a dystopia.

Stephen Diehl

# 7:45 am / bitcoin

Nov. 11, 2021

Release s3-credentials 0.5 — A tool for creating credentials for accessing S3 buckets

Nov. 12, 2021

Release git-history 0.1 — Tools for analyzing Git history using SQLite
Release git-history 0.2 — Tools for analyzing Git history using SQLite
Release git-history 0.2.1 — Tools for analyzing Git history using SQLite
Release git-history 0.3 — Tools for analyzing Git history using SQLite
Release git-history 0.3.1 — Tools for analyzing Git history using SQLite

Nov. 13, 2021

Datasette is four years old today. I marked the occasion with a short Twitter thread about the project so far.

# 6:14 pm / datasette

Nov. 14, 2021

Release datasette-hello-world 0.1.1 — The hello world of Datasette plugins
Release datasette 0.59.2 — An open source multi-tool for exploring and publishing data

2021 » November

MTWTFSS
1234567
891011121314
15161718192021
22232425262728
2930