SDKs
Read time: 8 minutes
Last edited: Nov 19, 2024
Overview
This topic explains the prerequisites you must consider when you're setting up a LaunchDarkly SDK for the first time.
A LaunchDarkly account is required to configure any LaunchDarkly SDK. To create an account, sign up for a trial. Your 14-day free trial begins as soon as you sign up.
Getting started with LaunchDarkly SDKs
The SDK types have different security considerations, as well as behavioral and architectural differences. They handle flag evaluations differently, utilize different kinds of SDK keys, and support different languages. Consider your use case carefully before you decide which SDKs to use.
To learn more, read Getting started with SDKs.
The SDKs are designed to evaluate feature flags in your application. If you want to interact programmatically with the LaunchDarkly product, for example to create or update account members, projects, or environments, or to search for existing flags, you'll need to use the LaunchDarkly API. To learn more about the differences between these offerings, read Comparing LaunchDarkly's REST API and SDK.
Available SDKs
If you already know which SDKs you want to use, choose from the list of supported SDKs below.
If the language or framework you use is not listed here, we may provide a sample application to help you get started. Sample applications demonstrate that an SDK is compatible with a particular language or framework. However, LaunchDarkly only provides full support for those languages or frameworks that have a dedicated SDK.
We provide the following SDKs:
CLIENT-SIDE / MOBILE SDKS
SERVER-SIDE SDKS
AI SDKS
EDGE SDKS
OPENFEATURE PROVIDERS
Supported features
This section includes tables of minimum SDK versions required to support the listed features. Open each section to view minimum version requirements.
All versions of these SDKs support evaluating feature flags, recording and flushing events, and shutting down.
Expand JavaScript-based client-side SDKs
This table lists the minimum SDK versions required of JavaScript-based client-side SDKs to support the listed features:
Feature | Electron | JavaScript | Node.js | React Native | React Web | Vue |
---|---|---|---|---|---|---|
Application metadata | 2.22 | 3.0 | 7.0 | 2.26 | ||
Automatic environment attributes | 8.0 | |||||
Big segments | All | All | All | All | All | All |
Bootstrapping | 1.0 | 2.5 | 1.0 | 2.9.5 | ||
Contexts and context kinds | 3.0 | 3.0 | 7.0 | 3.0 | 2.0 | |
Experimentation   (including holdouts) | 1.0 | 2.6 3.5 | 1.0 3.3 | 5.0 10.9 | 1.0 3.5 | 1.0 2.3 |
Flag evaluation reasons | 1.5.7 | 2.72 | 2.0 | 4.1.2 | 2.21 | 1.0 |
Getting all flags | 1.0 | 1.0 | 1.0 | 5.0.1 | 2.9 | |
Migration flags | ||||||
Multiple environments | 4.2.0 | |||||
Omit anon contexts from events | ||||||
Offline mode | 1.0 | |||||
Private attributes | 1.0.1 | 2.9.4 | 1.0 | 4.0 | 2.9 | 1.0 |
Reading flags from a file | ||||||
Relay Proxy in daemon mode | ||||||
Relay Proxy in proxy mode | 1.5.6 | 1.0 | 1.0 | 1.0 | 2.20.2 | |
Secure mode | 1.5 | 2.17 | 1.4 | 2.18 | ||
Sending custom events   (incl. events for prereqs) | 1.1.4 | 1.6.2 3.5 | 1.0 3.3 | 1.0 10.9 | 1.0 3.5 | 1.0 2.3 |
Storing data | ||||||
Subscribing to flag changes | 1.0 | 1.0 | 1.0 | 1.0 | 2.9 | |
Test data sources | ||||||
Web proxy configuration |
Expand all other client-side SDKs
This table lists the minimum SDK versions required of non-JavaScript-based client-side SDKs to support the listed features:
Feature | .NET | Android | C++ | Flutter | iOS | Roku |
---|---|---|---|---|---|---|
Application metadata | 3.1 | 3.6 (users), 4.2 (contexts) | 3.0 | 1.3 | 8.0 | 1.3 |
Automatic environment attributes | 4.0 | 5.0 | 3.0 | 9.0 | ||
Big segments | All | All | All | All | All | All |
Bootstrapping | ||||||
Contexts and context kinds | 3.0 | 4.0 | 3.0 | 2.0 | 8.0 | 2.0 |
Experimentation   (including holdouts) | 2.0 5.3 | 3.1 5.4 | 2.4.8 | 0.2.0 4.8 | 1.0 9.11 | 1.0 2.2 |
Flag evaluation reasons | 1.2 | 2.7 | 1.0 | 1.0 | 4.3 | 1.0 |
Getting all flags | 1.0 | 2.8 | 1.0 | 1.0 | 1.0 | 1.0 |
Migration flags | ||||||
Multiple environments | 2.6 | 5.3.1 | ||||
Omit anon contexts from events | ||||||
Offline mode | 1.0 | 1.0 | 1.0 | 1.0 | ||
Private attributes | 1.0 | 2.2 | 1.0 | 1.0 | 2.10 | 1.0 |
Reading flags from a file | ||||||
Relay Proxy in daemon mode | ||||||
Relay Proxy in proxy mode | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 |
Secure mode | ||||||
Sending custom events   (incl. events for prereqs) | 1.0 | 1.0 5.4 | 1.0 | 1.0 | 1.0 9.11 | 1.0 |
Storing data | ||||||
Subscribing to flag changes | 2.0 | 1.0 | 1.0 | 1.0 | 1.0 | |
Test data sources | 1.0 | |||||
Web proxy configuration | 1.0 |
Expand server-side SDKs, A-K
This table lists the minimum SDK versions required of server-side SDKs with names that start with letters from A to K to support the listed features:
Feature | .NET | Apex | C++ | Erlang | Go | Haskell | Java |
---|---|---|---|---|---|---|---|
Application metadata | 8.0 | 3.0 | 1.6 | 5.9 | 3.1 | 5.8 | |
Automatic environment attributes | |||||||
Big segments | 6.2 | 5.5 | 5.7 | ||||
Bootstrapping | |||||||
Contexts and context kinds | 7.0 | 3.0 | 2.0 | 6.0 | 4.0 | 6.0 | |
Experimentation | 6.1 | 1.1 | 2.4 | 1.2 | 5.4 | 2.2 | 5.5 |
Flag evaluation reasons | 5.4 | 1.0 | 1.0 | 1.0 | 4.3 | 1.0 | 4.3 |
Getting all flags   (incl. prereq details) | 2.0 8.6 | 1.0 | 1.0 3.8 | 1.0 3.4 | 2.0 7.7 | 1.0 4.3 | 1.0 7.6 |
Migration flags | 8.0 | 7.0 | 7.0 | ||||
Multiple environments | |||||||
Omit anon contexts from events | 7.5 | 4.2 | |||||
Offline mode | 1.0 | 1.0 | 1.0 | 2.0 | 1.0 | 1.0 | |
OpenTelemetry | 8.4 | 7.4 | 7.4 | ||||
Private attributes | 3.5 | 1.0 | 1.0 | 1.0 | 2.2.3 | 1.0 | 2.5 |
Reading flags from a file | 5.5 | 2.6 | 1.0 | 4.4 | 3.0 | 4.5 | |
Relay Proxy in daemon mode | 5.2 | 1.2 | 1.0 | 2.0 | 1.0 | 1.0 | |
Relay Proxy in proxy mode | 1.0 | 1.0 | 1.0 | 2.0 | 1.0 | 1.0 | |
Secure mode | 2.0 | 2.0 | 1.0 | 1.0 | |||
Sending custom events | 1.0 | 1.0 | 1.0 | 1.0 | 2.0 | 1.0 | 1.0 |
Storing data | 1.0 | 1.2 (Redis) | 1.0 | 4.5 (DynamoDB, Consul) | 1.0 | 1.0 | |
Subscribing to flag changes | 6.0 | 5.0 | 5.0 | ||||
Test data sources | 6.0 | 2.6 | 1.4 | 2.0 | 1.0 | 5.1 | |
Web proxy configuration | 1.0 | 1.0 | 2.0 | 2.2 |
Expand server-side SDKs, L-Z
This table lists the minimum SDK versions required of server-side SDKs with names that start with letters from L to Z to support the listed features:
Feature | Lua | Node.js | PHP | Python | Ruby | Rust |
---|---|---|---|---|---|---|
Application metadata | 6.4 | 4.3 | 7.6 | 6.4 | 1.0 | |
Automatic environment attributes | ||||||
Big segments | 6.2 | 7.3 | 6.3 | |||
Bootstrapping | ||||||
Contexts and context kinds | 7.0 | 5.0 | 8.0 | 7.0 | 1.0 | |
Experimentation | 1.0 | 6.1 | 4.1 | 7.2 | 6.2 | 1.0 |
Flag evaluation reasons | 1.0 | 5.4 | 3.4 | 6.4 | 5.2 | 1.0 |
Getting all flags   incl. prereq details | 1.0 2.1.2 | 3.0 9.7 | 1.6 6.3 | 2.0 9.8 | 2.0.1 8.8 | 1.0 2.3 |
Migration flags | 9.0 | 6.0 | 9.0 | 8.0 | 2.2 | |
Multiple environments | ||||||
Omit anon contexts from events | 9.7 | 8.6 | 2.2 | |||
Offline mode | 1.0 | 1.0 | 2.0 | 2.0 | 1.0 | |
OpenTelemetry | 9.3 | 9.4 | 8.4 | |||
Private attributes | 1.0 | 3.3 | 2.4 | 4.1 | 2.0 | 1.0 |
Reading flags from a file | 1.0 | 3.5 | 6.6 | 5.4.1 | ||
Relay Proxy in daemon mode | 1.0 | 1.0 | 1.0 | 2.0 | 2.0 | |
Relay Proxy in proxy mode | 1.0 | 1.0 | 1.0 | 2.0 | 2.0 | 1.0 |
Secure mode | 3.0 | 1.0 | 2.0 | 2.0.1 | 1.0 | |
Sending custom events | 1.0 | 1.0 | 1.0 | 2.0 | 2.0 | 1.0 |
Storing data | 1.0 | 2.0 (Redis) | 1.0 (Redis), 3.5 (Consul and DynamoDB) | 2.0 (Consul and Redis), 6.7 (DynamoDB) | 2.3.1 (Redis), 5.5 (Consul and DynamoDB) | |
Subscribing to flag changes | 1.0 | 9.1 | 2.0 | |||
Test data sources | 6.3 | 4.2 | 7.4 | 2.0 | ||
Web proxy configuration | 1.0 | 2.0 | 2.2.5 |
Expand edge SDKs
Edge SDKs are designed to be used with one of the LaunchDarkly client-side SDKs as follows:
- The edge SDK gets all flags at the edge for a given context, and bootstraps them onto a cached payload
- The client-side SDK initializes the bootstrapped payload
- The client-side SDK evaluates the flags and sends events back to LaunchDarkly
If you are using newer versions of some edge SDKs, then the SDK can send events back to LaunchDarkly directly. Using a client-side SDK is not necessary. You do need to configure the SDK to enable sending events.
This table lists the minimum SDK versions required of edge SDKs to support the listed features:
Feature | Akamai | Cloudflare | Vercel |
---|---|---|---|
Contexts and context kinds | 1.0 | 2.0 | 1.0 |
Experimentation | 2.3.0 | 1.2.0 | |
Getting all flags | 1.0 | 1.0 | |
Migration flags | 1.0.9 | 2.2.2 | 1.1.6 |
Secure mode | 2.0 | 1.0 | |
Sending custom events | 2.3 | 1.2 |
Expand AI SDKs
AI SDKs are designed to interact with AI configs. AI configs provide management of your AI prompts and model configurations.
This table lists the minimum SDK versions required of AI SDKs to support the listed features:
Feature | .NET | Node.js (AI) | Python |
---|---|---|---|
Contexts and context kinds | 0.1 | 0.1 | 0.1 |
Customizing AI configs | 0.1 | 0.1 | 0.1 |
Private attributes | 0.1 | 0.1 | 0.1 |
Tracking AI metrics | 0.1 | 0.1 | 0.1 |