Preview of new JSON default format for Datasette, see issue #782
This plugin will continue to change while the new output format is explored.
Install this plugin in the same environment as Datasette.
$ datasette install datasette-json-preview
Use the .json-preview
extension to preview the new JSON API design.
- https://latest-with-plugins.datasette.io/github/commits.json-preview
- https://latest-with-plugins.datasette.io/github/commits.json-preview?_extra=next_url
- https://latest-with-plugins.datasette.io/github/commits.json-preview?_extra=total
- https://latest-with-plugins.datasette.io/github/commits.json-preview?_extra=next_url&_extra=total
- https://latest-with-plugins.datasette.io/github/commits.json-preview?_extra=total&_size=0
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-json-preview
python3 -mvenv venv
source venv/bin/activate
Or if you are using pipenv
:
pipenv shell
Now install the dependencies and tests:
pip install -e '.[test]'
To run the tests:
pytest