Skip to main content

A lightweight Python client for the Synthetic Dataset Generation SaaS API

Project description

Synthetic Dataset SDK

A lightweight Python client for the Synthetic Dataset Generation API. This SDK allows you to easily ingest document pages and retrieve generated synthetic datasets.

Installation

pip install synthetic-dataset-sdk

Quick Start

from synthetic_dataset_sdk import SyntheticDatasetClient

# 1. Initialize the client
sdk = SyntheticDatasetClient(
    api_key="your-api-key",
    base_url="https://sdg-api.shashanksahu.live"
)

# 2. Upload document pages
# pages should be a list of dicts: [{"page_no": 1, "doc_id": "DOC-A", "text": "..."}]
pages = [
    {
        "page_no": 1, 
        "doc_id": "DOC-A", 
        "text": "The quick brown fox jumps over the lazy dog."
    }
]
result = sdk.upload(pages)
print(f"Ingest status: {result['job_status']}")

# 3. Check batch formation status
status = sdk.get_batch_status()
print(f"Total batches: {status['total_batches']}")

# 4. Fetch the generated dataset
# This will return validated QA pairs once the pipeline is done
dataset = sdk.get_dataset(include_faulty=False)
for entry in dataset["entries"]:
    print(f"Q: {entry['question']}")
    print(f"A: {entry['answer']}")

Features

  • Easy Ingestion: Upload raw text pages directly from your pipeline.
  • Batch Tracking: Monitor the progress of batch formation and QA generation.
  • Faulty Filtering: Toggle between high-accuracy pairs and the full generated set.
  • Lightweight: Minimal dependencies (just requests).

Requirements

  • Python 3.8+
  • requests

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

synthetic_dataset_sdk-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

synthetic_dataset_sdk-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file synthetic_dataset_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: synthetic_dataset_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for synthetic_dataset_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7349b65463a978f1b6caecd40e5f50c002e9b3803e9e9e523c97ded8ca415e87
MD5 7464b60204d92c0eabd8af2c9201bd07
BLAKE2b-256 a2df06b0fc081ef249681f8d8f773d29f618c73385e20ed7cc5067cbc3dec29b

See more details on using hashes here.

File details

Details for the file synthetic_dataset_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for synthetic_dataset_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c53373dc2cdb052444084770b55d514222d54d9dac7ac598addeee65d0c0534
MD5 f7976daacaf23e025a41a23b3a22ffd3
BLAKE2b-256 488f72f0ae21135c93af4b849a3bd8865cdb9ec8a4b1231d53e01f6490141864

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