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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for apache_superset_core-0.1.0rc2.tar.gz
Algorithm Hash digest
SHA256 42d16bedef2e0a887a230d0dbd2c00e970fefa69cfa2053031a3311ef3524366
MD5 37355db583955f20f16013bb697cfe4d
BLAKE2b-256 3baf6803296956b00cf20e83ad813e869bf63d90a0fbdf9b9aac69062be2924d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apache_superset_core-0.1.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 3dc4eefba878f2edbd0f428680b682ffca3969bc59610658312fd510f5919395
MD5 0eabeb5787c489c14213b02c7f74057d
BLAKE2b-256 bbdc56e614498b17e3ef07529e69ccda91939ab62610267f7e5423f7fab9e00b

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