Initial dclient query command, refs #1

This commit is contained in:
Simon Willison 2022-11-21 18:16:28 -08:00
commit 1ecb6a02e8
5 changed files with 94 additions and 27 deletions

View file

@ -23,6 +23,32 @@ You can also use:
python -m dclient --help
### dclient query
<!-- [[[cog
import cog
from dclient import cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli.cli, ["query", "--help"])
help = result.output.replace("Usage: cli", "Usage: dclient")
cog.out(
"```\n{}\n```".format(help)
)
]]] -->
```
Usage: dclient query [OPTIONS] URL SQL
Run a SQL query against a Datasette database URL
Returns a JSON array of objects
Options:
--help Show this message and exit.
```
<!-- [[[end]]] -->
## Development
To contribute to this tool, first checkout the code. Then create a new virtual environment: