View source on GitHub |
A backend entry describes a single backend.
Inherits From: Validated
, ValidatedBase
, expected_type
google.appengine.api.backendinfo.BackendEntry(
*args, **kwargs
)
Raises | |
---|---|
AttributeDefinitionError
|
When class instance is missing ATTRIBUTE
definition or when ATTRIBUTE is of the wrong type.
|
Methods
CheckInitialized
CheckInitialized()
Checks for missing or conflicting attributes.
Subclasses should override this function and raise an exception for any errors. Always run this method when all assignments are complete.
Raises | |
---|---|
ValidationError
|
When there are missing or conflicting attributes. |
Get
Get(
key
)
Get a single value on Validated instance.
This method can only be used to retrieve validated attributes.
Args | |
---|---|
key
|
The name of the attributes |
Raises | |
---|---|
ValidationError when no validated attribute exists on class.
|
GetUnnormalized
GetUnnormalized(
key
)
Get a single value on the Validated
instance, without normalizing.
GetValidator
@classmethod
GetValidator( key )
Safely get the underlying attribute definition as a Validator
.
Args | |
---|---|
key
|
Name of attribute to get. |
Returns | |
---|---|
Validator associated with key or attribute value wrapped in a validator. |
Raises | |
---|---|
ValidationError
|
if no such attribute exists. |
GetWarnings
GetWarnings()
Return all the warnings we've got, along with their associated fields.
Returns | |
---|---|
A list of tuples of (dotted_field, warning), both strings. |
Init
Init()
ParseOptions
ParseOptions()
Parses the options
field and sets appropriate fields.
Set
Set(
key, value
)
Set a single value on Validated
instance.
This method can only be used to assign validated attributes.
Args | |
---|---|
key
|
The name of the attributes |
value
|
The value to set |
Raises | |
---|---|
ValidationError when no validated attribute exists on class.
|
SetMultiple
SetMultiple(
attributes
)
Set multiple values on Validated instance.
All attributes will be validated before being set.
Args | |
---|---|
attributes
|
A dict of attributes/items to set. |
Raises | |
---|---|
ValidationError
|
When no validated attribute exists on class. |
ToDict
ToDict()
Returns a sorted dictionary representing the backend entry.
ToYAML
ToYAML()
Print validated object as simplified YAML.
Returns | |
---|---|
Object as a simplified YAML string compatible with parsing using the
SafeLoader .
|
WriteOptions
WriteOptions()
Writes the options
field based on other settings.
get_class
get_class()
Accessor for Class
, since an attribute reference is an error.
set_class
set_class(
Class
)
Setter for Class
, since an attribute reference is an error.
__eq__
__eq__(
other
)
Equality operator.
Comparison is done by comparing all attribute values to those in the other instance. Objects which are not of the same type are not equal.
Args | |
---|---|
other
|
Other object to compare against. |
Returns | |
---|---|
True if validated objects are equal, else False .
|
__ne__
__ne__(
other
)
Inequality operator.