Skip to main content

Synthik Python Client

A thin, well-typed Python client for the Synthik Labs backend.

Install (editable from repo)

pip install synthik-client

Usage

from synthik import SynthikClient
from synthik.types import ColumnBuilder, DatasetGenerationRequest, TextDatasetGenerationRequest

client = SynthikClient()

# Tabular
req = DatasetGenerationRequest(
    num_rows=100,
    topic="User profiles",
    columns=[
        ColumnBuilder.string("full_name", description="User's full name").build(),
        ColumnBuilder.int("age", description="Age in years", constraints={"min": 18, "max": 90}).build(),
        ColumnBuilder.categorical("country", ["US", "CA", "GB"]).build(),
        ColumnBuilder.email().build(),
    ]
)
result = client.tabular.generate(req)
print(result["metadata"])  # when format=json

# Text
text_req = TextDatasetGenerationRequest(
    num_samples=10,
    task_definition="sentiment analysis",
    data_domain="e-commerce",
    data_description="product reviews",
    output_format="instruction",
)
text_data = client.text.generate(text_req)
print(text_data.metadata)

Metadata

Release files for synthik-client 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synthik-client 0.2.0
File Size Uploaded
synthik_client-0.2.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for synthik-client 0.2.0
File Interpreter ABI Platform
synthik_client-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / synthik_client-0.2.0.tar.gz

Download URL synthik_client-0.2.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7acc63c637ceb4156f43e384f9d58fb3da16cca869471616e5925111b468937f
BLAKE2b-256 checksum
How to use checksums
9a6f170c507411492e25a384d939d8b3b916ace392050f8daf42cda8f8d55c51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / synthik_client-0.2.0-py3-none-any.whl

Download URL synthik_client-0.2.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1033147ed6514ddd0a224182c9ce2552e8de1057a6ed60b101c1c0f66efe63d
BLAKE2b-256 checksum
How to use checksums
ff90e83d77b1a5113cc92bb6c12bc78f2154cbe438bef828373a3a44557cf27c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page