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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synthik_client-0.2.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

synthik_client-0.2.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: synthik_client-0.2.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for synthik_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7acc63c637ceb4156f43e384f9d58fb3da16cca869471616e5925111b468937f
MD5 59071d3538e0e50d331d917034ccc1ac
BLAKE2b-256 9a6f170c507411492e25a384d939d8b3b916ace392050f8daf42cda8f8d55c51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: synthik_client-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for synthik_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1033147ed6514ddd0a224182c9ce2552e8de1057a6ed60b101c1c0f66efe63d
MD5 f38ffb570f8a446c66340a14783c22a5
BLAKE2b-256 ff90e83d77b1a5113cc92bb6c12bc78f2154cbe438bef828373a3a44557cf27c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page