> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/sdks/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # SDKs ## Docs - [Node](https://docs.getunleash.io/sdks/node.md): Set up the Unleash Node.js SDK to evaluate feature flags with context, variants, custom strategies, events, and bootstrap. - [Java](https://docs.getunleash.io/sdks/java.md): Set up the Unleash Java SDK to evaluate feature flags, configure clients, manage context, caching, bootstrap, and testing. - [Python](https://docs.getunleash.io/sdks/python.md): Set up the Unleash Python SDK to evaluate feature flags with context, variants, fallbacks, bootstrap, events, and custom cache. - [.NET](https://docs.getunleash.io/sdks/dotnet.md): Set up the Unleash .NET SDK to evaluate feature flags, configure clients, manage context, caching, bootstrap, and tests. - [Go SDK](https://docs.getunleash.io/sdks/go.md): Set up the Unleash Go SDK to evaluate feature flags with context, variants, custom strategies, events, and bootstrap. - [PHP](https://docs.getunleash.io/sdks/php.md): Set up the Unleash PHP SDK to evaluate feature flags with context, variants, caching, bootstrap, custom strategies, and metrics. - [Ruby](https://docs.getunleash.io/sdks/ruby.md): Set up the Unleash Ruby SDK to evaluate feature flags with context, variants, bootstrap, custom strategies, and Rails support. - [Rust](https://docs.getunleash.io/sdks/rust.md): Set up the Unleash Rust SDK to evaluate feature flags with async clients, context, custom strategies, metrics, and Edge. - [React SDK](https://docs.getunleash.io/sdks/react.md): Set up the Unleash React SDK to evaluate feature flags with hooks, variants, context updates, events, and toolbar support. - [React Native SDK](https://docs.getunleash.io/sdks/react-native.md): Set up the Unleash React Native SDK to evaluate feature flags in React Native and Expo apps with AsyncStorage and context. - [JavaScript Browser SDK](https://docs.getunleash.io/sdks/javascript-browser.md): Set up the Unleash JavaScript Browser SDK to evaluate feature flags in frontend apps with context, events, storage, and bootstrap. - [Next.js SDK](https://docs.getunleash.io/sdks/next-js.md): Set up the Unleash Next.js SDK to evaluate feature flags with App Router, middleware, SSR, SSG, bootstrap, and toolbar support. - [Android SDK](https://docs.getunleash.io/sdks/android.md): Set up the Unleash Android SDK to evaluate feature flags in Android apps with context, variants, bootstrap, and events. - [Flutter SDK](https://docs.getunleash.io/sdks/flutter.md): Set up the Unleash Flutter SDK to evaluate feature flags in Flutter apps with context, variants, events, and bootstrap. - [iOS SDK](https://docs.getunleash.io/sdks/ios.md): Set up the Unleash iOS SDK to evaluate feature flags in Swift apps with context, variants, bootstrap, events, and headers. - [Svelte SDK](https://docs.getunleash.io/sdks/svelte.md): Set up the Unleash Svelte SDK to evaluate feature flags in Svelte apps with context, variants, rendering control, and Edge. - [Vue SDK](https://docs.getunleash.io/sdks/vue.md): Set up the Unleash Vue SDK to evaluate feature flags in Vue.js apps with context updates, variants, deferred start, and toolbar support. - [Node.js OpenFeature provider](https://docs.getunleash.io/sdks/openfeature/node.md): Set up the Unleash OpenFeature provider for Node.js to evaluate feature flags through the OpenFeature API. - [PHP OpenFeature provider](https://docs.getunleash.io/sdks/openfeature/php.md): Set up the Unleash OpenFeature provider for PHP to evaluate feature flags through the OpenFeature API. - [Python OpenFeature provider](https://docs.getunleash.io/sdks/openfeature/python.md): Set up the Unleash OpenFeature provider for Python to evaluate feature flags through the OpenFeature API. - [Ruby OpenFeature provider](https://docs.getunleash.io/sdks/openfeature/ruby.md): Set up the Unleash OpenFeature provider for Ruby to evaluate feature flags through the OpenFeature API. - [Rust OpenFeature provider](https://docs.getunleash.io/sdks/openfeature/rust.md): Set up the Unleash OpenFeature provider for Rust to evaluate feature flags through the OpenFeature API. - [Swift OpenFeature provider](https://docs.getunleash.io/sdks/openfeature/swift.md): Set up the Unleash OpenFeature provider for Swift to evaluate feature flags through the OpenFeature API. > **Note:** This page contains both a page directory (above) and the landing page content (below). The page directory is generated for agent use and does not appear on the landing page. > For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/sdks/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # SDK overview > Unleash offers a number of client libraries (SDKs) designed to help you integrate Unleash into your applications. The SDKs provide an interface for fetching and evaluating feature flags. Unleash offers a number of client libraries (SDKs) designed to help you integrate Unleash into your applications. The SDKs provide an interface for fetching and evaluating feature flags. With [Unleash's architecture](/get-started/unleash-overview#system-overview), feature flags can be evaluated within the SDKs or [Unleash Edge](/unleash-edge), making evaluations incredibly fast. SDKs cache feature flag data in memory, providing high reliability. Unleash provides official SDKs for a number of programming languages. Our community has also contributed SDKs for [additional languages](#community-sdks). ## Official SDKs ### Backend SDKs Backend SDKs run in backend services. They communicate with Unleash or [Unleash Edge](/unleash-edge) using the [Client API](/get-started/unleash-overview#client-api) and require a [client token](/concepts/api-tokens-and-client-keys#backend-tokens). Backend SDKs perform the flag evaluation locally, meaning all user data is retained within the SDK. Unleash offers the following backend SDKs: * [Go SDK](/sdks/go) * [Java SDK](/sdks/java) * [Node.js SDK](/sdks/node) * [PHP SDK](/sdks/php) * [Python SDK](/sdks/python) * [Ruby SDK](/sdks/ruby) * [Rust SDK](/sdks/rust) * [.NET SDK](/sdks/dotnet) ### Frontend SDKs Frontend SDKs are used in frontend and mobile applications. They communicate with Unleash or [Unleash Edge](/unleash-edge) through the [Frontend API](/api) and require a [frontend token](/concepts/api-tokens-and-client-keys#frontend-tokens). Unlike backend SDKs, frontend SDKs do not perform the flag evaluation locally. Instead, they fetch all enabled feature flags for a given [Unleash Context](/concepts/unleash-context). The flag evaluation happens either in [Unleash Edge](/unleash-edge), or in the Unleash server, when using the [Frontend API](/api) directly. When the SDK initializes, it sets up an in-memory repository and retrieves a list of all enabled flags and their variants in a single request. Once fetched, the SDK serves flag values from memory, without making additional requests. It periodically refreshes the list of enabled flags to keep the data up to date. Unleash offers the following frontend SDKs: * [Android SDK](/sdks/android) * [Flutter SDK](/sdks/flutter) * [iOS SDK](/sdks/ios) * [JavaScript SDK](/sdks/javascript-browser) * [Next.js](/sdks/next-js) * [React SDK](/sdks/react) * [React Native SDK](/sdks/react-native) * [Svelte SDK](/sdks/svelte) * [Vue SDK](/sdks/vue) ### Feature compatibility in backend SDKs The following tables show which features are supported by each backend SDK. Some features are only applicable to specific SDKs, depending on the programming language or how the client is implemented. **Symbol Reference** ✅ Implemented | ❌ Not supported | ⭕ Not implemented, but under consideration | **N/A** Not applicable to this SDK #### Initialization | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | -------------------------------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | Async initialization | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | N/A | ✅ | | Block until synchronized | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | ✅ | ✅ | | Context provider | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | | Global fallback function | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ⭕ | ⭕ | | Flag Query: `namePrefix`, `tags` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | | Flag Query: `project_name` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | #### Custom headers | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | ---------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | static | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | | function | ✅ | ✅ | ⭕ | ✅ | ✅ (4.3) | ✅ | ✅ | ⭕ | #### Built-in strategies | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | -------------------------------------------------------------------------------------------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | [Gradual rollout](/concepts/activation-strategies) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | [Gradual rollout with custom stickiness](/concepts/stickiness#custom-stickiness) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ (0.16.0) | | [IP](/concepts/activation-strategies#ips), [hostname](/concepts/activation-strategies#hosts) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | [IP](/concepts/activation-strategies#ips) with CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ (5.0.0) | ✅ | ✅ | #### Custom strategies All backend SDKs have basic support. #### Strategy constraints All backend SDKs have support for the basic operators (`IN`, `NOT_IN`). | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | ------------------------------------------------------------------------ | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | [Advanced operators](/concepts/activation-strategies#advanced-operators) | ✅ (5.1) | ✅ (3.12) | ✅ (3.3) | ✅ (5.1) | ✅ (4.2) | ✅ (2.1) | ✅ (1.3.1) | ✅ (0.16.0) | #### Unleash context Static fields (`environment`, `appName`), defined fields, and custom properties are supported in all backend SDKs. #### `isEnabled` implementation | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | -------------------------------------------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | Can take context and override fallback value | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | Fallback function | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ⭕ | #### Strategy variants | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | ---------------------------------------------------------------------------------------------------------------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | [Strategy variants](/concepts/strategy-variants) and [custom stickiness](/concepts/stickiness#custom-stickiness) | ✅ (8.3.0) | ✅ (4.1.0) | ✅ (3.8.0) | ✅ (5.8.0) | ✅ (4.5.0) | ✅ (3.3.0) | ✅ (1.13.0) | ✅ (0.16.0) | Versions in parentheses are the minimum SDK versions that support [strategy variants](/concepts/strategy-variants#client-sdk-support). #### Local backup | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | ----------------------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | File-based local backup | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | #### Metrics and impression data | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | -------------------------------------------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | Usage metrics | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | [Impression data](/concepts/impression-data) | ✅ | ✅ | ✅ | ✅ | ⭕ | ✅ | ✅ | ⭕ | | [Impact metrics](/concepts/impact-metrics) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ⭕ | #### Bootstrap | Capability | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | -------------------------------------------- | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | Bootstrap from file or custom implementation | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ### Default refresh and metrics intervals #### Backend SDKs | Interval | [Java](/sdks/java) | [Node.js](/sdks/node) | [Go](/sdks/go) | [Python](/sdks/python) | [Ruby](/sdks/ruby) | [.NET](/sdks/dotnet) | [PHP](/sdks/php) | [Rust](/sdks/rust) | | ------------------------ | :----------------: | :-------------------: | :------------: | :--------------------: | :----------------: | :------------------: | :--------------: | :----------------: | | Default refresh interval | 15s | 15s | 15s | 15s | 15s | 15s | 15s | 15s | | Default metrics interval | 60s | 60s | 60s | 60s | 60s | 60s | 60s | 15s | #### Frontend SDKs | Interval | [Android](/sdks/android) | [Flutter](/sdks/flutter) | [iOS](/sdks/ios) | [JavaScript](/sdks/javascript-browser) | [Next.js](/sdks/next-js) | [React](/sdks/react) | [React Native](/sdks/react-native) | [Svelte](/sdks/svelte) | [Vue](/sdks/vue) | | ------------------------ | :----------------------: | :----------------------: | :--------------: | :------------------------------------: | :----------------------: | :------------------: | :--------------------------------: | :--------------------: | :--------------: | | Default refresh interval | 60s | 30s | 15s | 30s | 30s | 30s | 30s | 30s | 30s | | Default metrics interval | 60s | 30s | 30s | 60s | 60s | 60s | 60s | 60s | 60s | ## OpenFeature providers Beta Unleash also supports [OpenFeature](https://openfeature.dev/), an open standard that provides a vendor-neutral API for feature flagging. In OpenFeature, a provider is the component that connects the OpenFeature SDK to a flag management system. The Unleash providers translate OpenFeature API calls into Unleash SDK operations: Unleash still manages and evaluates your flags, while your application code depends only on the OpenFeature API. OpenFeature can be useful when you want a common feature flag interface across services, frameworks, or vendors. The trade-off is that the OpenFeature API models only the capabilities that feature flag systems have in common. It does not cover Unleash-specific capabilities, such as [impression data](/concepts/impression-data) and [impact metrics](/concepts/impact-metrics), including the [safeguards](/concepts/impact-metrics#configure-safeguards) that depend on them. To get the most out of Unleash, we recommend that you use the Unleash SDKs directly. Unleash maintains the following OpenFeature providers: * [Node.js provider](/sdks/openfeature/node) * [PHP provider](/sdks/openfeature/php) * [Python provider](https://github.com/Unleash/unleash-openfeature-python-provider) * [Ruby provider](/sdks/openfeature/ruby) * [Rust provider](https://github.com/Unleash/unleash-openfeature-rust-provider) * [Swift provider](https://github.com/Unleash/unleash-openfeature-swift-provider) ## Community SDKs If you need a language or framework not covered officially, explore our community contributions: * Angular - TypeScript ([angular-unleash-proxy-client](https://github.com/Karelics/angular-unleash-proxy-client) by [Karelics](https://karelics.fi/unleash-feature-flags-with-gitlab/)) * Angular - TypeScript ([ngx-unleash-proxy-client](https://github.com/snowfrogdev/snowfrogdev/tree/main/packages/ngx-unleash-proxy-client)) * Clojure ([AppsFlyer/clojure-unleash](https://github.com/AppsFlyer/unleash-client-clojure)) * C++ ([aruizs/unleash-client-cpp](https://github.com/aruizs/unleash-client-cpp)) * ColdBox - CFML ([coldbox-modules/unleashsdk](https://github.com/coldbox-modules/unleashsdk)) * Dart ([uekoetter.dev/unleash-client-dart](https://pub.dev/packages/unleash)) * Elixir ([afontaine/unleash\_ex](https://gitlab.com/afontaine/unleash_ex)) * Haskell ([finn-no/unleash-client-haskell](https://github.com/finn-no/unleash-client-haskell)) * Kotlin ([silvercar/unleash-client-kotlin](https://github.com/silvercar/unleash-client-kotlin)) * NestJS - Node.js ([pmb0/nestjs-unleash](https://github.com/pmb0/nestjs-unleash)) * PHP ([minds/unleash-client-php](https://gitlab.com/minds/unleash-client-php)) * PHP - Symfony ([Stogon/unleash-bundle](https://github.com/Stogon/unleash-bundle)) * Solid ([nunogois/proxy-client-solid](https://github.com/nunogois/proxy-client-solid)) ### Implement your own SDK If you can't find an SDK that fits your requirements, you can also develop your own SDK. To make implementation easier, check out these resources: * [Unleash Client Specifications](https://github.com/Unleash/client-specification) - Used by all official SDKs to make sure they behave correctly across different language implementations. This lets us verify that a gradual rollout to 10% of the users would affect the same users regardless of which SDK you're using. * [Client Specification](https://github.com/Unleash/unleash/blob/main/contributing/client-specification.md) - A brief guide of the *Unleash Architecture* and important aspects of the SDK role in it all. ## Offline behavior Once they have been initialized, all Unleash clients continue to function without an internet connection or in the event that the Unleash server has an outage. Because the SDKs and the Unleash Edge cache their feature flag states locally and only communicate with the Unleash server or Edge at predetermined intervals, a broken connection only means that they won't get any new updates. Unless the SDK supports [bootstrapping](#bootstrap), it needs to connect to Unleash at startup to get its initial feature flag data set. If the SDK doesn't have a feature flag data set available, all flags fall back to evaluating as disabled or as the specified default value. ### Bootstrap By default, all SDKs reach out to the Unleash server at startup to fetch their flag configuration. Additionally, most of the [backend SDKs](#backend-sdks) and Unleash Edge support bootstrapping, which allows them to get their flag configuration from a file, the environment, or other local resources. These SDKs can function without any network connection. Bootstrapping is also supported by the following frontend SDKs: * [Android SDK](/sdks/android) * [JavaScript SDK](/sdks/javascript-browser) * [React SDK](/sdks/react) * [React Native SDK](/sdks/react-native) * [Svelte SDK](/sdks/svelte) * [Vue SDK](/sdks/vue) ### SDK identification headers To identify which SDK instances are connected to Unleash, the following headers must be attached to all requests made by the SDK to the server (`/api/client` for backend SDKs and `/api/frontend` for frontend SDKs): `unleash-connection-id` * **Description**: A unique identifier for the current SDK instance. * **Format**: Automatically generated using the idiomatic unique identifier generator for the specific programming ecosystem. For example, `randomUUID` from `crypto` in Node.js. * **Additional information**: This connection ID represents a long-lived connection between the SDK and the Unleash server. An SDK should generate a new connection ID each time an SDK instance is instantiated (for example, when calling `new Unleash()` in a Node SDK). The same connection ID should be used for each request when an SDK instance polls the API. This header replaces the legacy `unleash-instanceid` which can be overwritten by the client. > Backend SDKs used in short-lived request/response models (like Next.js server mode and PHP) should not provide this header. `unleash-sdk` * **Description**: Provides information about the language/framework and version of the SDK making the request. * **Format**: The language/framework followed by the `@` symbol and the semantic version of the SDK. For example, `unleash-client-java@10.0.1` or `unleash-client-node@6.4.4`. * **Additional information**: Each SDK implementation should use a platform-idiomatic method to read the version from a package manager and update it with each version release. `unleash-appname` (Optional) * **Description**: Specifies the name of your application that is communicating with Unleash. * **Format**: User-defined with some SDKs providing a default fallback value. For example, `billing-service`.