SDKs overview

Yes No offers a suite of Software Development Kits (SDKs) designed to streamline the integration of its synthetic data, data masking, and test data generation capabilities into various applications and development workflows. These SDKs abstract the underlying RESTful API, providing language-specific interfaces that simplify common operations such as creating data schemas, generating synthetic datasets, and applying data masking rules Yes No API reference.

The primary benefit of using an SDK over direct API calls is the reduction in boilerplate code. SDKs handle authentication, request formatting, response parsing, and error handling, allowing developers to focus on application logic. This approach enhances developer productivity and reduces the likelihood of integration errors. Yes No's SDKs are designed to be idiomatic to their respective languages, aligning with common programming patterns and conventions.

Developers can leverage these SDKs to automate the provisioning of test data, implement privacy-preserving data transformations, and integrate synthetic data generation into continuous integration and continuous delivery (CI/CD) pipelines. This enables more efficient testing cycles and helps maintain compliance with data privacy regulations by reducing reliance on production data for development and testing environments Yes No documentation portal.

Official SDKs by language

Yes No provides official SDKs for a range of popular programming languages, ensuring broad compatibility and ease of integration for most development teams. Each SDK is maintained by Yes No and is designed to offer a consistent interface to the platform's core functionalities.

The following table outlines the officially supported SDKs, their typical package names, and common installation commands:

Language Package Name (Typical) Installation Command Example Maturity
Python yesno-sdk-python pip install yesno-sdk-python Stable
Java com.yesno:yesno-sdk-java Add to pom.xml or build.gradle Stable
JavaScript @yesno/sdk npm install @yesno/sdk or yarn add @yesno/sdk Stable
Go github.com/yesno/yesno-sdk-go go get github.com/yesno/yesno-sdk-go Stable
Rust yesno-sdk-rust cargo add yesno-sdk-rust Stable
Ruby yesno-sdk-ruby gem install yesno-sdk-ruby Stable
PHP yesno/yesno-sdk-php composer require yesno/yesno-sdk-php Stable
C# YesNo.Sdk dotnet add package YesNo.Sdk Stable

Each SDK provides access to the full range of Yes No's API endpoints, including data model definition, synthetic data generation, data transformation, and project management. Detailed API references and usage examples for each language are available in the Yes No developer documentation.

Installation

Installing Yes No SDKs typically follows the standard package management practices for each respective programming language. Below are detailed instructions and considerations for common languages.

Python

The Python SDK is distributed via PyPI. To install, use pip:

pip install yesno-sdk-python

It is recommended to install SDKs within a virtual environment to manage dependencies effectively. For example:

python -m venv .venv
source .venv/bin/activate  # On Windows, use `.venv\Scripts\activate`
pip install yesno-sdk-python

Java

The Java SDK is available through Maven Central. For Maven projects, add the following dependency to your pom.xml:

<dependency>
    <groupId>com.yesno</groupId>
    <artifactId>yesno-sdk-java</artifactId>
    <version>1.0.0</version> <!-- Replace with the latest version -->
</dependency>

For Gradle projects, add to your build.gradle:

implementation 'com.yesno:yesno-sdk-java:1.0.0' // Replace with the latest version

JavaScript (Node.js/Browser)

The JavaScript SDK is published on npm. Install using npm or yarn:

npm install @yesno/sdk
# or
yarn add @yesno/sdk

This package supports both Node.js environments and modern web browsers, often used in conjunction with bundlers like Webpack or Rollup.

Go

The Go SDK can be installed using the go get command:

go get github.com/yesno/yesno-sdk-go

After fetching, you can import the package in your Go source files:

import "github.com/yesno/yesno-sdk-go/pkg/yesno"

Rust

The Rust SDK is available on crates.io. Add it to your Cargo.toml:

[dependencies]
yesno-sdk-rust = "0.1.0" # Replace with the latest version

Alternatively, use the cargo add command:

cargo add yesno-sdk-rust

Ruby

The Ruby SDK is distributed as a RubyGem. Install using gem:

gem install yesno-sdk-ruby

Then require it in your Ruby application:

require 'yesno-sdk-ruby'

PHP

The PHP SDK is available via Composer. Add it to your composer.json:

