Skip to content

ContrastingSounds/fast-hub

Repository files navigation

fast-hub

Simple Looker Action Hub using Python + FastAPI. Includes SendGrid for emails.

Working Actions

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.

SDK credentials must be configured as environment variables

NOTE: This project assumes that you have set SDK credentials as environment variables.

To use

Requites Python 3.7+. To run locally:

  1. python3 -m venv .venv
  2. source .venv/bin/activate
  3. pip install -r requirements.txt
  4. ./start

FastAPI – Automatic OpenAPI documentation

Adding a new action

Any new, conforming action added to the actions folder will automatically be added to the Action Hub.

New Action Checklist

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)

About

Simple Looker Action Hub using Python + FastAPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages