An open source multi-tool for exploring and publishing data

PyPI Changelog Python 3.x License

Annotated version of this introductory video

Datasette is a tool for exploring and publishing data. It helps people take data of any shape or size, analyze and explore it, and publish it as an interactive website and accompanying API.

Datasette is aimed at data journalists, museum curators, archivists, local governments, scientists, researchers and anyone else who has data that they wish to share with the world. It is part of a wider ecosystem of 38 tools and 87 plugins dedicated to making working with structured data as productive as possible.

Try a demo and explore 33,000 power plants around the world, then follow the tutorial or take a look at some other examples of Datasette in action.

Then read how to get started with Datasette, subscribe to the monthly-ish newsletter and consider signing up for office hours for an in-person conversation about the project.

New: Datasette Desktop - a macOS desktop application for easily running Datasette on your own computer!

Exploratory data analysis

Import data from CSVs, JSON, database connections and more. Datasette will automatically show you patterns in your data and help you share your findings with your colleagues.

Instant data publishing

datasette publish lets you instantly publish your data to hosting providers like Google Cloud Run, Heroku or Vercel.

Rapid prototyping

Spin up a JSON API for any data in minutes. Use it to prototype and prove your ideas without building a custom backend.

Latest news

12th April 2022 #

Datasette for geospatial analysis describes how Datasette can be used in conjunction with SpatiaLite to work with geospatial data, including details of several geospatial plugins and tools from the Datasette ecosystem.

23rd March 2022 #

Datasette 0.61 introduces two potentially backwards-incompatible changes in preparation for the forthcoming 1.0 release: hashed URL mode has been moved to a new plugin, and the way URLs are generated to tables or databases containing special characters such as . or / has changed. Datasette 0.61.1 fixes a small bug in that release. See also the annotated release notes for these two versions.

27th February 2022 #

The first two of an ongoing series of official Datasette tutorials are now available: Exploring a database with Datasette introduces the Datasette web interface and shows how it can be used to explore a new database, and Learn SQL with Datasette provides an introduction to SQL using Datasette as a learning environment.

13th January 2022 #

Datasette 0.60 adds a new filters_from_request plugin hook, new internal methods for writing to the database, better performance and various faceting improvements. See also the annotated release notes.

5th December 2021 #

Observable notebooks recently added a SQL cell type, allowing SQL queries to be executed as part of an interactive notebook workflow. Alex Garcia built a Datasette Client for these which allows you to excute queries against any Datasette instance and explore and visualize the results using JavaScript code running in a notebook.

14th October 2021 #

Datasette 0.59 adds column descriptions in metadata, a new register_command plugin hook, enhanced --cors support and a bunch of other fixes and documentation improvements. See also the annotated release notes.

8th September 2021 #

Datasette Desktop is a new macOS desktop application version of Datasette, which supports opening SQLite files on your computer, importing CSV files and installing plugins. I wrote more about how it works in Datasette Desktop—a macOS desktop application for Datasette.

28th July 2021 #

The Baked Data architectural pattern describes a pattern commonly used with Datasette where the content for a site is bundled inside a SQLite database file and included alongside templates and application code in a deployment to a serverless hosting provider.

15th July 2021 #

Datasette 0.58 has new plugin hooks, a huge performance improvement for faceting, support for Unix domain sockets and several other improvements. Read the annotated release notes for extra background and context on the release.

5th June 2021 #

Datasette 0.57 is out with an important security patch plus a number of new features and bug fixes. Datasette 0.56.1, also out today, provides the security patch for users who are not yet ready to upgrade to the latest version.

10th May 2021 #

Django SQL Dashboard is a new tool that brings a useful authenticated subset of Datasette to Django projects that are built on top of PostgreSQL.

28th March 2021 #

Datasette 0.56 has bug fixes and documentation improvements, plus some new documented internal APIs for plugin authors and SpatiaLite 5 bundled with the official Datasette Docker container.

18th February 2021 #

Datasette 0.55 adds support for cross-database SQL queries. You can now run datasette --crossdb one.db two.db and then run queries that join data from tables in both of those database files - see cross-database queries in the documentation for more details.

sqlite-utils 3.6 adds similar features: a db.attach(alias, filepath) Python API method and --attach alias filepath.db command-line option, both for attaching additional databases in order to execute cross-database queries.

7th February 2021 #

This new Video introduction to Datasette and sqlite-utils provides a full introduction to both Datasette and sqlite-utils in 17 minutes, including a live demo of creating a database from a CSV file and publishing it to Google Cloud Run.

3rd February 2021 #

