Skip to content

Commit

Permalink
Warn about potential changes to get_metadata hook, refs #1384
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw authored Jul 15, 2021
1 parent a6c8e7f commit 7ea678d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/plugin_hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,9 @@ get_metadata(datasette, key, database, table)
This hook is responsible for returning a dictionary corresponding to Datasette :ref:`metadata`. This function is passed the ``database``, ``table`` and ``key`` which were passed to the upstream internal request for metadata. Regardless, it is important to return a global metadata object, where ``"databases": []`` would be a top-level key. The dictionary returned here, will be merged with, and overwritten by, the contents of the physical ``metadata.yaml`` if one is present.
.. warning::
The design of this plugin hook does not currently provide a mechanism for interacting with async code, and may change in the future. See `issue 1384 <https://github.com/simonw/datasette/issues/1384>`__.
.. code-block:: python
@hookimpl
Expand Down

0 comments on commit 7ea678d

Please sign in to comment.