openfeature-provider-flagd 0.2.6__py3-none-any.whl → 0.2.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. openfeature/contrib/provider/flagd/provider.py +10 -3
  2. openfeature/contrib/provider/flagd/resolvers/grpc.py +82 -27
  3. openfeature/contrib/provider/flagd/resolvers/in_process.py +7 -3
  4. openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py +70 -38
  5. openfeature/contrib/provider/flagd/resolvers/process/targeting.py +5 -1
  6. openfeature/contrib/provider/flagd/resolvers/protocol.py +7 -3
  7. openfeature/contrib/provider/flagd/resolvers/types.py +7 -0
  8. openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.py +36 -36
  9. openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.pyi +41 -22
  10. openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.py +2 -2
  11. openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.pyi +194 -39
  12. openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.py +22 -16
  13. openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.pyi +33 -10
  14. openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.py +2 -2
  15. openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.pyi +94 -19
  16. openfeature/schemas/protobuf/schema/v1/schema_pb2.py +4 -4
  17. openfeature/schemas/protobuf/schema/v1/schema_pb2.pyi +25 -19
  18. openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.py +2 -2
  19. openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.pyi +194 -39
  20. openfeature/schemas/protobuf/sync/v1/sync_service_pb2.py +4 -4
  21. openfeature/schemas/protobuf/sync/v1/sync_service_pb2.pyi +9 -9
  22. openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.py +2 -2
  23. openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.pyi +69 -14
  24. openfeature_provider_flagd-0.2.7.dist-info/METADATA +208 -0
  25. openfeature_provider_flagd-0.2.7.dist-info/RECORD +37 -0
  26. {openfeature_provider_flagd-0.2.6.dist-info → openfeature_provider_flagd-0.2.7.dist-info}/WHEEL +1 -1
  27. openfeature_provider_flagd-0.2.7.dist-info/entry_points.txt +6 -0
  28. {openfeature_provider_flagd-0.2.6.dist-info → openfeature_provider_flagd-0.2.7.dist-info}/licenses/LICENSE +1 -1
  29. openfeature/.gitignore +0 -2
  30. openfeature_provider_flagd-0.2.6.dist-info/METADATA +0 -370
  31. openfeature_provider_flagd-0.2.6.dist-info/RECORD +0 -36
@@ -15,8 +15,14 @@ import collections.abc
15
15
  import grpc
16
16
  import grpc.aio
17
17
  import openfeature.schemas.protobuf.schema.v1.schema_pb2
18
+ import sys
18
19
  import typing
19
20
 
21
+ if sys.version_info >= (3, 13):
22
+ import typing as typing_extensions
23
+ else:
24
+ import typing_extensions
25
+
20
26
  _T = typing.TypeVar("_T")
21
27
 
22
28
  class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
@@ -24,82 +30,231 @@ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Ite
24
30
  class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
25
31
  ...
26
32
 
27
- class ServiceStub:
28
- """Service defines the exposed rpcs of flagd"""
29
-
30
- def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
31
- ResolveAll: grpc.UnaryUnaryMultiCallable[
33
+ GRPC_GENERATED_VERSION: str
34
+ GRPC_VERSION: str
35
+ _ServiceResolveAllType = typing_extensions.TypeVar(
36
+ '_ServiceResolveAllType',
37
+ grpc.UnaryUnaryMultiCallable[
38
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
39
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
40
+ ],
41
+ grpc.aio.UnaryUnaryMultiCallable[
42
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
43
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
44
+ ],
45
+ default=grpc.UnaryUnaryMultiCallable[
32
46
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
33
47
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
34
- ]
48
+ ],
49
+ )
35
50
 
36
- ResolveBoolean: grpc.UnaryUnaryMultiCallable[
51
+ _ServiceResolveBooleanType = typing_extensions.TypeVar(
52
+ '_ServiceResolveBooleanType',
53
+ grpc.UnaryUnaryMultiCallable[
54
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
55
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
56
+ ],
57
+ grpc.aio.UnaryUnaryMultiCallable[
37
58
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
38
59
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
39
- ]
60
+ ],
61
+ default=grpc.UnaryUnaryMultiCallable[
62
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
63
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
64
+ ],
65
+ )
40
66
 
