Core Python package for building Apache Superset backend extensions and integrations
Project description
apache-superset-core
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42d16bedef2e0a887a230d0dbd2c00e970fefa69cfa2053031a3311ef3524366
|
|
| MD5 |
37355db583955f20f16013bb697cfe4d
|
|
| BLAKE2b-256 |
3baf6803296956b00cf20e83ad813e869bf63d90a0fbdf9b9aac69062be2924d
|
File details
Details for the file apache_superset_core-0.1.0rc2-py3-none-any.whl.
File metadata
- Download URL: apache_superset_core-0.1.0rc2-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dc4eefba878f2edbd0f428680b682ffca3969bc59610658312fd510f5919395
|
|
| MD5 |
0eabeb5787c489c14213b02c7f74057d
|
|
| BLAKE2b-256 |
bbdc56e614498b17e3ef07529e69ccda91939ab62610267f7e5423f7fab9e00b
|