Skip to main content

Add interactive checkboxes to columns in Datasette

Project description

datasette-checkbox

PyPI Changelog Tests 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.

Installation

Install this plugin in the same environment as Datasette.

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_* 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:

datasette data.db --root

Or use the Datasette permission system to grant update-row to specific users.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-checkbox
python3 -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

datasette_checkbox-0.1a0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

datasette_checkbox-0.1a0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file datasette_checkbox-0.1a0.tar.gz.

File metadata

  • Download URL: datasette_checkbox-0.1a0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for datasette_checkbox-0.1a0.tar.gz
Algorithm Hash digest
SHA256 e99be2bc345889c05abf5c6060f6562ef8b6ff136a571d523fe236ab29ac62f8
MD5 8db2ec0215c468c35bfd73af93e14dd4
BLAKE2b-256 032b1ce357bf202aed0600b8d887226e155e288c12e3d8b2a7e366d44ff5b19e

See more details on using hashes here.

File details

Details for the file datasette_checkbox-0.1a0-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_checkbox-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 eab4ca157a6dcf95294d2dd9e4b87f325b90f7e3e1aa35ceb9fd241db653420c
MD5 eb1611a89e47674612da38f92afbfa0d
BLAKE2b-256 4c806fd861fbdb97f8df063160a5d81dd60f2bf108474a001da9e269cd45bea3

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