AI-Powered Data Structuring Tool
English | 中文
This is the official Python SDK for SchemaForge AI, a unified service for AI structured data processing using Pydantic models to define output formats, supporting multiple AI large language models.
pip install schemaforgefrom pydantic import BaseModel
from schemaforge import SchemaForge
# Initialize client
client = SchemaForge(api_key="your_secure_api_key_here", api_base="http://localhost:8000", default_model="openai:o3-mini")
# Define a Pydantic model
class Person(BaseModel):
name: str
age: int
occupation: str
email: str
# Structure text using the model
person = client.structure(
content="John is a 30-year-old software engineer with email john@example.com",
model_class=Person
)
print(person.model_dump())
# {'name': 'John', 'age': 30, 'occupation': 'software engineer', 'email': 'john@example.com'}- Structure unstructured text into Pydantic models
- Generate Pydantic models from natural language descriptions
- Handle complex model dependencies automatically
- Async support for all operations
See the complete documentation for detailed examples and API reference.