Skip to main content

AI-Powered Synthetic Data Engine - Generate realistic multi-table datasets from natural language

Project description

๐Ÿง  Misata

The Intelligent Synthetic Data Engine

PyPI version Python versions License Downloads

Stop writing fake data scripts.
Generate production-grade datasets from natural language.

Quick Start โ€ข Features โ€ข Python API โ€ข Enterprise


๐Ÿš€ Why Misata?

Misata isn't just a random data generator. It's an intelligent engine that understands your business logic, relationships, and constraints. Whether you need 50 rows for unit tests or 10 million rows for load testing, Misata delivers statistically realistic data that looks and behaves like the real thing.

Feature Faker SDV Misata
Natural Language Input โŒ โŒ โœ…
Auto Schema Generation โŒ โŒ โœ…
Relational Integrity โŒ โœ… โœ…
Business Constraints โŒ โŒ โœ…
No Training Data Needed โœ… โŒ โœ…
Streaming (10M+ rows) โŒ โŒ โœ…

โšก Quick Start

1. Install

pip install misata

2. Generate

Describe what you need in plain English. Misata handles the rest.

# Basic generation (Rule-based, instant)
misata generate --story "A SaaS platform with 50K users, monthly subscriptions, and a 20% churn rate in Q3"

# Intelligent generation (LLM-powered)
export GROQ_API_KEY=gsk_...
misata generate --story "E-commerce store with seasonal trends and customer segments" --use-llm

3. Result

Misata creates a relational schema, generates the data, and saves it to ./generated_data.

๐Ÿ“‹ Schema: SaaS_Platform
   Tables: 4 (users, subscriptions, payments, events)
   Relationships: 3
   Events: 1 (Churn Spike Q3)

๐Ÿš€ Performance: 385,000 rows/second
๐Ÿ’พ Data saved to: ./generated_data

๐Ÿ†• New in v0.5.3 โ€” Reusable Runs

Misata can now save generation settings as a recipe and rerun them with machine-readable reports.

# Create a reusable recipe
misata recipe init \
  --name saas_smoke \
  --story "A SaaS platform with 1K users and subscriptions" \
  --output ./saas_recipe.yaml

# Run it later
misata recipe run --config ./saas_recipe.yaml --rows 1000

Each recipe run writes:

  • run_manifest.json
  • validation_report.json when validation is enabled
  • quality_report.json when quality checks are enabled
  • audit_report.json when audit mode is enabled

This keeps Misataโ€™s current generation flow intact, but makes it easier to repeat, review, and share working runs.


๐Ÿ”ฅ New in v0.5.2 โ€” The Realism Engine

Every column is now aware of every other column. Misata generates data that is mathematically consistent, not randomly independent.

What makes this different from Faker?

                 Faker/Random              Misata v0.5.3
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
order.total      $847.23 (random)          $847.23 = $798.50 + $29.99 + $18.74
product.cost     $96.00 (> price!)         $41.20 (43% of price $95.81)
line_total       $3,291.00 (random)        $3,291.00 = 5 ร— $662.00 โˆ’ $19.00
user.email       luke.ri@wanadoo.co.uk     emma.chen@gmail.com (from name)
rating           137 (wat?)                4 โ˜… (J-curve weighted)
categories       "Hypothyroidism"          "Electronics"
delivered_at     2021-01-03 (before order) 2024-03-15 (+7 days after order)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Row counts       100 ร— every table         15 categories, 500 order_items

Smart Row Proportions

Misata analyzes your FK graph to size tables realistically:

misata generate --db-url sqlite:///shop.db --smart --rows 100

# categories:    15   (reference โ€” fewer, no duplicates)
# users:        100   (entities โ€” your base count)
# products:     250   (entities with variety)
# orders:       250   (transactions โ€” more than users)
# order_items:  500   (line items โ€” most rows)
# reviews:      150   (activity โ€” subset of orders)

Seed Any Existing Database