Serving map tiles from SQLite with MBTiles and datasette-tiles. datasette-tiles is a new plugin that adds a tile server to Datasette, serving map tiles from databases that conform to the MBTiles specification. download-tiles is a tool for building these databases, and datasette-basemap is a plugin that bundles a 22MB SQLite database with OpenStreetMap tiles covering zoom levels 0-6 for the entire world.

All news

Latest releases

27th April 2022

datasette-gzip 0.1 - Add gzip compression to Datasette

  • Initial release. Adds gzip support to Datasette, respecting the Accept-Encoding HTTP header. A thin wrapper around the GZipMiddleware from Starlette.

26th April 2022

datasette-total-page-time 0.1 - Add a note to the Datasette footer measuring the total page load time

  • Initial implementation. Installing this plugin adds a "Page took 38.310ms" note to the Datasette footer.

20th April 2022

django-sql-dashboard 1.1 - Django app for building dashboards using raw SQL queries

  • <br> tag is now supported in HTML output. #150

18th April 2022

shot-scraper 0.13 - Tools for taking automated screenshots of websites

  • shot-scraper auth --devtools option for opening DevTools when authenticating with a site. #66
  • shot-scraper multi -n/--no-clobber option for skipping screenshots where the output image already exists on disk. #70

16th April 2022

datasette-nteract-data-explorer 0.3.1 - automatic visual data explorer for datasette

What's Changed

Full Changelog: https://github.com/hydrosquall/datasette-nteract-data-explorer/compare/0.2.1...0.3.1

13th April 2022

geojson-to-sqlite 1.1.1 - CLI tool for converting GeoJSON to SQLite (optionally with SpatiaLite)

  • Fixed a bug where a _tmp column remained after importing a geometry with no additional properties. #30
  • Added --version option to show the current installed version of the tool. #32

sqlite-utils 3.26 - CLI tool and Python utility functions for manipulating SQLite databases

geojson-to-sqlite 1.1 - CLI tool for converting GeoJSON to SQLite (optionally with SpatiaLite)

  • Command can now accept more than one GeoJSON file. The contents of all of the files will be inserted into the same table. #21
  • Using the --spatial-index option against the same database twice no longer triggers an error.
  • Now depends on sqlite-utils 3.23 on higher, taking advantage of the SpatiaLite utilities in that library. Thanks, Chris Amico. #28

12th April 2022

geojson-to-sqlite 1.0.1

  • Fixed bug where --spatialite option failed with an error if the GeoJSON features being loaded consisted of just a geometry with no properties. #30

geojson-to-sqlite 1.0.1

  • Fixed bug where --spatialite option failed with an error if the GeoJSON features being loaded consisted of just a geometry with no properties. #30

11th April 2022

shot-scraper 0.12 - Tools for taking automated screenshots of websites

  • --selector-all option to take a screenshot that encompasses every element matching the specified CSS selector - complements --selector which takes a screenshot of just the first element matching that selector. See Specifying elements using JavaScript filters. #64
  • selector_all: and selectors_all: keys in the shot-scraper multi YAML format.
  • --js-selector and --js-selector-all options for specifying elements to screenshot using a JavaScript expression, for cases which cannot be handled using CSS selectors #43. The following example takes a screenshot of the first paragraph on the page that mentions shot-scraper: shot-scraper https://github.com/simonw/shot-scraper \ --js-selector 'el.tagName == "P" && el.innerText.includes("shot-scraper")'
  • js_selector:, js_selectors:, js_selector_all: and js_selectors_all: equivalent keys in the shot-scraper multi YAML format.
  • --user-agent option for setting a custom user agent header. #63
  • --browser webkit option for running WebKit - thanks, Ryan Murphy. #56

8th April 2022

shot-scraper 0.11

  • New shot-scraper accessibility --timeout option, thanks Ben Welsh. #59
  • shot-scraper auth --browser option for authentication using a browser other than Chromium. #61
  • Using --quality now results in a JPEG file with the correct .jpg extension. Thanks, Ian Wootten. #58
  • New --reduced-motion flag for emulating the "prefers-reduced-motion" media feature. Thanks, Ryan Murphy. #49

pypi-to-sqlite 0.2.2 - Load data about Python packages from PyPI into SQLite

  • Fixed a bug where the command could not be safely run more than once against the same database file. #7

pypi-to-sqlite 0.2

  • New --prefix prefix option for creating tables with a prefix - so pypi-to-sqlite data.db datasette --prefix pypi_ will create tables called pypi_packages, pypi_versions and pypi_releases. #6

7th April 2022

pypi-to-sqlite 0.1

  • Initial release, with pypi-to-sqlite pypi.db datasette sqlite-utils command. #1

All releases