Remote Config
Remote Config — server-evaluated, publishable configuration.
// access
client.remote_configRemote 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
classclient.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.
RemoteConfig
constructorRemoteConfig(client, *, cache_ttl=30.0)Parameters
Prop
Type
defaults
propertydefaults: Mapping[str, Any]set_defaults()
methoddef set_defaults(defaults) -> NoneIn-app fallbacks used when a key is absent or the fetch fails.
Parameters
Prop
Type
fetch()
methoddef 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) -> RemoteConfigSnapshotResolve 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
all()
methoddef all(context=None, **options) -> Dict[str, Any]Flat {key: value} map, in-app defaults merged in.
Parameters
Prop
Type
Returns Dict[str, Any]
get()
methoddef get(key, default=None, context=None, **options) -> AnyOne parameter's resolved value, or default.
Parameters
Prop
Type
Returns Any
get_string()
methoddef get_string(key, default='', context=None, **o) -> strParameters
Prop
Type
Returns str
get_bool()
methoddef get_bool(key, default=False, context=None, **o) -> boolParameters
Prop
Type
Returns bool
get_number()
methoddef get_number(key, default=0.0, context=None, **o) -> floatParameters
Prop
Type
Returns float
get_int()
methoddef get_int(key, default=0, context=None, **o) -> intParameters
Prop
Type
Returns int
get_json()
methoddef get_json(key, default=None, context=None, **o) -> AnyParameters
Prop
Type
Returns Any
invalidate()
methoddef invalidate() -> NoneDrop the in-process cache (next read refetches).
View sourceset_parameter()
methoddef 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]
delete_parameter()
methoddef delete_parameter(key) -> NoneRemove a parameter from the draft template.
Parameters
Prop
Type
publish()
methoddef publish(description=None) -> Dict[str, Any]Make the draft live. Returns {versionNumber, etag, createdAt}.
Parameters
Prop
Type
Returns Dict[str, Any]
set()
methoddef 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]
