Skip to main content

Python SDK for Syncora.ai AI models

Project description

Syncora SDK

Syncora SDK is a Python client library for interacting with the Syncora synthetic data platform. It allows you to generate high-quality synthetic datasets from a variety of sources including CSV, dataframes, and raw text. With just a few lines of code, you can bootstrap synthetic data pipelines in your analytics, testing, and machine learning workflows.


Features

  • Easy initialization with API key or environment variable
  • Multiple data sources: CSV, Pandas DataFrame, JSON text
  • Data types: Tabular, Time-series, JSONL
  • Flexible configuration: Control number of rows, target columns, constraints
  • Asynchronous support for large datasets
  • Built‑in error handling and logging

Installation

Install the SDK via pip:

pip install syncora-sdk

Requires Python 3.7 or higher.


Quick Start

1. Set your API key

Head over to https://syncora.ai, register for an account, and generate your API key from the dashboard.

2. Initialize the client and generator

from syncora_sdk import SyncoraClient, SyntheticDataGenerator
from pathlib import Path


# Client with API key
client = SyncoraClient(api_key="your-syncora-api-key")

# Instantiate the synthetic data generator
syntheticDataGenerator = SyntheticDataGenerator(client)

3. Generate synthetic tabular data from a CSV file

file_path = Path("Sonar.csv")

response = syntheticDataGenerator.generate_from_file(
    file_path=file_path,
    type="Tabular",
    numberOfRows=100,
    targetColumn="Freq_1"
)

print(response)

This will return a JSON response with a link to download the generated synthetic dataset.


API Reference

SyncoraClient

Method Description
__init__(api_key) Initialize client with your api key.

SyntheticDataGenerator

Method Description
generate_from_file(file_path, type, ...) Generate synthetic data from a file (CSV, JSONL, etc.)

Common Parameters:

  • type (str): Type of data to generate. One of ["Tabular", "TimeSeries", "JSONL"]
  • numberOfRows (int): Number of rows or records to generate.
  • targetColumn (str, optional): Column on which to focus generation for tabular data.

Error Handling

All SDK methods raise SyncoraError on failure. You can catch and inspect:

from syncora_sdk import SyncoraError

try:
    syntheticDataGenerator.generate_from_file(...)
except SyncoraError as e:
    print(f"Error: {e.code}{e.message}")

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

syncora_sdk-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

syncora_sdk-0.1.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file syncora_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: syncora_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for syncora_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d32366f0d1f76d60e3708c65dee0b5bc7f8081234ad26fdb8da7e29d22e890d7
MD5 75308dceaf20b4d26865e058876426c6
BLAKE2b-256 67ae8924915d7a94e52e4d3b15742b72ee3ed98363123d32787da6820b2273fa

See more details on using hashes here.

File details

Details for the file syncora_sdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: syncora_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for syncora_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 381f48e4999d393ac16b5f4c6fb30d316ee947eadc124546a4fd2284bebd4364
MD5 2219be1cc9f3ec2ec3ab8fac70b8262a
BLAKE2b-256 8f326c9473a337b8dc79369b5420afe2213a0cf907f16deb74e9314c29f37d0a

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