dclient


Namedclient JSON
Version 0.3 PyPI version JSON
download
home_pagehttps://github.com/simonw/dclient
SummaryA client CLI utility for Datasette instances
upload_time2024-02-25 19:38:07
maintainer
docs_urlNone
authorSimon Willison
requires_python>=3.8
licenseApache License, Version 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dclient

[![PyPI](https://img.shields.io/pypi/v/dclient.svg)](https://pypi.org/project/dclient/)
[![Changelog](https://img.shields.io/github/v/release/simonw/dclient?include_prereleases&label=changelog)](https://github.com/simonw/dclient/releases)
[![Tests](https://github.com/simonw/dclient/workflows/Test/badge.svg)](https://github.com/simonw/dclient/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/dclient/blob/master/LICENSE)

A client CLI utility for [Datasette](https://datasette.io/) 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](https://docs.datasette.io/en/latest/json_api.html#the-json-write-api) (Datasette 1.0 alpha or higher)

## Installation

Install this tool using `pip`:
```bash
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:
```bash
datasette install dclient
```
## Running a query

```bash
dclient query https://latest.datasette.io/fixtures "select * from facetable limit 1"
```
To shorten that, create an alias:
```bash
dclient alias add fixtures https://latest.datasette.io/fixtures
```
Then run it like this instead:
```bash
dclient query fixtures "select * from facetable limit 1"
```
## Documentation

Visit **[dclient.datasette.io](https://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:
```bash
cd dclient
python -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
pytest
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/simonw/dclient",
    "name": "dclient",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simon Willison",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/db/d3/c0019201d16feecf549e869a3c12d557c415b6073eeaa6fe9d4caa0b2e69/dclient-0.3.tar.gz",
    "platform": null,
    "description": "# dclient\n\n[![PyPI](https://img.shields.io/pypi/v/dclient.svg)](https://pypi.org/project/dclient/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/dclient?include_prereleases&label=changelog)](https://github.com/simonw/dclient/releases)\n[![Tests](https://github.com/simonw/dclient/workflows/Test/badge.svg)](https://github.com/simonw/dclient/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/dclient/blob/master/LICENSE)\n\nA client CLI utility for [Datasette](https://datasette.io/) instances.\n\nMuch of the functionality requires Datasette 1.0a2 or higher.\n\n## Things you can do with dclient\n\n- Run SQL queries against Datasette and returning the results as JSON\n- Run queries against authenticated Datasette instances\n- Create aliases and store authentication tokens for convenient access to Datasette\n- Insert data into Datasette using the [insert API](https://docs.datasette.io/en/latest/json_api.html#the-json-write-api) (Datasette 1.0 alpha or higher)\n\n## Installation\n\nInstall this tool using `pip`:\n```bash\npip install dclient\n```\nIf you want to install it in the same virtual environment as Datasette (to use it as a plugin) you can instead run:\n```bash\ndatasette install dclient\n```\n## Running a query\n\n```bash\ndclient query https://latest.datasette.io/fixtures \"select * from facetable limit 1\"\n```\nTo shorten that, create an alias:\n```bash\ndclient alias add fixtures https://latest.datasette.io/fixtures\n```\nThen run it like this instead:\n```bash\ndclient query fixtures \"select * from facetable limit 1\"\n```\n## Documentation\n\nVisit **[dclient.datasette.io](https://dclient.datasette.io)** for full documentation on using this tool.\n\n## Development\n\nTo contribute to this tool, first checkout the code. Then create a new virtual environment:\n```bash\ncd dclient\npython -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "A client CLI utility for Datasette instances",
    "version": "0.3",
    "project_urls": {
        "CI": "https://github.com/simonw/dclient/actions",
        "Changelog": "https://github.com/simonw/dclient/releases",
        "Homepage": "https://github.com/simonw/dclient",
        "Issues": "https://github.com/simonw/dclient/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1dd08fb0233fff49c0020cfdf73fbf74f6528a74ec472cc120b35719bbb84f4",
                "md5": "c0bd21f8094cb6b5a6724be8d7e69832",
                "sha256": "78cfa8bc8db18517005d8d3cd9f7f7c060d52083be38844e013d960ad9542f12"
            },
            "downloads": -1,
            "filename": "dclient-0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0bd21f8094cb6b5a6724be8d7e69832",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11223,
            "upload_time": "2024-02-25T19:38:05",
            "upload_time_iso_8601": "2024-02-25T19:38:05.033421Z",
            "url": "https://files.pythonhosted.org/packages/b1/dd/08fb0233fff49c0020cfdf73fbf74f6528a74ec472cc120b35719bbb84f4/dclient-0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbd3c0019201d16feecf549e869a3c12d557c415b6073eeaa6fe9d4caa0b2e69",
                "md5": "679278f87c1675885bdf466f15262e1f",
                "sha256": "b265dd976cc1e1562b8f8e02bf495fc6746da306c27c78bcc5993997694293f1"
            },
            "downloads": -1,
            "filename": "dclient-0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "679278f87c1675885bdf466f15262e1f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14732,
            "upload_time": "2024-02-25T19:38:07",
            "upload_time_iso_8601": "2024-02-25T19:38:07.078134Z",
            "url": "https://files.pythonhosted.org/packages/db/d3/c0019201d16feecf549e869a3c12d557c415b6073eeaa6fe9d4caa0b2e69/dclient-0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-25 19:38:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simonw",
    "github_project": "dclient",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dclient"
}
        
Elapsed time: 0.19156s