Skip to content

Commit

Permalink
Documentation for datasette.databases property, closes #1443
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Aug 19, 2021
1 parent 4eb3ae4 commit 7e15422
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ Datasette class

This object is an instance of the ``Datasette`` class, passed to many plugin hooks as an argument called ``datasette``.

.. _datasette_databases:

.databases
----------

Property exposing an ordered dictionary of databases currently connected to Datasette.

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 :ref:`internals_database` instances.

All databases are listed, irrespective of user permissions. This means that the ``_internal`` database will always be listed here.

.. _datasette_plugin_config:

.plugin_config(plugin_name, database=None, table=None)
Expand Down

0 comments on commit 7e15422

Please sign in to comment.