Yeoman generator that scaffolds Superset visualization plugins and packages with proper structure and boilerplate code
63
A Python utility that simplifies configuring and initializing Apache Superset applications with custom settings.
@generates
"""
Superset Configuration Manager
Provides utilities for configuring and initializing Apache Superset applications.
"""
from typing import Any, Dict, Optional
from flask import Flask
class SupersetConfigManager:
"""Manages Superset application configuration and initialization."""
def __init__(self, config_path: Optional[str] = None):
"""
Initialize the configuration manager.
Args:
config_path: Optional path to a custom configuration file
"""
pass
def create_app(self, config_overrides: Optional[Dict[str, Any]] = None) -> Flask:
"""
Create and configure a Superset application instance.
Args:
config_overrides: Dictionary of configuration values to override
Returns:
Configured Flask application instance
"""
pass
def enable_feature_flags(self, *flag_names: str) -> None:
"""
Enable one or more feature flags.
Args:
*flag_names: Names of feature flags to enable
"""
pass
def get_feature_flag_status(self, flag_name: str) -> bool:
"""
Get the current status of a feature flag.
Args:
flag_name: Name of the feature flag
Returns:
True if the flag is enabled, False otherwise
"""
pass
def configure_database(
self,
database_uri: str,
pool_size: int = 5,
pool_timeout: int = 30,
pool_recycle: int = 3600
) -> None:
"""
Configure the Superset metadata database connection.
Args:
database_uri: SQLAlchemy database URI
pool_size: Size of the connection pool
pool_timeout: Connection timeout in seconds
pool_recycle: Time to recycle connections in seconds
"""
pass
def configure_redis_cache(
self,
host: str = "localhost",
port: int = 6379,
db: int = 0,
key_prefix: str = "superset_"
) -> None:
"""
Configure Redis as the cache backend.
Args:
host: Redis host
port: Redis port
db: Redis database number
key_prefix: Prefix for cache keys
"""
pass
def set_cache_timeouts(
self,
default: int = 300,
data_cache: int = 3600,
thumbnail_cache: int = 86400
) -> None:
"""
Configure cache timeout values.
Args:
default: Default cache timeout in seconds
data_cache: Data cache timeout in seconds
thumbnail_cache: Thumbnail cache timeout in seconds
"""
passProvides the Superset application framework, configuration system, and initialization components.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-superset-ui--generator-supersetdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10