A client CLI utility for Datasette instances
  • Python 99.7%
  • Just 0.3%
Find a file
Simon Willison c847badc4e
dclient insert command (#13)
* Move making queries to own page, refs #7
* Documentation for the dclient insert feature, refs #8
* Implemented progress bar for insert, refs #8
* --pk option
* --ignore and --replace for insert, refs #8
* --batch-size option, refs #8
* First insert test, using a mock - refs #8
* insert test that exercises against an in-memory Datasette instance, refs #8
* Insert tests now cover an error case, refs #8
* Tests for --ignore and --replace, refs #8
* Tests for different formats, refs #8
* Test for --no-detect-types
* Support for --encoding, refs #8
2023-07-24 16:22:39 -07:00
.github/workflows cache-dependency-path: setup.py 2022-11-21 23:00:33 -08:00
dclient dclient insert command (#13) 2023-07-24 16:22:39 -07:00
docs dclient insert command (#13) 2023-07-24 16:22:39 -07:00
tests dclient insert command (#13) 2023-07-24 16:22:39 -07:00
.gitignore Initial library structure 2022-11-22 01:57:06 +00:00
Justfile Documentation on ReadTheDocs using MyST 2023-07-17 16:48:50 -07:00
LICENSE Initial library structure 2022-11-22 01:57:06 +00:00
README.md dclient insert command (#13) 2023-07-24 16:22:39 -07:00
setup.py dclient insert command (#13) 2023-07-24 16:22:39 -07:00

dclient

PyPI Changelog Tests License

A client CLI utility for Datasette instances

Things you can do with dclient

  • Run SQL queries against Datasette and returning the results as JSON
  • Run queries against authenticated Datasette instances
  • Create aliases and store authentication tokens for convenient access to Datasette
  • Insert data into Datasette using the insert API (Datasette 1.0 alpha or higher)

Installation

Install this tool using pip:

pip install dclient

If you want to install it in the same virtual environment as Datasette (to use it as a plugin) you can instead run:

datasette install dclient

Running a query

dclient query https://latest.datasette.io/fixtures "select * from facetable limit 1"

Documentation

Visit dclient.datasette.io for full documentation on using this tool.

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd dclient
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest