actors_from_ids plugin hook and datasette.actors_from_ids() method (#2181)

* Prototype of actors_from_ids plugin hook, refs #2180
* datasette-remote-actors example plugin, refs #2180
This commit is contained in:
Simon Willison 2023-09-07 21:23:59 -07:00 committed by GitHub
commit b645174271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 155 additions and 0 deletions

View file

@ -94,6 +94,11 @@ def actor_from_request(datasette, request):
"""Return an actor dictionary based on the incoming request"""
@hookspec(firstresult=True)
def actors_from_ids(datasette, actor_ids):
"""Returns a dictionary mapping those IDs to actor dictionaries"""
@hookspec
def filters_from_request(request, database, table, datasette):
"""