# datasette-write-ui
[](https://pypi.org/project/datasette-write-ui/)
[](https://github.com/datasette/datasette-write-ui/releases)
[](https://github.com/datasette/datasette-write-ui/actions?query=workflow%3ATest)
[](https://github.com/datasette/datasette-write-ui/blob/main/LICENSE)
A Datasette plugin that adds UI elements to edit, insert, or delete rows in SQLite tables.
## Installation
This plugin requires the alpha version of Datasette 1.0. You can install it with:
```bash
pip install datasette==1.0a3
```
After that, you can install this plugin in the same environment as Datasette.
```bash
datasette install datasette-write-ui
```
## Usage
Once installed, the new UI elements will appear on the table page. You'll need special permission in order to see them. The easiest way is to [use the root user](https://docs.datasette.io/en/latest/authentication.html#using-the-root-actor), or otherwise use a [custom actor](https://docs.datasette.io/en/latest/authentication.html#actors).
<img width=600 src="https://camo.githubusercontent.com/f02dbf756d3ba7ed148a9e7263eb045fafcbb549733f37cd1350aafe54ff2c9f/68747470733a2f2f6461746173657474652d636c6f75642d6173736574732e73332e616d617a6f6e6177732e636f6d2f626c6f672f323032332f696e74726f647563696e672d6461746173657474652d77726974652d75692f75692d7461626c652d73637265656e73686f742e6a7067"/>
If you actor has the `insert-row` permissions, you'll see the "Insert new row" button at the bottom of the page.
<video src="https://datasette-cloud-assets.s3.amazonaws.com/blog/2023/introducing-datasette-write-ui/insert-demo.mp4" width=600 controls autoplay type="video/mp4" ></video>
If your actor has the `update-row` permissions, you'll see a new "Edit row" option in a new menu on each row.
<video src="https://datasette-cloud-assets.s3.amazonaws.com/blog/2023/introducing-datasette-write-ui/edit-demo.mp4" width=600 controls autoplay type="video/mp4" ></video>
If your actor has the `delete-row` permissions, you'll see a new "Delete row" option in a new menu on each row.
<video src="https://datasette-cloud-assets.s3.amazonaws.com/blog/2023/introducing-datasette-write-ui/delete-demo.mp4" width=600 controls autoplay type="video/mp4" ></video>
## Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd datasette-write-ui
python3 -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```
pip install -e '.[test]'
```
To install the JavaScript build dependencies, run this:
```bash
npm install
```
You can use the [Just](https://github.com/casey/just) command runner to build the TypeScript to minified JavaScript like this:
```bash
just js
```
To run the tests:
```bash
pytest
```
Raw data
{
"_id": null,
"home_page": "https://github.com/datasette/datasette-write-ui",
"name": "datasette-write-ui",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Alex Garcia",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/5e/d8/6ff0a3643336b26e418d16eede2828b0adafa6f1ce4e8bb7cf29e706db8f/datasette_write_ui-0.0.1a12.tar.gz",
"platform": null,
"description": "# datasette-write-ui\n\n[](https://pypi.org/project/datasette-write-ui/)\n[](https://github.com/datasette/datasette-write-ui/releases)\n[](https://github.com/datasette/datasette-write-ui/actions?query=workflow%3ATest)\n[](https://github.com/datasette/datasette-write-ui/blob/main/LICENSE)\n\nA Datasette plugin that adds UI elements to edit, insert, or delete rows in SQLite tables.\n\n## Installation\n\nThis plugin requires the alpha version of Datasette 1.0. You can install it with:\n\n```bash\npip install datasette==1.0a3\n```\n\nAfter that, you can install this plugin in the same environment as Datasette.\n\n```bash\ndatasette install datasette-write-ui\n```\n\n## Usage\n\nOnce installed, the new UI elements will appear on the table page. You'll need special permission in order to see them. The easiest way is to [use the root user](https://docs.datasette.io/en/latest/authentication.html#using-the-root-actor), or otherwise use a [custom actor](https://docs.datasette.io/en/latest/authentication.html#actors).\n\n<img width=600 src=\"https://camo.githubusercontent.com/f02dbf756d3ba7ed148a9e7263eb045fafcbb549733f37cd1350aafe54ff2c9f/68747470733a2f2f6461746173657474652d636c6f75642d6173736574732e73332e616d617a6f6e6177732e636f6d2f626c6f672f323032332f696e74726f647563696e672d6461746173657474652d77726974652d75692f75692d7461626c652d73637265656e73686f742e6a7067\"/>\n\nIf you actor has the `insert-row` permissions, you'll see the \"Insert new row\" button at the bottom of the page.\n\n<video src=\"https://datasette-cloud-assets.s3.amazonaws.com/blog/2023/introducing-datasette-write-ui/insert-demo.mp4\" width=600 controls autoplay type=\"video/mp4\" ></video>\n\nIf your actor has the `update-row` permissions, you'll see a new \"Edit row\" option in a new menu on each row.\n\n<video src=\"https://datasette-cloud-assets.s3.amazonaws.com/blog/2023/introducing-datasette-write-ui/edit-demo.mp4\" width=600 controls autoplay type=\"video/mp4\" ></video>\n\nIf your actor has the `delete-row` permissions, you'll see a new \"Delete row\" option in a new menu on each row.\n\n<video src=\"https://datasette-cloud-assets.s3.amazonaws.com/blog/2023/introducing-datasette-write-ui/delete-demo.mp4\" width=600 controls autoplay type=\"video/mp4\" ></video>\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd datasette-write-ui\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```\npip install -e '.[test]'\n```\nTo install the JavaScript build dependencies, run this:\n```bash\nnpm install\n```\nYou can use the [Just](https://github.com/casey/just) command runner to build the TypeScript to minified JavaScript like this:\n```bash\njust js\n```\nTo run the tests:\n```bash\npytest\n```\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": null,
"version": "0.0.1a12",
"project_urls": {
"CI": "https://github.com/datasette/datasette-write-ui/actions",
"Changelog": "https://github.com/datasette/datasette-write-ui/releases",
"Homepage": "https://github.com/datasette/datasette-write-ui",
"Issues": "https://github.com/datasette/datasette-write-ui/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cc39022f826114b25395aec39ee1702982d574d7d9465770cd75773ca86ddf73",
"md5": "a84419d213ca42fe791f49dd4e649797",
"sha256": "facea0fd65cce8c83964aeb22336d47c7db566d3ccdb9f8e1c3b381866df4dcc"
},
"downloads": -1,
"filename": "datasette_write_ui-0.0.1a12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a84419d213ca42fe791f49dd4e649797",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 14857,
"upload_time": "2025-01-14T18:43:51",
"upload_time_iso_8601": "2025-01-14T18:43:51.774185Z",
"url": "https://files.pythonhosted.org/packages/cc/39/022f826114b25395aec39ee1702982d574d7d9465770cd75773ca86ddf73/datasette_write_ui-0.0.1a12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5ed86ff0a3643336b26e418d16eede2828b0adafa6f1ce4e8bb7cf29e706db8f",
"md5": "399c000b7cf7d8acdbb789cd3170d667",
"sha256": "2f8de2cff68a0ebf54c974c077a5fff43e6f9a6d77a53da8c00f2e6e4fe6ec5b"
},
"downloads": -1,
"filename": "datasette_write_ui-0.0.1a12.tar.gz",
"has_sig": false,
"md5_digest": "399c000b7cf7d8acdbb789cd3170d667",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 16736,
"upload_time": "2025-01-14T18:43:55",
"upload_time_iso_8601": "2025-01-14T18:43:55.978111Z",
"url": "https://files.pythonhosted.org/packages/5e/d8/6ff0a3643336b26e418d16eede2828b0adafa6f1ce4e8bb7cf29e706db8f/datasette_write_ui-0.0.1a12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-14 18:43:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "datasette",
"github_project": "datasette-write-ui",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "datasette-write-ui"
}