Paste data to create tables in Datasette
Project description
datasette-paste
Paste data to create tables in Datasette
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-paste
Usage
This plugin adds a database action item called "Create table with pasted data".
This action is available to users with the create-table
permission.
It links to a page that allows users to paste in CSV, TSV or JSON data, and then use that to create and populate a new table in Datasette.
CSV and TSV data must have headers on the first row.
JSON data must be an array of objects with the same keys, or a container object object where one of the keys is an array of objects.
Credits
The CSV and TSV parsing is performed using Papa Parse, an MIT licensed JavaScript library that is bundled with this plugin.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-paste
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for datasette_paste-0.1a4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30f5c532a72b80b8b01cf281bc2a121d5131cd29cb2785934fe0c7784acd3f4e |
|
MD5 | 331acaa6db2ce473e3ec9e0aff592498 |
|
BLAKE2b-256 | 89f75584839f35d87b07ab1b5f0834b7d0ffc595a36d8216aa77182f1d665a67 |