SDKs
SDKs

Official SDKs

Get started with PrivaiShield in your language of choice. Our SDKs wrap the REST API with idiomatic interfaces, type safety, and built-in best practices.

Overview

All SDKs provide the same core functionality: text redaction, document processing, streaming, and batch operations. Choose the SDK that best fits your stack.

Installation

Install the SDK for your language using your package manager.

JavaScript (npm)bash
npm install @privaishield/sdk
# or
yarn add @privaishield/sdk
# or
pnpm add @privaishield/sdk
Python (pip)bash
pip install privaishield
# or
poetry add privaishield
Java (Gradle)groovy
implementation 'com.privaishield:sdk:1.0.0'
Java (Maven)xml
<dependency>
  <groupId>com.privaishield</groupId>
  <artifactId>sdk</artifactId>
  <version>1.0.0</version>
</dependency>

SDK Comparison

All SDKs support the full API feature set. Here's a quick comparison of language-specific features.

FeatureJavaScriptPythonJava
Text Redaction
Document Processing
Streaming
Batch Processing
TypeScript Types
Type Hints
Async/Await
Reactive Streams
Browser Support
Spring Boot Starter

Quick Start

Here's a minimal example in each language to get you started.

JavaScriptjs
import { PrivaiShield } from '@privaishield/sdk';

const client = new PrivaiShield({ apiKey: process.env.PRIVAISHIELD_API_KEY });
const result = await client.redact({ text: 'Email: john@example.com' });
console.log(result.redacted); // "Email: [EMAIL_1]"
Pythonpython
from privaishield import PrivaiShield

client = PrivaiShield(api_key=os.environ["PRIVAISHIELD_API_KEY"])
result = client.redact(text="Email: john@example.com")
print(result.redacted)  # "Email: [EMAIL_1]"
Javajava
PrivaiShield client = PrivaiShield.builder()
    .apiKey(System.getenv("PRIVAISHIELD_API_KEY"))
    .build();

RedactResult result = client.redact()
    .text("Email: john@example.com")
    .execute();
System.out.println(result.getRedacted()); // "Email: [EMAIL_1]"