Skip to main content

sintezi

Synthetic data generation that actually doesn't hurt.

PyPI Python License CI Docs

A type-safe Python library for generating synthetic data using LLMs. Built with structured outputs, automatic retry policies, and support for multiple response formats (JSON, XML).

Why sintezi? Unlike general-purpose LLM frameworks (LangChain, LlamaIndex), sintezi is focused on bulk synthetic data generation with explicit developer control:

  • Bulk generation first — optimized for creating large synthetic datasets, not building chatbots or agents
  • Explicit control — you define formats, parsers, and retry logic; no hidden prompt engineering or magic
  • Simple by design — no memory systems, RAG pipelines, or high-level abstractions; just clean, predictable data generation

If you need agentic workflows, memory, or RAG, use LangChain. If you need to generate 10,000 structured examples with full control, use sintezi.

Features

  • Type-safe — Pydantic models for requests and responses with full type hints
  • Multiple formats — JSON, XML, plain text, or custom formatters
  • Smart retry — Separate retry policies for network errors and validation failures
  • Auto-parsing — Automatic format selection based on Pydantic models
  • LLM-agnostic — Works with any OpenAI-compatible API

Installation

pip install sintezi

Requirements: Python 3.11+

Quick start

from pydantic import BaseModel
from openai import AsyncOpenAI
from sintezi.ai.context import ai_context_from_openai
from sintezi.ai.executor import StructuredAiCall, StructuredAiCallConfig, AiCallParameters
from sintezi.ai.formatter import auto_formatter_for_type
from sintezi.ai.parser import auto_parser_for_type

class ProductInfo(BaseModel):
    name: str
    category: str

class ProductDescription(BaseModel):
    description: str

# Setup
client = AsyncOpenAI(api_key="your-api-key")
ctx = ai_context_from_openai(client)

config = StructuredAiCallConfig(
    system_message="Generate product descriptions.",
    parameters=AiCallParameters(model="gpt-4o-mini"),
)

ai_call = StructuredAiCall(
    ctx=ctx,
    config=config,
    formatter=auto_formatter_for_type(ProductInfo),
    parser=auto_parser_for_type(ProductDescription),
)

# Generate
product = ProductInfo(name="Laptop", category="Electronics")
result = await ai_call(product)
print(result.description)

See the quick start guide for a complete walkthrough.

Documentation

Full documentation: https://mrapplexz.github.io/sintezi/

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sintezi-0.2.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

sintezi-0.2.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file sintezi-0.2.1.tar.gz.

File metadata

  • Download URL: sintezi-0.2.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sintezi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ecbfa91174552ca80f19c4288e27b9aa0814d87c690644ddac1feda407587d61
MD5 aadce5ea7f33cc40b3284b723ec9213a
BLAKE2b-256 95312acf1cfdca6cf26125f2f50dc7a6a517ecd1d703ada4a4e3553be0e9d51b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sintezi-0.2.1.tar.gz:

Publisher: release.yml on mrapplexz/sintezi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sintezi-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: sintezi-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sintezi-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7dd8141d77615e58c71fa72dbe87352972cdefbca66af4ecdda0c6f4f83cce8f
MD5 bb8de9152a4e66443ae673d951381d8e
BLAKE2b-256 bf00d0145a479b094f5a23c5622131c5762f11243176e582bcd6c6fcc82889c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for sintezi-0.2.1-py3-none-any.whl:

Publisher: release.yml on mrapplexz/sintezi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

2 files

0.0.0

2 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