# PostgreSQL, MySQL, SQLite โ€” just point and seed
misata generate \
  --db-url postgresql://user:pass@localhost:5432/mydb \
  --smart --rows 10000 --db-truncate

๐Ÿ’ป Python API

Seamlessly integrate Misata into your test suites and CI/CD pipelines.

Standard Generation

from misata import DataSimulator
from misata.llm_parser import LLMSchemaGenerator

# 1. Design schema with AI
llm = LLMSchemaGenerator(provider="groq")
config = llm.generate_from_story(
    "Healthcare app with patients, doctors, and appointments"
)

# 2. Generate data
simulator = DataSimulator(config)
for table_name, df in simulator.generate_all():
    print(f"Generated {len(df)} rows for {table_name}")
    df.to_csv(f"{table_name}.csv", index=False)

SQLAlchemy Seeding (Powerful!)

Directly seed your SQLAlchemy models without writing factories.

from misata import seed_from_sqlalchemy_models
from myapp.models import Base, engine

# Automatically analyzes your models and foreign keys
report = seed_from_sqlalchemy_models(
    engine, 
    Base, 
    default_rows=10_000, 
    create=True, 
    smart_mode=True  # Infers realistic values from column names
)

print(f"Seeded {report.total_rows} rows in {report.duration_seconds}s")

Reusable Recipes

Save a run once, then keep it in source control.

from misata import RecipeSpec, load_recipe

recipe = load_recipe("./saas_recipe.yaml")
print(recipe.name)
print(recipe.output_dir)

๐ŸŽฏ Business Constraints

Define complex rules that simple random generators can't handle.

from misata import Constraint, Table

timesheets = Table(
    name="timesheets",
    row_count=10000,
    constraints=[
        Constraint(
            name="max_daily_hours",
            type="sum_limit",
            group_by=["employee_id", "date"],
            column="hours",
            value=8.0,
            action="redistribute"  # Automatically fixes violations
        )
    ]
)

๐Ÿ”Œ Providers

Misata supports multiple LLM providers for schema generation.

Provider Env Var Tier Best For
Groq GROQ_API_KEY Free Speed (Recommended)
OpenAI OPENAI_API_KEY Paid Quality
Ollama None Free Privacy (Local)

๐Ÿข Enterprise

Building a platform? Misata Studio is our commercial offering for teams.

  • ๐Ÿ–ฅ๏ธ Visual Schema Editor: Drag-and-drop schema design.
  • ๐Ÿ”’ Privacy Filters: PII scanning and masking.
  • ๐Ÿ“ฆ One-Click Deploy: Docker & Kubernetes ready.
  • ๐Ÿค Support: Dedicated support and custom integration.

Contact Sales for a demo.


Built with โค๏ธ by Muhammed Rasin

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

misata-0.5.3.tar.gz (191.6 kB view details)

Uploaded Source

Built Distribution

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

misata-0.5.3-py3-none-any.whl (191.3 kB view details)

Uploaded Python 3

File details

Details for the file misata-0.5.3.tar.gz.

File metadata

  • Download URL: misata-0.5.3.tar.gz
  • Upload date:
  • Size: 191.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for misata-0.5.3.tar.gz
Algorithm Hash digest
SHA256 2c96c17a1c9d06ad9b9e73f6ae5d8bba40212e1c1513cdfdc2420c57e14be3d7
MD5 67c60afceb4d6fa5cc9a3155d2f1e340
BLAKE2b-256 091a9e06292d963b914b70a2d4a476f4980e3d42cde60ad3b3f34158936bec39

See more details on using hashes here.

File details

Details for the file misata-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: misata-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 191.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for misata-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 127444629384a9c1a072b41929549e267bbaa94f63aaad11fbbe29d2cc24e2ab
MD5 52ef6ec13e41cf3790c9d1463da221b5
BLAKE2b-256 dabf2080687a8879214eaa21dbc95bcf467cad715f1039cb0472f07264d643fd

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