Skip to content

Commit 60892c9

Browse files
Kaustubh22327rohitesh-wingify
authored andcommitted
feat: custom bucketing seed
1 parent c286331 commit 60892c9

13 files changed

Lines changed: 658 additions & 33 deletions

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.20.0] - 2026-03-03
9+
10+
### Added
11+
12+
- Added support for `customBucketingSeed` in context to specify the seed for bucketing.
13+
14+
```python
15+
options = {
16+
'sdk_key': '32-alpha-numeric-sdk-key',
17+
'account_id': '123456',
18+
}
19+
20+
vwo_client = init(options)
21+
22+
# Pass customBucketingSeed in context
23+
user_context = {
24+
'id': 'unique_user_id',
25+
'bucketingSeed': 'group_id_123'
26+
}
27+
28+
get_flag = vwo_client.get_flag('feature_key', user_context)
29+
```
830
## [1.19.0] - 2026-02-17
931

1032
- Added support to use the context `id` as the visitor UUID instead of auto-generating one. You can read the visitor UUID from the flag result via `flag.get_uuid()` (e.g. to pass to the web client).

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,33 @@ You can also manually flush events using the `flush_events()` method:
633633
vwo_client.flush_events()
634634
```
635635

636+
637+
### Custom Bucketing Seed
638+
639+
This option allows you to override the default bucketing behavior (which uses `userId`) and specify a custom seed for bucketing users into variations. This is useful when you want to ensure consistent variation assignments across different user IDs (e.g., maintaining the same experience for a group of users).
640+
641+
To use this feature, provide the `bucketingSeed` in the user context.
642+
643+
```python
644+
from vwo import init
645+
646+
options = {
647+
'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
648+
'account_id': '123456', # VWO Account ID
649+
}
650+
651+
vwo_client = init(options)
652+
653+
# Pass bucketingSeed in context
654+
user_context = {
655+
'id': 'unique_user_id',
656+
'bucketingSeed': 'group_id_123' # This value will be used for bucketing
657+
}
658+
659+
# The user will be bucketed based on 'group_id_123' instead of 'unique_user_id'
660+
get_flag = vwo_client.get_flag('feature_key', user_context)
661+
```
662+
636663
## Local development
637664

638665
```bash

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def run(self):
121121

122122
setup(
123123
name="vwo-fme-python-sdk",
124-
version="1.19.0",
124+
version="1.20.0",
125125
description="VWO Feature Management and Experimentation SDK for Python",
126126
long_description=long_description,
127127
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)