datasette-checkbox


Namedatasette-checkbox JSON
Version 0.1a2 PyPI version JSON
download
home_pageNone
SummaryAdd interactive checkboxes to columns in Datasette
upload_time2024-08-16 21:23:50
maintainerNone
docs_urlNone
authorSimon Willison
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # datasette-checkbox

[![PyPI](https://img.shields.io/pypi/v/datasette-checkbox.svg)](https://pypi.org/project/datasette-checkbox/)
[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-checkbox?include_prereleases&label=changelog)](https://github.com/datasette/datasette-checkbox/releases)
[![Tests](https://github.com/datasette/datasette-checkbox/actions/workflows/test.yml/badge.svg)](https://github.com/datasette/datasette-checkbox/actions/workflows/test.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-checkbox/blob/main/LICENSE)

Add interactive checkboxes to columns in Datasette. Requires Datasette 1.0 alpha or higher.

![Animated demo showing checkboxes in columns for is_done, should_be_deleted and is_happy - checking the checkboxes shows an updated message next to each one which then fades away.](https://raw.githubusercontent.com/datasette/datasette-checkbox/main/datasette-checkbox.gif)

## Installation

Install this plugin in the same environment as Datasette.
```bash
datasette install datasette-checkbox
```
## Usage

This plugin adds checkboxes to the table and row pages in Datasette for any column with a name that starts `is_*` or `should_*` or `has_*` and that is of type `integer`.

Toggling those checkboxes updates the underlying column to a `1` or a `0`.

The checkbox interface will only be shown for users who have `update-row` permission for the table.

The easiest way to try this plugin is using the `--root` Datasette option:

```bash
datasette data.db --root
```
Or use the [Datasette permission system](https://docs.datasette.io/en/latest/authentication.html#permissions) to grant `update-row` to specific users.

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd datasette-checkbox
python3 -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": null,
    "name": "datasette-checkbox",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Simon Willison",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c9/8a/85e501a67c0d7f22e214fe5171be17ad5a13ac3036dc9cdbf224f4df86af/datasette_checkbox-0.1a2.tar.gz",
    "platform": null,
    "description": "# datasette-checkbox\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-checkbox.svg)](https://pypi.org/project/datasette-checkbox/)\n[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-checkbox?include_prereleases&label=changelog)](https://github.com/datasette/datasette-checkbox/releases)\n[![Tests](https://github.com/datasette/datasette-checkbox/actions/workflows/test.yml/badge.svg)](https://github.com/datasette/datasette-checkbox/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-checkbox/blob/main/LICENSE)\n\nAdd interactive checkboxes to columns in Datasette. Requires Datasette 1.0 alpha or higher.\n\n![Animated demo showing checkboxes in columns for is_done, should_be_deleted and is_happy - checking the checkboxes shows an updated message next to each one which then fades away.](https://raw.githubusercontent.com/datasette/datasette-checkbox/main/datasette-checkbox.gif)\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n```bash\ndatasette install datasette-checkbox\n```\n## Usage\n\nThis plugin adds checkboxes to the table and row pages in Datasette for any column with a name that starts `is_*` or `should_*` or `has_*` and that is of type `integer`.\n\nToggling those checkboxes updates the underlying column to a `1` or a `0`.\n\nThe checkbox interface will only be shown for users who have `update-row` permission for the table.\n\nThe easiest way to try this plugin is using the `--root` Datasette option:\n\n```bash\ndatasette data.db --root\n```\nOr use the [Datasette permission system](https://docs.datasette.io/en/latest/authentication.html#permissions) to grant `update-row` to specific users.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd datasette-checkbox\npython3 -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-2.0",
    "summary": "Add interactive checkboxes to columns in Datasette",
    "version": "0.1a2",
    "project_urls": {
        "CI": "https://github.com/datasette/datasette-checkbox/actions",
        "Changelog": "https://github.com/datasette/datasette-checkbox/releases",
        "Homepage": "https://github.com/datasette/datasette-checkbox",
        "Issues": "https://github.com/datasette/datasette-checkbox/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42943dedeb5cfad622b9b64020a6187354329a7cebce67d7df86f026ac499684",
                "md5": "79018c28a57be19fd32d2e521d9ff793",
                "sha256": "6496e48f9071774c56ba86640f980055b9a8c232f1275c7d2a29bb5b69063fb6"
            },
            "downloads": -1,
            "filename": "datasette_checkbox-0.1a2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "79018c28a57be19fd32d2e521d9ff793",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8327,
            "upload_time": "2024-08-16T21:23:49",
            "upload_time_iso_8601": "2024-08-16T21:23:49.304435Z",
            "url": "https://files.pythonhosted.org/packages/42/94/3dedeb5cfad622b9b64020a6187354329a7cebce67d7df86f026ac499684/datasette_checkbox-0.1a2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c98a85e501a67c0d7f22e214fe5171be17ad5a13ac3036dc9cdbf224f4df86af",
                "md5": "81ac2dd578b72d017ca1cff412f1575d",
                "sha256": "1ea626cffb3173f66fa3eaccedabc27b8618ef4134616870478d970914f5492a"
            },
            "downloads": -1,
            "filename": "datasette_checkbox-0.1a2.tar.gz",
            "has_sig": false,
            "md5_digest": "81ac2dd578b72d017ca1cff412f1575d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7996,
            "upload_time": "2024-08-16T21:23:50",
            "upload_time_iso_8601": "2024-08-16T21:23:50.526401Z",
            "url": "https://files.pythonhosted.org/packages/c9/8a/85e501a67c0d7f22e214fe5171be17ad5a13ac3036dc9cdbf224f4df86af/datasette_checkbox-0.1a2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-16 21:23:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "datasette",
    "github_project": "datasette-checkbox",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "datasette-checkbox"
}
        
Elapsed time: 0.63275s