Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now generally available.

google.appengine.datastore.datastore_rpc.ConfigOption

A descriptor for a Configuration option.

Inherits From: expected_type

This class is used to create a configuration option on a class that inherits from BaseConfiguration. A validator function decorated with this class will be converted to a read-only descriptor and BaseConfiguration will implement constructor and merging logic for that configuration option. A validator function takes a single non-None value to validate and either throws an exception or returns that value (or an equivalent value). A validator is called once at construction time, but only if a non-None value for the configuration option is specified the constructor's keyword arguments.

Methods

__call__

View source

Gets the first non-None value for this option from the given args.

Args
*arg Any number of configuration objects or None values.

Returns
The first value for this ConfigOption found in the given configuration

objects or None.

Raises
datastore_errors.BadArgumentError if a given in object is not a

configuration object.