openfeature-provider-flagd 0.2.5__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.
- openfeature/contrib/provider/flagd/provider.py +10 -3
- openfeature/contrib/provider/flagd/resolvers/grpc.py +82 -27
- openfeature/contrib/provider/flagd/resolvers/in_process.py +49 -20
- openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py +70 -38
- openfeature/contrib/provider/flagd/resolvers/process/flags.py +11 -14
- openfeature/contrib/provider/flagd/resolvers/process/targeting.py +9 -1
- openfeature/contrib/provider/flagd/resolvers/protocol.py +7 -3
- openfeature/contrib/provider/flagd/resolvers/types.py +7 -0
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.py +34 -34
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2.pyi +41 -22
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.py +2 -2
- openfeature/schemas/protobuf/flagd/evaluation/v1/evaluation_pb2_grpc.pyi +194 -39
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.py +20 -14
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2.pyi +33 -10
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.py +2 -2
- openfeature/schemas/protobuf/flagd/sync/v1/sync_pb2_grpc.pyi +94 -19
- openfeature/schemas/protobuf/schema/v1/schema_pb2.py +2 -2
- openfeature/schemas/protobuf/schema/v1/schema_pb2.pyi +25 -19
- openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.py +2 -2
- openfeature/schemas/protobuf/schema/v1/schema_pb2_grpc.pyi +194 -39
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2.py +2 -2
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2.pyi +9 -9
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.py +2 -2
- openfeature/schemas/protobuf/sync/v1/sync_service_pb2_grpc.pyi +69 -14
- openfeature_provider_flagd-0.2.7.dist-info/METADATA +208 -0
- openfeature_provider_flagd-0.2.7.dist-info/RECORD +37 -0
- {openfeature_provider_flagd-0.2.5.dist-info → openfeature_provider_flagd-0.2.7.dist-info}/WHEEL +1 -1
- openfeature_provider_flagd-0.2.7.dist-info/entry_points.txt +6 -0
- {openfeature_provider_flagd-0.2.5.dist-info → openfeature_provider_flagd-0.2.7.dist-info}/licenses/LICENSE +1 -1
- openfeature/.gitignore +0 -2
- openfeature_provider_flagd-0.2.5.dist-info/METADATA +0 -370
- openfeature_provider_flagd-0.2.5.dist-info/RECORD +0 -36
|
@@ -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/flagd/sync/v1/sync.proto
|
|
5
|
-
# Protobuf Python Version: 6.31.
|
|
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
|
|
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
15
|
31,
|
|
16
|
-
|
|
16
|
+
1,
|
|
17
17
|
'',
|
|
18
18
|
'openfeature/schemas/protobuf/flagd/sync/v1/sync.proto'
|
|
19
19
|
)
|
|
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
|
|
|
25
25
|
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n5openfeature/schemas/protobuf/flagd/sync/v1/sync.proto\x12\rflagd.sync.v1\x1a\x1cgoogle/protobuf/struct.proto\"9\n\x10SyncFlagsRequest\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x10\n\x08selector\x18\x02 \x01(\t\"
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n5openfeature/schemas/protobuf/flagd/sync/v1/sync.proto\x12\rflagd.sync.v1\x1a\x1cgoogle/protobuf/struct.proto\"9\n\x10SyncFlagsRequest\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x10\n\x08selector\x18\x02 \x01(\t\"t\n\x11SyncFlagsResponse\x12\x1a\n\x12\x66lag_configuration\x18\x01 \x01(\t\x12\x32\n\x0csync_context\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x88\x01\x01\x42\x0f\n\r_sync_context\"=\n\x14\x46\x65tchAllFlagsRequest\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x10\n\x08selector\x18\x02 \x01(\t\"3\n\x15\x46\x65tchAllFlagsResponse\x12\x1a\n\x12\x66lag_configuration\x18\x01 \x01(\t\"\x18\n\x12GetMetadataRequest:\x02\x18\x01\"J\n\x13GetMetadataResponse\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct:\x02\x18\x01J\x04\x08\x01\x10\x02\x32\x9e\x02\n\x0f\x46lagSyncService\x12R\n\tSyncFlags\x12\x1f.flagd.sync.v1.SyncFlagsRequest\x1a .flagd.sync.v1.SyncFlagsResponse\"\x00\x30\x01\x12\\\n\rFetchAllFlags\x12#.flagd.sync.v1.FetchAllFlagsRequest\x1a$.flagd.sync.v1.FetchAllFlagsResponse\"\x00\x12Y\n\x0bGetMetadata\x12!.flagd.sync.v1.GetMetadataRequest\x1a\".flagd.sync.v1.GetMetadataResponse\"\x03\x88\x02\x01\x42\xa8\x01\n\x1f\x64\x65v.openfeature.flagd.grpc.syncZ\rflagd/sync/v1\xaa\x02\x1bOpenFeature.Flagd.Grpc.Sync\xca\x02,OpenFeature\\Providers\\Flagd\\Schema\\Grpc\\Sync\xea\x02(OpenFeature::Flagd::Provider::Grpc::Syncb\x06proto3')
|
|
29
29
|
|
|
30
30
|
_globals = globals()
|
|
31
31
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -33,18 +33,24 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'openfeature.schemas.protobu
|
|
|
33
33
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
34
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
35
|
_globals['DESCRIPTOR']._serialized_options = b'\n\037dev.openfeature.flagd.grpc.syncZ\rflagd/sync/v1\252\002\033OpenFeature.Flagd.Grpc.Sync\312\002,OpenFeature\\Providers\\Flagd\\Schema\\Grpc\\Sync\352\002(OpenFeature::Flagd::Provider::Grpc::Sync'
|
|
36
|
+
_globals['_GETMETADATAREQUEST']._loaded_options = None
|
|
37
|
+
_globals['_GETMETADATAREQUEST']._serialized_options = b'\030\001'
|
|
38
|
+
_globals['_GETMETADATARESPONSE']._loaded_options = None
|
|
39
|
+
_globals['_GETMETADATARESPONSE']._serialized_options = b'\030\001'
|
|
40
|
+
_globals['_FLAGSYNCSERVICE'].methods_by_name['GetMetadata']._loaded_options = None
|
|
41
|
+
_globals['_FLAGSYNCSERVICE'].methods_by_name['GetMetadata']._serialized_options = b'\210\002\001'
|
|
36
42
|
_globals['_SYNCFLAGSREQUEST']._serialized_start=102
|
|
37
43
|
_globals['_SYNCFLAGSREQUEST']._serialized_end=159
|
|
38
44
|
_globals['_SYNCFLAGSRESPONSE']._serialized_start=161
|
|
39
|
-
_globals['_SYNCFLAGSRESPONSE']._serialized_end=
|
|
40
|
-
_globals['_FETCHALLFLAGSREQUEST']._serialized_start=
|
|
41
|
-
_globals['_FETCHALLFLAGSREQUEST']._serialized_end=
|
|
42
|
-
_globals['_FETCHALLFLAGSRESPONSE']._serialized_start=
|
|
43
|
-
_globals['_FETCHALLFLAGSRESPONSE']._serialized_end=
|
|
44
|
-
_globals['_GETMETADATAREQUEST']._serialized_start=
|
|
45
|
-
_globals['_GETMETADATAREQUEST']._serialized_end=
|
|
46
|
-
_globals['_GETMETADATARESPONSE']._serialized_start=
|
|
47
|
-
_globals['_GETMETADATARESPONSE']._serialized_end=
|
|
48
|
-
_globals['_FLAGSYNCSERVICE']._serialized_start=
|
|
49
|
-
_globals['_FLAGSYNCSERVICE']._serialized_end=
|
|
45
|
+
_globals['_SYNCFLAGSRESPONSE']._serialized_end=277
|
|
46
|
+
_globals['_FETCHALLFLAGSREQUEST']._serialized_start=279
|
|
47
|
+
_globals['_FETCHALLFLAGSREQUEST']._serialized_end=340
|
|
48
|
+
_globals['_FETCHALLFLAGSRESPONSE']._serialized_start=342
|
|
49
|
+
_globals['_FETCHALLFLAGSRESPONSE']._serialized_end=393
|
|
50
|
+
_globals['_GETMETADATAREQUEST']._serialized_start=395
|
|
51
|
+
_globals['_GETMETADATAREQUEST']._serialized_end=419
|
|
52
|
+
_globals['_GETMETADATARESPONSE']._serialized_start=421
|
|
53
|
+
_globals['_GETMETADATARESPONSE']._serialized_end=495
|
|
54
|
+
_globals['_FLAGSYNCSERVICE']._serialized_start=498
|
|
55
|
+
_globals['_FLAGSYNCSERVICE']._serialized_end=784
|
|
50
56
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -12,8 +12,19 @@ import builtins
|
|
|
12
12
|
import google.protobuf.descriptor
|
|
13
13
|
import google.protobuf.message
|
|
14
14
|
import google.protobuf.struct_pb2
|
|
15
|
+
import sys
|
|
15
16
|
import typing
|
|
16
17
|
|
|
18
|
+
if sys.version_info >= (3, 10):
|
|
19
|
+
import typing as typing_extensions
|
|
20
|
+
else:
|
|
21
|
+
import typing_extensions
|
|
22
|
+
|
|
23
|
+
if sys.version_info >= (3, 13):
|
|
24
|
+
from warnings import deprecated
|
|
25
|
+
else:
|
|
26
|
+
from typing_extensions import deprecated
|
|
27
|
+
|
|
17
28
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
18
29
|
|
|
19
30
|
@typing.final
|
|
@@ -47,7 +58,7 @@ class SyncFlagsRequest(google.protobuf.message.Message):
|
|
|
47
58
|
) -> None: ...
|
|
48
59
|
def ClearField(self, field_name: typing.Literal["provider_id", b"provider_id", "selector", b"selector"]) -> None: ...
|
|
49
60
|
|
|
50
|
-
|
|
61
|
+
Global___SyncFlagsRequest: typing_extensions.TypeAlias = SyncFlagsRequest
|
|
51
62
|
|
|
52
63
|
@typing.final
|
|
53
64
|
class SyncFlagsResponse(google.protobuf.message.Message):
|
|
@@ -56,16 +67,24 @@ class SyncFlagsResponse(google.protobuf.message.Message):
|
|
|
56
67
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
57
68
|
|
|
58
69
|
FLAG_CONFIGURATION_FIELD_NUMBER: builtins.int
|
|
70
|
+
SYNC_CONTEXT_FIELD_NUMBER: builtins.int
|
|
59
71
|
flag_configuration: builtins.str
|
|
60
|
-
"""flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/
|
|
72
|
+
"""flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/flagd-schemas/main/json/flags.json"""
|
|
73
|
+
@property
|
|
74
|
+
def sync_context(self) -> google.protobuf.struct_pb2.Struct:
|
|
75
|
+
"""Static context to be included in in-process evaluations (optional)."""
|
|
76
|
+
|
|
61
77
|
def __init__(
|
|
62
78
|
self,
|
|
63
79
|
*,
|
|
64
80
|
flag_configuration: builtins.str = ...,
|
|
81
|
+
sync_context: google.protobuf.struct_pb2.Struct | None = ...,
|
|
65
82
|
) -> None: ...
|
|
66
|
-
def
|
|
83
|
+
def HasField(self, field_name: typing.Literal["_sync_context", b"_sync_context", "sync_context", b"sync_context"]) -> builtins.bool: ...
|
|
84
|
+
def ClearField(self, field_name: typing.Literal["_sync_context", b"_sync_context", "flag_configuration", b"flag_configuration", "sync_context", b"sync_context"]) -> None: ...
|
|
85
|
+
def WhichOneof(self, oneof_group: typing.Literal["_sync_context", b"_sync_context"]) -> typing.Literal["sync_context"] | None: ...
|
|
67
86
|
|
|
68
|
-
|
|
87
|
+
Global___SyncFlagsResponse: typing_extensions.TypeAlias = SyncFlagsResponse
|
|
69
88
|
|
|
70
89
|
@typing.final
|
|
71
90
|
class FetchAllFlagsRequest(google.protobuf.message.Message):
|
|
@@ -96,7 +115,7 @@ class FetchAllFlagsRequest(google.protobuf.message.Message):
|
|
|
96
115
|
) -> None: ...
|
|
97
116
|
def ClearField(self, field_name: typing.Literal["provider_id", b"provider_id", "selector", b"selector"]) -> None: ...
|
|
98
117
|
|
|
99
|
-
|
|
118
|
+
Global___FetchAllFlagsRequest: typing_extensions.TypeAlias = FetchAllFlagsRequest
|
|
100
119
|
|
|
101
120
|
@typing.final
|
|
102
121
|
class FetchAllFlagsResponse(google.protobuf.message.Message):
|
|
@@ -106,7 +125,7 @@ class FetchAllFlagsResponse(google.protobuf.message.Message):
|
|
|
106
125
|
|
|
107
126
|
FLAG_CONFIGURATION_FIELD_NUMBER: builtins.int
|
|
108
127
|
flag_configuration: builtins.str
|
|
109
|
-
"""flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/
|
|
128
|
+
"""flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/flagd-schemas/main/json/flags.json"""
|
|
110
129
|
def __init__(
|
|
111
130
|
self,
|
|
112
131
|
*,
|
|
@@ -114,8 +133,9 @@ class FetchAllFlagsResponse(google.protobuf.message.Message):
|
|
|
114
133
|
) -> None: ...
|
|
115
134
|
def ClearField(self, field_name: typing.Literal["flag_configuration", b"flag_configuration"]) -> None: ...
|
|
116
135
|
|
|
117
|
-
|
|
136
|
+
Global___FetchAllFlagsResponse: typing_extensions.TypeAlias = FetchAllFlagsResponse
|
|
118
137
|
|
|
138
|
+
@deprecated("""This message has been marked as deprecated using proto message options.""")
|
|
119
139
|
@typing.final
|
|
120
140
|
class GetMetadataRequest(google.protobuf.message.Message):
|
|
121
141
|
"""GetMetadataRequest is the request for retrieving metadata from the sync service"""
|
|
@@ -126,11 +146,14 @@ class GetMetadataRequest(google.protobuf.message.Message):
|
|
|
126
146
|
self,
|
|
127
147
|
) -> None: ...
|
|
128
148
|
|
|
129
|
-
|
|
149
|
+
Global___GetMetadataRequest: typing_extensions.TypeAlias = GetMetadataRequest
|
|
130
150
|
|
|
151
|
+
@deprecated("""This message has been marked as deprecated using proto message options.""")
|
|
131
152
|
@typing.final
|
|
132
153
|
class GetMetadataResponse(google.protobuf.message.Message):
|
|
133
|
-
"""GetMetadataResponse contains metadata from the sync service
|
|
154
|
+
"""GetMetadataResponse contains metadata from the sync service
|
|
155
|
+
DEPRECATED; use flagd.sync.v1.SyncFlagsResponse.sync_context
|
|
156
|
+
"""
|
|
134
157
|
|
|
135
158
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
136
159
|
|
|
@@ -145,4 +168,4 @@ class GetMetadataResponse(google.protobuf.message.Message):
|
|
|
145
168
|
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
146
169
|
def ClearField(self, field_name: typing.Literal["metadata", b"metadata"]) -> None: ...
|
|
147
170
|
|
|
148
|
-
|
|
171
|
+
Global___GetMetadataResponse: typing_extensions.TypeAlias = GetMetadataResponse
|
|
@@ -5,7 +5,7 @@ import warnings
|
|
|
5
5
|
|
|
6
6
|
from openfeature.schemas.protobuf.flagd.sync.v1 import sync_pb2 as openfeature_dot_schemas_dot_protobuf_dot_flagd_dot_sync_dot_v1_dot_sync__pb2
|
|
7
7
|
|
|
8
|
-
GRPC_GENERATED_VERSION = '1.
|
|
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
|
-
+
|
|
21
|
+
+ ' but the generated code in openfeature/schemas/protobuf/flagd/sync/v1/sync_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}.'
|
|
@@ -13,8 +13,14 @@ import collections.abc
|
|
|
13
13
|
import grpc
|
|
14
14
|
import grpc.aio
|
|
15
15
|
import openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2
|
|
16
|
+
import sys
|
|
16
17
|
import typing
|
|
17
18
|
|
|
19
|
+
if sys.version_info >= (3, 13):
|
|
20
|
+
import typing as typing_extensions
|
|
21
|
+
else:
|
|
22
|
+
import typing_extensions
|
|
23
|
+
|
|
18
24
|
_T = typing.TypeVar("_T")
|
|
19
25
|
|
|
20
26
|
class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
|
|
@@ -22,42 +28,111 @@ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Ite
|
|
|
22
28
|
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
|
|
23
29
|
...
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
GRPC_GENERATED_VERSION: str
|
|
32
|
+
GRPC_VERSION: str
|
|
33
|
+
_FlagSyncServiceSyncFlagsType = typing_extensions.TypeVar(
|
|
34
|
+
'_FlagSyncServiceSyncFlagsType',
|
|
35
|
+
grpc.UnaryStreamMultiCallable[
|
|
36
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsRequest,
|
|
37
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsResponse,
|
|
38
|
+
],
|
|
39
|
+
grpc.aio.UnaryStreamMultiCallable[
|
|
30
40
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsRequest,
|
|
31
41
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsResponse,
|
|
32
|
-
]
|
|
42
|
+
],
|
|
43
|
+
default=grpc.UnaryStreamMultiCallable[
|
|
44
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsRequest,
|
|
45
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsResponse,
|
|
46
|
+
],
|
|
47
|
+
)
|
|
33
48
|
|
|
34
|
-
|
|
49
|
+
_FlagSyncServiceFetchAllFlagsType = typing_extensions.TypeVar(
|
|
50
|
+
'_FlagSyncServiceFetchAllFlagsType',
|
|
51
|
+
grpc.UnaryUnaryMultiCallable[
|
|
52
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsRequest,
|
|
53
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsResponse,
|
|
54
|
+
],
|
|
55
|
+
grpc.aio.UnaryUnaryMultiCallable[
|
|
35
56
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsRequest,
|
|
36
57
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsResponse,
|
|
37
|
-
]
|
|
58
|
+
],
|
|
59
|
+
default=grpc.UnaryUnaryMultiCallable[
|
|
60
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsRequest,
|
|
61
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsResponse,
|
|
62
|
+
],
|
|
63
|
+
)
|
|
38
64
|
|
|
39
|
-
|
|
65
|
+
_FlagSyncServiceGetMetadataType = typing_extensions.TypeVar(
|
|
66
|
+
'_FlagSyncServiceGetMetadataType',
|
|
67
|
+
grpc.UnaryUnaryMultiCallable[
|
|
68
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataRequest,
|
|
69
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataResponse,
|
|
70
|
+
],
|
|
71
|
+
grpc.aio.UnaryUnaryMultiCallable[
|
|
40
72
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataRequest,
|
|
41
73
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataResponse,
|
|
42
|
-
]
|
|
74
|
+
],
|
|
75
|
+
default=grpc.UnaryUnaryMultiCallable[
|
|
76
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataRequest,
|
|
77
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataResponse,
|
|
78
|
+
],
|
|
79
|
+
)
|
|
43
80
|
|
|
44
|
-
class
|
|
81
|
+
class FlagSyncServiceStub(typing.Generic[_FlagSyncServiceSyncFlagsType, _FlagSyncServiceFetchAllFlagsType, _FlagSyncServiceGetMetadataType]):
|
|
45
82
|
"""FlagService implements a server streaming to provide realtime flag configurations"""
|
|
46
83
|
|
|
47
|
-
|
|
84
|
+
@typing.overload
|
|
85
|
+
def __init__(self: FlagSyncServiceStub[
|
|
86
|
+
grpc.UnaryStreamMultiCallable[
|
|
87
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsRequest,
|
|
88
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsResponse,
|
|
89
|
+
],
|
|
90
|
+
grpc.UnaryUnaryMultiCallable[
|
|
91
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsRequest,
|
|
92
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsResponse,
|
|
93
|
+
],
|
|
94
|
+
grpc.UnaryUnaryMultiCallable[
|
|
95
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataRequest,
|
|
96
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataResponse,
|
|
97
|
+
],
|
|
98
|
+
], channel: grpc.Channel) -> None: ...
|
|
99
|
+
|
|
100
|
+
@typing.overload
|
|
101
|
+
def __init__(self: FlagSyncServiceStub[
|
|
102
|
+
grpc.aio.UnaryStreamMultiCallable[
|
|
103
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsRequest,
|
|
104
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsResponse,
|
|
105
|
+
],
|
|
106
|
+
grpc.aio.UnaryUnaryMultiCallable[
|
|
107
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsRequest,
|
|
108
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsResponse,
|
|
109
|
+
],
|
|
110
|
+
grpc.aio.UnaryUnaryMultiCallable[
|
|
111
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataRequest,
|
|
112
|
+
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataResponse,
|
|
113
|
+
],
|
|
114
|
+
], channel: grpc.aio.Channel) -> None: ...
|
|
115
|
+
|
|
116
|
+
SyncFlags: _FlagSyncServiceSyncFlagsType
|
|
117
|
+
|
|
118
|
+
FetchAllFlags: _FlagSyncServiceFetchAllFlagsType
|
|
119
|
+
|
|
120
|
+
GetMetadata: _FlagSyncServiceGetMetadataType
|
|
121
|
+
|
|
122
|
+
FlagSyncServiceAsyncStub: typing_extensions.TypeAlias = FlagSyncServiceStub[
|
|
123
|
+
grpc.aio.UnaryStreamMultiCallable[
|
|
48
124
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsRequest,
|
|
49
125
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.SyncFlagsResponse,
|
|
50
|
-
]
|
|
51
|
-
|
|
52
|
-
FetchAllFlags: grpc.aio.UnaryUnaryMultiCallable[
|
|
126
|
+
],
|
|
127
|
+
grpc.aio.UnaryUnaryMultiCallable[
|
|
53
128
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsRequest,
|
|
54
129
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.FetchAllFlagsResponse,
|
|
55
|
-
]
|
|
56
|
-
|
|
57
|
-
GetMetadata: grpc.aio.UnaryUnaryMultiCallable[
|
|
130
|
+
],
|
|
131
|
+
grpc.aio.UnaryUnaryMultiCallable[
|
|
58
132
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataRequest,
|
|
59
133
|
openfeature.schemas.protobuf.flagd.sync.v1.sync_pb2.GetMetadataResponse,
|
|
60
|
-
]
|
|
134
|
+
],
|
|
135
|
+
]
|
|
61
136
|
|
|
62
137
|
class FlagSyncServiceServicer(metaclass=abc.ABCMeta):
|
|
63
138
|
"""FlagService implements a server streaming to provide realtime flag configurations"""
|
|
@@ -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/schema/v1/schema.proto
|
|
5
|
-
# Protobuf Python Version: 6.31.
|
|
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
|
|
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
14
|
6,
|
|
15
15
|
31,
|
|
16
|
-
|
|
16
|
+
1,
|
|
17
17
|
'',
|
|
18
18
|
'openfeature/schemas/protobuf/schema/v1/schema.proto'
|
|
19
19
|
)
|
|
@@ -16,8 +16,14 @@ import google.protobuf.descriptor
|
|
|
16
16
|
import google.protobuf.internal.containers
|
|
17
17
|
import google.protobuf.message
|
|
18
18
|
import google.protobuf.struct_pb2
|
|
19
|
+
import sys
|
|
19
20
|
import typing
|
|
20
21
|
|
|
22
|
+
if sys.version_info >= (3, 10):
|
|
23
|
+
import typing as typing_extensions
|
|
24
|
+
else:
|
|
25
|
+
import typing_extensions
|
|
26
|
+
|
|
21
27
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
22
28
|
|
|
23
29
|
@typing.final
|
|
@@ -39,7 +45,7 @@ class ResolveAllRequest(google.protobuf.message.Message):
|
|
|
39
45
|
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
40
46
|
def ClearField(self, field_name: typing.Literal["context", b"context"]) -> None: ...
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
Global___ResolveAllRequest: typing_extensions.TypeAlias = ResolveAllRequest
|
|
43
49
|
|
|
44
50
|
@typing.final
|
|
45
51
|
class ResolveAllResponse(google.protobuf.message.Message):
|
|
@@ -55,29 +61,29 @@ class ResolveAllResponse(google.protobuf.message.Message):
|
|
|
55
61
|
VALUE_FIELD_NUMBER: builtins.int
|
|
56
62
|
key: builtins.str
|
|
57
63
|
@property
|
|
58
|
-
def value(self) ->
|
|
64
|
+
def value(self) -> Global___AnyFlag: ...
|
|
59
65
|
def __init__(
|
|
60
66
|
self,
|
|
61
67
|
*,
|
|
62
68
|
key: builtins.str = ...,
|
|
63
|
-
value:
|
|
69
|
+
value: Global___AnyFlag | None = ...,
|
|
64
70
|
) -> None: ...
|
|
65
71
|
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
|
|
66
72
|
def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
67
73
|
|
|
68
74
|
FLAGS_FIELD_NUMBER: builtins.int
|
|
69
75
|
@property
|
|
70
|
-
def flags(self) -> google.protobuf.internal.containers.MessageMap[builtins.str,
|
|
76
|
+
def flags(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, Global___AnyFlag]:
|
|
71
77
|
"""Object structure describing the evaluated flags for the provided context."""
|
|
72
78
|
|
|
73
79
|
def __init__(
|
|
74
80
|
self,
|
|
75
81
|
*,
|
|
76
|
-
flags: collections.abc.Mapping[builtins.str,
|
|
82
|
+
flags: collections.abc.Mapping[builtins.str, Global___AnyFlag] | None = ...,
|
|
77
83
|
) -> None: ...
|
|
78
84
|
def ClearField(self, field_name: typing.Literal["flags", b"flags"]) -> None: ...
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
Global___ResolveAllResponse: typing_extensions.TypeAlias = ResolveAllResponse
|
|
81
87
|
|
|
82
88
|
@typing.final
|
|
83
89
|
class AnyFlag(google.protobuf.message.Message):
|
|
@@ -114,7 +120,7 @@ class AnyFlag(google.protobuf.message.Message):
|
|
|
114
120
|
def ClearField(self, field_name: typing.Literal["bool_value", b"bool_value", "double_value", b"double_value", "object_value", b"object_value", "reason", b"reason", "string_value", b"string_value", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
115
121
|
def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["bool_value", "string_value", "double_value", "object_value"] | None: ...
|
|
116
122
|
|
|
117
|
-
|
|
123
|
+
Global___AnyFlag: typing_extensions.TypeAlias = AnyFlag
|
|
118
124
|
|
|
119
125
|
@typing.final
|
|
120
126
|
class ResolveBooleanRequest(google.protobuf.message.Message):
|
|
@@ -139,7 +145,7 @@ class ResolveBooleanRequest(google.protobuf.message.Message):
|
|
|
139
145
|
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
140
146
|
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
141
147
|
|
|
142
|
-
|
|
148
|
+
Global___ResolveBooleanRequest: typing_extensions.TypeAlias = ResolveBooleanRequest
|
|
143
149
|
|
|
144
150
|
@typing.final
|
|
145
151
|
class ResolveBooleanResponse(google.protobuf.message.Message):
|
|
@@ -172,7 +178,7 @@ class ResolveBooleanResponse(google.protobuf.message.Message):
|
|
|
172
178
|
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
173
179
|
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
174
180
|
|
|
175
|
-
|
|
181
|
+
Global___ResolveBooleanResponse: typing_extensions.TypeAlias = ResolveBooleanResponse
|
|
176
182
|
|
|
177
183
|
@typing.final
|
|
178
184
|
class ResolveStringRequest(google.protobuf.message.Message):
|
|
@@ -197,7 +203,7 @@ class ResolveStringRequest(google.protobuf.message.Message):
|
|
|
197
203
|
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
198
204
|
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
199
205
|
|
|
200
|
-
|
|
206
|
+
Global___ResolveStringRequest: typing_extensions.TypeAlias = ResolveStringRequest
|
|
201
207
|
|
|
202
208
|
@typing.final
|
|
203
209
|
class ResolveStringResponse(google.protobuf.message.Message):
|
|
@@ -230,7 +236,7 @@ class ResolveStringResponse(google.protobuf.message.Message):
|
|
|
230
236
|
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
231
237
|
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
232
238
|
|
|
233
|
-
|
|
239
|
+
Global___ResolveStringResponse: typing_extensions.TypeAlias = ResolveStringResponse
|
|
234
240
|
|
|
235
241
|
@typing.final
|
|
236
242
|
class ResolveFloatRequest(google.protobuf.message.Message):
|
|
@@ -255,7 +261,7 @@ class ResolveFloatRequest(google.protobuf.message.Message):
|
|
|
255
261
|
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
256
262
|
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
257
263
|
|
|
258
|
-
|
|
264
|
+
Global___ResolveFloatRequest: typing_extensions.TypeAlias = ResolveFloatRequest
|
|
259
265
|
|
|
260
266
|
@typing.final
|
|
261
267
|
class ResolveFloatResponse(google.protobuf.message.Message):
|
|
@@ -288,7 +294,7 @@ class ResolveFloatResponse(google.protobuf.message.Message):
|
|
|
288
294
|
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
289
295
|
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
290
296
|
|
|
291
|
-
|
|
297
|
+
Global___ResolveFloatResponse: typing_extensions.TypeAlias = ResolveFloatResponse
|
|
292
298
|
|
|
293
299
|
@typing.final
|
|
294
300
|
class ResolveIntRequest(google.protobuf.message.Message):
|
|
@@ -313,7 +319,7 @@ class ResolveIntRequest(google.protobuf.message.Message):
|
|
|
313
319
|
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
314
320
|
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
315
321
|
|
|
316
|
-
|
|
322
|
+
Global___ResolveIntRequest: typing_extensions.TypeAlias = ResolveIntRequest
|
|
317
323
|
|
|
318
324
|
@typing.final
|
|
319
325
|
class ResolveIntResponse(google.protobuf.message.Message):
|
|
@@ -346,7 +352,7 @@ class ResolveIntResponse(google.protobuf.message.Message):
|
|
|
346
352
|
def HasField(self, field_name: typing.Literal["metadata", b"metadata"]) -> builtins.bool: ...
|
|
347
353
|
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
348
354
|
|
|
349
|
-
|
|
355
|
+
Global___ResolveIntResponse: typing_extensions.TypeAlias = ResolveIntResponse
|
|
350
356
|
|
|
351
357
|
@typing.final
|
|
352
358
|
class ResolveObjectRequest(google.protobuf.message.Message):
|
|
@@ -371,7 +377,7 @@ class ResolveObjectRequest(google.protobuf.message.Message):
|
|
|
371
377
|
def HasField(self, field_name: typing.Literal["context", b"context"]) -> builtins.bool: ...
|
|
372
378
|
def ClearField(self, field_name: typing.Literal["context", b"context", "flag_key", b"flag_key"]) -> None: ...
|
|
373
379
|
|
|
374
|
-
|
|
380
|
+
Global___ResolveObjectRequest: typing_extensions.TypeAlias = ResolveObjectRequest
|
|
375
381
|
|
|
376
382
|
@typing.final
|
|
377
383
|
class ResolveObjectResponse(google.protobuf.message.Message):
|
|
@@ -409,7 +415,7 @@ class ResolveObjectResponse(google.protobuf.message.Message):
|
|
|
409
415
|
def HasField(self, field_name: typing.Literal["metadata", b"metadata", "value", b"value"]) -> builtins.bool: ...
|
|
410
416
|
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "reason", b"reason", "value", b"value", "variant", b"variant"]) -> None: ...
|
|
411
417
|
|
|
412
|
-
|
|
418
|
+
Global___ResolveObjectResponse: typing_extensions.TypeAlias = ResolveObjectResponse
|
|
413
419
|
|
|
414
420
|
@typing.final
|
|
415
421
|
class EventStreamResponse(google.protobuf.message.Message):
|
|
@@ -436,7 +442,7 @@ class EventStreamResponse(google.protobuf.message.Message):
|
|
|
436
442
|
def HasField(self, field_name: typing.Literal["data", b"data"]) -> builtins.bool: ...
|
|
437
443
|
def ClearField(self, field_name: typing.Literal["data", b"data", "type", b"type"]) -> None: ...
|
|
438
444
|
|
|
439
|
-
|
|
445
|
+
Global___EventStreamResponse: typing_extensions.TypeAlias = EventStreamResponse
|
|
440
446
|
|
|
441
447
|
@typing.final
|
|
442
448
|
class EventStreamRequest(google.protobuf.message.Message):
|
|
@@ -448,4 +454,4 @@ class EventStreamRequest(google.protobuf.message.Message):
|
|
|
448
454
|
self,
|
|
449
455
|
) -> None: ...
|
|
450
456
|
|
|
451
|
-
|
|
457
|
+
Global___EventStreamRequest: typing_extensions.TypeAlias = EventStreamRequest
|
|
@@ -5,7 +5,7 @@ import warnings
|
|
|
5
5
|
|
|
6
6
|
from openfeature.schemas.protobuf.schema.v1 import schema_pb2 as openfeature_dot_schemas_dot_protobuf_dot_schema_dot_v1_dot_schema__pb2
|
|
7
7
|
|
|
8
|
-
GRPC_GENERATED_VERSION = '1.
|
|
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
|
-
+
|
|
21
|
+
+ ' but the generated code in openfeature/schemas/protobuf/schema/v1/schema_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}.'
|