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.0rc3.tar.gz (21.9 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.0rc3-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apache_superset_core-0.1.0rc3.tar.gz
  • Upload date:
  • Size: 21.9 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.0rc3.tar.gz
Algorithm Hash digest
SHA256 a0c612c83078c51515242ede634c49b4fabed8a10863611f8f8d80a717fb845b
MD5 a8ff042860f28b4ea9564981efafb5c9
BLAKE2b-256 172791ca0b7a4f3c2ecef550e8911e2617ae830a9e42cd3ee68062ef42eca927

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apache_superset_core-0.1.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 a25b7d8445d71b53f393eb44b35839a5326ed232f8568e4f810781f208d3bc66
MD5 0531568591846380b86c173329cf2177
BLAKE2b-256 1a8043c77b6a3a84870fc73d533253ac0dfc70bf6f4c5650dd7f576dcf7523f9

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