Skip to main content

The Synthetic Data API — privacy-preserving synthetic data generation

Project description

DataXID Python SDK

PyPI version Python versions License

High-fidelity synthetic data generation for single-table, multi-table, and time series data.

Installation

pip install dataxid

Quick Start

import dataxid
import pandas as pd

dataxid.api_key = "dx_..."
dataxid.enable_logging("info")  # optional: see training progress

df = pd.read_csv("customers.csv")
synthetic = dataxid.synthesize(data=df, n_samples=1000)

Multi-Table & Time Series

Synthesize related tables with referential integrity. Child tables are generated sequentially by default — preserving realistic per-entity patterns like transaction counts, temporal ordering, and sequence lengths.

from dataxid import Table

accounts = Table(pd.read_csv("accounts.csv"), primary_key="account_id")
transactions = Table(pd.read_csv("transactions.csv"),
                     foreign_keys={"account_id": accounts})

synthetic = dataxid.synthesize_tables({
    "accounts": accounts,
    "transactions": transactions,
})

synthetic["accounts"]       # synthetic accounts with auto-assigned PKs
synthetic["transactions"]   # sequential transactions per account, valid FKs

How It Works

Dataxid is built on a privacy-by-architecture principle. Data encoding and decoding happen entirely on your machine; only abstract embeddings are shared with the API for model training. Raw data never leaves your environment.

Configuration

Parameter Default Description
embedding_dim 64 Embedding size (larger = more expressive)
model_size "medium" Model capacity: "small", "medium", "large"
max_epochs 100 Maximum training epochs
batch_size 256 Training batch size
privacy_enabled False Add noise to embeddings for privacy
privacy_noise 0.1 Noise scale (Gaussian std)
import dataxid
import pandas as pd

dataxid.api_key = "dx_..."

df = pd.read_csv("customers.csv")

model = dataxid.Model.create(
    data=df,
    config=dataxid.ModelConfig(
        embedding_dim=128,
        model_size="large",
        max_epochs=50,
    ),
)
synthetic = model.generate(n_samples=1000)
model.delete()

synthesize_tables handles orchestration automatically. Use Model.create for fine-grained control:

model = dataxid.Model.create(
    data=transactions_df,
    parent=accounts_df,
    foreign_key="account_id",
)
synthetic = model.generate(parent=synthetic_accounts_df)
model.delete()

Logging

dataxid.enable_logging("info")   # see training progress, epoch stats
dataxid.enable_logging("debug")  # verbose: includes HTTP requests
dataxid.disable_logging()        # turn off (default state)

Or via environment variable (no code change needed):

DATAXID_LOG=info python my_script.py

Error Handling

import dataxid

try:
    synthetic = dataxid.synthesize(data=df)
except dataxid.AuthenticationError:
    print("Invalid API key")
except dataxid.QuotaExceededError as e:
    print(f"Quota exceeded. Upgrade: {e.upgrade_url}")
except dataxid.RateLimitError as e:
    print(f"Rate limited. Retry after: {e.retry_after}s")
except dataxid.DataxidError as e:
    print(f"Error: {e}")

Links

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

dataxid-0.2.0.tar.gz (102.7 kB view details)

Uploaded Source

Built Distribution

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

dataxid-0.2.0-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

Details for the file dataxid-0.2.0.tar.gz.

File metadata

  • Download URL: dataxid-0.2.0.tar.gz
  • Upload date:
  • Size: 102.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dataxid-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5077727aa0b63b47460305e0bcf79cdb2a04d0bbcf870f0d7eedfaf0e7e5fc4e
MD5 8b96d5618856eb2f7bacbac93e4673b7
BLAKE2b-256 9e60029bb6939e484f64ed565d16a61db3875bd37e9a92cb6f401c813595bdda

See more details on using hashes here.

File details

Details for the file dataxid-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dataxid-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dataxid-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ab736799dd49a7d9bdfde7498070c729ad5fc46bb4a3c7173da53ffad41555c
MD5 eba92c9dafa135937e42ea3ea46b427e
BLAKE2b-256 aaddb33b9c7e052c0d68df2f14d1d09a17f4159f9c701413a30b51f8142a12c5

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