Skip to content

Releases: simonw/datasette

Datasette 0.25

19 Sep 18:27
Compare
Choose a tag to compare

New plugin hooks, improved database view support and an easier way to use more recent versions of SQLite.

See full release notes here: https://datasette.readthedocs.io/en/latest/changelog.html#v0-25

Datasette 0.24

24 Jul 16:51
Compare
Choose a tag to compare

Datasette 0.23.2

08 Jul 05:41
Compare
Choose a tag to compare

Minor bugfix and documentation release.

Datasette 0.23.1

21 Jun 16:02
Compare
Choose a tag to compare

Minor bugfix release.

  • Correctly display empty strings in HTML table, closes #314
  • Allow “.” in database filenames, closes #302
  • 404s ending in slash redirect to remove that slash, closes #309
  • Fixed incorrect display of compound primary keys with foreign key references. Closes #319
  • Docs + example of canned SQL query using || concatenation. Closes #321
  • Correctly display facets with value of 0 - closes #318
  • Default ‘expand labels’ to checked in CSV advanced export

Datasette 0.23: CSV, SpatiaLite and more

18 Jun 15:28
Compare
Choose a tag to compare

This release features CSV export, improved options for foreign key expansions, new configuration settings and improved support for SpatiaLite.

See full release notes here: http://datasette.readthedocs.io/en/latest/changelog.html#v0-23

Datasette 0.22.1

23 May 14:04
Compare
Choose a tag to compare

Bugfix release, plus we now use versioneer for our version numbers.

  • Faceting no longer breaks pagination, fixes #282

  • Add __version_info__ derived from __version__ [Robert Gieseke]

    This might be tuple of more than two values (major and minor
    version) if commits have been made after a release.

  • Add version number support with Versioneer. [Robert Gieseke]

    Versioneer Licence:
    Public Domain (CC0-1.0)

    Closes #273

  • Refactor inspect logic [Russ Garrett]

Datasette 0.22: Datasette Facets

20 May 23:44
Compare
Choose a tag to compare

The big new feature in this release is facets. Datasette can now apply faceted browse to any column in any table. It will also suggest possible facets. See the Datasette Facets announcement post for more details.

In addition to the work on facets:

  • Added docs for introspection endpoints

  • New --config option, added --help-config, closes #274

    Removed the --page_size= argument to datasette serve in favour of:

    datasette serve --config default_page_size:50 mydb.db
    

    Added new help section:

    $ datasette --help-config
    Config options:
      default_page_size            Default page size for the table view
                                   (default=100)
      max_returned_rows            Maximum rows that can be returned from a table
                                   or custom query (default=1000)
      sql_time_limit_ms            Time limit for a SQL query in milliseconds
                                   (default=1000)
      default_facet_size           Number of values to return for requested facets
                                   (default=30)
      facet_time_limit_ms          Time limit for calculating a requested facet
                                   (default=200)
      facet_suggest_time_limit_ms  Time limit for calculating a suggested facet
                                   (default=50)
    
  • Only apply responsive table styles to .rows-and-column

    Otherwise they interfere with tables in the description, e.g. on
    https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo

  • Refactored views into new views/ modules, refs #256

  • Documentation for SQLite full-text search support, closes #253

  • /-/versions now includes SQLite fts_versions, closes #252

Datasette 0.21: New _shape=, new _size=, search within columns

05 May 23:21
Compare
Choose a tag to compare

