Skip to main content

A client CLI utility for Datasette instances

Project description

dclient

PyPI Changelog Tests License

A client CLI utility for Datasette instances.

Much of the functionality requires Datasette 1.0a2 or higher.

Things you can do with dclient

  • Run SQL queries against Datasette and return the results as JSON
  • 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 alias default latest
dclient alias default-db 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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dclient-0.5a0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dclient-0.5a0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file dclient-0.5a0.tar.gz.

File metadata

  • Download URL: dclient-0.5a0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dclient-0.5a0.tar.gz
Algorithm Hash digest
SHA256 da3cecb772b71cd6601269826ca8b6800d43832f3ef69ac4b27441269da13b3e
MD5 3e7a3838ddad041ffe1005dee2695596
BLAKE2b-256 a0429ccc1e817faf59edcd6edb0f6cc2101212a1e01f6a81f1ddbf6b6ef9ab62

See more details on using hashes here.

Provenance

The following attestation bundles were made for dclient-0.5a0.tar.gz:

Publisher: publish.yml on simonw/dclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dclient-0.5a0-py3-none-any.whl.

File metadata

  • Download URL: dclient-0.5a0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dclient-0.5a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebcdac9fbf7291efa311b43ebfda1e796e5bbe6f5a7adc953f73156bf2599346
MD5 7c0fac1974eb68c4ffb67f19b00adc32
BLAKE2b-256 c413f98e97257079fc60e1861c9044ae203e55f4a3314028e0bde90657901bb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dclient-0.5a0-py3-none-any.whl:

Publisher: publish.yml on simonw/dclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page