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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65778749f2622adfba7710604f846cb6afa8a24f8023c693294029fc2efac052
|
|
| MD5 |
fdc51f7f7747edb410296d1dae2f27ed
|
|
| BLAKE2b-256 |
6ce2261222d3c5133603558459fb50a239b25bb44c7ee68c77e233f169bc2da6
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
805c45cea0de4374e37b2319ba2acb2c7a16a1390a35d81dce6730d0c3dc2574
|
|
| MD5 |
8b16a2cf1aed6f0f5f50ca9a05150c95
|
|
| BLAKE2b-256 |
e27a54cfaad53165e295dc5e34d75b891bda452e068a14219c2bf0c61e242093
|