InvergeDocs
PythonAPI reference

Remote Config

Remote Config — server-evaluated, publishable configuration.

// access
client.remote_config

Remote Config — server-evaluated, publishable configuration.

Conditions (platform, version, country, percentile, custom user attributes) are evaluated server-side; the SDK receives final values. On the backend this is how you change behaviour — a phone number, a fee, a copy string, a kill switch — without a deploy.

RemoteConfig

class

client.remote_config

Reads are cached in-process for cache_ttl seconds (default 30) and revalidated with the previous ETag, so a hot path can call get freely. Pass fresh=True to bypass the cache.

Extends Resource.

View source

RemoteConfig

constructor
RemoteConfig(client, *, cache_ttl=30.0)

Parameters

Prop

Type

View source

defaults

property
defaults: Mapping[str, Any]
View source

set_defaults()

method
def set_defaults(defaults) -> None

In-app fallbacks used when a key is absent or the fetch fails.

Parameters

Prop

Type

View source

fetch()

method
def fetch(context=None, *, etag=None, fresh=False, app_instance_id=None, app_version=None, app_build=None, platform=None, os_version=None, country=None, language=None, first_open_time=None, user_properties=None) -> RemoteConfigSnapshot

Resolve the active template for a context.

user_properties feeds "Custom attribute" conditions; values must be primitives (str/int/float/bool) and match the condition value exactly.

platform defaults to "server". Pass the real platform when resolving config on behalf of a device, or platform conditions will not match.

Parameters

Prop

Type

Returns RemoteConfigSnapshot

View source

all()

method
def all(context=None, **options) -> Dict[str, Any]

Flat {key: value} map, in-app defaults merged in.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

get()

method
def get(key, default=None, context=None, **options) -> Any

One parameter's resolved value, or default.

Parameters

Prop

Type

Returns Any

View source

get_string()

method
def get_string(key, default='', context=None, **o) -> str

Parameters

Prop

Type

Returns str

View source

get_bool()

method
def get_bool(key, default=False, context=None, **o) -> bool

Parameters

Prop

Type

Returns bool

View source

get_number()

method
def get_number(key, default=0.0, context=None, **o) -> float

Parameters

Prop

Type

Returns float

View source

get_int()

method
def get_int(key, default=0, context=None, **o) -> int

Parameters

Prop

Type

Returns int

View source

get_json()

method
def get_json(key, default=None, context=None, **o) -> Any

Parameters

Prop

Type

Returns Any

View source

invalidate()

method
def invalidate() -> None

Drop the in-process cache (next read refetches).

View source

set_parameter()

method
def set_parameter(key, value=None, *, value_type=None, conditional_values=None, description=None) -> Dict[str, Any]

Create/update a parameter in the draft template.

Nothing changes for clients until publish.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

delete_parameter()

method
def delete_parameter(key) -> None

Remove a parameter from the draft template.

Parameters

Prop

Type

View source

publish()

method
def publish(description=None) -> Dict[str, Any]

Make the draft live. Returns {versionNumber, etag, createdAt}.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

set()

method
def set(key, value, *, value_type=None, description=None) -> Dict[str, Any]

Set one parameter and publish it in a single step.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

On this page