Skip to main content

Tadata Python SDK

Project description

Tadata Python SDK

The Tadata Python SDK provides an easy-to-use interface for deploying Model Context Protocol (MCP) servers from OpenAPI specifications.

Installation

# With uv (recommended)
uv add tadata-sdk

# With pip
pip install tadata-sdk

Quickstart

Deploy a Model Context Protocol (MCP) server with your OpenAPI specification:

import tadata_sdk

# Deploy from a dictionary
result = tadata_sdk.deploy(
    openapi_spec={
        "openapi": "3.0.0",
        "info": {"title": "My API", "version": "1.0.0"},
        "paths": {"/hello": {"get": {"responses": {"200": {"description": "OK"}}}}},
    },
    api_key="TADATA_API_KEY",  # Required
    name="My MCP Deployment",  # Optional
    base_url="https://api.myservice.com",  # Required if no valid and absolute base url is found in the openapi spec
)

print(f"Deployed MCP server: {result.id}")
print(f"Created at: {result.created_at}")

FastAPI Support

You can deploy FastAPI applications directly without manually extracting the OpenAPI specification:

import tadata_sdk
from fastapi import FastAPI

# Create your FastAPI app
app = FastAPI(title="My API", version="1.0.0")

@app.get("/hello")
def hello():
    return {"message": "Hello World"}

# Deploy the FastAPI app directly
result = tadata_sdk.deploy(
    fastapi_app=app,
    api_key="TADATA_API_KEY",
    base_url="https://api.myservice.com",
    name="My FastAPI Deployment"
)

print(f"Deployed FastAPI app: {result.id}")

Note: FastAPI is not a required dependency. If you want to use FastAPI support, install it separately:

pip install fastapi

Django Support

You can deploy Django REST Framework applications directly using drf-spectacular:

import os
import tadata_sdk

# Set up Django environment
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myproject.settings')
import django
django.setup()

# Your Django settings should include:
# INSTALLED_APPS = [
#     # ... your apps
#     'rest_framework',
#     'drf_spectacular',
# ]
# REST_FRAMEWORK = {
#     'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
# }

# Deploy using Django schema extraction
result = tadata_sdk.deploy(
    use_django=True,  # Extract schema from configured Django application
    api_key="TADATA_API_KEY",
    base_url="https://api.myservice.com",
    name="My Django Deployment"
)

print(f"Deployed Django app: {result.id}")

Note: Django, Django REST Framework, and drf-spectacular are not required dependencies. If you want to use Django support, install them separately:

pip install django djangorestframework drf-spectacular

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

tadata_sdk-0.1.0.tar.gz (83.7 kB view details)

Uploaded Source

Built Distribution

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

tadata_sdk-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tadata_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 83.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for tadata_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 65778749f2622adfba7710604f846cb6afa8a24f8023c693294029fc2efac052
MD5 fdc51f7f7747edb410296d1dae2f27ed
BLAKE2b-256 6ce2261222d3c5133603558459fb50a239b25bb44c7ee68c77e233f169bc2da6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tadata_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for tadata_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 805c45cea0de4374e37b2319ba2acb2c7a16a1390a35d81dce6730d0c3dc2574
MD5 8b16a2cf1aed6f0f5f50ca9a05150c95
BLAKE2b-256 e27a54cfaad53165e295dc5e34d75b891bda452e068a14219c2bf0c61e242093

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