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 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"

To shorten that, create an alias:

dclient alias add fixtures https://latest.datasette.io/fixtures

Then run it like this instead:

dclient query 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

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.3.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

dclient-0.3-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file dclient-0.3.tar.gz.

File metadata

  • Download URL: dclient-0.3.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for dclient-0.3.tar.gz
Algorithm Hash digest
SHA256 b265dd976cc1e1562b8f8e02bf495fc6746da306c27c78bcc5993997694293f1
MD5 679278f87c1675885bdf466f15262e1f
BLAKE2b-256 dbd3c0019201d16feecf549e869a3c12d557c415b6073eeaa6fe9d4caa0b2e69

See more details on using hashes here.

File details

Details for the file dclient-0.3-py3-none-any.whl.

File metadata

  • Download URL: dclient-0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for dclient-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 78cfa8bc8db18517005d8d3cd9f7f7c060d52083be38844e013d960ad9542f12
MD5 c0bd21f8094cb6b5a6724be8d7e69832
BLAKE2b-256 b1dd08fb0233fff49c0020cfdf73fbf74f6528a74ec472cc120b35719bbb84f4

See more details on using hashes here.

Supported by

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