Feature flags for Python

Mitigate risk and accelerate delivery with Optimizely Rollouts

  • Get unlimited feature flags and environments
  • Remotely enable features outside of app store releases
  • Roll back poor-performing features with a kill switch
  • Run betas or provision features to specific audiences

Free Feature Flags

We will email you your login details:

Welcome back. Not you?

Welcome, we're creating your account

Please correct form errors

Build and release with confidence

Feature flags, also known as switches or toggles, allow you to turn functionality on and off without deploying new code. This increases control, allowing you to release more frequently and test-and-learn without impacting the user experience.

Roll out and roll back

Rollouts help you mitigate risk. Start by releasing your feature behind a disabled feature flag with 0% traffic allocated. When you are ready to release to customers, you can gradually increase the rollout as needed as you iterate on and refine your feature.

Embrace continuous delivery

Separate code deployment from feature enablement. Get new features into production safely and faster with feature flags and make the shift to continuous delivery.

Target audiences

Optimizely Rollouts includes audiences that give you control over which users to include in a rollout. Target audiences using custom attributes like their app version, location, device type, or subscription plan.

Works in the languages you do

Create feature flags, target audiences, and roll out and roll back with zero-latency SDKs for Python and more.

Fast decision engine

Roll out features in performance-critical codepaths. Our SDKs bucket users in memory so rollouts have no impact on latency.

Open platform

Open-source SDKs with pluggable components give you control over network activity.

Read the Docs

Get integrated with quickstarts for every language.

                      
              import optimizely
              optimizely_client = optimizely.Optimizely(datafile)
              
              

# Evaluate a feature flag

enabled = optimizely_client.is_feature_enabled('my_feature', 'user_123') if enabled:

# Show your feature

else:

# Hide your feature

                      
              import com.optimizely.ab.Optimizely;
              
              Optimizely optimizely = Optimizely.builder(datafile).build();
              
              

// Evaluate a feature flag

Boolean enabled = optimizely.isFeatureEnabled("my_feature", "user_123"); if (enabled) {

// Show your feature

} else {

// Hide your feature

}
                      
              import "optimizely"
              
              optimizely_client = Optimizely::Project.new(datafile)
              
              

# Evaluate a feature flag

enabled = optimizely_client.is_feature_enabled('my_feature', 'user_123') if enabled

# Show your feature

else

# Hide your feature

end
                      
              const optimizely = require('@optimizely/optimizely-sdk');
              
              const optimizelyClient = optimizely.createInstance({ datafile: datafile });
              
              

// Evaluate a feature flag

const enabled = optimizelyClient.isFeatureEnabled('my_feature', 'user_123'); if (enabled) {

// Show your feature

} else {

// Hide your feature

}
                      
              use Optimizely\Optimizely;
              
              

// Initialize an Optimizely client

$optimizelyClient = new Optimizely($datafile);

// Evaluate a feature flag

$enabled = $optimizelyClient->isFeatureEnabled('my_feature', 'user_123'); if (enabled) {

// Show your feature

} else {

// Hide your feature

}
                      
              using OptimizelySDK;
              
              

// Initialize an Optimizely client

Optimizely OptimizelyClient = new Optimizely(datafile);

// Evaluate a feature flag

bool enabled = OptimizelyClient.IsFeatureEnabled("my_feature", "user_123"); if (enabled) {

// Show your feature

} else {

// Hide your feature

}
                      
              import optimizelySDK from '@optimizely/optimizely-sdk';
              
              

// Initialize an Optimizely client

const optimizelyClientInstance = optimizelySDK.createInstance({ datafile: datafile });

// Evaluate a feature flag

const enabled = optimizelyClientInstance.isFeatureEnabled('my_feature', 'user_123'); if (enabled) {

// Show your feature

} else {

// Hide your feature

}
                      
              // In AppDelegate.m
              #import 
              
              

// Initialize an Optimizely manager

OPTLYManager *optlyManager = [[OPTLYManager alloc] initWithBuilder:[OPTLYManagerBuilder builderWithBlock:^(OPTLYManagerBuilder * _Nullable builder) { builder.sdkKey = @''; }]];

// Initialize an Optimizely client

[optlyManager initializeWithCallback:^(NSError * _Nullable error, OPTLYClient * _Nullable client) {

// Evaluate a feature flag

bool enabled = [client isFeatureEnabled:@"new_feature" userId:@"user123" attributes: nil]; if (enabled) {

// Show your feature

} else {

// Hide your feature

} }];
                      
              import Optimizely
              
              

// Initialize an Optimizely client

optimizely = OptimizelyClient(sdkKey: @'') try optimizely!.start(datafile: datafile)

// Evaluate a feature flag

let enabled = try optimizely.isFeatureEnabled(featureKey: "my_feature_key", userId: "user_123") if enabled {

// Show your feature

} else {

// Hide your feature

}
                        
              import com.optimizely.ab.Optimizely;
              
              Optimizely optimizely = Optimizely.builder(datafile).build();
              
              

// Evaluate a feature flag

Boolean enabled = optimizely.isFeatureEnabled("my_feature", "user_123"); if (enabled) {

// Show your feature

} else {

// Hide your feature

}

Try out the Optimizely Rollouts demo

Sign up for free feature flags