{"id": "configuration:configuration-reference", "page": "configuration", "ref": "configuration-reference", "title": null, "content": "The following example shows some of the valid configuration options that can exist inside datasette.yaml . \n [[[cog\nfrom metadata_doc import config_example\nimport textwrap\nconfig_example(cog, textwrap.dedent(\n \"\"\"\n # Datasette settings block\n settings:\n default_page_size: 50\n sql_time_limit_ms: 3500\n max_returned_rows: 2000\n\n # top-level plugin configuration\n plugins:\n datasette-my-plugin:\n key: valueA\n\n # Database and table-level configuration\n databases:\n your_db_name:\n # plugin configuration for the your_db_name database\n plugins:\n datasette-my-plugin:\n key: valueA\n tables:\n your_table_name:\n allow:\n # Only the root user can access this table\n id: root\n # plugin configuration for the your_table_name table\n # inside your_db_name database\n plugins:\n datasette-my-plugin:\n key: valueB\n \"\"\")\n ) \n ]]] \n [[[end]]]", "breadcrumbs": "[\"Configuration\"]", "references": "[]"} {"id": "internals:datasette-absolute-url", "page": "internals", "ref": "datasette-absolute-url", "title": ".absolute_url(request, path)", "content": "request - Request \n \n The current Request object \n \n \n \n path - string \n \n A path, for example /dbname/table.json \n \n \n \n Returns the absolute URL for the given path, including the protocol and host. For example: \n absolute_url = datasette.absolute_url(\n request, \"/dbname/table.json\"\n)\n# Would return \"http://localhost:8001/dbname/table.json\" \n The current request object is used to determine the hostname and protocol that should be used for the returned URL. The force_https_urls configuration setting is taken into account.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-add-database", "page": "internals", "ref": "datasette-add-database", "title": ".add_database(db, name=None, route=None)", "content": "db - datasette.database.Database instance \n \n The database to be attached. \n \n \n \n name - string, optional \n \n The name to be used for this database . If not specified Datasette will pick one based on the filename or memory name. \n \n \n \n route - string, optional \n \n This will be used in the URL path. If not specified, it will default to the same thing as the name . \n \n \n \n The datasette.add_database(db) method lets you add a new database to the current Datasette instance. \n The db parameter should be an instance of the datasette.database.Database class. For example: \n from datasette.database import Database\n\ndatasette.add_database(\n Database(\n datasette,\n path=\"path/to/my-new-database.db\",\n )\n) \n This will add a mutable database and serve it at /my-new-database . \n Use is_mutable=False to add an immutable database. \n .add_database() returns the Database instance, with its name set as the database.name attribute. Any time you are working with a newly added database you should use the return value of .add_database() , for example: \n db = datasette.add_database(\n Database(datasette, memory_name=\"statistics\")\n)\nawait db.execute_write(\n \"CREATE TABLE foo(id integer primary key)\"\n)", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-add-memory-database", "page": "internals", "ref": "datasette-add-memory-database", "title": ".add_memory_database(name)", "content": "Adds a shared in-memory database with the specified name: \n datasette.add_memory_database(\"statistics\") \n This is a shortcut for the following: \n from datasette.database import Database\n\ndatasette.add_database(\n Database(datasette, memory_name=\"statistics\")\n) \n Using either of these pattern will result in the in-memory database being served at /statistics .", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-add-message", "page": "internals", "ref": "datasette-add-message", "title": ".add_message(request, message, type=datasette.INFO)", "content": "request - Request \n \n The current Request object \n \n \n \n message - string \n \n The message string \n \n \n \n type - constant, optional \n \n The message type - datasette.INFO , datasette.WARNING or datasette.ERROR \n \n \n \n Datasette's flash messaging mechanism allows you to add a message that will be displayed to the user on the next page that they visit. Messages are persisted in a ds_messages cookie. This method adds a message to that cookie. \n You can try out these messages (including the different visual styling of the three message types) using the /-/messages debugging tool.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-create-token", "page": "internals", "ref": "datasette-create-token", "title": ".create_token(actor_id, expires_after=None, restrict_all=None, restrict_database=None, restrict_resource=None)", "content": "actor_id - string \n \n The ID of the actor to create a token for. \n \n \n \n expires_after - int, optional \n \n The number of seconds after which the token should expire. \n \n \n \n restrict_all - iterable, optional \n \n A list of actions that this token should be restricted to across all databases and resources. \n \n \n \n restrict_database - dict, optional \n \n For restricting actions within specific databases, e.g. {\"mydb\": [\"view-table\", \"view-query\"]} . \n \n \n \n restrict_resource - dict, optional \n \n For restricting actions to specific resources (tables, SQL views and Canned queries ) within a database. For example: {\"mydb\": {\"mytable\": [\"insert-row\", \"update-row\"]}} . \n \n \n \n This method returns a signed API token of the format dstok_... which can be used to authenticate requests to the Datasette API. \n All tokens must have an actor_id string indicating the ID of the actor which the token will act on behalf of. \n Tokens default to lasting forever, but can be set to expire after a given number of seconds using the expires_after argument. The following code creates a token for user1 that will expire after an hour: \n token = datasette.create_token(\n actor_id=\"user1\",\n expires_after=3600,\n) \n The three restrict_* arguments can be used to create a token that has additional restrictions beyond what the associated actor is allowed to do. \n The following example creates a token that can access view-instance and view-table across everything, can additionally use view-query for anything in the docs database and is allowed to execute insert-row and update-row in the attachments table in that database: \n token = datasette.create_token(\n actor_id=\"user1\",\n restrict_all=(\"view-instance\", \"view-table\"),\n restrict_database={\"docs\": (\"view-query\",)},\n restrict_resource={\n \"docs\": {\n \"attachments\": (\"insert-row\", \"update-row\")\n }\n },\n)", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-databases", "page": "internals", "ref": "datasette-databases", "title": ".databases", "content": "Property exposing a collections.OrderedDict of databases currently connected to Datasette. \n The dictionary keys are the name of the database that is used in the URL - e.g. /fixtures would have a key of \"fixtures\" . The values are Database class instances. \n All databases are listed, irrespective of user permissions.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-get-database", "page": "internals", "ref": "datasette-get-database", "title": ".get_database(name)", "content": "name - string, optional \n \n The name of the database - optional. \n \n \n \n Returns the specified database object. Raises a KeyError if the database does not exist. Call this method without an argument to return the first connected database.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:id1", "page": "internals", "ref": "id1", "title": ".get_internal_database()", "content": "Returns a database object for reading and writing to the private internal database .", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-get-permission", "page": "internals", "ref": "datasette-get-permission", "title": ".get_permission(name_or_abbr)", "content": "name_or_abbr - string \n \n The name or abbreviation of the permission to look up, e.g. view-table or vt . \n \n \n \n Returns a Permission object representing the permission, or raises a KeyError if one is not found.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-permissions", "page": "internals", "ref": "datasette-permissions", "title": ".permissions", "content": "Property exposing a dictionary of permissions that have been registered using the register_permissions(datasette) plugin hook. \n The dictionary keys are the permission names - e.g. view-instance - and the values are Permission() objects describing the permission. Here is a description of that object .", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-plugin-config", "page": "internals", "ref": "datasette-plugin-config", "title": ".plugin_config(plugin_name, database=None, table=None)", "content": "plugin_name - string \n \n The name of the plugin to look up configuration for. Usually this is something similar to datasette-cluster-map . \n \n \n \n database - None or string \n \n The database the user is interacting with. \n \n \n \n table - None or string \n \n The table the user is interacting with. \n \n \n \n This method lets you read plugin configuration values that were set in datasette.yaml . See Writing plugins that accept configuration for full details of how this method should be used. \n The return value will be the value from the configuration file - usually a dictionary. \n If the plugin is not configured the return value will be None .", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-remove-database", "page": "internals", "ref": "datasette-remove-database", "title": ".remove_database(name)", "content": "name - string \n \n The name of the database to be removed. \n \n \n \n This removes a database that has been previously added. name= is the unique name of that database.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-resolve-database", "page": "internals", "ref": "datasette-resolve-database", "title": ".resolve_database(request)", "content": "request - Request object \n \n A request object \n \n \n \n If you are implementing your own custom views, you may need to resolve the database that the user is requesting based on a URL path. If the regular expression for your route declares a database named group, you can use this method to resolve the database object. \n This returns a Database instance. \n If the database cannot be found, it raises a datasette.utils.asgi.DatabaseNotFound exception - which is a subclass of datasette.utils.asgi.NotFound with a .database_name attribute set to the name of the database that was requested.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-resolve-row", "page": "internals", "ref": "datasette-resolve-row", "title": ".resolve_row(request)", "content": "request - Request object \n \n A request object \n \n \n \n This method assumes your route declares named groups for database , table and pks . \n It returns a ResolvedRow named tuple instance with the following fields: \n \n \n db - Database \n \n The database object \n \n \n \n table - string \n \n The name of the table \n \n \n \n sql - string \n \n SQL snippet that can be used in a WHERE clause to select the row \n \n \n \n params - dict \n \n Parameters that should be passed to the SQL query \n \n \n \n pks - list \n \n List of primary key column names \n \n \n \n pk_values - list \n \n List of primary key values decoded from the URL \n \n \n \n row - sqlite3.Row \n \n The row itself \n \n \n \n If the database or table cannot be found it raises a datasette.utils.asgi.DatabaseNotFound exception. \n If the table does not exist it raises a datasette.utils.asgi.TableNotFound exception. \n If the row cannot be found it raises a datasette.utils.asgi.RowNotFound exception. This has .database_name , .table and .pk_values attributes, extracted from the request path.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-resolve-table", "page": "internals", "ref": "datasette-resolve-table", "title": ".resolve_table(request)", "content": "request - Request object \n \n A request object \n \n \n \n This assumes that the regular expression for your route declares both a database and a table named group. \n It returns a ResolvedTable named tuple instance with the following fields: \n \n \n db - Database \n \n The database object \n \n \n \n table - string \n \n The name of the table (or view) \n \n \n \n is_view - boolean \n \n True if this is a view, False if it is a table \n \n \n \n If the database or table cannot be found it raises a datasette.utils.asgi.DatabaseNotFound exception. \n If the table does not exist it raises a datasette.utils.asgi.TableNotFound exception - a subclass of datasette.utils.asgi.NotFound with .database_name and .table attributes.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-setting", "page": "internals", "ref": "datasette-setting", "title": ".setting(key)", "content": "key - string \n \n The name of the setting, e.g. base_url . \n \n \n \n Returns the configured value for the specified setting . This can be a string, boolean or integer depending on the requested setting. \n For example: \n downloads_are_allowed = datasette.setting(\"allow_download\")", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "internals:datasette-sign", "page": "internals", "ref": "datasette-sign", "title": ".sign(value, namespace=\"default\")", "content": "value - any serializable type \n \n The value to be signed. \n \n \n \n namespace - string, optional \n \n An alternative namespace, see the itsdangerous salt documentation . \n \n \n \n Utility method for signing values, such that you can safely pass data to and from an untrusted environment. This is a wrapper around the itsdangerous library. \n This method returns a signed string, which can be decoded and verified using .unsign(value, namespace=\"default\") .", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[{\"href\": \"https://itsdangerous.palletsprojects.com/en/1.1.x/serializer/#the-salt\", \"label\": \"itsdangerous salt documentation\"}, {\"href\": \"https://itsdangerous.palletsprojects.com/\", \"label\": \"itsdangerous\"}]"} {"id": "internals:datasette-unsign", "page": "internals", "ref": "datasette-unsign", "title": ".unsign(value, namespace=\"default\")", "content": "signed - any serializable type \n \n The signed string that was created using .sign(value, namespace=\"default\") . \n \n \n \n namespace - string, optional \n \n The alternative namespace, if one was used. \n \n \n \n Returns the original, decoded object that was passed to .sign(value, namespace=\"default\") . If the signature is not valid this raises a itsdangerous.BadSignature exception.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"} {"id": "introspection:jsondataview-actor", "page": "introspection", "ref": "jsondataview-actor", "title": "/-/actor", "content": "Shows the currently authenticated actor. Useful for debugging Datasette authentication plugins. \n {\n \"actor\": {\n \"id\": 1,\n \"username\": \"some-user\"\n }\n}", "breadcrumbs": "[\"Introspection\"]", "references": "[]"} {"id": "introspection:jsondataview-config", "page": "introspection", "ref": "jsondataview-config", "title": "/-/config", "content": "Shows the configuration for this instance of Datasette. This is generally the contents of the datasette.yaml or datasette.json file, which can include plugin configuration as well. Config example : \n {\n \"settings\": {\n \"template_debug\": true,\n \"trace_debug\": true,\n \"force_https_urls\": true\n }\n} \n Any keys that include the one of the following substrings in their names will be returned as redacted *** output, to help avoid accidentally leaking private configuration information: secret , key , password , token , hash , dsn .", "breadcrumbs": "[\"Introspection\"]", "references": "[{\"href\": \"https://latest.datasette.io/-/config\", \"label\": \"Config example\"}]"} {"id": "introspection:jsondataview-databases", "page": "introspection", "ref": "jsondataview-databases", "title": "/-/databases", "content": "Shows currently attached databases. Databases example : \n [\n {\n \"hash\": null,\n \"is_memory\": false,\n \"is_mutable\": true,\n \"name\": \"fixtures\",\n \"path\": \"fixtures.db\",\n \"size\": 225280\n }\n]", "breadcrumbs": "[\"Introspection\"]", "references": "[{\"href\": \"https://latest.datasette.io/-/databases\", \"label\": \"Databases example\"}]"} {"id": "introspection:messagesdebugview", "page": "introspection", "ref": "messagesdebugview", "title": "/-/messages", "content": "The debug tool at /-/messages can be used to set flash messages to try out that feature. See .add_message(request, message, type=datasette.INFO) for details of this feature.", "breadcrumbs": "[\"Introspection\"]", "references": "[]"} {"id": "introspection:jsondataview-metadata", "page": "introspection", "ref": "jsondataview-metadata", "title": "/-/metadata", "content": "Shows the contents of the metadata.json file that was passed to datasette serve , if any. Metadata example : \n {\n \"license\": \"CC Attribution 4.0 License\",\n \"license_url\": \"http://creativecommons.org/licenses/by/4.0/\",\n \"source\": \"fivethirtyeight/data on GitHub\",\n \"source_url\": \"https://github.com/fivethirtyeight/data\",\n \"title\": \"Five Thirty Eight\",\n \"databases\": {\n\n }\n}", "breadcrumbs": "[\"Introspection\"]", "references": "[{\"href\": \"https://fivethirtyeight.datasettes.com/-/metadata\", \"label\": \"Metadata example\"}]"} {"id": "introspection:jsondataview-plugins", "page": "introspection", "ref": "jsondataview-plugins", "title": "/-/plugins", "content": "Shows a list of currently installed plugins and their versions. Plugins example : \n [\n {\n \"name\": \"datasette_cluster_map\",\n \"static\": true,\n \"templates\": false,\n \"version\": \"0.10\",\n \"hooks\": [\"extra_css_urls\", \"extra_js_urls\", \"extra_body_script\"]\n }\n] \n Add ?all=1 to include details of the default plugins baked into Datasette.", "breadcrumbs": "[\"Introspection\"]", "references": "[{\"href\": \"https://san-francisco.datasettes.com/-/plugins\", \"label\": \"Plugins example\"}]"} {"id": "introspection:jsondataview-settings", "page": "introspection", "ref": "jsondataview-settings", "title": "/-/settings", "content": "Shows the Settings for this instance of Datasette. Settings example : \n {\n \"default_facet_size\": 30,\n \"default_page_size\": 100,\n \"facet_suggest_time_limit_ms\": 50,\n \"facet_time_limit_ms\": 1000,\n \"max_returned_rows\": 1000,\n \"sql_time_limit_ms\": 1000\n}", "breadcrumbs": "[\"Introspection\"]", "references": "[{\"href\": \"https://fivethirtyeight.datasettes.com/-/settings\", \"label\": \"Settings example\"}]"} {"id": "introspection:jsondataview-threads", "page": "introspection", "ref": "jsondataview-threads", "title": "/-/threads", "content": "Shows details of threads and asyncio tasks. Threads example : \n {\n \"num_threads\": 2,\n \"threads\": [\n {\n \"daemon\": false,\n \"ident\": 4759197120,\n \"name\": \"MainThread\"\n },\n {\n \"daemon\": true,\n \"ident\": 123145319682048,\n \"name\": \"Thread-1\"\n },\n ],\n \"num_tasks\": 3,\n \"tasks\": [\n \" cb=[set.discard()]>\",\n \" wait_for=()]> cb=[run_until_complete..()]>\",\n \" wait_for=()]>>\"\n ]\n}", "breadcrumbs": "[\"Introspection\"]", "references": "[{\"href\": \"https://latest.datasette.io/-/threads\", \"label\": \"Threads example\"}]"} {"id": "introspection:jsondataview-versions", "page": "introspection", "ref": "jsondataview-versions", "title": "/-/versions", "content": "Shows the version of Datasette, Python and SQLite. Versions example : \n {\n \"datasette\": {\n \"version\": \"0.60\"\n },\n \"python\": {\n \"full\": \"3.8.12 (default, Dec 21 2021, 10:45:09) \\n[GCC 10.2.1 20210110]\",\n \"version\": \"3.8.12\"\n },\n \"sqlite\": {\n \"extensions\": {\n \"json1\": null\n },\n \"fts_versions\": [\n \"FTS5\",\n \"FTS4\",\n \"FTS3\"\n ],\n \"compile_options\": [\n \"COMPILER=gcc-6.3.0 20170516\",\n \"ENABLE_FTS3\",\n \"ENABLE_FTS4\",\n \"ENABLE_FTS5\",\n \"ENABLE_JSON1\",\n \"ENABLE_RTREE\",\n \"THREADSAFE=1\"\n ],\n \"version\": \"3.37.0\"\n }\n}", "breadcrumbs": "[\"Introspection\"]", "references": "[{\"href\": \"https://latest.datasette.io/-/versions\", \"label\": \"Versions example\"}]"} {"id": "changelog:id209", "page": "changelog", "ref": "id209", "title": "0.10 (2017-11-14)", "content": "Fixed #83 - 500 error on individual row pages. \n \n \n Stop using sqlite WITH RECURSIVE in our tests. \n The version of Python 3 running in Travis CI doesn't support this.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/83\", \"label\": \"#83\"}]"} {"id": "changelog:id208", "page": "changelog", "ref": "id208", "title": "0.11 (2017-11-14)", "content": "Added datasette publish now --force option. \n This calls now with --force - useful as it means you get a fresh copy of datasette even if Now has already cached that docker layer. \n \n \n Enable --cors by default when running in a container.", "breadcrumbs": "[\"Changelog\"]", "references": "[]"} {"id": "changelog:id198", "page": "changelog", "ref": "id198", "title": "0.12 (2017-11-16)", "content": "Added __version__ , now displayed as tooltip in page footer ( #108 ). \n \n \n Added initial docs, including a changelog ( #99 ). \n \n \n Turned on auto-escaping in Jinja. \n \n \n Added a UI for editing named parameters ( #96 ). \n You can now construct a custom SQL statement using SQLite named\n parameters (e.g. :name ) and datasette will display form fields for\n editing those parameters. Here\u2019s an example which lets you see the\n most popular names for dogs of different species registered through\n various dog registration schemes in Australia. \n \n \n \n \n \n Pin to specific Jinja version. ( #100 ). \n \n \n Default to 127.0.0.1 not 0.0.0.0. ( #98 ). \n \n \n Added extra metadata options to publish and package commands. ( #92 ). \n You can now run these commands like so: \n datasette now publish mydb.db \\\n --title=\"My Title\" \\\n --source=\"Source\" \\\n --source_url=\"http://www.example.com/\" \\\n --license=\"CC0\" \\\n --license_url=\"https://creativecommons.org/publicdomain/zero/1.0/\" \n This will write those values into the metadata.json that is packaged with the\n app. If you also pass --metadata=metadata.json that file will be updated with the extra\n values before being written into the Docker image. \n \n \n Added production-ready Dockerfile ( #94 ) [Andrew\n Cutler] \n \n \n New ?_sql_time_limit_ms=10 argument to database and table page ( #95 ) \n \n \n SQL syntax highlighting with Codemirror ( #89 ) [Tom Dyson]", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/108\", \"label\": \"#108\"}, {\"href\": \"https://github.com/simonw/datasette/issues/99\", \"label\": \"#99\"}, {\"href\": \"https://github.com/simonw/datasette/issues/96\", \"label\": \"#96\"}, {\"href\": \"https://australian-dogs.now.sh/australian-dogs-3ba9628?sql=select+name%2C+count%28*%29+as+n+from+%28%0D%0A%0D%0Aselect+upper%28%22Animal+name%22%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2013%5D+where+Breed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28Animal_Name%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2014%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all+%0D%0A%0D%0Aselect+upper%28Animal_Name%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2015%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22AnimalName%22%29+as+name+from+%5BCity-of-Port-Adelaide-Enfield-Dog_Registrations_2016%5D+where+AnimalBreed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22Animal+Name%22%29+as+name+from+%5BMitcham-dog-registrations-2015%5D+where+Breed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22DOG_NAME%22%29+as+name+from+%5Bburnside-dog-registrations-2015%5D+where+DOG_BREED+like+%3Abreed%0D%0A%0D%0Aunion+all+%0D%0A%0D%0Aselect+upper%28%22Animal_Name%22%29+as+name+from+%5Bcity-of-playford-2015-dog-registration%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22Animal+Name%22%29+as+name+from+%5Bcity-of-prospect-dog-registration-details-2016%5D+where%22Breed+Description%22+like+%3Abreed%0D%0A%0D%0A%29+group+by+name+order+by+n+desc%3B&breed=pug\", \"label\": \"Here\u2019s an example\"}, {\"href\": \"https://github.com/simonw/datasette/issues/100\", \"label\": \"#100\"}, {\"href\": \"https://github.com/simonw/datasette/issues/98\", \"label\": \"#98\"}, {\"href\": \"https://github.com/simonw/datasette/issues/92\", \"label\": \"#92\"}, {\"href\": \"https://github.com/simonw/datasette/issues/94\", \"label\": \"#94\"}, {\"href\": \"https://github.com/simonw/datasette/issues/95\", \"label\": \"#95\"}, {\"href\": \"https://github.com/simonw/datasette/issues/89\", \"label\": \"#89\"}]"} {"id": "changelog:id183", "page": "changelog", "ref": "id183", "title": "0.13 (2017-11-24)", "content": "Search now applies to current filters. \n Combined search into the same form as filters. \n Closes #133 \n \n \n Much tidier design for table view header. \n Closes #147 \n \n \n Added ?column__not=blah filter. \n Closes #148 \n \n \n Row page now resolves foreign keys. \n Closes #132 \n \n \n Further tweaks to select/input filter styling. \n Refs #86 - thanks for the help, @natbat! \n \n \n Show linked foreign key in table cells. \n \n \n Added UI for editing table filters. \n Refs #86 \n \n \n Hide FTS-created tables on index pages. \n Closes #129 \n \n \n Add publish to heroku support [Jacob Kaplan-Moss] \n datasette publish heroku mydb.db \n Pull request #104 \n \n \n Initial implementation of ?_group_count=column . \n URL shortcut for counting rows grouped by one or more columns. \n ?_group_count=column1&_group_count=column2 works as well. \n SQL generated looks like this: \n select \"qSpecies\", count(*) as \"count\"\nfrom Street_Tree_List\ngroup by \"qSpecies\"\norder by \"count\" desc limit 100 \n Or for two columns like this: \n select \"qSpecies\", \"qSiteInfo\", count(*) as \"count\"\nfrom Street_Tree_List\ngroup by \"qSpecies\", \"qSiteInfo\"\norder by \"count\" desc limit 100 \n Refs #44 \n \n \n Added --build=master option to datasette publish and package. \n The datasette publish and datasette package commands both now accept an\n optional --build argument. If provided, this can be used to specify a branch\n published to GitHub that should be built into the container. \n This makes it easier to test code that has not yet been officially released to\n PyPI, e.g.: \n datasette publish now mydb.db --branch=master \n \n \n Implemented ?_search=XXX + UI if a FTS table is detected. \n Closes #131 \n \n \n Added datasette --version support. \n \n \n Table views now show expanded foreign key references, if possible. \n If a table has foreign key columns, and those foreign key tables have\n label_columns , the TableView will now query those other tables for the\n corresponding values and display those values as links in the corresponding\n table cells. \n label_columns are currently detected by the inspect() function, which looks\n for any table that has just two columns - an ID column and one other - and\n sets the label_column to be that second non-ID column. \n \n \n Don't prevent tabbing to \"Run SQL\" button ( #117 ) [Robert Gieseke] \n See comment in #115 \n \n \n Add keyboard shortcut to execute SQL query ( #115 ) [Robert Gieseke] \n \n \n Allow --load-extension to be set via environment variable. \n \n \n Add support for ?field__isnull=1 ( #107 ) [Ray N] \n \n \n Add spatialite, switch to debian and local build ( #114 ) [Ariel N\u00fa\u00f1ez] \n \n \n Added --load-extension argument to datasette serve. \n Allows loading of SQLite extensions. Refs #110 .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/133\", \"label\": \"#133\"}, {\"href\": \"https://github.com/simonw/datasette/issues/147\", \"label\": \"#147\"}, {\"href\": \"https://github.com/simonw/datasette/issues/148\", \"label\": \"#148\"}, {\"href\": \"https://github.com/simonw/datasette/issues/132\", \"label\": \"#132\"}, {\"href\": \"https://github.com/simonw/datasette/issues/86\", \"label\": \"#86\"}, {\"href\": \"https://github.com/simonw/datasette/issues/86\", \"label\": \"#86\"}, {\"href\": \"https://github.com/simonw/datasette/issues/129\", \"label\": \"#129\"}, {\"href\": \"https://github.com/simonw/datasette/issues/104\", \"label\": \"#104\"}, {\"href\": \"https://github.com/simonw/datasette/issues/44\", \"label\": \"#44\"}, {\"href\": \"https://github.com/simonw/datasette/issues/131\", \"label\": \"#131\"}, {\"href\": \"https://github.com/simonw/datasette/issues/117\", \"label\": \"#117\"}, {\"href\": \"https://github.com/simonw/datasette/issues/115\", \"label\": \"#115\"}, {\"href\": \"https://github.com/simonw/datasette/issues/115\", \"label\": \"#115\"}, {\"href\": \"https://github.com/simonw/datasette/issues/107\", \"label\": \"#107\"}, {\"href\": \"https://github.com/simonw/datasette/issues/114\", \"label\": \"#114\"}, {\"href\": \"https://github.com/simonw/datasette/issues/110\", \"label\": \"#110\"}]"} {"id": "changelog:id174", "page": "changelog", "ref": "id174", "title": "0.14 (2017-12-09)", "content": "The theme of this release is customization: Datasette now allows every aspect\n of its presentation to be customized \n either using additional CSS or by providing entirely new templates. \n Datasette's metadata.json format \n has also been expanded, to allow per-database and per-table metadata. A new\n datasette skeleton command can be used to generate a skeleton JSON file\n ready to be filled in with per-database and per-table details. \n The metadata.json file can also be used to define\n canned queries ,\n as a more powerful alternative to SQL views. \n \n \n extra_css_urls / extra_js_urls in metadata \n A mechanism in the metadata.json format for adding custom CSS and JS urls. \n Create a metadata.json file that looks like this: \n {\n \"extra_css_urls\": [\n \"https://simonwillison.net/static/css/all.bf8cd891642c.css\"\n ],\n \"extra_js_urls\": [\n \"https://code.jquery.com/jquery-3.2.1.slim.min.js\"\n ]\n} \n Then start datasette like this: \n datasette mydb.db --metadata=metadata.json \n The CSS and JavaScript files will be linked in the of every page. \n You can also specify a SRI (subresource integrity hash) for these assets: \n {\n \"extra_css_urls\": [\n {\n \"url\": \"https://simonwillison.net/static/css/all.bf8cd891642c.css\",\n \"sri\": \"sha384-9qIZekWUyjCyDIf2YK1FRoKiPJq4PHt6tp/ulnuuyRBvazd0hG7pWbE99zvwSznI\"\n }\n ],\n \"extra_js_urls\": [\n {\n \"url\": \"https://code.jquery.com/jquery-3.2.1.slim.min.js\",\n \"sri\": \"sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=\"\n }\n ]\n} \n Modern browsers will only execute the stylesheet or JavaScript if the SRI hash\n matches the content served. You can generate hashes using https://www.srihash.org/ \n \n \n Auto-link column values that look like URLs ( #153 ) \n \n \n CSS styling hooks as classes on the body ( #153 ) \n Every template now gets CSS classes in the body designed to support custom\n styling. \n The index template (the top level page at / ) gets this: \n \n The database template ( /dbname/ ) gets this: \n \n The table template ( /dbname/tablename ) gets: \n \n The row template ( /dbname/tablename/rowid ) gets: \n \n The db-x and table-x classes use the database or table names themselves IF\n they are valid CSS identifiers. If they aren't, we strip any invalid\n characters out and append a 6 character md5 digest of the original name, in\n order to ensure that multiple tables which resolve to the same stripped\n character version still have different CSS classes. \n Some examples (extracted from the unit tests): \n \"simple\" => \"simple\"\n\"MixedCase\" => \"MixedCase\"\n\"-no-leading-hyphens\" => \"no-leading-hyphens-65bea6\"\n\"_no-leading-underscores\" => \"no-leading-underscores-b921bc\"\n\"no spaces\" => \"no-spaces-7088d7\"\n\"-\" => \"336d5e\"\n\"no $ characters\" => \"no--characters-59e024\" \n \n \n datasette --template-dir=mytemplates/ argument \n You can now pass an additional argument specifying a directory to look for\n custom templates in. \n Datasette will fall back on the default templates if a template is not\n found in that directory. \n \n \n Ability to over-ride templates for individual tables/databases. \n It is now possible to over-ride templates on a per-database / per-row or per-\n table basis. \n When you access e.g. /mydatabase/mytable Datasette will look for the following: \n - table-mydatabase-mytable.html\n- table.html \n If you provided a --template-dir argument to datasette serve it will look in\n that directory first. \n The lookup rules are as follows: \n Index page (/):\n index.html\n\nDatabase page (/mydatabase):\n database-mydatabase.html\n database.html\n\nTable page (/mydatabase/mytable):\n table-mydatabase-mytable.html\n table.html\n\nRow page (/mydatabase/mytable/id):\n row-mydatabase-mytable.html\n row.html \n If a table name has spaces or other unexpected characters in it, the template\n filename will follow the same rules as our custom CSS classes\n - for example, a table called \"Food Trucks\"\n will attempt to load the following templates: \n table-mydatabase-Food-Trucks-399138.html\ntable.html \n It is possible to extend the default templates using Jinja template\n inheritance. If you want to customize EVERY row template with some additional\n content you can do so by creating a row.html template like this: \n {% extends \"default:row.html\" %}\n\n{% block content %}\n

EXTRA HTML AT THE TOP OF THE CONTENT BLOCK

\n

This line renders the original block:

\n{{ super() }}\n{% endblock %} \n \n \n --static option for datasette serve ( #160 ) \n You can now tell Datasette to serve static files from a specific location at a\n specific mountpoint. \n For example: \n datasette serve mydb.db --static extra-css:/tmp/static/css \n Now if you visit this URL: \n http://localhost:8001/extra-css/blah.css \n The following file will be served: \n /tmp/static/css/blah.css \n \n \n Canned query support. \n Named canned queries can now be defined in metadata.json like this: \n {\n \"databases\": {\n \"timezones\": {\n \"queries\": {\n \"timezone_for_point\": \"select tzid from timezones ...\"\n }\n }\n }\n} \n These will be shown in a new \"Queries\" section beneath \"Views\" on the database page. \n \n \n New datasette skeleton command for generating metadata.json ( #164 ) \n \n \n metadata.json support for per-table/per-database metadata ( #165 ) \n Also added support for descriptions and HTML descriptions. \n Here's an example metadata.json file illustrating custom per-database and per-\n table metadata: \n {\n \"title\": \"Overall datasette title\",\n \"description_html\": \"This is a description with HTML.\",\n \"databases\": {\n \"db1\": {\n \"title\": \"First database\",\n \"description\": \"This is a string description & has no HTML\",\n \"license_url\": \"http://example.com/\",\n \"license\": \"The example license\",\n \"queries\": {\n \"canned_query\": \"select * from table1 limit 3;\"\n },\n \"tables\": {\n \"table1\": {\n \"title\": \"Custom title for table1\",\n \"description\": \"Tables can have descriptions too\",\n \"source\": \"This has a custom source\",\n \"source_url\": \"http://example.com/\"\n }\n }\n }\n }\n} \n \n \n Renamed datasette build command to datasette inspect ( #130 ) \n \n \n Upgrade to Sanic 0.7.0 ( #168 ) \n https://github.com/channelcat/sanic/releases/tag/0.7.0 \n \n \n Package and publish commands now accept --static and --template-dir \n Example usage: \n datasette package --static css:extra-css/ --static js:extra-js/ \\\n sf-trees.db --template-dir templates/ --tag sf-trees --branch master \n This creates a local Docker image that includes copies of the templates/,\n extra-css/ and extra-js/ directories. You can then run it like this: \n docker run -p 8001:8001 sf-trees \n For publishing to Zeit now: \n datasette publish now --static css:extra-css/ --static js:extra-js/ \\\n sf-trees.db --template-dir templates/ --name sf-trees --branch master \n \n \n HTML comment showing which templates were considered for a page ( #171 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://docs.datasette.io/en/stable/custom_templates.html\", \"label\": \"to be customized\"}, {\"href\": \"https://docs.datasette.io/en/stable/metadata.html\", \"label\": \"metadata.json format\"}, {\"href\": \"https://docs.datasette.io/en/stable/sql_queries.html#canned-queries\", \"label\": \"canned queries\"}, {\"href\": \"https://www.srihash.org/\", \"label\": \"https://www.srihash.org/\"}, {\"href\": \"https://github.com/simonw/datasette/issues/153\", \"label\": \"#153\"}, {\"href\": \"https://github.com/simonw/datasette/issues/153\", \"label\": \"#153\"}, {\"href\": \"https://github.com/simonw/datasette/issues/160\", \"label\": \"#160\"}, {\"href\": \"https://github.com/simonw/datasette/issues/164\", \"label\": \"#164\"}, {\"href\": \"https://github.com/simonw/datasette/issues/165\", \"label\": \"#165\"}, {\"href\": \"https://github.com/simonw/datasette/issues/130\", \"label\": \"#130\"}, {\"href\": \"https://github.com/simonw/datasette/issues/168\", \"label\": \"#168\"}, {\"href\": \"https://github.com/channelcat/sanic/releases/tag/0.7.0\", \"label\": \"https://github.com/channelcat/sanic/releases/tag/0.7.0\"}, {\"href\": \"https://github.com/simonw/datasette/issues/171\", \"label\": \"#171\"}]"} {"id": "changelog:id161", "page": "changelog", "ref": "id161", "title": "0.15 (2018-04-09)", "content": "The biggest new feature in this release is the ability to sort by column. On the\n table page the column headers can now be clicked to apply sort (or descending\n sort), or you can specify ?_sort=column or ?_sort_desc=column directly\n in the URL. \n \n \n table_rows => table_rows_count , filtered_table_rows =>\n filtered_table_rows_count \n Renamed properties. Closes #194 \n \n \n New sortable_columns option in metadata.json to control sort options. \n You can now explicitly set which columns in a table can be used for sorting\n using the _sort and _sort_desc arguments using metadata.json : \n {\n \"databases\": {\n \"database1\": {\n \"tables\": {\n \"example_table\": {\n \"sortable_columns\": [\n \"height\",\n \"weight\"\n ]\n }\n }\n }\n }\n} \n Refs #189 \n \n \n Column headers now link to sort/desc sort - refs #189 \n \n \n _sort and _sort_desc parameters for table views \n Allows for paginated sorted results based on a specified column. \n Refs #189 \n \n \n Total row count now correct even if _next applied \n \n \n Use .custom_sql() for _group_count implementation (refs #150 ) \n \n \n Make HTML title more readable in query template ( #180 ) [Ryan Pitts] \n \n \n New ?_shape=objects/object/lists param for JSON API ( #192 ) \n New _shape= parameter replacing old .jsono extension \n Now instead of this: \n /database/table.jsono \n We use the _shape parameter like this: \n /database/table.json?_shape=objects \n Also introduced a new _shape called object which looks like this: \n /database/table.json?_shape=object \n Returning an object for the rows key: \n ...\n\"rows\": {\n \"pk1\": {\n ...\n },\n \"pk2\": {\n ...\n }\n} \n Refs #122 \n \n \n Utility for writing test database fixtures to a .db file \n python tests/fixtures.py /tmp/hello.db \n This is useful for making a SQLite database of the test fixtures for\n interactive exploration. \n \n \n Compound primary key _next= now plays well with extra filters \n Closes #190 \n \n \n Fixed bug with keyset pagination over compound primary keys \n Refs #190 \n \n \n Database/Table views inherit source/license/source_url/license_url \n metadata \n If you set the source_url/license_url/source/license fields in your root\n metadata those values will now be inherited all the way down to the database\n and table templates. \n The title/description are NOT inherited. \n Also added unit tests for the HTML generated by the metadata. \n Refs #185 \n \n \n Add metadata, if it exists, to heroku temp dir ( #178 ) [Tony Hirst] \n \n \n Initial documentation for pagination \n \n \n Broke up test_app into test_api and test_html \n \n \n Fixed bug with .json path regular expression \n I had a table called geojson and it caused an exception because the regex\n was matching .json and not \\.json \n \n \n Deploy to Heroku with Python 3.6.3", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/194\", \"label\": \"#194\"}, {\"href\": \"https://github.com/simonw/datasette/issues/189\", \"label\": \"#189\"}, {\"href\": \"https://github.com/simonw/datasette/issues/189\", \"label\": \"#189\"}, {\"href\": \"https://github.com/simonw/datasette/issues/189\", \"label\": \"#189\"}, {\"href\": \"https://github.com/simonw/datasette/issues/150\", \"label\": \"#150\"}, {\"href\": \"https://github.com/simonw/datasette/issues/180\", \"label\": \"#180\"}, {\"href\": \"https://github.com/simonw/datasette/issues/192\", \"label\": \"#192\"}, {\"href\": \"https://github.com/simonw/datasette/issues/122\", \"label\": \"#122\"}, {\"href\": \"https://github.com/simonw/datasette/issues/190\", \"label\": \"#190\"}, {\"href\": \"https://github.com/simonw/datasette/issues/190\", \"label\": \"#190\"}, {\"href\": \"https://github.com/simonw/datasette/issues/185\", \"label\": \"#185\"}, {\"href\": \"https://github.com/simonw/datasette/issues/178\", \"label\": \"#178\"}]"} {"id": "changelog:id155", "page": "changelog", "ref": "id155", "title": "0.16 (2018-04-13)", "content": "Better mechanism for handling errors; 404s for missing table/database \n New error mechanism closes #193 \n 404s for missing tables/databases closes #184 \n \n \n long_description in markdown for the new PyPI \n \n \n Hide SpatiaLite system tables. [Russ Garrett] \n \n \n Allow explain select / explain query plan select #201 \n \n \n Datasette inspect now finds primary_keys #195 \n \n \n Ability to sort using form fields (for mobile portrait mode) #199 \n We now display sort options as a select box plus a descending checkbox, which\n means you can apply sort orders even in portrait mode on a mobile phone where\n the column headers are hidden.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/193\", \"label\": \"#193\"}, {\"href\": \"https://github.com/simonw/datasette/issues/184\", \"label\": \"#184\"}, {\"href\": \"https://github.com/simonw/datasette/issues/201\", \"label\": \"#201\"}, {\"href\": \"https://github.com/simonw/datasette/issues/195\", \"label\": \"#195\"}, {\"href\": \"https://github.com/simonw/datasette/issues/199\", \"label\": \"#199\"}]"} {"id": "changelog:id154", "page": "changelog", "ref": "id154", "title": "0.17 (2018-04-13)", "content": "Release 0.17 to fix issues with PyPI", "breadcrumbs": "[\"Changelog\"]", "references": "[]"} {"id": "changelog:id152", "page": "changelog", "ref": "id152", "title": "0.18 (2018-04-14)", "content": "This release introduces support for units ,\n contributed by Russ Garrett ( #203 ).\n You can now optionally specify the units for specific columns using metadata.json .\n Once specified, units will be displayed in the HTML view of your table. They also become\n available for use in filters - if a column is configured with a unit of distance, you can\n request all rows where that column is less than 50 meters or more than 20 feet for example. \n \n \n Link foreign keys which don't have labels. [Russ Garrett] \n This renders unlabeled FKs as simple links. \n Also includes bonus fixes for two minor issues: \n \n \n In foreign key link hrefs the primary key was escaped using HTML\n escaping rather than URL escaping. This broke some non-integer PKs. \n \n \n Print tracebacks to console when handling 500 errors. \n \n \n \n \n Fix SQLite error when loading rows with no incoming FKs. [Russ\n Garrett] \n This fixes an error caused by an invalid query when loading incoming FKs. \n The error was ignored due to async but it still got printed to the\n console. \n \n \n Allow custom units to be registered with Pint. [Russ Garrett] \n \n \n Support units in filters. [Russ Garrett] \n \n \n Tidy up units support. [Russ Garrett] \n \n \n Add units to exported JSON \n \n \n Units key in metadata skeleton \n \n \n Docs \n \n \n \n \n Initial units support. [Russ Garrett] \n Add support for specifying units for a column in metadata.json and\n rendering them on display using\n pint", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://docs.datasette.io/en/stable/metadata.html#specifying-units-for-a-column\", \"label\": \"support for units\"}, {\"href\": \"https://github.com/simonw/datasette/issues/203\", \"label\": \"#203\"}, {\"href\": \"https://pint.readthedocs.io/en/latest/\", \"label\": \"pint\"}]"} {"id": "changelog:id145", "page": "changelog", "ref": "id145", "title": "0.19 (2018-04-16)", "content": "This is the first preview of the new Datasette plugins mechanism. Only two\n plugin hooks are available so far - for custom SQL functions and custom template\n filters. There's plenty more to come - read the documentation and get involved in\n the tracking ticket if you\n have feedback on the direction so far. \n \n \n Fix for _sort_desc=sortable_with_nulls test, refs #216 \n \n \n Fixed #216 - paginate correctly when sorting by nullable column \n \n \n Initial documentation for plugins, closes #213 \n https://docs.datasette.io/en/stable/plugins.html \n \n \n New --plugins-dir=plugins/ option ( #212 ) \n New option causing Datasette to load and evaluate all of the Python files in\n the specified directory and register any plugins that are defined in those\n files. \n This new option is available for the following commands: \n datasette serve mydb.db --plugins-dir=plugins/\ndatasette publish now/heroku mydb.db --plugins-dir=plugins/\ndatasette package mydb.db --plugins-dir=plugins/ \n \n \n Start of the plugin system, based on pluggy ( #210 ) \n Uses https://pluggy.readthedocs.io/ originally created for the py.test project \n We're starting with two plugin hooks: \n prepare_connection(conn) \n This is called when a new SQLite connection is created. It can be used to register custom SQL functions. \n prepare_jinja2_environment(env) \n This is called with the Jinja2 environment. It can be used to register custom template tags and filters. \n 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 \n Refs #14 \n \n \n Return HTTP 405 on InvalidUsage rather than 500. [Russ Garrett] \n This also stops it filling up the logs. This happens for HEAD requests\n at the moment - which perhaps should be handled better, but that's a\n different issue.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://docs.datasette.io/en/stable/plugins.html\", \"label\": \"the documentation\"}, {\"href\": \"https://github.com/simonw/datasette/issues/14\", \"label\": \"the tracking ticket\"}, {\"href\": \"https://github.com/simonw/datasette/issues/216\", \"label\": \"#216\"}, {\"href\": \"https://github.com/simonw/datasette/issues/216\", \"label\": \"#216\"}, {\"href\": \"https://github.com/simonw/datasette/issues/213\", \"label\": \"#213\"}, {\"href\": \"https://docs.datasette.io/en/stable/plugins.html\", \"label\": \"https://docs.datasette.io/en/stable/plugins.html\"}, {\"href\": \"https://github.com/simonw/datasette/issues/212\", \"label\": \"#212\"}, {\"href\": \"https://github.com/simonw/datasette/issues/14\", \"label\": \"#210\"}, {\"href\": \"https://pluggy.readthedocs.io/\", \"label\": \"https://pluggy.readthedocs.io/\"}, {\"href\": \"https://github.com/simonw/datasette-plugin-demos\", \"label\": \"https://github.com/simonw/datasette-plugin-demos\"}, {\"href\": \"https://github.com/simonw/datasette/issues/14\", \"label\": \"#14\"}]"} {"id": "changelog:id136", "page": "changelog", "ref": "id136", "title": "0.20 (2018-04-20)", "content": "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. \n \n \n Add col-X classes to HTML table on custom query page \n \n \n Fixed out-dated template in documentation \n \n \n Plugins can now bundle custom templates, #224 \n \n \n Added /-/metadata /-/plugins /-/inspect, #225 \n \n \n Documentation for --install option, refs #223 \n \n \n Datasette publish/package --install option, #223 \n \n \n Fix for plugins in Python 3.5, #222 \n \n \n New plugin hooks: extra_css_urls() and extra_js_urls(), #214 \n \n \n /-/static-plugins/PLUGIN_NAME/ now serves static/ from plugins \n \n \n now gets class=\"col-X\" - plus added col-X documentation \n \n \n Use to_css_class for table cell column classes \n This ensures that columns with spaces in the name will still\n generate usable CSS class names. Refs #209 \n \n \n Add column name classes to s, make PK bold [Russ Garrett] \n \n \n Don't duplicate simple primary keys in the link column [Russ Garrett] \n When there's a simple (single-column) primary key, it looks weird to\n duplicate it in the link column. \n This change removes the second PK column and treats the link column as\n if it were the PK column from a header/sorting perspective. \n \n \n Correct escaping for HTML display of row links [Russ Garrett] \n \n \n Longer time limit for test_paginate_compound_keys \n It was failing intermittently in Travis - see #209 \n \n \n Use application/octet-stream for downloadable databases \n \n \n Updated PyPI classifiers \n \n \n Updated PyPI link to pypi.org", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/224\", \"label\": \"#224\"}, {\"href\": \"https://github.com/simonw/datasette/issues/225\", \"label\": \"#225\"}, {\"href\": \"https://github.com/simonw/datasette/issues/223\", \"label\": \"#223\"}, {\"href\": \"https://github.com/simonw/datasette/issues/223\", \"label\": \"#223\"}, {\"href\": \"https://github.com/simonw/datasette/issues/222\", \"label\": \"#222\"}, {\"href\": \"https://github.com/simonw/datasette/issues/214\", \"label\": \"#214\"}, {\"href\": \"https://github.com/simonw/datasette/issues/209\", \"label\": \"#209\"}, {\"href\": \"https://github.com/simonw/datasette/issues/209\", \"label\": \"#209\"}]"} {"id": "changelog:id123", "page": "changelog", "ref": "id123", "title": "0.21 (2018-05-05)", "content": "New JSON _shape= options, the ability to set table _size= and a mechanism for searching within specific columns. \n \n \n Default tests to using a longer timelimit \n Every now and then a test will fail in Travis CI on Python 3.5 because it hit\n the default 20ms SQL time limit. \n Test fixtures now default to a 200ms time limit, and we only use the 20ms time\n limit for the specific test that tests query interruption. This should make\n our tests on Python 3.5 in Travis much more stable. \n \n \n Support _search_COLUMN=text searches, closes #237 \n \n \n Show version on /-/plugins page, closes #248 \n \n \n ?_size=max option, closes #249 \n \n \n Added /-/versions and /-/versions.json , closes #244 \n Sample output: \n {\n \"python\": {\n \"version\": \"3.6.3\",\n \"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)]\"\n },\n \"datasette\": {\n \"version\": \"0.20\"\n },\n \"sqlite\": {\n \"version\": \"3.23.1\",\n \"extensions\": {\n \"json1\": null,\n \"spatialite\": \"4.3.0a\"\n }\n }\n} \n \n \n Renamed ?_sql_time_limit_ms= to ?_timelimit , closes #242 \n \n \n New ?_shape=array option + tweaks to _shape , closes #245 \n \n \n Default is now ?_shape=arrays (renamed from lists ) \n \n \n New ?_shape=array returns an array of objects as the root object \n \n \n Changed ?_shape=object to return the object as the root \n \n \n Updated docs \n \n \n \n \n FTS tables now detected by inspect() , closes #240 \n \n \n New ?_size=XXX query string parameter for table view, closes #229 \n Also added documentation for all of the _special arguments. \n Plus deleted some duplicate logic implementing _group_count . \n \n \n If max_returned_rows==page_size , increment max_returned_rows - fixes #230 \n \n \n New hidden: True option for table metadata, closes #239 \n \n \n Hide idx_* tables if spatialite detected, closes #228 \n \n \n Added class=rows-and-columns to custom query results table \n \n \n Added CSS class rows-and-columns to main table \n \n \n label_column option in metadata.json - closes #234", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/237\", \"label\": \"#237\"}, {\"href\": \"https://github.com/simonw/datasette/issues/248\", \"label\": \"#248\"}, {\"href\": \"https://github.com/simonw/datasette/issues/249\", \"label\": \"#249\"}, {\"href\": \"https://github.com/simonw/datasette/issues/244\", \"label\": \"#244\"}, {\"href\": \"https://github.com/simonw/datasette/issues/242\", \"label\": \"#242\"}, {\"href\": \"https://github.com/simonw/datasette/issues/245\", \"label\": \"#245\"}, {\"href\": \"https://github.com/simonw/datasette/issues/240\", \"label\": \"#240\"}, {\"href\": \"https://github.com/simonw/datasette/issues/229\", \"label\": \"#229\"}, {\"href\": \"https://github.com/simonw/datasette/issues/230\", \"label\": \"#230\"}, {\"href\": \"https://github.com/simonw/datasette/issues/239\", \"label\": \"#239\"}, {\"href\": \"https://github.com/simonw/datasette/issues/228\", \"label\": \"#228\"}, {\"href\": \"https://github.com/simonw/datasette/issues/234\", \"label\": \"#234\"}]"} {"id": "changelog:id118", "page": "changelog", "ref": "id118", "title": "0.22 (2018-05-20)", "content": "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. \n In addition to the work on facets: \n \n \n Added docs for introspection endpoints \n \n \n New --config option, added --help-config , closes #274 \n Removed the --page_size= argument to datasette serve in favour of: \n datasette serve --config default_page_size:50 mydb.db \n Added new help section: \n datasette --help-config \n Config options:\n default_page_size Default page size for the table view\n (default=100)\n max_returned_rows Maximum rows that can be returned from a table\n or custom query (default=1000)\n sql_time_limit_ms Time limit for a SQL query in milliseconds\n (default=1000)\n default_facet_size Number of values to return for requested facets\n (default=30)\n facet_time_limit_ms Time limit for calculating a requested facet\n (default=200)\n facet_suggest_time_limit_ms Time limit for calculating a suggested facet\n (default=50) \n \n \n Only apply responsive table styles to .rows-and-column \n Otherwise they interfere with tables in the description, e.g. on\n https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo \n \n \n Refactored views into new views/ modules, refs #256 \n \n \n Documentation for SQLite full-text search support, closes #253 \n \n \n /-/versions now includes SQLite fts_versions , closes #252", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://simonwillison.net/2018/May/20/datasette-facets/\", \"label\": \"Datasette Facets\"}, {\"href\": \"https://docs.datasette.io/en/stable/introspection.html\", \"label\": \"docs for introspection endpoints\"}, {\"href\": \"https://github.com/simonw/datasette/issues/274\", \"label\": \"#274\"}, {\"href\": \"https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo\", \"label\": \"https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo\"}, {\"href\": \"https://github.com/simonw/datasette/issues/256\", \"label\": \"#256\"}, {\"href\": \"https://docs.datasette.io/en/stable/full_text_search.html\", \"label\": \"Documentation for SQLite full-text search\"}, {\"href\": \"https://github.com/simonw/datasette/issues/253\", \"label\": \"#253\"}, {\"href\": \"https://github.com/simonw/datasette/issues/252\", \"label\": \"#252\"}]"} {"id": "changelog:id115", "page": "changelog", "ref": "id115", "title": "0.22.1 (2018-05-23)", "content": "Bugfix release, plus we now use versioneer for our version numbers. \n \n \n Faceting no longer breaks pagination, fixes #282 \n \n \n Add __version_info__ derived from __version__ [Robert Gieseke] \n This might be tuple of more than two values (major and minor\n version) if commits have been made after a release. \n \n \n Add version number support with Versioneer. [Robert Gieseke] \n Versioneer Licence:\n Public Domain (CC0-1.0) \n Closes #273 \n \n \n Refactor inspect logic [Russ Garrett]", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/warner/python-versioneer\", \"label\": \"versioneer\"}, {\"href\": \"https://github.com/simonw/datasette/issues/282\", \"label\": \"#282\"}, {\"href\": \"https://github.com/simonw/datasette/issues/273\", \"label\": \"#273\"}]"} {"id": "changelog:id114", "page": "changelog", "ref": "id114", "title": "0.23 (2018-06-18)", "content": "This release features CSV export, improved options for foreign key expansions,\n new configuration settings and improved support for SpatiaLite. \n See datasette/compare/0.22.1...0.23 for a full list of\n commits added since the last release.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/compare/0.22.1...0.23\", \"label\": \"datasette/compare/0.22.1...0.23\"}]"} {"id": "changelog:id107", "page": "changelog", "ref": "id107", "title": "0.23.1 (2018-06-21)", "content": "Minor bugfix release. \n \n \n Correctly display empty strings in HTML table, closes #314 \n \n \n Allow \".\" in database filenames, closes #302 \n \n \n 404s ending in slash redirect to remove that slash, closes #309 \n \n \n Fixed incorrect display of compound primary keys with foreign key\n references. Closes #319 \n \n \n Docs + example of canned SQL query using || concatenation. Closes #321 \n \n \n Correctly display facets with value of 0 - closes #318 \n \n \n Default 'expand labels' to checked in CSV advanced export", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/314\", \"label\": \"#314\"}, {\"href\": \"https://github.com/simonw/datasette/issues/302\", \"label\": \"#302\"}, {\"href\": \"https://github.com/simonw/datasette/issues/309\", \"label\": \"#309\"}, {\"href\": \"https://github.com/simonw/datasette/issues/319\", \"label\": \"#319\"}, {\"href\": \"https://github.com/simonw/datasette/issues/321\", \"label\": \"#321\"}, {\"href\": \"https://github.com/simonw/datasette/issues/318\", \"label\": \"#318\"}]"} {"id": "changelog:id103", "page": "changelog", "ref": "id103", "title": "0.23.2 (2018-07-07)", "content": "Minor bugfix and documentation release. \n \n \n CSV export now respects --cors , fixes #326 \n \n \n Installation instructions , including docker image - closes #328 \n \n \n Fix for row pages for tables with / in, closes #325", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/326\", \"label\": \"#326\"}, {\"href\": \"https://github.com/simonw/datasette/issues/328\", \"label\": \"#328\"}, {\"href\": \"https://github.com/simonw/datasette/issues/325\", \"label\": \"#325\"}]"} {"id": "changelog:id94", "page": "changelog", "ref": "id94", "title": "0.24 (2018-07-23)", "content": "A number of small new features: \n \n \n datasette publish heroku now supports --extra-options , fixes #334 \n \n \n Custom error message if SpatiaLite is needed for specified database, closes #331 \n \n \n New config option: truncate_cells_html for truncating long cell values in HTML view - closes #330 \n \n \n Documentation for datasette publish and datasette package , closes #337 \n \n \n Fixed compatibility with Python 3.7 \n \n \n datasette publish heroku now supports app names via the -n option, which can also be used to overwrite an existing application [Russ Garrett] \n \n \n Title and description metadata can now be set for canned SQL queries , closes #342 \n \n \n New force_https_on config option, fixes https:// API URLs when deploying to Zeit Now - closes #333 \n \n \n ?_json_infinity=1 query string argument for handling Infinity/-Infinity values in JSON, closes #332 \n \n \n URLs displayed in the results of custom SQL queries are now URLified, closes #298", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/334\", \"label\": \"#334\"}, {\"href\": \"https://github.com/simonw/datasette/issues/331\", \"label\": \"#331\"}, {\"href\": \"https://github.com/simonw/datasette/issues/330\", \"label\": \"#330\"}, {\"href\": \"https://github.com/simonw/datasette/issues/337\", \"label\": \"#337\"}, {\"href\": \"https://github.com/simonw/datasette/issues/342\", \"label\": \"#342\"}, {\"href\": \"https://github.com/simonw/datasette/issues/333\", \"label\": \"#333\"}, {\"href\": \"https://github.com/simonw/datasette/issues/332\", \"label\": \"#332\"}, {\"href\": \"https://github.com/simonw/datasette/issues/298\", \"label\": \"#298\"}]"} {"id": "changelog:id93", "page": "changelog", "ref": "id93", "title": "0.25 (2018-09-19)", "content": "New plugin hooks, improved database view support and an easier way to use more recent versions of SQLite. \n \n \n New publish_subcommand plugin hook. A plugin can now add additional datasette publish publishers in addition to the default now and heroku , both of which have been refactored into default plugins. publish_subcommand documentation . Closes #349 \n \n \n New render_cell plugin hook. Plugins can now customize how values are displayed in the HTML tables produced by Datasette's browsable interface. datasette-json-html and datasette-render-images are two new plugins that use this hook. render_cell documentation . Closes #352 \n \n \n New extra_body_script plugin hook, enabling plugins to provide additional JavaScript that should be added to the page footer. extra_body_script documentation . \n \n \n extra_css_urls and extra_js_urls hooks now take additional optional parameters, allowing them to be more selective about which pages they apply to. Documentation . \n \n \n You can now use the sortable_columns metadata setting to explicitly enable sort-by-column in the interface for database views, as well as for specific tables. \n \n \n The new fts_table and fts_pk metadata settings can now be used to explicitly configure full-text search for a table or a view , even if that table is not directly coupled to the SQLite FTS feature in the database schema itself. \n \n \n Datasette will now use pysqlite3 in place of the standard library sqlite3 module if it has been installed in the current environment. This makes it much easier to run Datasette against a more recent version of SQLite, including the just-released SQLite 3.25.0 which adds window function support. More details on how to use this in #360 \n \n \n New mechanism that allows plugin configuration options to be set using metadata.json .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/349\", \"label\": \"#349\"}, {\"href\": \"https://github.com/simonw/datasette-json-html\", \"label\": \"datasette-json-html\"}, {\"href\": \"https://github.com/simonw/datasette-render-images\", \"label\": \"datasette-render-images\"}, {\"href\": \"https://github.com/simonw/datasette/issues/352\", \"label\": \"#352\"}, {\"href\": \"https://github.com/coleifer/pysqlite3\", \"label\": \"pysqlite3\"}, {\"href\": \"https://www.sqlite.org/releaselog/3_25_0.html\", \"label\": \"SQLite 3.25.0\"}, {\"href\": \"https://github.com/simonw/datasette/issues/360\", \"label\": \"#360\"}]"} {"id": "changelog:id92", "page": "changelog", "ref": "id92", "title": "0.25.1 (2018-11-04)", "content": "Documentation improvements plus a fix for publishing to Zeit Now. \n \n \n datasette publish now now uses Zeit's v1 platform, to work around the new 100MB image limit. Thanks, @slygent - closes #366 .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/366\", \"label\": \"#366\"}]"} {"id": "changelog:id91", "page": "changelog", "ref": "id91", "title": "0.25.2 (2018-12-16)", "content": "datasette publish heroku now uses the python-3.6.7 runtime \n \n \n Added documentation on how to build the documentation \n \n \n Added documentation covering our release process \n \n \n Upgraded to pytest 4.0.2", "breadcrumbs": "[\"Changelog\"]", "references": "[]"} {"id": "changelog:id90", "page": "changelog", "ref": "id90", "title": "0.26 (2019-01-02)", "content": "datasette serve --reload now restarts Datasette if a database file changes on disk. \n \n \n datasette publish now now takes an optional --alias mysite.now.sh argument. This will attempt to set an alias after the deploy completes. \n \n \n Fixed a bug where the advanced CSV export form failed to include the currently selected filters ( #393 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/393\", \"label\": \"#393\"}]"} {"id": "changelog:id89", "page": "changelog", "ref": "id89", "title": "0.26.1 (2019-01-10)", "content": "/-/versions now includes SQLite compile_options ( #396 ) \n \n \n datasetteproject/datasette Docker image now uses SQLite 3.26.0 ( #397 ) \n \n \n Cleaned up some deprecation warnings under Python 3.7", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/396\", \"label\": \"#396\"}, {\"href\": \"https://hub.docker.com/r/datasetteproject/datasette\", \"label\": \"datasetteproject/datasette\"}, {\"href\": \"https://github.com/simonw/datasette/issues/397\", \"label\": \"#397\"}]"} {"id": "changelog:id88", "page": "changelog", "ref": "id88", "title": "0.27 (2019-01-31)", "content": "New command: datasette plugins ( documentation ) shows you the currently installed list of plugins. \n \n \n Datasette can now output newline-delimited JSON using the new ?_shape=array&_nl=on query string option. \n \n \n Added documentation on The Datasette Ecosystem . \n \n \n Now using Python 3.7.2 as the base for the official Datasette Docker image .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"http://ndjson.org/\", \"label\": \"newline-delimited JSON\"}, {\"href\": \"https://hub.docker.com/r/datasetteproject/datasette/\", \"label\": \"Datasette Docker image\"}]"} {"id": "changelog:id87", "page": "changelog", "ref": "id87", "title": "0.27.1 (2019-05-09)", "content": "Tiny bugfix release: don't install tests/ in the wrong place. Thanks, Veit Heller.", "breadcrumbs": "[\"Changelog\"]", "references": "[]"} {"id": "changelog:id85", "page": "changelog", "ref": "id85", "title": "0.28 (2019-05-19)", "content": "A salmagundi of new features!", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://adamj.eu/tech/2019/01/18/a-salmagundi-of-django-alpha-announcements/\", \"label\": \"salmagundi\"}]"} {"id": "changelog:id84", "page": "changelog", "ref": "id84", "title": "0.29 (2019-07-07)", "content": "ASGI, new plugin hooks, facet by date and much, much more...", "breadcrumbs": "[\"Changelog\"]", "references": "[]"} {"id": "changelog:id83", "page": "changelog", "ref": "id83", "title": "0.29.1 (2019-07-11)", "content": "Fixed bug with static mounts using relative paths which could lead to traversal exploits ( #555 ) - thanks Abdussamet Kocak! \n \n \n Datasette can now be run as a module: python -m datasette ( #556 ) - thanks, Abdussamet Kocak!", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/555\", \"label\": \"#555\"}, {\"href\": \"https://github.com/simonw/datasette/issues/556\", \"label\": \"#556\"}]"} {"id": "changelog:id82", "page": "changelog", "ref": "id82", "title": "0.29.2 (2019-07-13)", "content": "Bumped Uvicorn to 0.8.4, fixing a bug where the query string was not included in the server logs. ( #559 ) \n \n \n Fixed bug where the navigation breadcrumbs were not displayed correctly on the page for a custom query. ( #558 ) \n \n \n Fixed bug where custom query names containing unicode characters caused errors.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://www.uvicorn.org/\", \"label\": \"Uvicorn\"}, {\"href\": \"https://github.com/simonw/datasette/issues/559\", \"label\": \"#559\"}, {\"href\": \"https://github.com/simonw/datasette/issues/558\", \"label\": \"#558\"}]"} {"id": "changelog:id81", "page": "changelog", "ref": "id81", "title": "0.29.3 (2019-09-02)", "content": "Fixed implementation of CodeMirror on database page ( #560 ) \n \n \n Documentation typo fixes - thanks, Min ho Kim ( #561 ) \n \n \n Mechanism for detecting if a table has FTS enabled now works if the table name used alternative escaping mechanisms ( #570 ) - for compatibility with a recent change to sqlite-utils .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/560\", \"label\": \"#560\"}, {\"href\": \"https://github.com/simonw/datasette/pull/561\", \"label\": \"#561\"}, {\"href\": \"https://github.com/simonw/datasette/issues/570\", \"label\": \"#570\"}, {\"href\": \"https://github.com/simonw/sqlite-utils/pull/57\", \"label\": \"a recent change to sqlite-utils\"}]"} {"id": "changelog:id80", "page": "changelog", "ref": "id80", "title": "0.30 (2019-10-18)", "content": "Added /-/threads debugging page \n \n \n Allow EXPLAIN WITH... ( #583 ) \n \n \n Button to format SQL - thanks, Tobias Kunze ( #136 ) \n \n \n Sort databases on homepage by argument order - thanks, Tobias Kunze ( #585 ) \n \n \n Display metadata footer on custom SQL queries - thanks, Tobias Kunze ( #589 ) \n \n \n Use --platform=managed for publish cloudrun ( #587 ) \n \n \n Fixed bug returning non-ASCII characters in CSV ( #584 ) \n \n \n Fix for /foo v.s. /foo-bar bug ( #601 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/583\", \"label\": \"#583\"}, {\"href\": \"https://github.com/simonw/datasette/issues/136\", \"label\": \"#136\"}, {\"href\": \"https://github.com/simonw/datasette/issues/585\", \"label\": \"#585\"}, {\"href\": \"https://github.com/simonw/datasette/pull/589\", \"label\": \"#589\"}, {\"href\": \"https://github.com/simonw/datasette/issues/587\", \"label\": \"#587\"}, {\"href\": \"https://github.com/simonw/datasette/issues/584\", \"label\": \"#584\"}, {\"href\": \"https://github.com/simonw/datasette/issues/601\", \"label\": \"#601\"}]"} {"id": "changelog:id79", "page": "changelog", "ref": "id79", "title": "0.30.1 (2019-10-30)", "content": "Fixed bug where ?_where= parameter was not persisted in hidden form fields ( #604 ) \n \n \n Fixed bug with .JSON representation of row pages - thanks, Chris Shaw ( #603 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/604\", \"label\": \"#604\"}, {\"href\": \"https://github.com/simonw/datasette/issues/603\", \"label\": \"#603\"}]"} {"id": "changelog:id78", "page": "changelog", "ref": "id78", "title": "0.30.2 (2019-11-02)", "content": "/-/plugins page now uses distribution name e.g. datasette-cluster-map instead of the name of the underlying Python package ( datasette_cluster_map ) ( #606 ) \n \n \n Array faceting is now only suggested for columns that contain arrays of strings ( #562 ) \n \n \n Better documentation for the --host argument ( #574 ) \n \n \n Don't show None with a broken link for the label on a nullable foreign key ( #406 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/606\", \"label\": \"#606\"}, {\"href\": \"https://github.com/simonw/datasette/issues/562\", \"label\": \"#562\"}, {\"href\": \"https://github.com/simonw/datasette/issues/574\", \"label\": \"#574\"}, {\"href\": \"https://github.com/simonw/datasette/issues/406\", \"label\": \"#406\"}]"} {"id": "changelog:id77", "page": "changelog", "ref": "id77", "title": "0.31 (2019-11-11)", "content": "This version adds compatibility with Python 3.8 and breaks compatibility with Python 3.5. \n If you are still running Python 3.5 you should stick with 0.30.2 , which you can install like this: \n pip install datasette==0.30.2 \n \n \n Format SQL button now works with read-only SQL queries - thanks, Tobias Kunze ( #602 ) \n \n \n New ?column__notin=x,y,z filter for table views ( #614 ) \n \n \n Table view now uses select col1, col2, col3 instead of select * \n \n \n Database filenames can now contain spaces - thanks, Tobias Kunze ( #590 ) \n \n \n Removed obsolete ?_group_count=col feature ( #504 ) \n \n \n Improved user interface and documentation for datasette publish cloudrun ( #608 ) \n \n \n Tables with indexes now show the CREATE INDEX statements on the table page ( #618 ) \n \n \n Current version of uvicorn is now shown on /-/versions \n \n \n Python 3.8 is now supported! ( #622 ) \n \n \n Python 3.5 is no longer supported.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/pull/602\", \"label\": \"#602\"}, {\"href\": \"https://github.com/simonw/datasette/issues/614\", \"label\": \"#614\"}, {\"href\": \"https://github.com/simonw/datasette/pull/590\", \"label\": \"#590\"}, {\"href\": \"https://github.com/simonw/datasette/issues/504\", \"label\": \"#504\"}, {\"href\": \"https://github.com/simonw/datasette/issues/608\", \"label\": \"#608\"}, {\"href\": \"https://github.com/simonw/datasette/issues/618\", \"label\": \"#618\"}, {\"href\": \"https://www.uvicorn.org/\", \"label\": \"uvicorn\"}, {\"href\": \"https://github.com/simonw/datasette/issues/622\", \"label\": \"#622\"}]"} {"id": "changelog:id76", "page": "changelog", "ref": "id76", "title": "0.31.1 (2019-11-12)", "content": "Deployments created using datasette publish now use python:3.8 base Docker image ( #629 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/pull/629\", \"label\": \"#629\"}]"} {"id": "changelog:id75", "page": "changelog", "ref": "id75", "title": "0.31.2 (2019-11-13)", "content": "Fixed a bug where datasette publish heroku applications failed to start ( #633 ) \n \n \n Fix for datasette publish with just --source_url - thanks, Stanley Zheng ( #572 ) \n \n \n Deployments to Heroku now use Python 3.8.0 ( #632 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/633\", \"label\": \"#633\"}, {\"href\": \"https://github.com/simonw/datasette/issues/572\", \"label\": \"#572\"}, {\"href\": \"https://github.com/simonw/datasette/issues/632\", \"label\": \"#632\"}]"} {"id": "changelog:id74", "page": "changelog", "ref": "id74", "title": "0.32 (2019-11-14)", "content": "Datasette now renders templates using Jinja async mode . This means plugins can provide custom template functions that perform asynchronous actions, for example the new datasette-template-sql plugin which allows custom templates to directly execute SQL queries and render their results. ( #628 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://jinja.palletsprojects.com/en/2.10.x/api/#async-support\", \"label\": \"Jinja async mode\"}, {\"href\": \"https://github.com/simonw/datasette-template-sql\", \"label\": \"datasette-template-sql\"}, {\"href\": \"https://github.com/simonw/datasette/issues/628\", \"label\": \"#628\"}]"} {"id": "changelog:id73", "page": "changelog", "ref": "id73", "title": "0.33 (2019-12-22)", "content": "rowid is now included in dropdown menus for filtering tables ( #636 ) \n \n \n Columns are now only suggested for faceting if they have at least one value with more than one record ( #638 ) \n \n \n Queries with no results now display \"0 results\" ( #637 ) \n \n \n Improved documentation for the --static option ( #641 ) \n \n \n asyncio task information is now included on the /-/threads debug page \n \n \n Bumped Uvicorn dependency 0.11 \n \n \n You can now use --port 0 to listen on an available port \n \n \n New template_debug setting for debugging templates, e.g. https://latest.datasette.io/fixtures/roadside_attractions?_context=1 ( #654 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/636\", \"label\": \"#636\"}, {\"href\": \"https://github.com/simonw/datasette/issues/638\", \"label\": \"#638\"}, {\"href\": \"https://github.com/simonw/datasette/issues/637\", \"label\": \"#637\"}, {\"href\": \"https://github.com/simonw/datasette/issues/641\", \"label\": \"#641\"}, {\"href\": \"https://latest.datasette.io/fixtures/roadside_attractions?_context=1\", \"label\": \"https://latest.datasette.io/fixtures/roadside_attractions?_context=1\"}, {\"href\": \"https://github.com/simonw/datasette/issues/654\", \"label\": \"#654\"}]"} {"id": "changelog:id72", "page": "changelog", "ref": "id72", "title": "0.34 (2020-01-29)", "content": "_search= queries are now correctly escaped using a new escape_fts() custom SQL function. This means you can now run searches for strings like park. without seeing errors. ( #651 ) \n \n \n Google Cloud Run is no longer in beta, so datasette publish cloudrun has been updated to work even if the user has not installed the gcloud beta components package. Thanks, Katie McLaughlin ( #660 ) \n \n \n datasette package now accepts a --port option for specifying which port the resulting Docker container should listen on. ( #661 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/651\", \"label\": \"#651\"}, {\"href\": \"https://cloud.google.com/run/\", \"label\": \"Google Cloud Run\"}, {\"href\": \"https://github.com/simonw/datasette/pull/660\", \"label\": \"#660\"}, {\"href\": \"https://github.com/simonw/datasette/issues/661\", \"label\": \"#661\"}]"} {"id": "changelog:id71", "page": "changelog", "ref": "id71", "title": "0.35 (2020-02-04)", "content": "Added five new plugins and one new conversion tool to the The Datasette Ecosystem . \n \n \n The Datasette class has a new render_template() method which can be used by plugins to render templates using Datasette's pre-configured Jinja templating library. \n \n \n You can now execute SQL queries that start with a -- comment - thanks, Jay Graves ( #653 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://jinja.palletsprojects.com/\", \"label\": \"Jinja\"}, {\"href\": \"https://github.com/simonw/datasette/pull/653\", \"label\": \"#653\"}]"} {"id": "changelog:id70", "page": "changelog", "ref": "id70", "title": "0.36 (2020-02-21)", "content": "The datasette object passed to plugins now has API documentation: Datasette class . ( #576 ) \n \n \n New methods on datasette : .add_database() and .remove_database() - documentation . ( #671 ) \n \n \n prepare_connection() plugin hook now takes optional datasette and database arguments - prepare_connection(conn, database, datasette) . ( #678 ) \n \n \n Added three new plugins and one new conversion tool to the The Datasette Ecosystem .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/576\", \"label\": \"#576\"}, {\"href\": \"https://github.com/simonw/datasette/issues/671\", \"label\": \"#671\"}, {\"href\": \"https://github.com/simonw/datasette/issues/678\", \"label\": \"#678\"}]"} {"id": "changelog:id69", "page": "changelog", "ref": "id69", "title": "0.37 (2020-02-25)", "content": "Plugins now have a supported mechanism for writing to a database, using the new .execute_write() and .execute_write_fn() methods. Documentation . ( #682 ) \n \n \n Immutable databases that have had their rows counted using the inspect command now use the calculated count more effectively - thanks, Kevin Keogh. ( #666 ) \n \n \n --reload no longer restarts the server if a database file is modified, unless that database was opened immutable mode with -i . ( #494 ) \n \n \n New ?_searchmode=raw option turns off escaping for FTS queries in ?_search= allowing full use of SQLite's FTS5 query syntax . ( #676 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/682\", \"label\": \"#682\"}, {\"href\": \"https://github.com/simonw/datasette/pull/666\", \"label\": \"#666\"}, {\"href\": \"https://github.com/simonw/datasette/issues/494\", \"label\": \"#494\"}, {\"href\": \"https://www.sqlite.org/fts5.html#full_text_query_syntax\", \"label\": \"FTS5 query syntax\"}, {\"href\": \"https://github.com/simonw/datasette/issues/676\", \"label\": \"#676\"}]"} {"id": "changelog:id68", "page": "changelog", "ref": "id68", "title": "0.37.1 (2020-03-02)", "content": "Don't attempt to count table rows to display on the index page for databases > 100MB. ( #688 ) \n \n \n Print exceptions if they occur in the write thread rather than silently swallowing them. \n \n \n Handle the possibility of scope[\"path\"] being a string rather than bytes \n \n \n Better documentation for the extra_template_vars(template, database, table, columns, view_name, request, datasette) plugin hook.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/688\", \"label\": \"#688\"}]"} {"id": "changelog:id67", "page": "changelog", "ref": "id67", "title": "0.38 (2020-03-08)", "content": "The Docker build of Datasette now uses SQLite 3.31.1, upgraded from 3.26. ( #695 ) \n \n \n datasette publish cloudrun now accepts an optional --memory=2Gi flag for setting the Cloud Run allocated memory to a value other than the default (256Mi). ( #694 ) \n \n \n Fixed bug where templates that shipped with plugins were sometimes not being correctly loaded. ( #697 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://hub.docker.com/r/datasetteproject/datasette\", \"label\": \"Docker build\"}, {\"href\": \"https://github.com/simonw/datasette/issues/695\", \"label\": \"#695\"}, {\"href\": \"https://github.com/simonw/datasette/issues/694\", \"label\": \"#694\"}, {\"href\": \"https://github.com/simonw/datasette/issues/697\", \"label\": \"#697\"}]"} {"id": "changelog:id66", "page": "changelog", "ref": "id66", "title": "0.39 (2020-03-24)", "content": "New base_url configuration setting for serving up the correct links while running Datasette under a different URL prefix. ( #394 ) \n \n \n New metadata settings \"sort\" and \"sort_desc\" for setting the default sort order for a table. See Setting a default sort order . ( #702 ) \n \n \n Sort direction arrow now displays by default on the primary key. This means you only have to click once (not twice) to sort in reverse order. ( #677 ) \n \n \n New await Request(scope, receive).post_vars() method for accessing POST form variables. ( #700 ) \n \n \n Plugin hooks documentation now links to example uses of each plugin. ( #709 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/394\", \"label\": \"#394\"}, {\"href\": \"https://github.com/simonw/datasette/issues/702\", \"label\": \"#702\"}, {\"href\": \"https://github.com/simonw/datasette/issues/677\", \"label\": \"#677\"}, {\"href\": \"https://github.com/simonw/datasette/issues/700\", \"label\": \"#700\"}, {\"href\": \"https://github.com/simonw/datasette/issues/709\", \"label\": \"#709\"}]"} {"id": "changelog:id65", "page": "changelog", "ref": "id65", "title": "0.40 (2020-04-21)", "content": "Datasette Metadata can now be provided as a YAML file as an optional alternative to JSON. ( #713 ) \n \n \n Removed support for datasette publish now , which used the the now-retired Zeit Now v1 hosting platform. A new plugin, datasette-publish-now , can be installed to publish data to Zeit ( now Vercel ) Now v2. ( #710 ) \n \n \n Fixed a bug where the extra_template_vars(request, view_name) plugin hook was not receiving the correct view_name . ( #716 ) \n \n \n Variables added to the template context by the extra_template_vars() plugin hook are now shown in the ?_context=1 debugging mode (see template_debug ). ( #693 ) \n \n \n Fixed a bug where the \"templates considered\" HTML comment was no longer being displayed. ( #689 ) \n \n \n Fixed a datasette publish bug where --plugin-secret would over-ride plugin configuration in the provided metadata.json file. ( #724 ) \n \n \n Added a new CSS class for customizing the canned query page. ( #727 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/713\", \"label\": \"#713\"}, {\"href\": \"https://github.com/simonw/datasette-publish-now\", \"label\": \"datasette-publish-now\"}, {\"href\": \"https://vercel.com/blog/zeit-is-now-vercel\", \"label\": \"now Vercel\"}, {\"href\": \"https://github.com/simonw/datasette/issues/710\", \"label\": \"#710\"}, {\"href\": \"https://github.com/simonw/datasette/issues/716\", \"label\": \"#716\"}, {\"href\": \"https://github.com/simonw/datasette/issues/693\", \"label\": \"#693\"}, {\"href\": \"https://github.com/simonw/datasette/issues/689\", \"label\": \"#689\"}, {\"href\": \"https://github.com/simonw/datasette/issues/724\", \"label\": \"#724\"}, {\"href\": \"https://github.com/simonw/datasette/issues/727\", \"label\": \"#727\"}]"} {"id": "changelog:id64", "page": "changelog", "ref": "id64", "title": "0.41 (2020-05-06)", "content": "You can now create custom pages within your Datasette instance using a custom template file. For example, adding a template file called templates/pages/about.html will result in a new page being served at /about on your instance. See the custom pages documentation for full details, including how to return custom HTTP headers, redirects and status codes. ( #648 ) \n Configuration directory mode ( #731 ) allows you to define a custom Datasette instance as a directory. So instead of running the following: \n datasette one.db two.db \\\n --metadata=metadata.json \\\n --template-dir=templates/ \\\n --plugins-dir=plugins \\\n --static css:css \n You can instead arrange your files in a single directory called my-project and run this: \n datasette my-project/ \n Also in this release: \n \n \n New NOT LIKE table filter: ?colname__notlike=expression . ( #750 ) \n \n \n Datasette now has a pattern portfolio at /-/patterns - e.g. https://latest.datasette.io/-/patterns . This is a page that shows every Datasette user interface component in one place, to aid core development and people building custom CSS themes. ( #151 ) \n \n \n SQLite PRAGMA functions such as pragma_table_info(tablename) are now allowed in Datasette SQL queries. ( #761 ) \n \n \n Datasette pages now consistently return a content-type of text/html; charset=utf-8\" . ( #752 ) \n \n \n Datasette now handles an ASGI raw_path value of None , which should allow compatibility with the Mangum adapter for running ASGI apps on AWS Lambda. Thanks, Colin Dellow. ( #719 ) \n \n \n Installation documentation now covers how to Using pipx . ( #756 ) \n \n \n Improved the documentation for Full-text search . ( #748 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/648\", \"label\": \"#648\"}, {\"href\": \"https://github.com/simonw/datasette/issues/731\", \"label\": \"#731\"}, {\"href\": \"https://github.com/simonw/datasette/issues/750\", \"label\": \"#750\"}, {\"href\": \"https://latest.datasette.io/-/patterns\", \"label\": \"https://latest.datasette.io/-/patterns\"}, {\"href\": \"https://github.com/simonw/datasette/issues/151\", \"label\": \"#151\"}, {\"href\": \"https://www.sqlite.org/pragma.html#pragfunc\", \"label\": \"PRAGMA functions\"}, {\"href\": \"https://github.com/simonw/datasette/issues/761\", \"label\": \"#761\"}, {\"href\": \"https://github.com/simonw/datasette/issues/752\", \"label\": \"#752\"}, {\"href\": \"https://github.com/erm/mangum\", \"label\": \"Mangum\"}, {\"href\": \"https://github.com/simonw/datasette/pull/719\", \"label\": \"#719\"}, {\"href\": \"https://github.com/simonw/datasette/issues/756\", \"label\": \"#756\"}, {\"href\": \"https://github.com/simonw/datasette/issues/748\", \"label\": \"#748\"}]"} {"id": "changelog:id63", "page": "changelog", "ref": "id63", "title": "0.42 (2020-05-08)", "content": "A small release which provides improved internal methods for use in plugins, along with documentation. See #685 . \n \n \n Added documentation for db.execute() , see await db.execute(sql, ...) . \n \n \n Renamed db.execute_against_connection_in_thread() to db.execute_fn() and made it a documented method, see await db.execute_fn(fn) . \n \n \n New results.first() and results.single_value() methods, plus documentation for the Results class - see Results .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/685\", \"label\": \"#685\"}]"} {"id": "changelog:id62", "page": "changelog", "ref": "id62", "title": "0.43 (2020-05-28)", "content": "The main focus of this release is a major upgrade to the register_output_renderer(datasette) plugin hook, which allows plugins to provide new output formats for Datasette such as datasette-atom and datasette-ics . \n \n \n Redesign of register_output_renderer(datasette) to provide more context to the render callback and support an optional \"can_render\" callback that controls if a suggested link to the output format is provided. ( #581 , #770 ) \n \n \n Visually distinguish float and integer columns - useful for figuring out why order-by-column might be returning unexpected results. ( #729 ) \n \n \n The Request object , which is passed to several plugin hooks, is now documented. ( #706 ) \n \n \n New metadata.json option for setting a custom default page size for specific tables and views, see Setting a custom page size . ( #751 ) \n \n \n Canned queries can now be configured with a default URL fragment hash, useful when working with plugins such as datasette-vega , see Additional canned query options . ( #706 ) \n \n \n Fixed a bug in datasette publish when running on operating systems where the /tmp directory lives in a different volume, using a backport of the Python 3.8 shutil.copytree() function. ( #744 ) \n \n \n Every plugin hook is now covered by the unit tests, and a new unit test checks that each plugin hook has at least one corresponding test. ( #771 , #773 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette-atom\", \"label\": \"datasette-atom\"}, {\"href\": \"https://github.com/simonw/datasette-ics\", \"label\": \"datasette-ics\"}, {\"href\": \"https://github.com/simonw/datasette/issues/581\", \"label\": \"#581\"}, {\"href\": \"https://github.com/simonw/datasette/issues/770\", \"label\": \"#770\"}, {\"href\": \"https://github.com/simonw/datasette/issues/729\", \"label\": \"#729\"}, {\"href\": \"https://github.com/simonw/datasette/issues/706\", \"label\": \"#706\"}, {\"href\": \"https://github.com/simonw/datasette/issues/751\", \"label\": \"#751\"}, {\"href\": \"https://github.com/simonw/datasette-vega\", \"label\": \"datasette-vega\"}, {\"href\": \"https://github.com/simonw/datasette/issues/706\", \"label\": \"#706\"}, {\"href\": \"https://github.com/simonw/datasette/issues/744\", \"label\": \"#744\"}, {\"href\": \"https://github.com/simonw/datasette/issues/771\", \"label\": \"#771\"}, {\"href\": \"https://github.com/simonw/datasette/issues/773\", \"label\": \"#773\"}]"} {"id": "changelog:id60", "page": "changelog", "ref": "id60", "title": "0.44 (2020-06-11)", "content": "See also Datasette 0.44: The annotated release notes . \n Authentication and permissions, writable canned queries, flash messages, new plugin hooks and more.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://simonwillison.net/2020/Jun/12/annotated-release-notes/\", \"label\": \"Datasette 0.44: The annotated release notes\"}]"} {"id": "changelog:id58", "page": "changelog", "ref": "id58", "title": "0.45 (2020-07-01)", "content": "See also Datasette 0.45: The annotated release notes . \n Magic parameters for canned queries, a log out feature, improved plugin documentation and four new plugin hooks.", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://simonwillison.net/2020/Jul/1/datasette-045/\", \"label\": \"Datasette 0.45: The annotated release notes\"}]"} {"id": "changelog:id57", "page": "changelog", "ref": "id57", "title": "0.46 (2020-08-09)", "content": "This release contains a security fix related to authenticated writable canned queries. If you are using this feature you should upgrade as soon as possible. \n \n \n \n Security fix: CSRF tokens were incorrectly included in read-only canned query forms, which could allow them to be leaked to a sophisticated attacker. See issue 918 for details. \n \n \n Datasette now supports GraphQL via the new datasette-graphql plugin - see GraphQL in Datasette with the new datasette-graphql plugin . \n \n \n Principle git branch has been renamed from master to main . ( #849 ) \n \n \n New debugging tool: /-/allow-debug tool ( demo here ) helps test allow blocks against actors, as described in Defining permissions with \"allow\" blocks . ( #908 ) \n \n \n New logo for the documentation, and a new project tagline: \"An open source multi-tool for exploring and publishing data\". \n \n \n Whitespace in column values is now respected on display, using white-space: pre-wrap . ( #896 ) \n \n \n New await request.post_body() method for accessing the raw POST body, see Request object . ( #897 ) \n \n \n Database file downloads now include a content-length HTTP header, enabling download progress bars. ( #905 ) \n \n \n File downloads now also correctly set the suggested file name using a content-disposition HTTP header. ( #909 ) \n \n \n tests are now excluded from the Datasette package properly - thanks, abeyerpath. ( #456 ) \n \n \n The Datasette package published to PyPI now includes sdist as well as bdist_wheel . \n \n \n Better titles for canned query pages. ( #887 ) \n \n \n Now only loads Python files from a directory passed using the --plugins-dir option - thanks, Amjith Ramanujam. ( #890 ) \n \n \n New documentation section on Publishing to Vercel .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/918\", \"label\": \"issue 918\"}, {\"href\": \"https://github.com/simonw/datasette-graphql\", \"label\": \"datasette-graphql\"}, {\"href\": \"https://simonwillison.net/2020/Aug/7/datasette-graphql/\", \"label\": \"GraphQL in Datasette with the new datasette-graphql plugin\"}, {\"href\": \"https://github.com/simonw/datasette/issues/849\", \"label\": \"#849\"}, {\"href\": \"https://latest.datasette.io/-/allow-debug\", \"label\": \"demo here\"}, {\"href\": \"https://github.com/simonw/datasette/issues/908\", \"label\": \"#908\"}, {\"href\": \"https://github.com/simonw/datasette/issues/896\", \"label\": \"#896\"}, {\"href\": \"https://github.com/simonw/datasette/issues/897\", \"label\": \"#897\"}, {\"href\": \"https://github.com/simonw/datasette/issues/905\", \"label\": \"#905\"}, {\"href\": \"https://github.com/simonw/datasette/issues/909\", \"label\": \"#909\"}, {\"href\": \"https://github.com/simonw/datasette/issues/456\", \"label\": \"#456\"}, {\"href\": \"https://github.com/simonw/datasette/issues/887\", \"label\": \"#887\"}, {\"href\": \"https://github.com/simonw/datasette/pull/890\", \"label\": \"#890\"}]"} {"id": "changelog:id56", "page": "changelog", "ref": "id56", "title": "0.47 (2020-08-11)", "content": "Datasette now has a GitHub discussions forum for conversations about the project that go beyond just bug reports and issues. \n \n \n Datasette can now be installed on macOS using Homebrew! Run brew install simonw/datasette/datasette . See Using Homebrew . ( #335 ) \n \n \n Two new commands: datasette install name-of-plugin and datasette uninstall name-of-plugin . These are equivalent to pip install and pip uninstall but automatically run in the same virtual environment as Datasette, so users don't have to figure out where that virtual environment is - useful for installations created using Homebrew or pipx . See Installing plugins . ( #925 ) \n \n \n A new command-line option, datasette --get , accepts a path to a URL within the Datasette instance. It will run that request through Datasette (without starting a web server) and print out the response. See datasette --get for an example. ( #926 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/discussions\", \"label\": \"a GitHub discussions forum\"}, {\"href\": \"https://github.com/simonw/datasette/issues/335\", \"label\": \"#335\"}, {\"href\": \"https://github.com/simonw/datasette/issues/925\", \"label\": \"#925\"}, {\"href\": \"https://github.com/simonw/datasette/issues/926\", \"label\": \"#926\"}]"} {"id": "changelog:id55", "page": "changelog", "ref": "id55", "title": "0.47.1 (2020-08-11)", "content": "Fixed a bug where the sdist distribution of Datasette was not correctly including the template files. ( #930 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/930\", \"label\": \"#930\"}]"} {"id": "changelog:id54", "page": "changelog", "ref": "id54", "title": "0.47.2 (2020-08-12)", "content": "Fixed an issue with the Docker image published to Docker Hub . ( #931 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://hub.docker.com/r/datasetteproject/datasette\", \"label\": \"published to Docker Hub\"}, {\"href\": \"https://github.com/simonw/datasette/issues/931\", \"label\": \"#931\"}]"} {"id": "changelog:id53", "page": "changelog", "ref": "id53", "title": "0.47.3 (2020-08-15)", "content": "The datasette --get command-line mechanism now ensures any plugins using the startup() hook are correctly executed. ( #934 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/934\", \"label\": \"#934\"}]"} {"id": "changelog:id52", "page": "changelog", "ref": "id52", "title": "0.48 (2020-08-16)", "content": "Datasette documentation now lives at docs.datasette.io . \n \n \n db.is_mutable property is now documented and tested, see Database introspection . \n \n \n The extra_template_vars , extra_css_urls , extra_js_urls and extra_body_script plugin hooks now all accept the same arguments. See extra_template_vars(template, database, table, columns, view_name, request, datasette) for details. ( #939 ) \n \n \n Those hooks now accept a new columns argument detailing the table columns that will be rendered on that page. ( #938 ) \n \n \n Fixed bug where plugins calling db.execute_write_fn() could hang Datasette if the connection failed. ( #935 ) \n \n \n Fixed bug with the ?_nl=on output option and binary data. ( #914 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://docs.datasette.io/\", \"label\": \"docs.datasette.io\"}, {\"href\": \"https://github.com/simonw/datasette/issues/939\", \"label\": \"#939\"}, {\"href\": \"https://github.com/simonw/datasette/issues/938\", \"label\": \"#938\"}, {\"href\": \"https://github.com/simonw/datasette/issues/935\", \"label\": \"#935\"}, {\"href\": \"https://github.com/simonw/datasette/issues/914\", \"label\": \"#914\"}]"} {"id": "changelog:id51", "page": "changelog", "ref": "id51", "title": "0.49 (2020-09-14)", "content": "See also Datasette 0.49: The annotated release notes . \n \n \n Writable canned queries now expose a JSON API, see JSON API for writable canned queries . ( #880 ) \n \n \n New mechanism for defining page templates with custom path parameters - a template file called pages/about/{slug}.html will be used to render any requests to /about/something . See Path parameters for pages . ( #944 ) \n \n \n register_output_renderer() render functions can now return a Response . ( #953 ) \n \n \n New --upgrade option for datasette install . ( #945 ) \n \n \n New datasette --pdb option. ( #962 ) \n \n \n datasette --get exit code now reflects the internal HTTP status code. ( #947 ) \n \n \n New raise_404() template function for returning 404 errors. ( #964 ) \n \n \n datasette publish heroku now deploys using Python 3.8.5 \n \n \n Upgraded CodeMirror to 5.57.0. ( #948 ) \n \n \n Upgraded code style to Black 20.8b1. ( #958 ) \n \n \n Fixed bug where selected facets were not correctly persisted in hidden form fields on the table page. ( #963 ) \n \n \n Renamed the default error template from 500.html to error.html . \n \n \n Custom error pages are now documented, see Custom error pages . ( #965 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://simonwillison.net/2020/Sep/15/datasette-0-49/\", \"label\": \"Datasette 0.49: The annotated release notes\"}, {\"href\": \"https://github.com/simonw/datasette/issues/880\", \"label\": \"#880\"}, {\"href\": \"https://github.com/simonw/datasette/issues/944\", \"label\": \"#944\"}, {\"href\": \"https://github.com/simonw/datasette/issues/953\", \"label\": \"#953\"}, {\"href\": \"https://github.com/simonw/datasette/issues/945\", \"label\": \"#945\"}, {\"href\": \"https://github.com/simonw/datasette/issues/962\", \"label\": \"#962\"}, {\"href\": \"https://github.com/simonw/datasette/issues/947\", \"label\": \"#947\"}, {\"href\": \"https://github.com/simonw/datasette/issues/964\", \"label\": \"#964\"}, {\"href\": \"https://codemirror.net/\", \"label\": \"CodeMirror\"}, {\"href\": \"https://github.com/simonw/datasette/issues/948\", \"label\": \"#948\"}, {\"href\": \"https://github.com/simonw/datasette/issues/958\", \"label\": \"#958\"}, {\"href\": \"https://github.com/simonw/datasette/issues/963\", \"label\": \"#963\"}, {\"href\": \"https://github.com/simonw/datasette/issues/965\", \"label\": \"#965\"}]"} {"id": "changelog:id50", "page": "changelog", "ref": "id50", "title": "0.49.1 (2020-09-15)", "content": "Fixed a bug with writable canned queries that use magic parameters but accept no non-magic arguments. ( #967 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/967\", \"label\": \"#967\"}]"} {"id": "changelog:id49", "page": "changelog", "ref": "id49", "title": "0.50 (2020-10-09)", "content": "The key new feature in this release is the column actions menu on the table page ( #891 ). This can be used to sort a column in ascending or descending order, facet data by that column or filter the table to just rows that have a value for that column. \n Plugin authors can use the new datasette.client object to make internal HTTP requests from their plugins, allowing them to make use of Datasette's JSON API. ( #943 ) \n New Deploying Datasette documentation with guides for deploying Datasette on a Linux server using systemd or to hosting providers that support buildpacks . ( #514 , #997 ) \n Other improvements in this release: \n \n \n Publishing to Google Cloud Run documentation now covers Google Cloud SDK options. Thanks, Geoffrey Hing. ( #995 ) \n \n \n New datasette -o option which opens your browser as soon as Datasette starts up. ( #970 ) \n \n \n Datasette now sets sqlite3.enable_callback_tracebacks(True) so that errors in custom SQL functions will display tracebacks. ( #891 ) \n \n \n Fixed two rendering bugs with column headers in portrait mobile view. ( #978 , #980 ) \n \n \n New db.table_column_details(table) introspection method for retrieving full details of the columns in a specific table, see Database introspection . \n \n \n Fixed a routing bug with custom page wildcard templates. ( #996 ) \n \n \n datasette publish heroku now deploys using Python 3.8.6. \n \n \n New datasette publish heroku --tar= option. ( #969 ) \n \n \n OPTIONS requests against HTML pages no longer return a 500 error. ( #1001 ) \n \n \n Datasette now supports Python 3.9. \n \n \n See also Datasette 0.50: The annotated release notes .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/891\", \"label\": \"#891\"}, {\"href\": \"https://github.com/simonw/datasette/issues/943\", \"label\": \"#943\"}, {\"href\": \"https://github.com/simonw/datasette/issues/514\", \"label\": \"#514\"}, {\"href\": \"https://github.com/simonw/datasette/issues/997\", \"label\": \"#997\"}, {\"href\": \"https://github.com/simonw/datasette/pull/995\", \"label\": \"#995\"}, {\"href\": \"https://github.com/simonw/datasette/issues/970\", \"label\": \"#970\"}, {\"href\": \"https://github.com/simonw/datasette/issues/891\", \"label\": \"#891\"}, {\"href\": \"https://github.com/simonw/datasette/issues/978\", \"label\": \"#978\"}, {\"href\": \"https://github.com/simonw/datasette/issues/980\", \"label\": \"#980\"}, {\"href\": \"https://github.com/simonw/datasette/issues/996\", \"label\": \"#996\"}, {\"href\": \"https://github.com/simonw/datasette/issues/969\", \"label\": \"#969\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1001\", \"label\": \"#1001\"}, {\"href\": \"https://simonwillison.net/2020/Oct/9/datasette-0-50/\", \"label\": \"Datasette 0.50: The annotated release notes\"}]"} {"id": "changelog:id48", "page": "changelog", "ref": "id48", "title": "0.50.1 (2020-10-09)", "content": "Fixed a bug introduced in 0.50 where the export as JSON/CSV links on the table, row and query pages were broken. ( #1010 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/1010\", \"label\": \"#1010\"}]"} {"id": "changelog:id47", "page": "changelog", "ref": "id47", "title": "0.50.2 (2020-10-09)", "content": "Fixed another bug introduced in 0.50 where column header links on the table page were broken. ( #1011 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/1011\", \"label\": \"#1011\"}]"} {"id": "changelog:id45", "page": "changelog", "ref": "id45", "title": "0.51 (2020-10-31)", "content": "A new visual design, plugin hooks for adding navigation options, better handling of binary data, URL building utility methods and better support for running Datasette behind a proxy.", "breadcrumbs": "[\"Changelog\"]", "references": "[]"} {"id": "changelog:id44", "page": "changelog", "ref": "id44", "title": "0.51.1 (2020-10-31)", "content": "Improvements to the new Binary data documentation page.", "breadcrumbs": "[\"Changelog\"]", "references": "[]"} {"id": "changelog:id43", "page": "changelog", "ref": "id43", "title": "0.52 (2020-11-28)", "content": "This release includes a number of changes relating to an internal rebranding effort: Datasette's configuration mechanism (things like datasette --config default_page_size:10 ) has been renamed to settings . \n \n \n New --setting default_page_size 10 option as a replacement for --config default_page_size:10 (note the lack of a colon). The --config option is deprecated but will continue working until Datasette 1.0. ( #992 ) \n \n \n The /-/config introspection page is now /-/settings , and the previous page redirects to the new one. ( #1103 ) \n \n \n The config.json file in Configuration directory mode is now called settings.json . ( #1104 ) \n \n \n The undocumented datasette.config() internal method has been replaced by a documented .setting(key) method. ( #1107 ) \n \n \n Also in this release: \n \n \n New plugin hook: database_actions(datasette, actor, database, request) , which adds menu items to a new cog menu shown at the top of the database page. ( #1077 ) \n \n \n datasette publish cloudrun has a new --apt-get-install option that can be used to install additional Ubuntu packages as part of the deployment. This is useful for deploying the new datasette-ripgrep plugin . ( #1110 ) \n \n \n Swept the documentation to remove words that minimize involved difficulty. ( #1089 ) \n \n \n And some bug fixes: \n \n \n Foreign keys linking to rows with blank label columns now display as a hyphen, allowing those links to be clicked. ( #1086 ) \n \n \n Fixed bug where row pages could sometimes 500 if the underlying queries exceeded a time limit. ( #1088 ) \n \n \n Fixed a bug where the table action menu could appear partially obscured by the edge of the page. ( #1084 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/992\", \"label\": \"#992\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1103\", \"label\": \"#1103\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1104\", \"label\": \"#1104\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1107\", \"label\": \"#1107\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1077\", \"label\": \"#1077\"}, {\"href\": \"https://github.com/simonw/datasette-ripgrep\", \"label\": \"datasette-ripgrep plugin\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1110\", \"label\": \"#1110\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1089\", \"label\": \"#1089\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1086\", \"label\": \"#1086\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1088\", \"label\": \"#1088\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1084\", \"label\": \"#1084\"}]"} {"id": "changelog:id42", "page": "changelog", "ref": "id42", "title": "0.52.1 (2020-11-29)", "content": "Documentation on Testing plugins now recommends using datasette.client . ( #1102 ) \n \n \n Fix bug where compound foreign keys produced broken links. ( #1098 ) \n \n \n datasette --load-module=spatialite now also checks for /usr/local/lib/mod_spatialite.so . Thanks, Dan Peterson. ( #1114 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/1102\", \"label\": \"#1102\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1098\", \"label\": \"#1098\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1114\", \"label\": \"#1114\"}]"} {"id": "changelog:id41", "page": "changelog", "ref": "id41", "title": "0.52.2 (2020-12-02)", "content": "Generated columns from SQLite 3.31.0 or higher are now correctly displayed. ( #1116 ) \n \n \n Error message if you attempt to open a SpatiaLite database now suggests using --load-extension=spatialite if it detects that the extension is available in a common location. ( #1115 ) \n \n \n OPTIONS requests against the /database page no longer raise a 500 error. ( #1100 ) \n \n \n Databases larger than 32MB that are published to Cloud Run can now be downloaded. ( #749 ) \n \n \n Fix for misaligned cog icon on table and database pages. Thanks, Abdussamet Ko\u00e7ak. ( #1121 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/1116\", \"label\": \"#1116\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1115\", \"label\": \"#1115\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1100\", \"label\": \"#1100\"}, {\"href\": \"https://github.com/simonw/datasette/issues/749\", \"label\": \"#749\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1121\", \"label\": \"#1121\"}]"} {"id": "changelog:id40", "page": "changelog", "ref": "id40", "title": "0.52.3 (2020-12-03)", "content": "Fixed bug where static assets would 404 for Datasette installed on ARM Amazon Linux. ( #1124 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/1124\", \"label\": \"#1124\"}]"} {"id": "changelog:id39", "page": "changelog", "ref": "id39", "title": "0.52.4 (2020-12-05)", "content": "Show pysqlite3 version on /-/versions , if installed. ( #1125 ) \n \n \n Errors output by Datasette (e.g. for invalid SQL queries) now go to stderr , not stdout . ( #1131 ) \n \n \n Fix for a startup error on windows caused by unnecessary from os import EX_CANTCREAT - thanks, Abdussamet Ko\u00e7ak. ( #1094 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/coleifer/pysqlite3\", \"label\": \"pysqlite3\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1125\", \"label\": \"#1125\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1131\", \"label\": \"#1131\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1094\", \"label\": \"#1094\"}]"} {"id": "changelog:id38", "page": "changelog", "ref": "id38", "title": "0.52.5 (2020-12-09)", "content": "Fix for error caused by combining the _searchmode=raw and ?_search_COLUMN parameters. ( #1134 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://github.com/simonw/datasette/issues/1134\", \"label\": \"#1134\"}]"} {"id": "changelog:id37", "page": "changelog", "ref": "id37", "title": "0.53 (2020-12-10)", "content": "Datasette has an official project website now, at https://datasette.io/ . This release mainly updates the documentation to reflect the new site. \n \n \n New ?column__arraynotcontains= table filter. ( #1132 ) \n \n \n datasette serve has a new --create option, which will create blank database files if they do not already exist rather than exiting with an error. ( #1135 ) \n \n \n New ?_header=off option for CSV export which omits the CSV header row, documented here . ( #1133 ) \n \n \n \"Powered by Datasette\" link in the footer now links to https://datasette.io/ . ( #1138 ) \n \n \n Project news no longer lives in the README - it can now be found at https://datasette.io/news . ( #1137 )", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://datasette.io/\", \"label\": \"https://datasette.io/\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1132\", \"label\": \"#1132\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1135\", \"label\": \"#1135\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1133\", \"label\": \"#1133\"}, {\"href\": \"https://datasette.io/\", \"label\": \"https://datasette.io/\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1138\", \"label\": \"#1138\"}, {\"href\": \"https://datasette.io/news\", \"label\": \"https://datasette.io/news\"}, {\"href\": \"https://github.com/simonw/datasette/issues/1137\", \"label\": \"#1137\"}]"} {"id": "changelog:id35", "page": "changelog", "ref": "id35", "title": "0.54 (2021-01-25)", "content": "The two big new features in this release are the _internal SQLite in-memory database storing details of all connected databases and tables, and support for JavaScript modules in plugins and additional scripts. \n For additional commentary on this release, see Datasette 0.54, the annotated release notes .", "breadcrumbs": "[\"Changelog\"]", "references": "[{\"href\": \"https://simonwillison.net/2021/Jan/25/datasette/\", \"label\": \"Datasette 0.54, the annotated release notes\"}]"}