MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / get_openfeature_client

Function get_openfeature_client

api/integrations/flagsmith/client.py:31–40  ·  view source on GitHub ↗
(
    domain: str = DEFAULT_OPENFEATURE_DOMAIN,
)

Source from the content-addressed store, hash-verified

29
30
31def get_openfeature_client(
32 domain: str = DEFAULT_OPENFEATURE_DOMAIN,
33) -> OpenFeatureClient:
34 openfeature_client = openfeature_api.get_client(domain=domain)
35 # An unbound domain falls back to a ready `NoOpProvider`, so we can't rely
36 # on provider status here — check whether we're still on the default.
37 metadata = openfeature_api.get_provider_metadata(domain)
38 if getattr(metadata, "is_default_provider", False):
39 initialise_provider(domain, **get_provider_kwargs())
40 return openfeature_client
41
42
43def initialise_provider(

Calls 3

initialise_providerFunction · 0.85
get_provider_kwargsFunction · 0.85
get_clientMethod · 0.80

Used in the wild real call sites across dependent graphs

searching dependent graphs…