Launch Darkly Snippets
The code first calls the get() method on the LDClient object, passing in the feature_key and user variables as arguments. It then calls the variation() method, passing in the feature_key and user variables as arguments. The variation() method returns a Feature instance, which is what the show_feature() function uses to display the feature for the user.
Library: launchdarkly-server-sdk
Shortcut: launchdarkly.variation
show_feature = ldclient.get().variation(feature_key, user, False)