Quick Start
This guide walks you through creating your first Superset extension - a simple "Hello World" panel that displays a message fetched from a backend API endpoint. You'll learn the essential structure and patterns for building full-stack Superset extensions.
Prerequisites
Before starting, ensure you have:
- Node.js and npm compatible with your Superset version
- Python compatible with your Superset version
- A running Superset development environment
- Basic knowledge of React, TypeScript, and Flask
Step 1: Install the Extensions CLI
First, install the Apache Superset Extensions CLI:
pip install apache-superset-extensions-cli
Step 2: Create a New Extension
Use the CLI to scaffold a new extension project. Extensions can include frontend functionality, backend functionality, or both, depending on your needs. This quickstart demonstrates a full-stack extension with both frontend UI components and backend API endpoints to show the complete integration pattern.
superset-extensions init
The CLI will prompt you for information using a three-step publisher workflow:
Extension display name: Hello World
Extension name (hello-world): hello-world
Publisher (e.g., my-org): my-org
Initial version [0.1.0]: 0.1.0
License [Apache-2.0]: Apache-2.0
Include frontend? [Y/n]: Y
Include backend? [Y/n]: Y
Publisher Namespaces: Extensions use organizational namespaces similar to VS Code extensions, providing collision-safe naming across organizations:
- NPM package:
@my-org/hello-world(scoped package for frontend distribution) - Module Federation name:
myOrg_helloWorld(collision-safe JavaScript identifier) - Backend package:
my_org-hello_world(collision-safe Python distribution name) - Python namespace:
superset_extensions.my_org.hello_world
This approach ensures that extensions from different organizations cannot conflict, even if they use the same technical name (e.g., both acme.dashboard-widgets and corp.dashboard-widgets can coexist).
This creates a complete project structure:
my-org.hello-world/