41
- ResolveString: grpc.UnaryUnaryMultiCallable[
67
+ _ServiceResolveStringType = typing_extensions.TypeVar(
68
+ '_ServiceResolveStringType',
69
+ grpc.UnaryUnaryMultiCallable[
42
70
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
43
71
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
44
- ]
72
+ ],
73
+ grpc.aio.UnaryUnaryMultiCallable[
74
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
75
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
76
+ ],
77
+ default=grpc.UnaryUnaryMultiCallable[
78
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
79
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
80
+ ],
81
+ )
45
82
 
46
- ResolveFloat: grpc.UnaryUnaryMultiCallable[
83
+ _ServiceResolveFloatType = typing_extensions.TypeVar(
84
+ '_ServiceResolveFloatType',
85
+ grpc.UnaryUnaryMultiCallable[
47
86
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
48
87
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
49
- ]
88
+ ],
89
+ grpc.aio.UnaryUnaryMultiCallable[
90
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
91
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
92
+ ],
93
+ default=grpc.UnaryUnaryMultiCallable[
94
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
95
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
96
+ ],
97
+ )
50
98
 
51
- ResolveInt: grpc.UnaryUnaryMultiCallable[
99
+ _ServiceResolveIntType = typing_extensions.TypeVar(
100
+ '_ServiceResolveIntType',
101
+ grpc.UnaryUnaryMultiCallable[
102
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
103
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
104
+ ],
105
+ grpc.aio.UnaryUnaryMultiCallable[
106
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
107
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
108
+ ],
109
+ default=grpc.UnaryUnaryMultiCallable[
52
110
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
53
111
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
54
- ]
112
+ ],
113
+ )
55
114
 
56
- ResolveObject: grpc.UnaryUnaryMultiCallable[
115
+ _ServiceResolveObjectType = typing_extensions.TypeVar(
116
+ '_ServiceResolveObjectType',
117
+ grpc.UnaryUnaryMultiCallable[
57
118
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
58
119
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
59
- ]
120
+ ],
121
+ grpc.aio.UnaryUnaryMultiCallable[
122
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
123
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
124
+ ],
125
+ default=grpc.UnaryUnaryMultiCallable[
126
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
127
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
128
+ ],
129
+ )
60
130
 
61
- EventStream: grpc.UnaryStreamMultiCallable[
131
+ _ServiceEventStreamType = typing_extensions.TypeVar(
132
+ '_ServiceEventStreamType',
133
+ grpc.UnaryStreamMultiCallable[
134
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
135
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
136
+ ],
137
+ grpc.aio.UnaryStreamMultiCallable[
62
138
  openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
63
139
  openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
64
- ]
140
+ ],
141
+ default=grpc.UnaryStreamMultiCallable[
142
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
143
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
144
+ ],
145
+ )
65
146
 
66
- class ServiceAsyncStub:
147
+ class ServiceStub(typing.Generic[_ServiceResolveAllType, _ServiceResolveBooleanType, _ServiceResolveStringType, _ServiceResolveFloatType, _ServiceResolveIntType, _ServiceResolveObjectType, _ServiceEventStreamType]):
67
148
  """Service defines the exposed rpcs of flagd"""
68
149
 
