Simple Looker Action Hub using Python + FastAPI. Includes SendGrid for emails.
Note that the PowerPoint and Report Pack actions have not been implemented in this repo, they were built for private trials and only the icons are included here for illustrative purposes.
NOTE: This project assumes that you have set SDK credentials as environment variables.
Requites Python 3.7+. To run locally:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
./start
Any new, conforming action added to the actions folder will automatically be added to the Action Hub.
A new action will require the following:
-
from core import action_hub
(imports the base url for the action hub) -
from core import
... any desired helper functions (e.g. to get sdk client, send emails, create temp files, ...) -
from main import app
(imports the main application) -
from api_types import ActionDefinition, ActionList, ActionFormField, ActionRequest, ActionForm
-
slug = (action slug)
(code- and url- friendly name for the action) -
icon_uri = (data uri for icon image)
(DATAURI GENERATOR: https://dopiaza.org/tools/datauri/index.php) -
definition = ActionDefinition()
(This definition will be used to register the action) -
def form()
(This form will be filled in by the user when sending/scheduling the action) -
def action()
(The action itself)