Skip to main content

Tools for importing data into Datasette

Project description

datasette-import

PyPI Changelog Tests License

Tools for importing data into Datasette

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-import

Usage

This plugin adds a database action item called "Create table with imported data".

This action is available to users with the create-table permission.

It links to a page that allows users to upload files or 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-import
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-import-0.1a4.tar.gz (18.7 kB view hashes)

Uploaded Source

Built Distribution

datasette_import-0.1a4-py3-none-any.whl (18.3 kB view hashes)

Uploaded Python 3

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