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

Frameworks

Integration guides for popular frameworks, built on top of the JavaScript SDK.

Feature Comparison

JSJavaPythonGo.NETRustSwiftPHPRuby
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:

OptionDefaultDescription
apiKeyrequiredYour environment API key
baseUrlhttps://api.flipswitch.ioFlipswitch server URL
enableRealtimetrueEnable SSE for instant updates
enablePollingFallbacktrueFall back to polling when SSE fails
pollingInterval30sPolling interval in fallback mode
maxSseRetries5Max 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.

On this page