syntharc: The Grand Unified Synthetic Data Generator
syntharc is a powerful, flexible, and unified Python library for generating high-quality synthetic data across multiple domains. In the modern machine learning ecosystem, acquiring high-quality, privacy-compliant, and diverse datasets is often the biggest bottleneck. syntharc solves this by abstracting the complexity of various generative algorithms into a single, intuitive framework.
Whether you need to anonymize sensitive tabular records, augment image operations for computer vision, simulate realistic text sequences, or replicate complex financial time-series signals. syntharc provides the unified API to do it all using state-of-the-art backend engines like PyTorch, Hugging Face Transformers, Albumentations, and the Synthetic Data Vault (SDV).
How It Works: The Unified Lifecycle
One of the biggest hurdles in synthetic data generation is the fragmented tooling across different data types. syntharc forces all underlying models into a highly predictable 3-step lifecycle inherited from our BaseSynthesizer architecture:
prepare(**kwargs): Configures the internal environment. This is where you define structural metadata, column types, sequence keys, or image transformation pipelines to guide the generation.fit(data): Feeds your actual, real-world dataset into the generative model so it can learn patterns, probabilistic distributions, and internal representations.generate(**kwargs): Samples from the trained model to yield your brand new synthetic dataset—retaining the statistical properties of the original without exposing real user information.
Key Features
- Tabular Data: Synthesize fully relational datasets using Deep Learning (
CTGANSynthesizer) or statistical modeling (GaussianCopulaSynthesizer). - Text Generation: Leverage the power of LLMs (
TransformerSynthesizer), classic statistical chains (MarkovSynthesizer), or strict ruleings (TemplateSynthesizer). - Image Augmentation: Use
ImageAugmentorto rapidly iterate through spatial and pixel-level augmentations, dynamically expanding computer vision datasets. - Time-Series: Employ the
PARSynthesizer(Probabilistic AutoRegressive model) to safely synthesize robust sequence data over time. - Evaluations: Built-in tools for evaluating the quality, fidelity, and privacy metrics of your generated data against your source data.
Installation
Install syntharc via pip. The base package provides the core infrastructure. We highly recommend installing the specific domain dependencies you intend to use to keep your environment lean:
# Install everything (Recommended for the full experience)
pip install "syntharc[all]"
# Or individually pick your domains:
pip install "syntharc[tabular]"
pip install "syntharc[text]"
pip install "syntharc[image]"
pip install "syntharc[timeseries]"
# For contributors and local development:
pip install "syntharc[dev]"
Comprehensive Quick Start
Below are examples of how our unified framework elegantly handles vastly different data constraints.
1. Privacy-Preserving Tabular Data
Train a CTGAN model to learn the distribution of your customer data without saving real identities.
import pandas as pd
from syntharc.tabular.ctgan import CTGANSynthesizer
real_data = pd.read_csv("customer_data.csv")
# 1. Initialize & Prepare metadata
synth = CTGANSynthesizer(epochs=50)
synth.prepare(metadata_dict={"primary_key": "user_id"})
# 2. Fit to real data
synth.fit(real_data)
# 3. Generate 1,000 synthetic rows!
synthetic_data = synth.generate(num_rows=1000)
print(synthetic_data.head())
2. Deep Time-Series Generation
Synthesize sequential metrics, like stock prices or IoT sensor readings, using AutoRegressive modeling.
from syntharc.timeseries.par import PARSynthesizer
# 1. Initialize & Prepare
synth = PARSynthesizer(epochs=25)
# Define what makes a "sequence" (e.g., separate tracking per 'device_id')
synth.prepare(metadata_dict={
"sequence_key": "device_id",
"context_columns": ["region"]
})
# 2. Fit
synth.fit(sensor_dataframe)
# 3. Generate sequential data
synthetic_series = synth.generate(num_sequences=50)
3. Causal Text Generation (LLMs)
Easily utilize Hugging Face causal language models.
from syntharc.text.transformer import TransformerTextGenerator
# 1. Initialize (Downloads SmolLM2-360M-Instruct by default)
synth = TransformerTextGenerator()
# 2. Prepare with an optional style context
synth.prepare(corpus="The future of synthetic data is bright and highly scalable.")
# 3. Generate structured text from instructions
text_output = synth.generate(num_samples=1, instructions="Write a short summary about data.")
print(text_output[0])
4. High-Speed Image Augmentation
Prepare a pipeline of augmentations to expand your Machine Learning dataset effortlessly.
from syntharc.image.augmentor import ImageAugmentor
import cv2
# 1. Initialize rules
augmentor = ImageAugmentor()
# Uses Albumentations backend dictionary standards mapping
augmentor.prepare(config={
'resize': (256, 256),
'horizontal_flip': 0.5,
'brightness_contrast': 0.2
})
# 2. Load Real Image
image = cv2.imread('dataset/cat.jpg')
# 3. Generate augmentations
# The generator seamlessly wraps Albumentations under the hood
augmented_image = augmentor.generate(num_samples=1, data=[image])
print(f"Augmented Shape: {augmented_image[0].shape}")
Documentation
For comprehensive guides, parameter references, evaluations, and interactive Jupyter showcase notebooks, please check out the docs/ folder:
- Getting Started
- Tabular Generation Guide
- Time-Series Generation Guide
- Text Generation Guide
- Image Augmentation Guide
- API Reference
Contributing
We love our contributors! If you're interested in adding a new generative model, fixing a bug, or improving the documentation, please refer to our CONTRIBUTING.md for detailed instructions on setting up your local environment, managing dependencies, and passing our CI checks.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the syntharc team.
Metadata
Release files for syntharc 0.1.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| syntharc-0.1.0.post1.tar.gz | 33.5 kB | With provenance | Details for syntharc-0.1.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| syntharc-0.1.0.post1-py3-none-any.whl | Python 3 | none | any | Details for syntharc-0.1.0.post1-py3-none-any.whl |
Total release size: 75.2 kB
Release files / syntharc-0.1.0.post1.tar.gz
| Download URL | syntharc-0.1.0.post1.tar.gz |
|---|---|
| Size | 33.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68dbe44456c7fd51a261f2b684cfdeede428cd8b292eb83d1d648ad4dfde8599
|
|
BLAKE2b-256 checksum How to use checksums |
ee9286e2fcedca97e1ec1f37a46d603e51bf3323e86b1917fe4c2250421a55b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logRelease files / syntharc-0.1.0.post1-py3-none-any.whl
| Download URL | syntharc-0.1.0.post1-py3-none-any.whl |
|---|---|
| Size | 41.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27ed20b4f9b8308168b71ca31017d13ac89639d815ebf2fa1295c5cf6a1373da
|
|
BLAKE2b-256 checksum How to use checksums |
084cc71ee2448ad8bc028097f1f3aaaed7ffd77aa5fc8ec1b22670ef5713c555
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logSecurity for syntharc 0.1.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for syntharc-0.1.0.post1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.