Hi there! Is there a way to get the id of a "force...
# ask-questions
j
Hi there! Is there a way to get the id of a "force" rule when doing
evalFeature('feature_name')
in the Python SDK? I can get my segment by doing
evalFeature('feature_name').value
and I can get the source
evalFeature('feature_name').source
(this would return 'force').
evalFeature('feature-name').ruleId
returns None, even though a force rule is being applied. I cannot seem to distinguish between which rule is actually forcing the user into a certain assignment. However, when calling the
/features
endpoint, I see there is an id for my force rule, but there seems to be no way to access this using
evalFeature
.
Or is there a way to force a set of users into a certain variation within an experiment based on an attribute? Seems like you can only do this separately with a force rule.
f
Hi Shayla. @freezing-postman-69602 may be able to help you with the SDK question
j
@fresh-football-47124 Thanks so much! @freezing-postman-69602 Are you able to answer my question by any chance?
Just noticed this probably should have been in the Python SDK channel, sorry about that!
@freezing-postman-69602 Any update on this?
f
are you using the latest sdk? if yes, you should get the ruleId when you do,
evalFeature('feature_name').ruleId
j
Which version is the current version? We are on
1.1.0
@freezing-postman-69602
f
1.2.1
is the latest
j
@freezing-postman-69602 Is there any documentation that shows the changes from 1.1.0 to 1.2.1?
f
We're as of now, working on updating the docs. The most significant changes include, growthbook_client, that lets you use the same growthbook instance with various attributes targeting at the time of feature evaluation with enhanced thread safety and performance. Alternatively, you can see the changelog tagged in the release.