forked from DevCycleHQ/python-server-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevcycle_client.py
More file actions
40 lines (31 loc) · 917 Bytes
/
Copy pathdevcycle_client.py
File metadata and controls
40 lines (31 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import typing
from abc import abstractmethod
from devcycle_python_sdk.models.user import DevCycleUser
from devcycle_python_sdk.models.variable import Variable
from openfeature.provider import AbstractProvider
class AbstractDevCycleClient:
"""
A common interface for all DevCycle Clients
"""
@abstractmethod
def is_initialized(self) -> bool:
pass
@abstractmethod
def variable(
self, user: DevCycleUser, key: str, default_value: typing.Any
) -> Variable:
pass
@abstractmethod
def variable_value(
self, user: DevCycleUser, key: str, default_value: typing.Any
) -> typing.Any:
pass
@abstractmethod
def get_openfeature_provider(self) -> AbstractProvider:
"""
Returns the OpenFeature provider for this client
"""
pass
@abstractmethod
def get_sdk_platform(self) -> str:
pass