Closed simonw closed 2 years ago
The implementation of this can be an almost exact copy of Datasette's, which was added in this commit: https://github.com/simonw/datasette/commit/01fe5b740171bfaea3752fc5754431dac53777e3
Current code for that is here: https://github.com/simonw/datasette/blob/0.62/datasette/cli.py#L319-L340 - which is improved to use the from runpy import run_module
function.
With the addition of
--functions
in:471
In addition to the existing
convert
command, there are now very good reasons to want to install additional packages into the same virtual environment assqlite-utils
itself, to allow them to be used with those features.This isn't easy if you installed the tool with
pipx
orbrew install sqlite-utils
.Datasette solved this problem with the
datasette install
command:sqlite-utils
could benefit from the same idea.