SDKs Overview
Official Flipswitch SDKs with real-time updates
Flipswitch provides official SDKs with real-time SSE streaming, plus support for any language via the OpenFeature OFREP protocol.
Languages
JavaScript
Core web & server providers
Java
Spring Boot, server-side
Python
FastAPI, Django, server-side
Go
Gin, net/http, server-side
.NET
ASP.NET, server-side
Rust
Tokio, Axum, server-side
Swift
iOS, macOS
PHP
Laravel, server-side
Ruby
Rails, server-side
Frameworks
Integration guides for popular frameworks, built on top of the JavaScript SDK.
React
Hooks, real-time re-renders, Suspense
Angular
Directives, services, signals
NestJS
Server-side, guards, dependency injection
Feature Comparison
| JS | Java | Python | Go | .NET | Rust | Swift | PHP | Ruby | |
|---|---|---|---|---|---|---|---|---|---|
| Flag evaluation | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Real-time updates (SSE) | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Automatic reconnection | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Polling fallback | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Local caching | ✓ | ✓ | ✓ | ✓ | ~ | ~ | ~ | ~ | ~ |
| Event handlers | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| OpenFeature compatible | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Official SDKs (JS, Java, Python, Go) maintain a persistent SSE connection for millisecond-latency updates. OFREP-based SDKs (.NET, Rust, Swift, PHP, Ruby) poll at a configurable interval, which is simpler but means flag changes aren't instant.
Configuration
All official SDKs share common options:
| Option | Default | Description |
|---|---|---|
apiKey | required | Your environment API key |
baseUrl | https://api.flipswitch.io | Flipswitch server URL |
enableRealtime | true | Enable SSE for instant updates |
enablePollingFallback | true | Fall back to polling when SSE fails |
pollingInterval | 30s | Polling interval in fallback mode |
maxSseRetries | 5 | Max SSE retries before polling fallback |
Evaluation Context
Pass user attributes for targeting:
const context = {
targetingKey: 'user-123', // Required: unique identifier
email: 'user@example.com', // Custom attributes
plan: 'premium',
country: 'SE'
};
const value = await client.getBooleanValue('feature', false, context);The targetingKey is required for consistent gradual rollouts.