datasette icon indicating copy to clipboard operation
datasette copied to clipboard

Use datasette-table Web Component to guide the design of the JSON API for 1.0

Open simonw opened this issue 3 years ago • 4 comments

I realized that one of the reasons I'm having trouble committing to nailing down the JSON API for 1.0 is that I don't use it much myself - I use the ?_shape=array one quite often, but I don't have any projects that are using the default, more fully-featured API.

As an experiment I built a Web Component for embedding Datasette tables on pages - https://github.com/simonw/datasette-table - and I think it's actually going to be a really useful tool for helping me dog food the v1.0 API design.

simonw avatar Nov 28 '21 20:11 simonw

FWIW I've written some web components that consume the json api and I think it's a really nice way to work with datasette. I like the combination with datasette+sqlite as a back-end feeding data to a front-end that's entirely javascript + html.

20after4 avatar Nov 29 '21 19:11 20after4

That's really cool to hear - I've not seen many people actively building on top of the JSON API.

simonw avatar Nov 30 '21 06:11 simonw

It's a really great API and the documentation is really great too. Honestly, in more than 20 years of professional experience, I haven't worked with any software API that was more of a joy to use.

20after4 avatar Nov 30 '21 15:11 20after4

Could also build a CLI Rich/Textual app to exercise the API - which could embed Datasette as a dependency and work using datasette.client.get(...) calls.

Could be a plugin that adds a datasette tui command.

simonw avatar Mar 16 '22 20:03 simonw