{"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-754957658", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 754957658, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NDk1NzY1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-05T23:12:50Z", "updated_at": "2021-01-05T23:12:50Z", "author_association": "OWNER", "body": "See https://docs.datasette.io/en/stable/internals.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-754957563", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 754957563, "node_id": "MDEyOklzc3VlQ29tbWVudDc1NDk1NzU2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-05T23:12:37Z", "updated_at": "2021-01-05T23:12:37Z", "author_association": "OWNER", "body": "I'm happy with how this has evolved, so I'm closing the issue.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-636340618", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 636340618, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjM0MDYxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-30T14:46:04Z", "updated_at": "2020-05-30T18:41:41Z", "author_association": "OWNER", "body": "I should also think about the class properties (as opposed to methods) that are setup in the Datasette constructor. Many of these should be private, some should be documented.\r\n\r\n- cache_headers\r\n- cors\r\n- databases\r\n- executor\r\n- files\r\n- immutables\r\n- inspect_data\r\n- jinja_env\r\n- max_returned_rows\r\n- page_size\r\n- plugins_dir\r\n- renderers\r\n- sql_time_limit_ms\r\n- sqlite_extensions\r\n- sqlite_functions\r\n- static_mounts\r\n- template_dir\r\n- version_note\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-636332183", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 636332183, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjMzMjE4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-30T13:37:51Z", "updated_at": "2020-05-30T13:38:35Z", "author_association": "OWNER", "body": "**\\_\\_init\\_\\_**(self, files, immutables=None, cache_headers=True, cors=False, inspect_data=None, metadata=None, sqlite_extensions=None, template_dir=None, plugins_dir=None, static_mounts=None, memory=False, config=None, version_note=None, config_dir=None)\r\n\r\n`Initialize self. See help(type(self)) for accurate signature.`\r\n\r\n**absolute_url**(self, request, path)\r\n\r\n**add_database**(self, name, db)\r\n\r\n**app**(self)\r\n\r\n`Returns an ASGI app function that serves the whole of [Datasette](http://localhost:8066/datasette.app.html#Datasette)`\r\n\r\n**app_css_hash**(self)\r\n\r\n**config**(self, key)\r\n\r\n**config_dict**(self)\r\n\r\n**connected_databases**(self)\r\n\r\n**execute**(self, db_name, sql, params=None, truncate=False, custom_time_limit=None, page_size=None, log_sql_errors=True)\r\n\r\n**expand_foreign_keys**(self, database, table, column, values)\r\n\r\n`Returns dict mapping (column, value) -> label`\r\n\r\n**get_canned_queries**(self, database_name)\r\n\r\n**get_canned_query**(self, database_name, query_name)\r\n\r\n**metadata**(self, key=None, database=None, table=None, fallback=True)\r\n\r\n`Looks up metadata, cascading backwards from specified level.\\\r\nReturns None if metadata value is not found.`\r\n\r\n**plugin_config**(self, plugin_name, database=None, table=None, fallback=True)\r\n\r\n`Return config for plugin, falling back from specified database/table`\r\n\r\n**plugins**(self, show_all=False)\r\n\r\n**prepare_connection**(self, conn, database)\r\n\r\n**register_custom_units**(self)\r\n\r\n`Register any custom units defined in the metadata.json with Pint`\r\n\r\n**register_renderers**(self)\r\n\r\n`Register output renderers which output data in custom formats.`\r\n\r\n**remove_database**(self, name)\r\n\r\n**render_template**(self, templates, context=None, request=None, view_name=None)\r\n\r\n**table_metadata**(self, database, table)\r\n\r\n`Fetch table-specific metadata.`\r\n\r\n**threads**(self)\r\n\r\n**update_with_inherited_metadata**(self, metadata)\r\n\r\n**versions**(self)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-636332083", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 636332083, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjMzMjA4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-30T13:36:55Z", "updated_at": "2020-05-30T13:36:55Z", "author_association": "OWNER", "body": "Here's the current `Datasette` class as introspected using the webserver run by `pydoc -p 8000`:\r\n\r\n\"Pydoc__module_datasette_app\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-636330843", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 636330843, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjMzMDg0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-30T13:26:38Z", "updated_at": "2020-05-30T13:26:38Z", "author_association": "OWNER", "body": "There's a bunch of methods on that class which I could add a `_` prefix to and leave undocumented. `datasette.register_renderers()` should be `datasette._register_renderers()` for example.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-636329095", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 636329095, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjMyOTA5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-30T13:11:39Z", "updated_at": "2020-05-30T13:25:10Z", "author_association": "OWNER", "body": "I need to document the `.databases` property - both how to get access to specific databases and how to access the first/only database.\r\n\r\nIdea: `datasette.get_database(name)` method (consistent with existing `.add_database()` and `.remove_database()` methods) - but `name` parameter is optional, returns first database if you omit that.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-636330438", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 636330438, "node_id": "MDEyOklzc3VlQ29tbWVudDYzNjMzMDQzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-30T13:23:04Z", "updated_at": "2020-05-30T13:23:04Z", "author_association": "OWNER", "body": "Need to document `datasette.metadata()` - see #780", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-586053947", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 586053947, "node_id": "MDEyOklzc3VlQ29tbWVudDU4NjA1Mzk0Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-02-14T01:29:48Z", "updated_at": "2020-05-30T13:22:09Z", "author_association": "OWNER", "body": "OK, I've made a start on this now in 3ffb8f3b98252531d11897fd431711e9b8045ace - still plenty more methods to document. More importantly that class has a LOT of junk methods on that no-one should ever call from a plugin, so I need to decide what to do about those.\r\n\r\nhttps://datasette.readthedocs.io/en/latest/internals.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/576#issuecomment-571366326", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/576", "id": 571366326, "node_id": "MDEyOklzc3VlQ29tbWVudDU3MTM2NjMyNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-01-06T23:50:33Z", "updated_at": "2020-01-06T23:50:33Z", "author_association": "OWNER", "body": "I wrote about this a bit here: https://simonwillison.net/2020/Jan/6/sitemap-xml/", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 497170355, "label": "Documented internals API for use in plugins"}, "performed_via_github_app": null}