CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-apache-superset

A modern, enterprise-ready business intelligence web application for data exploration and visualization.

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

cli-commands.mddocs/

CLI Commands

Command-line interface for Apache Superset application management, providing tools for initialization, user management, data loading, and development tasks.

Capabilities

Application Management

Core commands for initializing and managing the Superset application.

def init() -> None:
    """
    Initialize the Superset application.
    
    Sets up database tables, adds default permissions, and synchronizes role definitions.
    Must be run before first use of Superset.
    """

def version(verbose: bool = False) -> None:
    """
    Print current version number.
    
    Args:
        verbose: Show additional version information including build details
    """

def fab_create_admin() -> None:
    """
    Create an admin user interactively.
    
    Prompts for username, first name, last name, email, and password.
    Creates user with Admin role permissions.
    """

def run(host: str = "127.0.0.1", port: int = 8088, 
        with_threads: bool = False, reload: bool = False,
        debugger: bool = False) -> None:
    """
    Start development server.
    
    Args:
        host: Host address to bind to
        port: Port number to bind to  
        with_threads: Enable threaded mode
        reload: Enable auto-reload on code changes
        debugger: Enable interactive debugger
    """

Usage Examples:

# Initialize application
superset init

# Create admin user
superset fab create-admin

# Start development server
superset run -h 0.0.0.0 -p 8088 --with-threads --reload --debugger

Data Management

Commands for loading, importing, and exporting data and configurations.

def load_examples() -> None:
    """
    Load example datasets, charts, and dashboards.
    
    Includes birth names data, energy consumption data, flight data,
    and World Bank data with corresponding visualizations.
    """

def load_test_users() -> None:
    """
    Load test users for development and testing.
    
    Creates users with different permission levels for testing
    role-based access control functionality.
    """

def export_dashboards(dashboard_file: str, print_stdout: bool = False) -> None:
    """
    Export dashboard configurations to file.
    
    Args:
        dashboard_file: Path to output file
        print_stdout: Print export data to stdout instead of file
    """

def export_datasources(datasource_file: str, print_stdout: bool = False,
                      back_references: bool = False) -> None:
    """
    Export datasource configurations to file.
    
    Args:
        datasource_file: Path to output file
        print_stdout: Print export data to stdout instead of file
        back_references: Include back references in export
    """

def import_dashboards(dashboard_file: str, sync: List[str] = None,
                     update_refresh_periods: bool = False) -> None:
    """
    Import dashboard configurations from file.
    
    Args:
        dashboard_file: Path to import file
        sync: Synchronization strategy for existing objects
        update_refresh_periods: Update refresh periods on import
    """

def import_datasources(datasource_file: str, sync: List[str] = None,
                      recursive: bool = False) -> None:
    """
    Import datasource configurations from file.
    
    Args:
        datasource_file: Path to import file  
        sync: Synchronization strategy for existing objects
        recursive: Recursively import dependencies
    """

Usage Examples:

# Load example data
superset load-examples

# Export dashboards
superset export-dashboards -f /tmp/dashboards.json

# Import dashboards  
superset import-dashboards -f /tmp/dashboards.json

Database Operations

Commands for managing database connections and metadata.

def set_database_uri(database_name: str, uri: str) -> None:
    """
    Update database URI for existing database connection.
    
    Args:
        database_name: Name of database to update
        uri: New SQLAlchemy database URI
    """

def refresh_druid(datasource: str = None, merge: bool = True) -> None:
    """
    Refresh Druid datasource metadata.
    
    Args:
        datasource: Specific datasource to refresh (refreshes all if None)
        merge: Merge with existing metadata instead of replacing
    """

def update_datasources_cache() -> None:
    """
    Update datasource metadata cache.
    
    Refreshes column information, table schemas, and other metadata
    for all configured datasources.
    """

def sync_tags() -> None:
    """
    Synchronize tags across the system.
    
    Updates tag relationships and ensures consistency across
    dashboards, charts, and other tagged objects.
    """

Usage Examples:

# Update database connection
superset set-database-uri -d "MyDB" -u "postgresql://user:pass@host/db"

# Refresh Druid metadata
superset refresh-druid --merge

# Update datasource cache
superset update-datasources-cache

Background Task Management

Commands for managing Celery workers and background processing.

def worker(concurrency: int = None, loglevel: str = "info") -> None:
    """
    Start Celery worker for background task processing.
    
    Args:
        concurrency: Number of concurrent worker processes
        loglevel: Logging level (debug, info, warning, error)
    """

def flower(port: int = 5555, address: str = "0.0.0.0") -> None:
    """
    Start Celery Flower monitoring interface.
    
    Args:
        port: Port for Flower web interface
        address: Address to bind Flower interface
    """

def compute_thumbnails(dashboard_ids: List[int] = None,
                      chart_ids: List[int] = None,
                      force: bool = False) -> None:
    """
    Generate thumbnails for dashboards and charts.
    
    Args:
        dashboard_ids: Specific dashboard IDs to process
        chart_ids: Specific chart IDs to process  
        force: Force regeneration of existing thumbnails
    """

Usage Examples:

# Start Celery worker
superset worker --concurrency=4

# Start Flower monitoring
superset flower --port=5555

# Generate thumbnails
superset compute-thumbnails --force

Development and Testing

Commands for development, testing, and maintenance tasks.

def update_api_docs() -> None:
    """
    Update OpenAPI documentation files.
    
    Generates updated API documentation based on current
    Flask-RESTX endpoints and schemas.
    """

def alert(action: str, report_id: int = None) -> None:
    """
    Manage alerting system operations.
    
    Args:
        action: Action to perform (list, test, run)
        report_id: Specific report ID for targeted actions
    """

def shell_context() -> Dict[str, Any]:
    """
    Provide shell context with common objects.
    
    Returns:
        Dictionary containing app, db, and other common objects
        for interactive shell sessions
    """

Usage Examples:

# Update API documentation
superset update-api-docs

# Test alerts
superset alert test --report-id=123

# Start interactive shell
superset shell

Command Categories

Essential Setup Commands

  • superset init - Initialize application
  • superset fab create-admin - Create admin user
  • superset load-examples - Load sample data

Development Commands

  • superset run - Start development server
  • superset shell - Start interactive shell
  • superset update-api-docs - Update documentation

Data Commands

  • superset load-test-users - Load test users
  • superset export-dashboards - Export dashboard configs
  • superset import-dashboards - Import dashboard configs
  • superset export-datasources - Export datasource configs
  • superset import-datasources - Import datasource configs

Maintenance Commands

  • superset refresh-druid - Refresh Druid metadata
  • superset update-datasources-cache - Update metadata cache
  • superset sync-tags - Synchronize tags
  • superset compute-thumbnails - Generate thumbnails

Background Processing

  • superset worker - Start Celery worker
  • superset flower - Start Celery monitoring

Install with Tessl CLI

npx tessl i tessl/pypi-apache-superset

docs

cli-commands.md

configuration.md

index.md

models-database.md

rest-api.md

security-auth.md

visualization.md

tile.json

VALIDATION_REPORT.md