Skip to main content

zobi-core

PyPI version License Python 3.10+

The official core package for building Zobi 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 zobi-core

🏗️ Package Structure

src/zobi_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 zobi_core.rest_api.api import RestApi
from zobi_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 zobi_core.tasks.decorators import task
from zobi_core.tasks.types import TaskScope

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

MCP Tools

from zobi_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 zobi_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 MIT. See LICENSE for details.

🔗 Links

Metadata

Release files for zobi-core 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zobi-core 1.0.0
File Size Uploaded
zobi_core-1.0.0.tar.gz 24.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zobi-core 1.0.0
File Interpreter ABI Platform
zobi_core-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.8 kB

Release files / zobi_core-1.0.0.tar.gz

Download URL zobi_core-1.0.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f04615ece5d486aa373299650f7919b78b570a516128a5a1f6f98ee83bb6dcda
BLAKE2b-256 checksum
How to use checksums
995e1a00203f91f4454d3ecd1fe1152fe95686a3a16b00024f4f81454dc9673a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / zobi_core-1.0.0-py3-none-any.whl

Download URL zobi_core-1.0.0-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c130bc6cc14eeddbf38208e4f2007da3a16545ea16f58cac81b28da0c3d2ff8c
BLAKE2b-256 checksum
How to use checksums
4a0d487f080372a533574e584f2c4dfcec0baf6ea9bc936bee8993c687b6ad5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page