Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

datasette/datasette-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datasette-paste

PyPI Changelog Tests License

Paste data to create tables in Datasette

This plugin is no longer being developed. It has been replaced by datasette-import.

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

About

Paste data to create tables in Datasette

Resources

License

Stars

Watchers

Forks

Contributors