File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
providers/openfeature-provider-unleash/src/openfeature/contrib/provider/unleash Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,20 @@ def __init__(
2222 url : str ,
2323 app_name : str ,
2424 api_token : str ,
25+ environment : str = "development" ,
2526 ) -> None :
2627 """Initialize the Unleash provider.
2728
2829 Args:
2930 url: The Unleash API URL
3031 app_name: The application name
3132 api_token: The API token for authentication
33+ environment: The environment to connect to (default: "development")
3234 """
3335 self .url = url
3436 self .app_name = app_name
3537 self .api_token = api_token
38+ self .environment = environment
3639 self .client : Optional [UnleashClient ] = None
3740 self ._status = ProviderStatus .NOT_READY
3841 self ._last_context : Optional [EvaluationContext ] = None
@@ -58,6 +61,7 @@ def initialize(
5861 self .client = UnleashClient (
5962 url = self .url ,
6063 app_name = self .app_name ,
64+ environment = self .environment ,
6165 custom_headers = {"Authorization" : self .api_token },
6266 event_callback = self ._unleash_event_callback ,
6367 )
You can’t perform that action at this time.
0 commit comments