69
- ResolveAll: grpc.aio.UnaryUnaryMultiCallable[
150
+ @typing.overload
151
+ def __init__(self: ServiceStub[
152
+ grpc.UnaryUnaryMultiCallable[
153
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
154
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
155
+ ],
156
+ grpc.UnaryUnaryMultiCallable[
157
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
158
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
159
+ ],
160
+ grpc.UnaryUnaryMultiCallable[
161
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
162
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
163
+ ],
164
+ grpc.UnaryUnaryMultiCallable[
165
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
166
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
167
+ ],
168
+ grpc.UnaryUnaryMultiCallable[
169
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
170
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
171
+ ],
172
+ grpc.UnaryUnaryMultiCallable[
173
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
174
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
175
+ ],
176
+ grpc.UnaryStreamMultiCallable[
177
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
178
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
179
+ ],
180
+ ], channel: grpc.Channel) -> None: ...
181
+
182
+ @typing.overload
183
+ def __init__(self: ServiceStub[
184
+ grpc.aio.UnaryUnaryMultiCallable[
185
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
186
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
187
+ ],
188
+ grpc.aio.UnaryUnaryMultiCallable[
189
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
190
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
191
+ ],
192
+ grpc.aio.UnaryUnaryMultiCallable[
193
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
194
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
195
+ ],
196
+ grpc.aio.UnaryUnaryMultiCallable[
197
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
198
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
199
+ ],
200
+ grpc.aio.UnaryUnaryMultiCallable[
201
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
202
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
203
+ ],
204
+ grpc.aio.UnaryUnaryMultiCallable[
205
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
206
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
207
+ ],
208
+ grpc.aio.UnaryStreamMultiCallable[
209
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
210
+ openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
211
+ ],
212
+ ], channel: grpc.aio.Channel) -> None: ...
213
+
214
+ ResolveAll: _ServiceResolveAllType
215
+
216
+ ResolveBoolean: _ServiceResolveBooleanType
217
+
218
+ ResolveString: _ServiceResolveStringType
219
+
220
+ ResolveFloat: _ServiceResolveFloatType
221
+
222
+ ResolveInt: _ServiceResolveIntType
223
+
224
+ ResolveObject: _ServiceResolveObjectType
225
+
226
+ EventStream: _ServiceEventStreamType
227
+
228
+ ServiceAsyncStub: typing_extensions.TypeAlias = ServiceStub[
229
+ grpc.aio.UnaryUnaryMultiCallable[
70
230
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllRequest,
71
231
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveAllResponse,
72
- ]
73
-
74
- ResolveBoolean: grpc.aio.UnaryUnaryMultiCallable[
232
+ ],
233
+ grpc.aio.UnaryUnaryMultiCallable[
75
234
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanRequest,
76
235
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveBooleanResponse,
77
- ]
78
-
79
- ResolveString: grpc.aio.UnaryUnaryMultiCallable[
236
+ ],
237
+ grpc.aio.UnaryUnaryMultiCallable[
80
238
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringRequest,
81
239
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveStringResponse,
82
- ]
83
-
84
- ResolveFloat: grpc.aio.UnaryUnaryMultiCallable[
240
+ ],
241
+ grpc.aio.UnaryUnaryMultiCallable[
85
242
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatRequest,
86
243
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveFloatResponse,
87
- ]
88
-
89
- ResolveInt: grpc.aio.UnaryUnaryMultiCallable[
244
+ ],
245
+ grpc.aio.UnaryUnaryMultiCallable[
90
246
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntRequest,
91
247
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveIntResponse,
92
- ]
93
-
94
- ResolveObject: grpc.aio.UnaryUnaryMultiCallable[
248
+ ],
249
+ grpc.aio.UnaryUnaryMultiCallable[
95
250
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectRequest,
96
251
  openfeature.schemas.protobuf.schema.v1.schema_pb2.ResolveObjectResponse,
97
- ]
98
-
99
- EventStream: grpc.aio.UnaryStreamMultiCallable[
252
+ ],
253
+ grpc.aio.UnaryStreamMultiCallable[
100
254
  openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamRequest,
101
255
  openfeature.schemas.protobuf.schema.v1.schema_pb2.EventStreamResponse,
102
- ]
256
+ ],
257
+ ]
103
258
 
104
259
  class ServiceServicer(metaclass=abc.ABCMeta):
105
260
  """Service defines the exposed rpcs of flagd"""
@@ -2,7 +2,7 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
4
  # source: openfeature/schemas/protobuf/sync/v1/sync_service.proto
5
- # Protobuf Python Version: 5.29.0
5
+ # Protobuf Python Version: 6.31.1
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
8
8
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -11,9 +11,9 @@ from google.protobuf import symbol_database as _symbol_database
11
11
  from google.protobuf.internal import builder as _builder
12
12
  _runtime_version.ValidateProtobufRuntimeVersion(
13
13
  _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
14
+ 6,
15
+ 31,
16
+ 1,
17
17
  '',
18
18
  'openfeature/schemas/protobuf/sync/v1/sync_service.proto'
19
19
  )
@@ -67,7 +67,7 @@ SYNC_STATE_DELETE: SyncState.ValueType # 4
67
67
  """Convey a deletion of a flag. Flagd internally removes the flag"""
68
68
  SYNC_STATE_PING: SyncState.ValueType # 5
69
69
  """Optional server ping to check client connectivity. Handling is ignored by flagd and is to merely support live check"""
70
- global___SyncState = SyncState
70
+ Global___SyncState: typing_extensions.TypeAlias = SyncState
71
71
 
72
72
  @typing.final
73
73
  class SyncFlagsRequest(google.protobuf.message.Message):
@@ -98,7 +98,7 @@ class SyncFlagsRequest(google.protobuf.message.Message):
98
98
  ) -> None: ...
99
99
  def ClearField(self, field_name: typing.Literal["provider_id", b"provider_id", "selector", b"selector"]) -> None: ...
100
100
 
101
- global___SyncFlagsRequest = SyncFlagsRequest
101
+ Global___SyncFlagsRequest: typing_extensions.TypeAlias = SyncFlagsRequest
102
102
 
103
103
  @typing.final
104
104
  class SyncFlagsResponse(google.protobuf.message.Message):
@@ -109,8 +109,8 @@ class SyncFlagsResponse(google.protobuf.message.Message):
109
109
  FLAG_CONFIGURATION_FIELD_NUMBER: builtins.int
110
110
  STATE_FIELD_NUMBER: builtins.int
111
111
  flag_configuration: builtins.str
112
- """flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json"""
113
- state: global___SyncState.ValueType
112
+ """flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/flagd-schemas/main/json/flags.json"""
113
+ state: Global___SyncState.ValueType
114
114
  """State conveying the operation to be performed by flagd. See the descriptions of SyncState for an explanation of
115
115
  supported values
116
116
  """
@@ -118,11 +118,11 @@ class SyncFlagsResponse(google.protobuf.message.Message):
118
118
  self,
119
119
  *,
120
120
  flag_configuration: builtins.str = ...,
121
- state: global___SyncState.ValueType = ...,
121
+ state: Global___SyncState.ValueType = ...,
122
122
  ) -> None: ...
123
123
  def ClearField(self, field_name: typing.Literal["flag_configuration", b"flag_configuration", "state", b"state"]) -> None: ...
124
124
 
125
- global___SyncFlagsResponse = SyncFlagsResponse
125
+ Global___SyncFlagsResponse: typing_extensions.TypeAlias = SyncFlagsResponse
126
126
 
127
127
  @typing.final
128
128
  class FetchAllFlagsRequest(google.protobuf.message.Message):
@@ -153,7 +153,7 @@ class FetchAllFlagsRequest(google.protobuf.message.Message):
153
153
  ) -> None: ...
154
154
  def ClearField(self, field_name: typing.Literal["provider_id", b"provider_id", "selector", b"selector"]) -> None: ...
155
155
 
156
- global___FetchAllFlagsRequest = FetchAllFlagsRequest
156
+ Global___FetchAllFlagsRequest: typing_extensions.TypeAlias = FetchAllFlagsRequest
157
157
 
158
158
  @typing.final
159
159
  class FetchAllFlagsResponse(google.protobuf.message.Message):
@@ -163,7 +163,7 @@ class FetchAllFlagsResponse(google.protobuf.message.Message):
163
163
 
164
164
  FLAG_CONFIGURATION_FIELD_NUMBER: builtins.int
165
165
  flag_configuration: builtins.str
166
- """flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json"""
166
+ """flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/flagd-schemas/main/json/flags.json"""
167
167
  def __init__(
168
168
  self,
169
169
  *,
@@ -171,4 +171,4 @@ class FetchAllFlagsResponse(google.protobuf.message.Message):
171
171
  ) -> None: ...
172
172
  def ClearField(self, field_name: typing.Literal["flag_configuration", b"flag_configuration"]) -> None: ...
173
173
 
174
- global___FetchAllFlagsResponse = FetchAllFlagsResponse
174
+ Global___FetchAllFlagsResponse: typing_extensions.TypeAlias = FetchAllFlagsResponse
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from openfeature.schemas.protobuf.sync.v1 import sync_service_pb2 as openfeature_dot_schemas_dot_protobuf_dot_sync_dot_v1_dot_sync__service__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.71.2'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.py depends on'
21
+ + ' but the generated code in openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -14,8 +14,14 @@ import collections.abc
14
14
  import grpc
15
15
  import grpc.aio
16
16
  import openfeature.schemas.protobuf.sync.v1.sync_service_pb2
17
+ import sys
17
18
  import typing
18
19
 
20
+ if sys.version_info >= (3, 13):
21
+ import typing as typing_extensions
22
+ else:
23
+ import typing_extensions
24
+
19
25
  _T = typing.TypeVar("_T")
20
26
 
21
27
  class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
@@ -23,32 +29,81 @@ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Ite
23
29
  class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
24
30
  ...
25
31
 
26
- class FlagSyncServiceStub:
27
- """FlagService implements a server streaming to provide realtime flag configurations"""
28
-
29
- def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
30
- SyncFlags: grpc.UnaryStreamMultiCallable[
32
+ GRPC_GENERATED_VERSION: str
33
+ GRPC_VERSION: str
34
+ _FlagSyncServiceSyncFlagsType = typing_extensions.TypeVar(
35
+ '_FlagSyncServiceSyncFlagsType',
36
+ grpc.UnaryStreamMultiCallable[
37
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
38
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
39
+ ],
40
+ grpc.aio.UnaryStreamMultiCallable[
41
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
42
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
43
+ ],
44
+ default=grpc.UnaryStreamMultiCallable[
31
45
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
32
46
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
33
- ]
47
+ ],
48
+ )
34
49
 
35
- FetchAllFlags: grpc.UnaryUnaryMultiCallable[
50
+ _FlagSyncServiceFetchAllFlagsType = typing_extensions.TypeVar(
51
+ '_FlagSyncServiceFetchAllFlagsType',
52
+ grpc.UnaryUnaryMultiCallable[
53
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
54
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
55
+ ],
56
+ grpc.aio.UnaryUnaryMultiCallable[
57
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
58
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
59
+ ],
60
+ default=grpc.UnaryUnaryMultiCallable[
36
61
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
37
62
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
38
- ]
63
+ ],
64
+ )
39
65
 
40
- class FlagSyncServiceAsyncStub:
66
+ class FlagSyncServiceStub(typing.Generic[_FlagSyncServiceSyncFlagsType, _FlagSyncServiceFetchAllFlagsType]):
41
67
  """FlagService implements a server streaming to provide realtime flag configurations"""
42
68
 
43
- SyncFlags: grpc.aio.UnaryStreamMultiCallable[
69
+ @typing.overload
70
+ def __init__(self: FlagSyncServiceStub[
71
+ grpc.UnaryStreamMultiCallable[
72
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
73
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
74
+ ],
75
+ grpc.UnaryUnaryMultiCallable[
76
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
77
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
78
+ ],
79
+ ], channel: grpc.Channel) -> None: ...
80
+
81
+ @typing.overload
82
+ def __init__(self: FlagSyncServiceStub[
83
+ grpc.aio.UnaryStreamMultiCallable[
84
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
85
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
86
+ ],
87
+ grpc.aio.UnaryUnaryMultiCallable[
88
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
89
+ openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
90
+ ],
91
+ ], channel: grpc.aio.Channel) -> None: ...
92
+
93
+ SyncFlags: _FlagSyncServiceSyncFlagsType
94
+
95
+ FetchAllFlags: _FlagSyncServiceFetchAllFlagsType
96
+
97
+ FlagSyncServiceAsyncStub: typing_extensions.TypeAlias = FlagSyncServiceStub[
98
+ grpc.aio.UnaryStreamMultiCallable[
44
99
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsRequest,
45
100
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.SyncFlagsResponse,
46
- ]
47
-
48
- FetchAllFlags: grpc.aio.UnaryUnaryMultiCallable[
101
+ ],
102
+ grpc.aio.UnaryUnaryMultiCallable[
49
103
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsRequest,
50
104
  openfeature.schemas.protobuf.sync.v1.sync_service_pb2.FetchAllFlagsResponse,
51
- ]
105
+ ],
106
+ ]
52
107
 
53
108
  class FlagSyncServiceServicer(metaclass=abc.ABCMeta):
54
109
  """FlagService implements a server streaming to provide realtime flag configurations"""