Datasette¶
An open source multi-tool for exploring and publishing data
Datasette is a tool for exploring and publishing data. It helps people take data of any shape or size and publish that as an interactive, explorable website and accompanying API.
Datasette is aimed at data journalists, museum curators, archivists, local governments and anyone else who has data that they wish to share with the world. It is part of a wider ecosystem of tools and plugins dedicated to making working with structured data as productive as possible.
Explore a demo, watch a presentation about the project or Try Datasette without installing anything using Glitch.
Interested in learning Datasette? Start with the official tutorials.
Support questions, feedback? Join our GitHub Discussions forum.
Contents¶
- Getting started
- Installation
- The Datasette Ecosystem
- CLI reference
- Pages and API endpoints
- Publishing data
- Deploying Datasette
- JSON API
- Running SQL queries
- Authentication and permissions
- Performance and caching
- CSV export
- Binary data
- Facets
- Full-text search
- SpatiaLite
- Metadata
- Settings
- Using --setting
- Configuration directory mode
- Settings
- default_allow_sql
- default_page_size
- sql_time_limit_ms
- max_returned_rows
- num_sql_threads
- allow_facet
- default_facet_size
- facet_time_limit_ms
- facet_suggest_time_limit_ms
- suggest_facets
- allow_download
- default_cache_ttl
- cache_size_kb
- allow_csv_stream
- max_csv_mb
- truncate_cells_html
- force_https_urls
- template_debug
- trace_debug
- base_url
- Configuring the secret
- Using secrets with datasette publish
- Introspection
- Custom pages and templates
- Plugins
- Writing plugins
- Plugin hooks
- prepare_connection(conn, database, datasette)
- prepare_jinja2_environment(env, datasette)
- extra_template_vars(template, database, table, columns, view_name, request, datasette)
- extra_css_urls(template, database, table, columns, view_name, request, datasette)
- extra_js_urls(template, database, table, columns, view_name, request, datasette)
- extra_body_script(template, database, table, columns, view_name, request, datasette)
- publish_subcommand(publish)
- render_cell(row, value, column, table, database, datasette)
- register_output_renderer(datasette)
- register_routes(datasette)
- register_commands(cli)
- register_facet_classes()
- asgi_wrapper(datasette)
- startup(datasette)
- canned_queries(datasette, database, actor)
- actor_from_request(datasette, request)
- filters_from_request(request, database, table, datasette)
- permission_allowed(datasette, actor, action, resource)
- register_magic_parameters(datasette)
- forbidden(datasette, request, message)
- handle_exception(datasette, request, exception)
- menu_links(datasette, actor, request)
- table_actions(datasette, actor, database, table, request)
- database_actions(datasette, actor, database, request)
- skip_csrf(datasette, scope)
- get_metadata(datasette, key, database, table)
- Testing plugins
- Internals for plugins
- Request object
- The MultiParams class
- Response class
- Datasette class
- .databases
- .plugin_config(plugin_name, database=None, table=None)
- await .render_template(template, context=None, request=None)
- await .permission_allowed(actor, action, resource=None, default=False)
- await .ensure_permissions(actor, permissions)
- await .check_visibility(actor, action=None, resource=None, permissions=None)
- .get_database(name)
- .add_database(db, name=None, route=None)
- .add_memory_database(name)
- .remove_database(name)
- .sign(value, namespace="default")
- .unsign(value, namespace="default")
- .add_message(request, message, type=datasette.INFO)
- .absolute_url(request, path)
- .setting(key)
- datasette.client
- datasette.urls
- Database class
- Database(ds, path=None, is_mutable=True, is_memory=False, memory_name=None)
- db.hash
- await db.execute(sql, ...)
- Results
- await db.execute_fn(fn)
- await db.execute_write(sql, params=None, block=True)
- await db.execute_write_script(sql, block=True)
- await db.execute_write_many(sql, params_seq, block=True)
- await db.execute_write_fn(fn, block=True)
- db.close()
- Database introspection
- CSRF protection
- The _internal database
- The datasette.utils module
- datasette.tracer
- Import shortcuts
- Contributing
- Changelog
- 0.65.1 (2024-12-28)
- 0.65 (2024-10-07)
- 0.64.8 (2024-06-21)
- 0.64.7 (2024-06-12)
- 0.64.6 (2023-12-22)
- 0.64.5 (2023-10-08)
- 0.64.4 (2023-09-21)
- 0.64.3 (2023-04-27)
- 0.64.2 (2023-03-08)
- 0.64.1 (2023-01-11)
- 0.64 (2023-01-09)
- 0.63.3 (2022-12-17)
- 0.63.2 (2022-11-18)
- 0.63.1 (2022-11-10)
- 0.63 (2022-10-27)
- 0.62 (2022-08-14)
- 0.61.1 (2022-03-23)
- 0.61 (2022-03-23)
- 0.60.2 (2022-02-07)
- 0.60.1 (2022-01-20)
- 0.60 (2022-01-13)
- 0.59.4 (2021-11-29)
- 0.59.3 (2021-11-20)
- 0.59.2 (2021-11-13)
- 0.59.1 (2021-10-24)
- 0.59 (2021-10-14)
- 0.58.1 (2021-07-16)
- 0.58 (2021-07-14)
- 0.57.1 (2021-06-08)
- 0.57 (2021-06-05)
- 0.56.1 (2021-06-05)
- 0.56 (2021-03-28)
- 0.55 (2021-02-18)
- 0.54.1 (2021-02-02)
- 0.54 (2021-01-25)
- 0.53 (2020-12-10)
- 0.52.5 (2020-12-09)
- 0.52.4 (2020-12-05)
- 0.52.3 (2020-12-03)
- 0.52.2 (2020-12-02)
- 0.52.1 (2020-11-29)
- 0.52 (2020-11-28)
- 0.51.1 (2020-10-31)
- 0.51 (2020-10-31)
- 0.50.2 (2020-10-09)
- 0.50.1 (2020-10-09)
- 0.50 (2020-10-09)
- 0.49.1 (2020-09-15)
- 0.49 (2020-09-14)
- 0.48 (2020-08-16)
- 0.47.3 (2020-08-15)
- 0.47.2 (2020-08-12)
- 0.47.1 (2020-08-11)
- 0.47 (2020-08-11)
- 0.46 (2020-08-09)
- 0.45 (2020-07-01)
- 0.44 (2020-06-11)
- 0.43 (2020-05-28)
- 0.42 (2020-05-08)
- 0.41 (2020-05-06)
- 0.40 (2020-04-21)
- 0.39 (2020-03-24)
- 0.38 (2020-03-08)
- 0.37.1 (2020-03-02)
- 0.37 (2020-02-25)
- 0.36 (2020-02-21)
- 0.35 (2020-02-04)
- 0.34 (2020-01-29)
- 0.33 (2019-12-22)
- 0.32 (2019-11-14)
- 0.31.2 (2019-11-13)
- 0.31.1 (2019-11-12)
- 0.31 (2019-11-11)
- 0.30.2 (2019-11-02)
- 0.30.1 (2019-10-30)
- 0.30 (2019-10-18)
- 0.29.3 (2019-09-02)
- 0.29.2 (2019-07-13)
- 0.29.1 (2019-07-11)
- 0.29 (2019-07-07)
- 0.28 (2019-05-19)
- 0.27.1 (2019-05-09)
- 0.27 (2019-01-31)
- 0.26.1 (2019-01-10)
- 0.26 (2019-01-02)
- 0.25.2 (2018-12-16)
- 0.25.1 (2018-11-04)
- 0.25 (2018-09-19)
- 0.24 (2018-07-23)
- 0.23.2 (2018-07-07)
- 0.23.1 (2018-06-21)
- 0.23 (2018-06-18)
- 0.22.1 (2018-05-23)
- 0.22 (2018-05-20)
- 0.21 (2018-05-05)
- 0.20 (2018-04-20)
- 0.19 (2018-04-16)
- 0.18 (2018-04-14)
- 0.17 (2018-04-13)
- 0.16 (2018-04-13)
- 0.15 (2018-04-09)
- 0.14 (2017-12-09)
- 0.13 (2017-11-24)
- 0.12 (2017-11-16)
- 0.11 (2017-11-14)
- 0.10 (2017-11-14)
- 0.9 (2017-11-13)
- 0.8 (2017-11-13)