Skip to main content

Datasette plugin for modifying table schemas

Project description

datasette-edit-schema

PyPI Changelog Tests License

Datasette plugin for modifying table schemas

Features

  • Add new columns to a table
  • Rename columns in a table
  • Modify the type of columns in a table
  • Re-order the columns in a table
  • Rename a table
  • Delete a table

Installation

Install this plugin in the same environment as Datasette.

$ pip install datasette-edit-schema

Usage

Navigate to /-/edit-schema/dbname/tablename on your Datasette instance to edit a specific table.

Use /-/edit-schema/dbname to create a new table in a specific database.

By default only the root actor can access the page - so you'll need to run Datasette with the --root option and click on the link shown in the terminal to sign in and access the page.

The edit-schema permission governs access. You can use permission plugins such as datasette-permissions-sql to grant additional access to the write interface.

Screenshot

datasette-edit-schema interface

Development

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

cd datasette-edit-schema
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and tests:

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-edit-schema-0.3.tar.gz (52.6 kB view details)

Uploaded Source

Built Distribution

datasette_edit_schema-0.3-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

Details for the file datasette-edit-schema-0.3.tar.gz.

File metadata

  • Download URL: datasette-edit-schema-0.3.tar.gz
  • Upload date:
  • Size: 52.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for datasette-edit-schema-0.3.tar.gz
Algorithm Hash digest
SHA256 c7d1a78948bbfefb8c36ed4a9227dc5aaafc47c614fa4c241903fae21d450aab
MD5 a728080cb2b13b38b775f533ed9e1067
BLAKE2b-256 5b33da547684d6a86b04ce3b979dcc93df691af4c029bce7d75a102a65d041d4

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: datasette_edit_schema-0.3-py3-none-any.whl
  • Upload date:
  • Size: 57.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for datasette_edit_schema-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83019b18bd4f09c0dab27cb0aa12fd62aae4fb5a28bda89fd2c4e4eb0afec233
MD5 bcefca21af369546b8f4e04fe3daa3ca
BLAKE2b-256 e08bd7e4a12ea1c6e16ee181a70299c656e622b0e39eb24b87f8ce9f1a4a5876

See more details on using hashes here.

Provenance

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