I can expose ALL of Datasette's functionality on the command-line (without even running a web server) by adding --get and --post options to datasette serve.
datasette fixtures.db --get "/fixtures.json"
This would instantiate the Datasette ASGI app, run a fake request for /fixtures.json through it, dump the results out to standard output and quit.
A --post option could do the same for a POST request. Treating that as a stretch goal for the moment.
I can expose ALL of Datasette's functionality on the command-line (without even running a web server) by adding
--getand--postoptions todatasette serve.This would instantiate the Datasette ASGI app, run a fake request for
/fixtures.jsonthrough it, dump the results out to standard output and quit.A
--postoption could do the same for a POST request. Treating that as a stretch goal for the moment.