A client CLI utility for Datasette instances
Project description
dclient
A client CLI utility for Datasette instances.
Much of the functionality requires Datasette 1.0a2 or higher.
Things you can do with dclient
- Browse table data with filtering, sorting, and pagination — no SQL required
- Run SQL queries against Datasette and return the results as JSON, CSV, TSV, or an ASCII table
- Introspect databases, tables, plugins, and schema
- Run queries against authenticated Datasette instances
- Create aliases and set default instances/databases for convenient access
- Insert and upsert data using the write 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
Quick start
Add an alias for a Datasette instance:
dclient alias add latest https://latest.datasette.io
dclient default instance latest
dclient default database latest fixtures
Now run queries directly:
dclient "select * from facetable limit 1"
Or be explicit:
dclient query fixtures "select * from facetable limit 1" -i latest
Output as a table with -t, or use --csv, --tsv, --nl:
dclient "select pk, state from facetable limit 3" -t
Browse table rows without SQL:
dclient rows facetable -f state eq CA --sort _city_id -t
Introspection
dclient databases
dclient tables
dclient plugins
dclient schema facetable
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dclient-0.5a3.tar.gz.
File metadata
- Download URL: dclient-0.5a3.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
293ebb95cdaba979bb12c71af370ce4b2bd1aeecb148eb86fa33b0a9e0fdeb24
|
|
| MD5 |
87e2b8afbd64c7ce4cfab6bf8ff990ae
|
|
| BLAKE2b-256 |
a2dbc22fc07f317a74a1a632827e115900db09891dde99d2ea5c80e0beefac04
|
Provenance
The following attestation bundles were made for dclient-0.5a3.tar.gz:
Publisher:
publish.yml on simonw/dclient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dclient-0.5a3.tar.gz -
Subject digest:
293ebb95cdaba979bb12c71af370ce4b2bd1aeecb148eb86fa33b0a9e0fdeb24 - Sigstore transparency entry: 1057142616
- Sigstore integration time:
-
Permalink:
simonw/dclient@80786dadafcc16b93fd3fc2aa2cb950031bbb165 -
Branch / Tag:
refs/tags/0.5a3 - Owner: https://github.com/simonw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@80786dadafcc16b93fd3fc2aa2cb950031bbb165 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dclient-0.5a3-py3-none-any.whl.
File metadata
- Download URL: dclient-0.5a3-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46b557e37bdb67e4e2cfa0444005685ed0dd01d0f2965facf80545a70bc41997
|
|
| MD5 |
168ea35c1bd86cddc3385023574c19b5
|
|
| BLAKE2b-256 |
6356e116f8d4022668725fabb6d13d24115fbad9caefb0c4ec970583bb645760
|
Provenance
The following attestation bundles were made for dclient-0.5a3-py3-none-any.whl:
Publisher:
publish.yml on simonw/dclient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dclient-0.5a3-py3-none-any.whl -
Subject digest:
46b557e37bdb67e4e2cfa0444005685ed0dd01d0f2965facf80545a70bc41997 - Sigstore transparency entry: 1057142650
- Sigstore integration time:
-
Permalink:
simonw/dclient@80786dadafcc16b93fd3fc2aa2cb950031bbb165 -
Branch / Tag:
refs/tags/0.5a3 - Owner: https://github.com/simonw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@80786dadafcc16b93fd3fc2aa2cb950031bbb165 -
Trigger Event:
release
-
Statement type: