Official SDKs
TruSec provides official SDKs to make integration easy and idiomatic in your preferred language.JavaScript / TypeScript
Full-featured SDK for Node.js, browsers, and edge runtimes
Python
Pythonic SDK with async support and type hints
Go
Lightweight SDK for Go applications (coming soon)
Ruby
Ruby SDK with Rails integration (coming soon)
Installation
- JavaScript
- Python
- Go
Quick Start
- JavaScript
- Python
Features
All official SDKs include:Type Safety
Type Safety
Full TypeScript definitions and Python type hints for excellent IDE support and compile-time safety.
Automatic Retries
Automatic Retries
Built-in retry logic with exponential backoff for transient failures.
Error Handling
Error Handling
Rich error types with detailed information for debugging.
Logging
Logging
Configurable logging for debugging and monitoring.
Testing Utilities
Testing Utilities
Mock clients and testing helpers for unit and integration tests.
Configuration Options
All SDKs support the following configuration options:| Option | Description | Default |
|---|---|---|
apiKey | Your TruSec API key | Required |
baseUrl | API base URL | https://api.trusec.io |
timeout | Request timeout in ms | 30000 |
retries | Number of retry attempts | 3 |
debug | Enable debug logging | false |
Community SDKs
Community-maintained SDKs for additional languages:| Language | Package | Maintainer |
|---|---|---|
| PHP | trusec/php-sdk | Community |
| Java | io.trusec:sdk | Community |
| .NET | TruSec.SDK | Community |