simonw / datasette

An open source multi-tool for exploring and publishing data
https://datasette.io
Apache License 2.0
9.59k stars 691 forks source link

SQLITE_EXTENSIONS environment variable should be DATASETTE_LOAD_EXTENSION #2424

Closed simonw closed 2 months ago

simonw commented 2 months ago

Spotted in:

https://github.com/simonw/datasette/blob/0bc6a2af89a2201d55650c47f8cdbf8aa26255d4/datasette/cli.py#L84-L91

It's inconsistent with our other environment variables, which all use the DATASETTE_ prefix.

simonw commented 2 months ago

SQLITE_EXTENSIONS was never mentioned in our documentation, so this is a very minor breaking change (and good for pre-1.0).

simonw commented 2 months ago

Actually DATASETTE_LOAD_EXTENSION is a better name, it matches the --load-extension option.

simonw commented 2 months ago

Tested like this:

DATASETTE_LOAD_EXTENSION=spatialite datasette --get /-/versions.json

Returned ... {"spatialite_version": "5.1.0", "spatialite_target_cpu": "arm64-apple-darwin22.4.0"...

simonw commented 2 months ago

Documented here: https://docs.datasette.io/en/latest/cli-reference.html#environment-variables