{
    "require": {
        "yesno/yesno-sdk-php": "^1.0"
    }
}

Then run composer install or composer update. Alternatively, use the command:

composer require yesno/yesno-sdk-php

C#

The C# SDK is distributed as a NuGet package. Install using the .NET CLI:

dotnet add package YesNo.Sdk

Or via the Package Manager Console in Visual Studio:

Install-Package YesNo.Sdk

Quickstart example

This quickstart example demonstrates how to use the Yes No Python SDK to generate a simple synthetic dataset. The process involves initializing the client, defining a data schema, and requesting synthetic data. Ensure you have your Yes No API key available, which can be obtained from your Yes No account dashboard.

Python Quickstart: Generate Synthetic User Data

import os
from yesno_sdk_python import YesNoClient
from yesno_sdk_python.models import DataSchema, FieldType, GenerateDataRequest

# 1. Initialize the Yes No client with your API key
# It's recommended to store your API key as an environment variable
api_key = os.getenv("YESNO_API_KEY")
if not api_key:
    raise ValueError("YESNO_API_KEY environment variable not set.")

client = YesNoClient(api_key=api_key)

# 2. Define a simple data schema for synthetic users
user_schema = DataSchema(
    name="SyntheticUserSchema",
    fields=[
        {"name": "id", "type": FieldType.UUID},
        {"name": "first_name", "type": FieldType.FIRST_NAME},
        {"name": "last_name", "type": FieldType.LAST_NAME},
        {"name": "email", "type": FieldType.EMAIL},
        {"name": "age", "type": FieldType.INTEGER, "min": 18, "max": 99},
        {"name": "country", "type": FieldType.COUNTRY_CODE}
    ]
)

# 3. Create a request to generate 5 records based on the schema
generate_request = GenerateDataRequest(
    schema=user_schema,
    num_records=5
)

# 4. Generate the synthetic data
try:
    synthetic_data_response = client.generate_data(generate_request)
    print("Successfully generated synthetic data:")
    for record in synthetic_data_response.data:
        print(record)
except Exception as e:
    print(f"An error occurred: {e}")

# Example output (actual data will vary):
# Successfully generated synthetic data:
# {'id': 'a1b2c3d4-e5f6-7890-1234-567890abcdef', 'first_name': 'Alice', 'last_name': 'Smith', 'email': '[email protected]', 'age': 34, 'country': 'US'}
# {'id': 'b2c3d4e5-f6a7-8901-2345-67890abcdef0', 'first_name': 'Bob', 'last_name': 'Johnson', 'email': '[email protected]', 'age': 52, 'country': 'CA'}
# ...

This example demonstrates the core workflow: client initialization, schema definition, and data generation. For more complex scenarios, such as data masking, data subsetting, or integrating with existing databases, refer to the Yes No comprehensive documentation.

Community libraries

While Yes No provides official SDKs for major programming languages, the open-source community may contribute additional libraries, connectors, or utility tools that extend Yes No's functionality or integrate it with niche platforms. These community-driven projects are not officially supported or maintained by Yes No but can offer valuable solutions for specific use cases.

Examples of community contributions might include:

  • Framework-specific integrations: Libraries that integrate Yes No's data generation directly into testing frameworks like Jest, Pytest, or JUnit, simplifying test data setup.
  • CLI tools: Command-line interfaces built on top of the SDKs for quick, scriptable data operations without writing full programs.
  • Data visualization tools: Extensions that help visualize synthetic data distributions or compare synthetic data to real data characteristics.
  • Connectors for less common languages or platforms: While official SDKs cover many languages, community efforts might fill gaps for platforms not directly supported.

Developers interested in exploring community contributions are encouraged to search public code repositories like GitHub or GitLab using terms such as "Yes No SDK", "Yes No API client", or "synthetic data library" to discover relevant projects. Always review the source code, licensing, and community activity before incorporating third-party libraries into production systems to ensure security and reliability, as highlighted in best practices for open source supply chain security.

Yes No encourages community engagement and contributions. Developers can find guidelines for contributing to open-source projects or creating their own integrations within the Yes No developer portal or by engaging with the broader Yes No developer community forums, if available.