def features_from_session(self, request):
        for key in request.session.keys():
            m = re.match(_FEATURE_STATUS, key)
            if m:
                feature = m.groupdict()['feature']
                if request.session[key] == 'enabled':
                    yield (feature, True)
                else: # We'll assume it's disabled
                    yield (feature, False)
Provides an iterator yielding tuples (feature name, True/False)
dataset/ETHPy150Open tobych/django-feature-flipper/featureflipper/middleware.py/FeaturesMiddleware.features_from_session