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.
With Unleash's architecture, feature flags can be evaluated within the SDKs or 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.
Official SDKs
Backend SDKs
Backend SDKs run in backend services. They communicate with Unleash or Unleash Edge using the Client API and require a client token. Backend SDKs perform the flag evaluation locally, meaning all user data is retained within the SDK.
Unleash offers the following backend SDKs:
Frontend SDKs
Frontend SDKs are used in frontend and mobile applications. They communicate with Unleash or Unleash Edge through the Frontend API and require a frontend token. Unlike backend SDKs, frontend SDKs do not perform the flag evaluation locally. Instead, they fetch all enabled feature flags for a given Unleash Context. The flag evaluation happens either in Unleash Edge, or in the Unleash server, when using the Frontend 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:
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 | Node.js | Go | Python | Ruby | .NET | PHP | Rust |
---|---|---|---|---|---|---|---|---|
Async initialization | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
Block until synchronized | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | ✅ | ⭕ |
Context provider | ✅ | N/A | N/A | N/A | N/A | ✅ | ✅ | N/A |
Global fallback function | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
Flag Query: namePrefix , tags | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
Flag Query: project_name | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | N/A | ⭕ |
Custom headers
Capability | Java | Node.js | Go | Python | Ruby | .NET | PHP | Rust |
---|---|---|---|---|---|---|---|---|
static | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ |
function | ✅ | ✅ | ⭕ | ✅ | ✅ (4.3) | ✅ | ✅ | ⭕ |
Built-in strategies
Capability | Java | Node.js | Go | Python | Ruby | .NET | PHP | Rust |
---|---|---|---|---|---|---|---|---|
Gradual rollout | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Gradual rollout with custom stickiness | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ |
UserID, IP, hostname | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
IP with CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ✅ | ✅ |
Custom strategies
All backend SDKs have basic support.
Strategy constraints
All backend SDKs have support for the basic operators (IN
, NOT_IN
).
Capability | Java | Node.js | Go | Python | Ruby | .NET | PHP | Rust |
---|---|---|---|---|---|---|---|---|
Advanced operators | ✅ (5.1) | ✅ (3.12) | ✅ (3.3) | ✅ (5.1) | ✅ (4.2) | ✅ (2.1) | ✅ (1.3.1) | ⭕ |
Unleash Context
Static fields (environment
, appName
), defined fields, and custom properties are supported in all backend SDKs.
isEnabled
implementation
Capability | Java | Node.js | Go | Python | Ruby | .NET | PHP | Rust |
---|---|---|---|---|---|---|---|---|
Can take context and override fallback value | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Fallback function | ✅ | ✅ | ✅ | ✅ | ✅ |