Skip to main content

Core Python package for building Apache Superset backend extensions and integrations

Project description

apache-superset-core

PyPI version License Python 3.10+

The official core package for building Apache Superset backend extensions and integrations. This package provides essential building blocks including base classes, API utilities, type definitions, and decorators for both the host application and extensions.

📦 Installation

pip install apache-superset-core

🏗️ Package Structure

src/superset_core/
├── common/
├── extensions/
├── mcp/
├── queries/
├── rest_api/
├── tasks/
└── __init__.py

🚀 Quick Start

Basic Extension API

from flask_appbuilder.api import expose, permission_name, protect, safe
from superset_core.rest_api.api import RestApi
from superset_core.rest_api.decorators import api


@api(id="dataset_references", name="Dataset References API")
class DatasetReferencesAPI(RestApi):

    @expose("/metadata", methods=("POST",))
    @protect()
    @safe
    @permission_name("read")
    def metadata(self) -> Response:
        # ... endpoint implementation

Background Tasks

from superset_core.tasks.decorators import task
from superset_core.tasks.types import TaskScope

@task(name="generate_report", scope=TaskScope.SHARED)
def generate_report(chart_id: int) -> None:
    # ... task implementation

MCP Tools

from superset_core.mcp.decorators import tool

@tool(name="my_tool", description="Custom business logic", tags=["extension"])
def my_extension_tool(param: str) -> dict:
    # ... tool implementation

MCP Prompts

from superset_core.mcp.decorators import prompt

@prompt(name="my_prompt", title="My Prompt", description="Interactive prompt", tags={"extension"})
async def my_prompt_handler(ctx: Context) -> str:
    # ... prompt implementation

📄 License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

🔗 Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apache_superset_core-0.1.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apache_superset_core-0.1.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file apache_superset_core-0.1.0.tar.gz.

File metadata

  • Download URL: apache_superset_core-0.1.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for apache_superset_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72cddac557f212db30f718ef0741a59bc5f5b54559525f9a104d9c925aba18c1
MD5 af0d716754eaa059295f74abee90d591
BLAKE2b-256 b1e0ffc6c91c31e4a47a61bed44bba0c80f1b02df0f6e7fddf9046329257667d

See more details on using hashes here.

File details

Details for the file apache_superset_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for apache_superset_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ba2755792a07e6e060edfbf3341a941a27fb46a305008d45e5067b18f040706
MD5 5c3b73256ae0775d9c8e99564309899b
BLAKE2b-256 f2e21dfdc416124711d7dc4ece83d7c04af079466c481f4e078b5d6ff0e4f321

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page