New JSON _shape= options, the ability to set table _size= and a mechanism for searching within specific columns.

  • Default tests to using a longer timelimit

    Every now and then a test will fail in Travis CI on Python 3.5 because it hit the default 20ms SQL time limit.

    Test fixtures now default to a 200ms time limit, and we only use the 20ms time limit for the specific test that tests query interruption.

    This should make our tests on Python 3.5 in Travis much more stable.

  • Support _search_COLUMN=text searches, closes #237

  • Show version on /-/plugins page, closes #248

  • ?_size=max option, closes #249

  • Added /-/versions and /-/versions.json, closes #244

    Sample output:

    {
      "python": {
        "version": "3.6.3",
        "full": "3.6.3 (default, Oct  4 2017, 06:09:38) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]"
      },
      "datasette": {
        "version": "0.20"
      },
      "sqlite": {
        "version": "3.23.1",
        "extensions": {
          "json1": null,
          "spatialite": "4.3.0a"
        }
      }
    }
    
  • Renamed ?_sql_time_limit_ms= to ?_timelimit, closes #242

  • New ?_shape=array option + tweaks to _shape, closes #245

    • Default is now ?_shape=arrays (renamed from lists)
    • New ?_shape=array returns an array of objects as the root object
    • Changed ?_shape=object to return the object as the root
    • Updated docs
  • FTS tables now detected by inspect(), closes #240

  • New ?_size=XXX querystring parameter for table view, closes #229

    Also added documentation for all of the _special arguments.

    Plus deleted some duplicate logic implementing _group_count.

  • If max_returned_rows==page_size, increment max_returned_rows - fixes #230

  • New hidden: True option for table metadata, closes #239

  • Hide idx_* tables if spatialite detected, closes #228

  • Added class=rows-and-columns to custom query results table

  • Added CSS class rows-and-columns to main table

  • label_column option in metadata.json - closes #234

Datasette 0.20: static assets and templates for plugins

20 Apr 14:41
Compare
Choose a tag to compare

Mostly new work on the Plugins mechanism: plugins can now bundle static assets and custom templates, and datasette publish has a new --install=name-of-plugin option.

  • Add col-X classes to HTML table on custom query page

  • Fixed out-dated template in documentation

  • Plugins can now bundle custom templates, #224

  • Added /-/metadata /-/plugins /-/inspect, #225

  • Documentation for --install option, refs #223

  • Datasette publish/package --install option, #223

  • Fix for plugins in Python 3.5, #222

  • New plugin hooks: extra_css_urls() and extra_js_urls(), #214

  • /-/static-plugins/PLUGIN_NAME/ now serves static/ from plugins

  • now gets class="col-X" - plus added col-X documentation
  • Use to_css_class for table cell column classes

    This ensures that columns with spaces in the name will still
    generate usable CSS class names. Refs #209

  • Add column name classes to s, make PK bold [Russ Garrett]

  • Don't duplicate simple primary keys in the link column [Russ Garrett]

    When there's a simple (single-column) primary key, it looks weird to
    duplicate it in the link column.

    This change removes the second PK column and treats the link column as
    if it were the PK column from a header/sorting perspective.

  • Correct escaping for HTML display of row links [Russ Garrett]

  • Longer time limit for test_paginate_compound_keys

    It was failing intermittently in Travis - see #209

  • Use application/octet-stream for downloadable databses

  • Updated PyPI classifiers

  • Updated PyPI link to pypi.org

Datasette 0.19: plugins preview

17 Apr 02:21
Compare
Choose a tag to compare

This is the first preview of the new Datasette plugins mechanism. Only two plugin hooks are available so far - for custom SQL functions and custom template filters. There's plenty more to come - read the documentation and get involved in the tracking ticket if you have feedback on the direction so far.

  • Fix for _sort_desc=sortable_with_nulls test, refs #216

  • Fixed #216 - paginate correctly when sorting by nullable column

  • Initial documentation for plugins, closes #213

    https://datasette.readthedocs.io/en/latest/plugins.html

  • New --plugins-dir=plugins/ option (#212)

    New option causing Datasette to load and evaluate all of the Python files in the specified directory and register any plugins that are defined in those files.

    This new option is available for the following commands:

    datasette serve mydb.db --plugins-dir=plugins/
    datasette publish now/heroku mydb.db --plugins-dir=plugins/
    datasette package mydb.db --plugins-dir=plugins/
    
  • Start of the plugin system, based on pluggy (#210)

    Uses https://pluggy.readthedocs.io/ originally created for the py.test project

    We're starting with two plugin hooks:

    prepare_connection(conn)

    This is called when a new SQLite connection is created. It can be used to register custom SQL functions.

    prepare_jinja2_environment(env)

    This is called with the Jinja2 environment. It can be used to register custom template tags and filters.

    An example plugin which uses these two hooks can be found at https://github.com/simonw/datasette-plugin-demos or installed using pip install datasette-plugin-demos

    Refs #14

  • Return HTTP 405 on InvalidUsage rather than 500. [Russ Garrett]

    This also stops it filling up the logs. This happens for HEAD requests at the moment - which perhaps should be handled better, but that's a different issue.