Crates.io | growthbook-sdk-rust |
lib.rs | growthbook-sdk-rust |
version | 0.1.1 |
source | src |
created_at | 2024-12-13 18:46:38.346722+00 |
updated_at | 2024-12-13 18:46:38.346722+00 |
description | unofficial growthbook rust sdk |
homepage | https://github.com/deroldo/growthbook-rust-sdk |
repository | https://github.com/deroldo/growthbook-rust-sdk |
max_upload_size | |
id | 1482422 |
size | 265,172 |
[!WARNING]
Fork from Will Bank.
This fork was created just to fix some dependency incompatibilities across projects while the main repository is not updated.
Non-official GrowthBook SDK for Rust services.
This crate provide an easy way to retrieve a feature value using SDK-KEY.
Initializing SDK
let gb_url = "HTTP_OR_HTTPS_URL";
let sdk_key = "SDK_KEY";
let gb = GrowthBookClient::new(gb_url, sdk_key, None, None)?;
The lib is configurable via environment variables as following:
env var | required | description |
---|---|---|
GB_HTTP_CLIENT_TIMEOUT | false | Timeout from gb client to wait a response from gb server. Default value is 10s |
GB_UPDATE_INTERVAL | false | Interval to fetch features data from gb server. Default value is 60s |
GB_URL | false | URL from gb server |
GB_SDK_KEY | false | SDK key to get features from gb server |
Check the client folder for a complete example using the SDK.