Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore ListLoad Str Assign NameStore Num Assign NameStore Num Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad Raise Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad orelse If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr orelse If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call NameLoad NameLoad orelse If Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad If Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Raise Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr keyword NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr NameLoad orelse Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr TupleLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body If CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str Continue If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareNotEq NameLoad Str body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If BoolOpOr UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad CompareLt NameLoad Num body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Return Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr UnaryOpUAdd NameLoad orelse Expr Call AttributeLoad NameLoad attr UnaryOpUSub NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Return orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad If CompareNotIn Str NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body If Call AttributeLoad NameLoad attr Str body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod NameLoad TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad Str NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareEq NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr orelse For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Str NameLoad If Call NameLoad NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Return Assign NameStore Call NameLoad NameLoad Str NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr CompareIn NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad body Return Assign NameStore AttributeLoad NameLoad attr While BoolOpAnd CompareEq Call NameLoad NameLoad Num CompareNotEq SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num If CompareIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return orelse Assign NameStore AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad NameLoad Str Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore CompareIsNot Call NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot NameLoad NameLoad body Return Call AttributeLoad NameLoad attr decorator_list Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad body Raise Call NameLoad BinOpMod NameLoad TupleLoad NameLoad Return BoolOpOr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse If Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad orelse Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If UnaryOpNot NameLoad body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpMod NameLoad TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Raise Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword BinOpAdd AttributeLoad NameLoad attr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If UnaryOpNot NameLoad body For NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpMod NameLoad TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Raise Call NameLoad NameLoad Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index Str Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword BinOpAdd AttributeLoad NameLoad attr Str Assign NameStore TupleLoad AttributeLoad NameLoad attr NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword BinOpAdd AttributeLoad NameLoad attr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Dict Str Str Str Call AttributeLoad NameLoad attr NameLoad Num keyword NameLoad Call AttributeLoad NameLoad attr Num Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Continue If AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Raise Call NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd CompareNotIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr CompareNotEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Raise Call NameLoad NameLoad Assign NameStore Dict Assign NameStore ListLoad For NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Continue Assign NameStore Call NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Raise Call NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr keyword NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad keyword NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareGt Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd NameLoad CompareIs Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Return NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list Return NameLoad decorator_list NameLoad Call AttributeLoad NameLoad attr Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad kwarg body Expr Str If CompareIn NameLoad NameLoad body Raise Call NameLoad Str Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr keyword NameLoad If CompareIn NameLoad NameLoad body Raise Call NameLoad Str Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr keyword NameLoad If CompareIn NameLoad NameLoad body If CompareNotEq SubscriptLoad NameLoad Index NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd NameLoad CompareIs Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore BoolOpOr AttributeLoad NameLoad attr NameLoad If CompareGt NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad TupleLoad NameLoad NameLoad Assign NameStore Dict Str AttributeLoad NameLoad attr If NameLoad body Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareIn NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore NameLoad Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list Return NameLoad decorator_list NameLoad Call AttributeLoad NameLoad attr Num decorator_list Assign NameStore NameLoad
N/A N/A EndpointsModel definition and accompanying definitions.

This model can be used to replace an existing NDB model and allow simple
conversion of model classes into ProtoRPC message classes. These classes can be
used to simplify endpoints API methods so that only entities need be used rather
than converting between ProtoRPC messages and entities and then back again.
 N/A functools N/A itertools N/A re N/A endpoints N/A properties N/A utils ndb_utils N/A utils protorpc messages protorpc message_types google.appengine.api datastore_types google.appengine.datastore datastore_query google.appengine.ext ndb N/A __all__ N/A EndpointsModel N/A QUERY_LIMIT_DEFAULT 10 N/A QUERY_LIMIT_MAX 100 N/A QUERY_MAX_EXCEEDED_TEMPLATE %s results requested. Exceeds limit of %s. N/A PROPERTY_COLLISION_TEMPLATE Name conflict: %s set as an NDB property and an Endpoints alias property. N/A BAD_FIELDS_SCHEMA_TEMPLATE Model %s has bad message fields schema type: %s. Only a list, tuple, dictionary or MessageFieldsSchema are allowed. N/A NO_MSG_FIELD_TEMPLATE Tried to use a ProtoRPC message field: %s. Only simple fields can be used when allow message fields is turned off. N/A REQUEST_MESSAGE request_message N/A RESPONSE_MESSAGE response_message N/A HTTP_METHOD http_method N/A PATH path N/A QUERY_HTTP_METHOD GET N/A BASE_MODEL_CLASS None N/A EndpointsAliasProperty N/A properties EndpointsAliasProperty N/A MessageFieldsSchema N/A utils MessageFieldsSchema _VerifyProperty N/A N/A modelclass attr_name N/A N/A N/A Return a property if set on a model class, otherwise raises an exception.

  Args:
    modelclass: A subclass of EndpointsModel which has a
        _GetEndpointsProperty method.
    attr_name: String; the name of the property.

  Returns:
    The property set at the attribute name.

  Raises:
    AttributeError: if the property is not set on the class.
   N/A prop N/A N/A modelclass _GetEndpointsProperty attr_name N/A N/A prop None N/A N/A error_msg N/A The attribute %s is not an accepted field. Accepted fields are limited to NDB properties and Endpoints alias properties. N/A attr_name N/A N/A AttributeError error_msg N/A prop N/A ToValue N/A N/A prop value N/A N/A N/A Serializes a value from a property to a ProtoRPC message type.

  Args:
    prop: The NDB or alias property to be converted.
    value: The value to be serialized.

  Returns:
    The serialized version of the value to be set on a ProtoRPC message.
   N/A N/A value None N/A N/A value N/A N/A N/A isinstance value EndpointsModel N/A N/A N/A N/A value ToMessage N/A N/A N/A N/A hasattr prop ToValue N/A callable N/A prop ToValue N/A N/A N/A N/A prop ToValue value N/A N/A N/A isinstance prop N/A ndb UserProperty N/A N/A N/A N/A utils UserMessageFromUser value N/A N/A N/A isinstance prop N/A ndb GeoPtProperty N/A N/A N/A N/A utils GeoPtMessage lat N/A value lat lon N/A value lon N/A N/A N/A isinstance prop N/A ndb KeyProperty N/A N/A N/A N/A value urlsafe N/A N/A N/A isinstance prop N/A ndb BlobKeyProperty N/A N/A N/A str value N/A N/A N/A isinstance prop N/A N/A ndb TimeProperty N/A ndb DateProperty N/A ndb DateTimeProperty N/A N/A N/A N/A utils DatetimeValueToString value N/A N/A value N/A FromValue N/A N/A prop value N/A N/A N/A Deserializes a value from a ProtoRPC message type to a property value.

  Args:
    prop: The NDB or alias property to be set.
    value: The value to be deserialized.

  Returns:
    The deserialized version of the ProtoRPC value to be set on a property.

  Raises:
    TypeError: if a StructuredProperty has a model class that is not an
        EndpointsModel.
   N/A N/A value None N/A N/A value N/A N/A isinstance prop N/A N/A ndb StructuredProperty N/A ndb LocalStructuredProperty N/A N/A modelclass N/A prop _modelclass N/A N/A N/A N/A utils IsSubclass modelclass EndpointsModel N/A N/A error_msg N/A Structured properties should refer to models which inherit from EndpointsModel. Received an instance of %s. N/A N/A N/A modelclass __class__ __name__ N/A N/A TypeError error_msg N/A N/A N/A modelclass FromMessage value N/A N/A N/A hasattr prop FromValue N/A callable N/A prop FromValue N/A N/A N/A N/A prop FromValue value N/A N/A N/A isinstance prop N/A ndb UserProperty N/A N/A N/A N/A utils UserMessageToUser value N/A N/A N/A isinstance prop N/A ndb GeoPtProperty N/A N/A N/A N/A datastore_types GeoPt lat N/A value lat lon N/A value lon N/A N/A N/A isinstance prop N/A ndb KeyProperty N/A N/A N/A N/A ndb Key urlsafe value N/A N/A N/A isinstance prop N/A ndb BlobKeyProperty N/A N/A N/A N/A datastore_types BlobKey value N/A N/A N/A isinstance prop N/A N/A ndb TimeProperty N/A ndb DateProperty N/A ndb DateTimeProperty N/A N/A N/A N/A utils DatetimeValueFromString value N/A N/A value N/A _EndpointsQueryInfo N/A object N/A N/A A custom container for query information.

  This will be set on an EndpointsModel (or subclass) instance, and can be used
  in conjunction with alias properties to store query information, simple
  filters, ordering and ancestor.

  Uses an entity to construct simple filters, to validate ordering, to validate
  ancestor and finally to construct a query from these filters, ordering and/or
  ancestor.

  Attributes:
    _entity: An instance of EndpointsModel or a subclass. The values from this
        will be used to create filters for a query.
    _filters: A set of simple equality filters (ndb.FilterNode). Utilizes the
        fact that FilterNodes are hashable and respect equality.
    _ancestor: An ndb Key to be used as an ancestor for a query.
    _cursor: A datastore_query.Cursor, to be used for resuming a query.
    _limit: A positive integer, to be used in a fetch.
    _order: String; comma separated list of property names or property names
        preceded by a minus sign. Used to define an order of query results.
    _order_attrs: The attributes (or negation of attributes) parsed from
        _order. If these can't be parsed from the attributes in _entity, will
        throw an exception.
    _query_final: A final query created using the orders (_order_attrs), filters
        (_filters) and class definition (_entity) in the query info. If this is
        not null, setting attributes on the query info object will fail.
   __init__ N/A N/A self entity N/A N/A N/A Sets all internal variables to the default values and verifies entity.

    Args:
      entity: An instance of EndpointsModel or a subclass.

    Raises:
      TypeError: if entity is not an instance of EndpointsModel or a subclass.
     N/A N/A N/A isinstance entity EndpointsModel N/A N/A N/A TypeError N/A Query info can only be used with an instance of an EndpointsModel subclass. Received: instance of %s. N/A N/A N/A entity __class__ __name__ N/A N/A self _entity entity N/A N/A self _filters N/A set N/A N/A self _ancestor None N/A N/A self _cursor None N/A N/A self _limit None N/A N/A self _order None N/A N/A self _order_attrs N/A N/A N/A self _query_final None N/A _PopulateFilters N/A N/A self N/A N/A N/A Populates filters in query info by using values set on the entity. N/A entity N/A self _entity N/A prop N/A N/A N/A entity _properties itervalues N/A N/A current_value N/A N/A prop _retrieve_value entity N/A N/A prop _repeated N/A N/A N/A current_value None N/A N/A N/A ValueError No queries on repeated values are allowed. N/A N/A N/A current_value None N/A N/A N/A N/A self _AddFilter N/A prop current_value N/A SetQuery N/A N/A self N/A N/A N/A Sets the final query on the query info object.

    Uses the filters and orders in the query info to refine the query. If the
    final query is already set, does nothing.
     N/A N/A N/A self _query_final None N/A N/A N/A N/A N/A self _PopulateFilters N/A N/A N/A self ancestor None N/A N/A query N/A N/A N/A self _entity query ancestor N/A self ancestor N/A N/A query N/A N/A N/A self _entity query N/A simple_filter N/A self _filters N/A N/A query N/A N/A query filter simple_filter N/A order_attr N/A self _order_attrs N/A N/A query N/A N/A query order order_attr N/A N/A self _query_final query N/A _AddFilter N/A N/A self candidate_filter N/A N/A N/A Checks a filter and sets it in the filter set.

    Args:
      candidate_filter: An NDB filter which may be added to the query info.

    Raises:
      AttributeError: if query on the object is already final.
      TypeError: if the filter is not a simple filter (FilterNode).
      ValueError: if the operator symbol in the filter is not equality.
     N/A N/A N/A self _query_final None N/A N/A N/A AttributeError Can't add more filters. Query info is final. N/A N/A N/A isinstance candidate_filter N/A ndb FilterNode N/A N/A N/A TypeError N/A Only simple filters can be used. Received: %s. N/A candidate_filter N/A opsymbol N/A candidate_filter _FilterNode__opsymbol N/A N/A opsymbol = N/A N/A N/A ValueError N/A Only equality filters allowed. Received: %s. N/A opsymbol N/A N/A N/A N/A self _filters add candidate_filter N/A query N/A N/A self N/A N/A N/A Public getter for the final query on query info. N/A N/A self _query_final N/A property _GetAncestor N/A N/A self N/A N/A N/A Getter to be used for public ancestor property on query info. N/A N/A self _ancestor N/A _SetAncestor N/A N/A self value N/A N/A N/A Setter to be used for public ancestor property on query info.

    Args:
      value: A potential value for an ancestor.

    Raises:
      AttributeError: if query on the object is already final.
      AttributeError: if the ancestor has already been set.
      TypeError: if the value to be set is not an instance of ndb.Key.
     N/A N/A N/A self _query_final None N/A N/A N/A AttributeError Can't set ancestor. Query info is final. N/A N/A N/A self _ancestor None N/A N/A N/A AttributeError Ancestor can't be set twice. N/A N/A N/A isinstance value N/A ndb Key N/A N/A N/A TypeError Ancestor must be an instance of ndb.Key. N/A N/A self _ancestor value N/A N/A ancestor N/A property fget _GetAncestor fset _SetAncestor _GetCursor N/A N/A self N/A N/A N/A Getter to be used for public cursor property on query info. N/A N/A self _cursor N/A _SetCursor N/A N/A self value N/A N/A N/A Setter to be used for public cursor property on query info.

    Args:
      value: A potential value for a cursor.

    Raises:
      AttributeError: if query on the object is already final.
      AttributeError: if the cursor has already been set.
      TypeError: if the value to be set is not an instance of
          datastore_query.Cursor.
     N/A N/A N/A self _query_final None N/A N/A N/A AttributeError Can't set cursor. Query info is final. N/A N/A N/A self _cursor None N/A N/A N/A AttributeError Cursor can't be set twice. N/A N/A N/A isinstance value N/A datastore_query Cursor N/A N/A N/A TypeError Cursor must be an instance of datastore_query.Cursor. N/A N/A self _cursor value N/A N/A cursor N/A property fget _GetCursor fset _SetCursor _GetLimit N/A N/A self N/A N/A N/A Getter to be used for public limit property on query info. N/A N/A self _limit N/A _SetLimit N/A N/A self value N/A N/A N/A Setter to be used for public limit property on query info.

    Args:
      value: A potential value for a limit.

    Raises:
      AttributeError: if query on the object is already final.
      AttributeError: if the limit has already been set.
      TypeError: if the value to be set is not a positive integer.
     N/A N/A N/A self _query_final None N/A N/A N/A AttributeError Can't set limit. Query info is final. N/A N/A N/A self _limit None N/A N/A N/A AttributeError Limit can't be set twice. N/A N/A N/A N/A isinstance value N/A int long N/A value 1 N/A N/A N/A TypeError Limit must be a positive integer. N/A N/A self _limit value N/A N/A limit N/A property fget _GetLimit fset _SetLimit _GetOrder N/A N/A self N/A N/A N/A Getter to be used for public order property on query info. N/A N/A self _order N/A _SetOrderAttrs N/A N/A self N/A N/A N/A Helper method to set _order_attrs using the value of _order.

    If _order is not set, simply returns, else splits _order by commas and then
    looks up each value (or its negation) in the _properties of the entity on
    the query info object.

    We look up directly in _properties rather than using the attribute names
    on the object since only NDB property names will be used for field names.

    Raises:
      AttributeError: if one of the attributes in the order is not a property
          on the entity.
     N/A N/A N/A self _order None N/A N/A N/A unclean_attr_names N/A N/A N/A N/A N/A self _order strip split , N/A result N/A N/A attr_name unclean_attr_names N/A N/A ascending True N/A N/A N/A attr_name startswith - N/A N/A ascending False N/A attr_name N/A attr_name N/A 1 N/A attr N/A N/A N/A N/A self _entity _properties get attr_name N/A N/A attr None N/A N/A N/A AttributeError N/A Order attribute %s not defined. N/A attr_name N/A ascending N/A N/A N/A N/A result append N/A attr N/A N/A N/A N/A result append N/A attr N/A N/A self _order_attrs N/A tuple result N/A _SetOrder N/A N/A self value N/A N/A N/A Setter to be used for public order property on query info.

    Sets the value of _order and attempts to set _order_attrs as well
    by valling _SetOrderAttrs, which uses the value of _order.

    If the passed in value is None, but the query is not final and the
    order has not already been set, the method will return without any
    errors or data changed.

    Args:
      value: A potential value for an order.

    Raises:
      AttributeError: if query on the object is already final.
      AttributeError: if the order has already been set.
      TypeError: if the order to be set is not a string.
     N/A N/A N/A self _query_final None N/A N/A N/A AttributeError Can't set order. Query info is final. N/A N/A N/A self _order None N/A N/A N/A AttributeError Order can't be set twice. N/A N/A value None N/A N/A N/A N/A N/A N/A isinstance value basestring N/A N/A N/A TypeError Order must be a string. N/A N/A self _order value N/A N/A N/A self _SetOrderAttrs N/A N/A order N/A property fget _GetOrder fset _SetOrder N/A EndpointsMetaModel N/A N/A ndb MetaModel N/A N/A Metaclass for EndpointsModel.

  This exists to create new instances of the mutable class attributes for
  subclasses and to verify ProtoRPC specific properties.
   __init__ N/A N/A cls name bases classdict N/A N/A N/A Verifies additional ProtoRPC properties on an NDB model. N/A N/A N/A N/A super EndpointsMetaModel cls __init__ name bases classdict N/A N/A _message_fields_schema classdict N/A N/A N/A cls _message_fields_schema None N/A N/A cls _alias_properties N/A N/A N/A cls _proto_models N/A N/A N/A cls _proto_collections N/A N/A N/A cls _resource_containers N/A N/A N/A cls _property_to_proto N/A N/A N/A ndb_utils NDB_PROPERTY_TO_PROTO copy N/A N/A N/A cls _FixUpAliasProperties N/A N/A N/A cls _VerifyMessageFieldsSchema N/A N/A N/A cls _VerifyProtoMapping N/A _FixUpAliasProperties N/A N/A cls N/A N/A N/A Updates the alias properties map and verifies each alias property.

    Raises:
      AttributeError: if an alias property is defined beginning with
          an underscore.
      AttributeError: if an alias property is defined that conflicts with
          an NDB property.
     N/A attr_name N/A dir cls N/A N/A prop N/A getattr cls attr_name None N/A N/A isinstance prop EndpointsAliasProperty N/A N/A N/A N/A attr_name startswith _ N/A N/A N/A AttributeError N/A EndpointsAliasProperty %s cannot begin with an underscore character. N/A attr_name N/A N/A attr_name N/A cls _properties N/A N/A N/A AttributeError N/A PROPERTY_COLLISION_TEMPLATE N/A attr_name N/A N/A N/A prop _FixUp attr_name N/A N/A N/A cls _alias_properties N/A N/A prop _name prop N/A _VerifyMessageFieldsSchema N/A N/A cls N/A N/A N/A Verifies that the preset message fields correspond to actual properties.

    If no message fields schema was set on the class, sets the schema using the
    default fields determing by the NDB properties and alias properties defined.

    In either case, converts the passed in fields to an instance of
       MessageFieldsSchema and sets that as the value of _message_fields_schema
       on the class.

    Raises:
      TypeError: if a message fields schema was set on the class that is not a
          list, tuple, dictionary, or MessageFieldsSchema instance.
     N/A message_fields_schema N/A getattr cls _message_fields_schema None N/A base_schema N/A getattr BASE_MODEL_CLASS _message_fields_schema None N/A N/A N/A message_fields_schema None N/A message_fields_schema base_schema N/A N/A message_fields_schema N/A N/A cls _DefaultFields N/A N/A N/A N/A isinstance message_fields_schema N/A list tuple dict MessageFieldsSchema N/A N/A N/A TypeError N/A BAD_FIELDS_SCHEMA_TEMPLATE N/A N/A cls __name__ N/A N/A message_fields_schema __class__ __name__ N/A N/A attr message_fields_schema N/A N/A N/A _VerifyProperty cls attr N/A N/A cls _message_fields_schema N/A MessageFieldsSchema message_fields_schema name N/A cls __name__ N/A _VerifyProtoMapping N/A N/A cls N/A N/A N/A Verifies that each property on the class has an associated proto mapping.

    First checks if there is a _custom_property_to_proto dictionary present and
    then overrides the class to proto mapping found in _property_to_proto.

    Then, for each property (NDB or alias), tries to add a mapping first by
    checking for a message field attribute, and then by trying to infer based
    on property subclass.

    Raises:
      TypeError: if a key from _custom_property_to_proto is not a valid NBD
          property. (We don't allow EndpointsAliasProperty here because it
          is not meant to be subclassed and defines a message_field).
      TypeError: if after checking _custom_property_to_proto, message_field and
          inference from a superclass, no appropriate mapping is found in
          _property_to_proto.
     N/A custom_property_to_proto N/A getattr cls _custom_property_to_proto None N/A N/A isinstance custom_property_to_proto dict N/A N/A N/A key value N/A N/A custom_property_to_proto iteritems N/A N/A N/A N/A N/A utils IsSubclass key N/A ndb Property N/A N/A N/A TypeError N/A Invalid property class: %s. N/A key N/A N/A N/A cls _property_to_proto N/A key value N/A prop N/A N/A cls _EndpointsPropertyItervalues N/A N/A property_class N/A prop __class__ N/A N/A N/A cls _TryAddMessageField property_class N/A N/A N/A cls _TryInferSuperclass property_class N/A N/A property_class N/A cls _property_to_proto N/A N/A N/A TypeError N/A No converter present for property %s N/A N/A property_class __name__ N/A _TryAddMessageField N/A N/A cls property_class N/A N/A N/A Tries to add a proto mapping for a property class using a message field.

    If the property class is already in the proto mapping, does nothing.

    Args:
      property_class: The class of a property from a model.
     N/A N/A property_class N/A cls _property_to_proto N/A N/A N/A message_field N/A getattr property_class message_field None N/A N/A message_field None N/A N/A N/A N/A cls _property_to_proto N/A property_class message_field N/A _TryInferSuperclass N/A N/A cls property_class N/A N/A N/A Tries to add a proto mapping for a property class by using a base class.

    If the property class is already in the proto mapping, does nothing.
    Descends up the class hierarchy until an ancestor class has more than one
    base class or until ndb.Property is reached. If any class up the hierarchy
    is already in the proto mapping, the method/field for the superclass is also
    set for the propert class in question.

    Args:
      property_class: The class of a property from a model.
     N/A N/A N/A property_class N/A cls _property_to_proto N/A N/A utils IsSubclass property_class EndpointsAliasProperty N/A N/A N/A bases N/A property_class __bases__ N/A N/A N/A N/A len bases 1 N/A N/A bases N/A 0 N/A ndb Property N/A N/A base N/A bases N/A 0 N/A N/A base N/A cls _property_to_proto N/A N/A N/A N/A cls _property_to_proto N/A property_class N/A N/A cls _property_to_proto N/A base N/A N/A N/A bases N/A base __bases__ N/A N/A EndpointsModel N/A N/A ndb Model N/A N/A Subclass of NDB model that enables translation to ProtoRPC message classes.

  Also uses a subclass of ndb.MetaModel as the metaclass, to allow for custom
  behavior (particularly property verification) on class creation. Two types of
  properties are allowed, the standard NDB property, which ends up in a
  _properties dictionary and {EndpointsAliasProperty}s, which end up in an
  _alias_properties dictionary. They can be accessed simultaneously through
  _GetEndpointsProperty.

  As with NDB, you cannot use the same property object to describe multiple
  properties -- you must create separate property objects for each property.

  In addition to _alias_properties, there are several other class variables that
  can be used to augment the default NDB model behavior:
      _property_to_proto: This is a mapping from properties to ProtoRPC message
          fields or methods which can take a property and an index and convert
          them to a message field. It starts out as a copy of the global
          NDB_PROPERTY_TO_PROTO from ndb_utils and can be augmented by your
          class and/or property definitions
      _custom_property_to_proto: if set as a dictionary, allows default mappings
          from NDB properties to ProtoRPC fields in _property_to_proto to be
          overridden.

  The metaclass ensures each property (alias properties included) can be
  converted to a ProtoRPC message field before the class can be created. Due to
  this, a ProtoRPC message class can be created using any subset of the model
  properties in any order, or a collection containing multiple messages of the
  same class. Once created, these ProtoRPC message classes are cached in the
  class variables _proto_models and _proto_collections.

  Endpoints models also have two class methods which can be used as decorators
  for Cloud Endpoints API methods: method and query_method. These methods use
  the endpoints.api decorator but tailor the behavior to the specific model
  class.

  Where a method decorated with the endpoints.api expects a ProtoRPC
  message class for the response and request type, a method decorated with the
  "method" decorator provided by a model class expects an instance of that class
  both as input and output. In order to deserialize the ProtoRPC input to an
  entity and serialize the entity returned by the decorated method back to
  ProtoRPC, request and response fields can be specified which the Endpoints
  model class can use to create (and cache) corresponding ProtoRPC message
  classes.

  Similarly, a method decorated with the query_method decorator expects a query
  for the EndpointsModel subclass both as input and output. Instead of
  specifying request/response fields for entities, a query and collection fields
  list can be used.

  When no fields are provided, the default fields from the class are used. This
  can be overridden by setting the class variable _message_fields_schema to a
  dictionary, list, tuple or MessageFieldsSchema of your choice. If none is
  provided, the default will include all NDB properties and all Endpoints Alias
  properties.
   N/A __metaclass__ EndpointsMetaModel N/A _custom_property_to_proto None N/A _message_fields_schema None N/A _alias_properties None N/A _proto_models None N/A _proto_collections None N/A _resource_containers None N/A _property_to_proto None __init__ N/A N/A self N/A args kwargs N/A N/A Initializes NDB model and adds a query info object.

    Attributes:
      _endpoints_query_info: An _EndpointsQueryInfo instance, directly tied to
          the current instance that can be used to form queries using properties
          provided by the instance and can be augmented by alias properties to
          allow custom queries.
     N/A N/A N/A N/A super EndpointsModel self __init__ args kwargs N/A N/A self _endpoints_query_info N/A _EndpointsQueryInfo self N/A N/A self _from_datastore False N/A from_datastore N/A N/A self N/A N/A N/A Property accessor that represents if the entity is from the datastore. N/A N/A self _from_datastore N/A property _DefaultFields N/A N/A cls N/A N/A N/A The default fields for the class.

    Uses all NDB properties and alias properties which are different from the
    alias properties defined on the parent class EndpointsModel.
     N/A fields N/A N/A N/A cls _properties keys N/A N/A prop_name prop N/A N/A N/A cls _alias_properties iteritems N/A N/A base_alias_props N/A getattr BASE_MODEL_CLASS _alias_properties N/A N/A base_prop N/A N/A base_alias_props get prop_name N/A N/A base_prop prop N/A N/A N/A N/A fields append prop_name N/A fields N/A classmethod _CopyFromEntity N/A N/A self entity N/A N/A N/A Copies properties from another entity to the current one.

    Only sets properties on the current entity that are not already set.

    Args:
      entity: A model instance to be copied from.

    Raises:
      TypeError: if the entity passed in is not the exact same type as the
          current entity.
     N/A N/A N/A entity __class__ N/A self __class__ N/A N/A N/A TypeError N/A Can only copy from entities of the exact type %s. Received an instance of %s. N/A N/A N/A self __class__ __name__ N/A N/A entity __class__ __name__ N/A prop N/A N/A entity _EndpointsPropertyItervalues N/A N/A attr_name N/A prop _code_name N/A value N/A getattr entity attr_name N/A N/A value None N/A N/A N/A isinstance prop EndpointsAliasProperty N/A N/A value_set N/A N/A getattr self attr_name None N/A N/A value_set N/A N/A prop _name N/A self _values N/A N/A value_set N/A N/A N/A setattr self attr_name value N/A UpdateFromKey N/A N/A self key N/A N/A N/A Attempts to get current entity for key and update the unset properties.

    Only does anything if there is a corresponding entity in the datastore.
    Calls _CopyFromEntity to merge the current entity with the one that was
    retrieved. If one was retrieved, sets _from_datastore to True to signal that
    an entity was retrieved.

    Args:
      key: An NDB key used to retrieve an entity.
     N/A N/A self _key key N/A entity N/A N/A N/A self _key get N/A N/A entity None N/A N/A N/A N/A self _CopyFromEntity entity N/A N/A self _from_datastore True N/A IdSet N/A N/A self value N/A N/A N/A Setter to be used for default id EndpointsAliasProperty.

    Sets the key on the current entity using the value passed in as the ID.
    Using this key, attempts to retrieve the entity from the datastore and
    update the unset properties of the current entity with those from the
    retrieved entity.

    Args:
      value: An integer ID value for a simple key.

    Raises:
      TypeError: if the value to be set is not an integer. (Though if outside of
          a given range, the get call will also throw an exception.)
     N/A N/A N/A isinstance value N/A int long N/A N/A N/A TypeError ID must be an integer. N/A N/A N/A self UpdateFromKey N/A N/A ndb Key N/A self __class__ value N/A id N/A N/A self N/A N/A N/A Getter to be used for default id EndpointsAliasProperty.

    Specifies that the ProtoRPC property_type is IntegerField, though simple
    string IDs or more complex IDs that use ancestors could also be used.

    Returns:
      The integer ID of the entity key, if the key is not null and the integer
          ID is not null, else returns None.
     N/A N/A N/A self _key None N/A N/A N/A N/A N/A self _key integer_id N/A N/A EndpointsAliasProperty setter IdSet property_type N/A messages IntegerField EntityKeySet N/A N/A self value N/A N/A N/A Setter to be used for default entityKey EndpointsAliasProperty.

    Sets the key on the current entity using the urlsafe entity key string.
    Using the key set on the entity, attempts to retrieve the entity from the
    datastore and update the unset properties of the current entity with those
    from the retrieved entity.

    Args:
      value: String; A urlsafe entity key for an object.

    Raises:
      TypeError: if the value to be set is not a string. (Though if the string
          is not valid base64 or not properly encoded, the key creation will
          also throw an exception.)
     N/A N/A N/A isinstance value basestring N/A N/A N/A TypeError entityKey must be a string. N/A N/A N/A self UpdateFromKey N/A N/A ndb Key urlsafe value N/A entityKey N/A N/A self N/A N/A N/A Getter to be used for default entityKey EndpointsAliasProperty.

    Uses the default ProtoRPC property_type StringField.

    Returns:
      The urlsafe string produced by the entity key, if the key is not null,
          else returns None.
     N/A N/A N/A self _key None N/A N/A N/A N/A N/A self _key urlsafe N/A N/A EndpointsAliasProperty setter EntityKeySet LimitSet N/A N/A self value N/A N/A N/A Setter to be used for default limit EndpointsAliasProperty.

    Simply sets the limit on the entity's query info object, and the query
    info object handles validation.

    Args:
      value: The limit value to be set.
     N/A N/A N/A self _endpoints_query_info limit value N/A limit N/A N/A self N/A N/A N/A Getter to be used for default limit EndpointsAliasProperty.

    Uses the ProtoRPC property_type IntegerField since a limit.

    Returns:
      The integer (or null) limit from the query info on the entity.
     N/A N/A N/A self _endpoints_query_info limit N/A N/A EndpointsAliasProperty setter LimitSet property_type N/A messages IntegerField OrderSet N/A N/A self value N/A N/A N/A Setter to be used for default order EndpointsAliasProperty.

    Simply sets the order on the entity's query info object, and the query
    info object handles validation.

    Args:
      value: The order value to be set.
     N/A N/A N/A self _endpoints_query_info order value N/A order N/A N/A self N/A N/A N/A Getter to be used for default order EndpointsAliasProperty.

    Uses the default ProtoRPC property_type StringField.

    Returns:
      The string (or null) order from the query info on the entity.
     N/A N/A N/A self _endpoints_query_info order N/A N/A EndpointsAliasProperty setter OrderSet PageTokenSet N/A N/A self value N/A N/A N/A Setter to be used for default pageToken EndpointsAliasProperty.

    Tries to use Cursor.from_websafe_string to convert the value to a cursor
    and then sets the cursor on the entity's query info object, and the query
    info object handles validation.

    Args:
      value: The websafe string version of a cursor.
     N/A cursor N/A N/A N/A datastore_query Cursor from_websafe_string value N/A N/A N/A self _endpoints_query_info cursor cursor N/A pageToken N/A N/A self N/A N/A N/A Getter to be used for default pageToken EndpointsAliasProperty.

    Uses the default ProtoRPC property_type StringField.

    Returns:
      The websafe string from the cursor on the entity's query info object, or
          None if the cursor is null.
     N/A cursor N/A N/A self _endpoints_query_info cursor N/A N/A cursor None N/A N/A N/A N/A cursor to_websafe_string N/A N/A EndpointsAliasProperty setter PageTokenSet _GetEndpointsProperty N/A N/A cls attr_name N/A N/A N/A Return a property if set on a model class.

    Attempts to retrieve both the NDB and alias version of the property, makes
    sure at most one is not null and then returns that one.

    Args:
      attr_name: String; the name of the property.

    Returns:
      The property set at the attribute name.

    Raises:
      AttributeError: if the property is both an NDB and alias property.
     N/A property_value N/A N/A N/A cls _properties get attr_name N/A alias_value N/A N/A N/A cls _alias_properties get attr_name N/A N/A N/A property_value None N/A alias_value None N/A N/A N/A AttributeError N/A PROPERTY_COLLISION_TEMPLATE N/A attr_name N/A N/A property_value alias_value N/A classmethod _EndpointsPropertyItervalues N/A N/A cls N/A N/A N/A Iterator containing both NDB and alias property instances for class. N/A property_values N/A N/A N/A cls _properties itervalues N/A alias_values N/A N/A N/A cls _alias_properties itervalues N/A N/A N/A itertools chain property_values alias_values N/A classmethod _MessageFields N/A N/A cls message_fields_schema allow_message_fields N/A True N/A N/A Creates ProtoRPC fields from a MessageFieldsSchema.

    Verifies that each property is valid (may cause exception) and then uses the
    proto mapping to create the corresponding ProtoRPC field.

    Args:
      message_fields_schema: MessageFieldsSchema object to create fields from.
      allow_message_fields: An optional boolean; defaults to True. If True, does
          nothing. If False, stops ProtoRPC message classes that have one or
          more ProtoRPC {MessageField}s from being created.

    Returns:
      Dictionary of ProtoRPC fields.

    Raises:
      AttributeError: if a verified property has no proto mapping registered.
          This is a serious error and should not occur due to what happens in
          the metaclass.
      TypeError: if a value from the proto mapping is not a ProtoRPC field or a
          callable method (which takes a property and an index).
      TypeError: if a proto mapping results in a ProtoRPC MessageField while
          message fields are explicitly disallowed by having
          allow_message_fields set to False.
     N/A message_fields N/A N/A N/A index name N/A enumerate message_fields_schema N/A N/A field_index N/A index 1 N/A prop N/A _VerifyProperty cls name N/A to_proto N/A N/A N/A cls _property_to_proto get N/A prop __class__ N/A N/A to_proto None N/A N/A N/A AttributeError N/A %s does not have a proto mapping for %s. N/A N/A cls __name__ N/A N/A prop __class__ __name__ N/A N/A N/A utils IsSimpleField to_proto N/A N/A proto_attr N/A N/A ndb_utils MessageFromSimpleField to_proto prop field_index N/A N/A N/A callable to_proto N/A N/A proto_attr N/A to_proto prop field_index N/A N/A N/A TypeError N/A Proto mapping for %s was invalid. Received %s, which was neither a ProtoRPC field, nor a callable object. N/A name to_proto N/A N/A allow_message_fields N/A N/A N/A isinstance proto_attr N/A messages MessageField N/A N/A error_msg N/A NO_MSG_FIELD_TEMPLATE N/A N/A N/A proto_attr __class__ __name__ N/A N/A TypeError error_msg N/A N/A message_fields N/A name proto_attr N/A message_fields N/A classmethod ProtoModel N/A N/A cls fields allow_message_fields N/A None True N/A N/A Creates a ProtoRPC message class using a subset of the class properties.

    Creates a MessageFieldsSchema from the passed in fields (may cause exception
    if not valid). If this MessageFieldsSchema is already in the cache of
    models, returns the cached value.

    If not creates ProtoRPC fields from the MessageFieldsSchema (may cause
    exception). Using the created fields and the name from the MessageFieldsSchema,
    creates a new ProtoRPC message class by calling the type() constructor.

    Before returning it, it caches the newly created ProtoRPC message class.

    Args:
      fields: Optional fields, defaults to None. If None, the default from
          the class is used. If specified, will be converted to a
          MessageFieldsSchema object (and verified as such).
      allow_message_fields: An optional boolean; defaults to True. If True, does
          nothing. If False, stops ProtoRPC message classes that have one or
          more ProtoRPC {MessageField}s from being created.

    Returns:
      The cached or created ProtoRPC message class specified by the fields.

    Raises:
      TypeError: if a proto mapping results in a ProtoRPC MessageField while
          message fields are explicitly disallowed by having
          allow_message_fields set to False.
     N/A N/A fields None N/A N/A fields N/A cls _message_fields_schema N/A message_fields_schema N/A MessageFieldsSchema fields basename N/A N/A cls __name__ Proto N/A N/A message_fields_schema N/A cls _proto_models N/A N/A cached_model N/A N/A cls _proto_models N/A message_fields_schema N/A N/A allow_message_fields N/A N/A field N/A N/A cached_model all_fields N/A N/A N/A isinstance field N/A messages MessageField N/A N/A error_msg N/A NO_MSG_FIELD_TEMPLATE N/A N/A N/A field __class__ __name__ N/A N/A TypeError error_msg N/A cached_model N/A message_fields N/A N/A cls _MessageFields message_fields_schema allow_message_fields allow_message_fields N/A N/A message_fields N/A __module__ N/A message_class N/A type N/A message_fields_schema name N/A N/A messages Message message_fields N/A N/A N/A cls _proto_models N/A message_fields_schema message_class N/A message_class N/A classmethod ResourceContainer N/A N/A cls message fields N/A N/A message_types VoidMessage None N/A N/A Creates a ResourceContainer using a subset of the class properties.

    Creates a MessageFieldsSchema from the passed in fields (may cause exception
    if not valid). If this MessageFieldsSchema in combination with the message
    is already in the cache, returns the cached value.

    If not creates ProtoRPC fields from the MessageFieldsSchema (may cause
    exception) and creates a endpoints.ResourceContainer using the created
    ProtoRPC fields and the provided reques body message.

    Before returning it, it caches the newly created ResourceContainer.

    Args:
      message: ProtoRPC message class to be used as request body.
      fields: Optional fields, defaults to None. If None, the default from
          the class is used. If specified, will be converted to a
          MessageFieldsSchema object (and verified as such).

    Returns:
      The cached or created ResourceContainer specified by the fields and message.

     N/A N/A fields None N/A N/A fields N/A cls _message_fields_schema N/A message_fields_schema N/A MessageFieldsSchema fields basename N/A N/A cls __name__ Proto N/A container_key N/A N/A message __name__ message_fields_schema N/A N/A container_key N/A cls _resource_containers N/A N/A N/A N/A cls _resource_containers N/A container_key N/A message_fields N/A N/A cls _MessageFields message_fields_schema allow_message_fields False N/A resource_container N/A N/A endpoints ResourceContainer message message_fields N/A N/A N/A cls _resource_containers N/A container_key resource_container N/A resource_container N/A classmethod ProtoCollection N/A N/A cls collection_fields N/A None N/A N/A Creates a ProtoRPC message class using a subset of the class properties.

    In contrast to ProtoModel, this creates a collection with only two fields:
    items and nextPageToken. The field nextPageToken is used for paging through
    result sets, while the field items is a repeated ProtoRPC MessageField used
    to hold the query results. The fields passed in are used to specify the
    ProtoRPC message class set on the MessageField.

    As with ProtoModel, creates a MessageFieldsSchema from the passed in fields,
    checks if this MessageFieldsSchema is already in the cache of collections,
    and returns the cached value if it exists.

    If not, will call ProtoModel with the collection_fields passed in to set
    the ProtoRPC message class on the items MessageField.

    Before returning it, it caches the newly created ProtoRPC message class in a
    cache of collections.

    Args:
      collection_fields: Optional fields, defaults to None. If None, the
          default from the class is used. If specified, will be converted to a
          MessageFieldsSchema object (and verified as such).

    Returns:
      The cached or created ProtoRPC (collection) message class specified by
          the fields.
     N/A N/A collection_fields None N/A N/A collection_fields N/A cls _message_fields_schema N/A message_fields_schema N/A MessageFieldsSchema collection_fields basename N/A N/A cls __name__ Proto N/A N/A message_fields_schema N/A cls _proto_collections N/A N/A N/A N/A cls _proto_collections N/A message_fields_schema N/A proto_model N/A N/A cls ProtoModel fields message_fields_schema N/A message_fields N/A items nextPageToken __module__ N/A N/A messages MessageField proto_model 1 repeated True N/A N/A messages StringField 2 N/A collection_class N/A type N/A message_fields_schema collection_name N/A N/A messages Message message_fields N/A N/A N/A cls _proto_collections N/A message_fields_schema collection_class N/A collection_class N/A classmethod ToMessage N/A N/A self fields N/A None N/A N/A Converts an entity to an ProtoRPC message.

    Uses the fields list passed in to create a ProtoRPC message class and then
    converts the relevant fields from the entity using ToValue.

    Args:
      fields: Optional fields, defaults to None. Passed to ProtoModel to
          create a ProtoRPC message class for the message.

    Returns:
      The ProtoRPC message created using the values from the entity and the
          fields provided for the message class.

    Raises:
      TypeError: if a repeated field has a value which is not a tuple or list.
     N/A proto_model N/A N/A self ProtoModel fields fields N/A proto_args N/A N/A field N/A N/A proto_model all_fields N/A N/A name N/A field name N/A value_property N/A _VerifyProperty N/A self __class__ name N/A value N/A getattr self N/A value_property _code_name N/A N/A value None N/A N/A N/A N/A field repeated N/A N/A N/A N/A isinstance value N/A list tuple N/A N/A error_msg N/A Property %s is a repeated field and its value should be a list or tuple. Received: %s N/A name value N/A N/A TypeError error_msg N/A to_add N/A N/A ToValue value_property element N/A element value N/A N/A to_add N/A ToValue value_property value N/A N/A proto_args N/A name to_add N/A N/A proto_model proto_args N/A FromMessage N/A N/A cls message N/A N/A N/A Converts a ProtoRPC message to an entity of the model class.

    Makes sure the message being converted is an instance of a ProtoRPC message
    class we have already encountered and then converts the relevant field
    values to the entity values using FromValue.

    When collecting the values from the message for conversion to an entity, NDB
    and alias properties are treated differently. The NDB properties can just be
    passed in to the class constructor as kwargs, but the alias properties must
    be set after the fact, and may even throw exceptions if the message has
    fields corresponding to alias properties which don't define a setter.

    Args:
      message: A ProtoRPC message.

    Returns:
      The entity of the current class that was created using the
          message field values.

    Raises:
      TypeError: if a message class is encountered that has not been stored in
          the _proto_models cache on the class. This is a precaution against
          unkown ProtoRPC message classes.
      TypeError: if a repeated field has a value which is not a tuple or list.
     N/A message_class N/A message __class__ N/A N/A N/A message_class N/A N/A N/A cls _proto_models values N/A N/A message_class __name__ CombinedContainer N/A N/A error_msg N/A The message is an instance of %s, which is a class this EndpointsModel does not know how to process. N/A message_class __name__ N/A N/A TypeError error_msg N/A entity_kwargs N/A N/A alias_args N/A N/A field N/A sorted N/A N/A message_class all_fields key N/A N/A N/A field N/A N/A field number N/A N/A name N/A field name N/A value N/A getattr message name None N/A N/A value None N/A N/A N/A value_property N/A _VerifyProperty cls name N/A N/A field repeated N/A N/A N/A N/A isinstance value N/A list tuple N/A N/A error_msg N/A Repeated attribute should be a list or tuple. Received a %s. N/A N/A N/A value __class__ __name__ N/A N/A TypeError error_msg N/A to_add N/A N/A FromValue value_property element N/A element value N/A N/A to_add N/A FromValue value_property value N/A local_name N/A value_property _code_name N/A N/A isinstance value_property EndpointsAliasProperty N/A N/A N/A N/A alias_args append N/A local_name to_add N/A N/A N/A entity_kwargs N/A local_name to_add N/A entity N/A cls entity_kwargs N/A N/A name value alias_args N/A N/A N/A setattr entity name value N/A entity N/A classmethod ToMessageCollection N/A N/A cls items collection_fields next_cursor N/A None None N/A N/A Converts a list of entities and cursor to ProtoRPC (collection) message.

    Uses the fields list to create a ProtoRPC (collection) message class and
    then converts each item into a ProtoRPC message to be set as a list of
    items.

    If the cursor is not null, we convert it to a websafe string and set the
    nextPageToken field on the result message.

    Args:
      items: A list of entities of this model.
      collection_fields: Optional fields, defaults to None. Passed to
          ProtoCollection to create a ProtoRPC message class for for the
          collection of messages.
      next_cursor: An optional query cursor, defaults to None.

    Returns:
      The ProtoRPC message created using the entities and cursor provided,
          making sure that the entity message class matches collection_fields.
     N/A proto_model N/A N/A cls ProtoCollection collection_fields collection_fields N/A items_as_message N/A N/A N/A item ToMessage fields collection_fields N/A item items N/A result N/A proto_model items items_as_message N/A N/A next_cursor None N/A N/A N/A result nextPageToken N/A N/A next_cursor to_websafe_string N/A result N/A classmethod method N/A N/A cls request_fields response_fields user_required N/A None None False kwargs N/A N/A Creates an API method decorator using provided metadata.

    Augments the endpoints.method decorator-producing function by allowing
    API methods to receive and return a class instance rather than having to
    worry with ProtoRPC messages (and message class definition). By specifying
    a list of ProtoRPC fields rather than defining the class, response and
    request classes can be defined on the fly.

    If there is any collision between request/response field lists and potential
    custom request/response message definitions that can be passed to the
    endpoints.method decorator, this call will fail.

    All other arguments will be passed directly to the endpoints.method
    decorator-producing function. If request/response field lists are used to
    define custom classes, the newly defined classes will also be passed to
    endpoints.method as the keyword arguments request_message/response_message.

    If a custom request message class is passed in, the resulting decorator will
    not attempt to convert the ProtoRPC message it receives into an
    EndpointsModel entity before passing it to the decorated method. Similarly,
    if a custom response message class is passed in, no attempt will be made to
    convert the object (returned by the decorated method) in the opposite
    direction.

    NOTE: Using utils.positional(1), we ensure the class instance will be the
    only positional argument hence won't have leaking/collision between the
    endpoints.method decorator function that we mean to pass metadata to.

    Args:
      request_fields: An (optional) list, tuple, dictionary or
          MessageFieldsSchema that defines a field ordering in a ProtoRPC
          message class. Defaults to None.
      response_fields: An (optional) list, tuple, dictionary or
          MessageFieldsSchema that defines a field ordering in a ProtoRPC
          message class. Defaults to None.
      user_required: Boolean; indicates whether or not a user is required on any
          incoming request.

    Returns:
      A decorator that takes the metadata passed in and augments an API method.

    Raises:
      TypeError: if there is a collision (either request or response) of
          field list and custom message definition.
     N/A request_message N/A N/A kwargs get REQUEST_MESSAGE N/A N/A N/A request_fields None N/A request_message None N/A N/A N/A TypeError Received both a request message class and a field list for creating a request message class. N/A proto_message request_message N/A N/A proto_message None N/A N/A proto_message N/A N/A cls ProtoModel fields request_fields N/A path N/A N/A kwargs get PATH N/A query_fields N/A N/A N/A path None N/A N/A query_fields N/A N/A re findall {(.*?)} path N/A N/A N/A len query_fields 0 N/A N/A N/A kwargs N/A REQUEST_MESSAGE N/A N/A cls ResourceContainer message proto_message fields query_fields N/A N/A N/A kwargs N/A REQUEST_MESSAGE proto_message N/A response_message N/A N/A kwargs get RESPONSE_MESSAGE N/A N/A N/A response_fields None N/A response_message None N/A N/A N/A TypeError Received both a response message class and a field list for creating a response message class. N/A N/A response_message None N/A N/A N/A kwargs N/A RESPONSE_MESSAGE N/A N/A cls ProtoModel fields response_fields N/A apiserving_method_decorator N/A N/A endpoints method kwargs RequestToEntityDecorator N/A N/A api_method N/A N/A N/A A decorator that uses the metadata passed to the enclosing method.

      Args:
        api_method: A method to be decorated. Expected signature is two
            positional arguments, an instance object of an API service and a
            variable containing a deserialized API request object, most likely
            as a ProtoRPC message or as an instance of the current
            EndpointsModel class.

      Returns:
        A decorated method that uses the metadata of the enclosing method to
            verify the service instance, convert the arguments to ones that can
            be consumed by the decorated method and serialize the method output
            back to a ProtoRPC message.
       EntityToRequestMethod N/A N/A service_instance request N/A N/A N/A Stub method to be decorated.

        After creation, will be passed to the standard endpoints.method
        decorator to preserve the necessary method attributes needed for
        endpoints API methods.

        Args:
          service_instance: A ProtoRPC remove service instance.
          request: A ProtoRPC message.

        Returns:
          A ProtoRPC message, potentially serialized after being returned from a
              method which returns a class instance.

        Raises:
          endpoints.UnauthorizedException: if the user required boolean from
             the metadata is True and if there is no current endpoints user.
         N/A N/A user_required N/A N/A N/A endpoints get_current_user None N/A N/A N/A N/A endpoints UnauthorizedException Invalid token. N/A N/A request_message None N/A N/A request N/A N/A cls FromMessage request N/A response N/A api_method service_instance request N/A N/A response_message None N/A N/A response N/A N/A response ToMessage fields response_fields N/A response N/A N/A N/A functools wraps api_method N/A N/A apiserving_method_decorator EntityToRequestMethod N/A N/A RequestToEntityDecorator N/A classmethod N/A N/A utils positional 1 query_method N/A N/A cls query_fields collection_fields limit_default limit_max user_required use_projection N/A N/A None QUERY_LIMIT_DEFAULT QUERY_LIMIT_MAX False False kwargs N/A N/A Creates an API query method decorator using provided metadata.

    This will produce a decorator which is solely intended to decorate functions
    which receive queries and expect them to be decorated. Augments the
    endpoints.method decorator-producing function by allowing API methods to
    receive and return a query object.

    Query data will be stored in an entity using the same (de)serialization
    methods used by the classmethod "method". Once there, the query info
    object on the entity will allow conversion into a query and the decorator
    will execute this query.

    Rather than request/response fields (as in "method"), we require that
    callers specify query fields -- which will produce the entity before it
    is converted to a query -- and collection fields -- which will be passed
    to ProtoCollection to create a container class for items returned by the
    query.

    In contrast to "method", no custom request/response message classes can be
    passed in, the queries and collection responses can only be specified by the
    query/collection fields. THIS IS SUBJECT TO CHANGE.

    All other arguments will be passed directly to the endpoints.method
    decorator-producing function. The custom classes defined by the
    query/collection fields will also be passed to endpoints.method as the
    keyword arguments request_message/response_message.

    Custom {EndpointsAliasProperty}s have been defined that allow for
    customizing queries:
      limit: allows a limit to be passed in and augment the query info on the
          deserialized entity.
      order: allows an order to be passed in and augment the query info on the
          deserialized entity.
      pageToken: allows a websafe string value to be converted to a cursor and
          set on the query info of the deserialized entity.

    NOTE: Using utils.positional(1), we ensure the class instance will be the
    only positional argument hence won't have leaking/collision between the
    endpoints.method decorator function that we mean to pass metadata to.

    Args:
      query_fields: An (optional) list, tuple, dictionary or MessageFieldsSchema
          that define a field ordering in a ProtoRPC message class. Defaults to
          an empty tuple, which results in a simple datastore query of the kind.
      collection_fields: An (optional) list, tuple, dictionary or
          MessageFieldsSchema that define a field ordering in a ProtoRPC
          message class. Defaults to None.
      limit_default: An (optional) default value for the amount of items to
          fetch in a query. Defaults to the global QUERY_LIMIT_DEFAULT.
      limit_max: An (optional) max value for the amount of items to
          fetch in a query. Defaults to the global QUERY_LIMIT_MAX.
      user_required: Boolean; indicates whether or not a user is required on any
          incoming request. Defaults to False.
      use_projection: Boolean; indicates whether or the query should retrieve
          entire entities or just a projection using the collection fields.
          Defaults to False. If used, all properties in a projection must be
          indexed, so this should be used with care. However, when used
          correctly, this will speed up queries, reduce payload size and even
          reduce cost at times.

    Returns:
      A decorator that takes the metadata passed in and augments an API query
          method. The decorator will perform the fetching, the decorated method
          simply need return the augmented query object.

    Raises:
      TypeError: if there is a custom request or response message class was
          passed in.
      TypeError: if a http_method other than 'GET' is passed in.
     N/A N/A REQUEST_MESSAGE kwargs N/A N/A N/A TypeError Received a request message class on a method intended for queries. This is explicitly not allowed. Only query_fields can be specified. N/A N/A kwargs N/A REQUEST_MESSAGE N/A N/A cls ResourceContainer fields query_fields N/A N/A RESPONSE_MESSAGE kwargs N/A N/A N/A TypeError Received a response message class on a method intended for queries. This is explicitly not allowed. Only collection_fields can be specified. N/A N/A kwargs N/A RESPONSE_MESSAGE N/A N/A cls ProtoCollection collection_fields collection_fields N/A N/A HTTP_METHOD kwargs N/A N/A N/A N/A kwargs N/A HTTP_METHOD QUERY_HTTP_METHOD N/A N/A N/A TypeError N/A Query requests must use the HTTP GET methods. Received %s. N/A N/A kwargs N/A HTTP_METHOD N/A N/A kwargs N/A HTTP_METHOD QUERY_HTTP_METHOD N/A apiserving_method_decorator N/A N/A endpoints method kwargs RequestToQueryDecorator N/A N/A api_method N/A N/A N/A A decorator that uses the metadata passed to the enclosing method.

      Args:
        api_method: A method to be decorated. Expected signature is two
            positional arguments, an instance object of an API service and a
            variable containing a deserialized API request object, required here
            to be an NDB query object with kind set to the current
            EndpointsModel class.

      Returns:
        A decorated method that uses the metadata of the enclosing method to
            verify the service instance, convert the arguments to ones that can
            be consumed by the decorated method and serialize the method output
            back to a ProtoRPC (collection) message.
       QueryFromRequestMethod N/A N/A service_instance request N/A N/A N/A Stub method to be decorated.

        After creation, will be passed to the standard endpoints.method
        decorator to preserve the necessary method attributes needed for
        endpoints API methods.

        Args:
          service_instance: A ProtoRPC remove service instance.
          request: A ProtoRPC message.

        Returns:
          A ProtoRPC (collection) message, serialized after being returned from
              an NDB query and containing the cursor if there are more results
              and a cursor was returned.

        Raises:
          endpoints.UnauthorizedException: if the user required boolean from
             the metadata is True and if there is no current endpoints user.
          endpoints.ForbiddenException: if the limit passed in through the
             request exceeds the maximum allowed.
         N/A N/A user_required N/A N/A N/A endpoints get_current_user None N/A N/A N/A N/A endpoints UnauthorizedException Invalid token. N/A request_entity N/A N/A cls FromMessage request N/A query_info N/A request_entity _endpoints_query_info N/A N/A N/A query_info SetQuery N/A query N/A api_method service_instance N/A query_info query N/A request_limit N/A N/A query_info limit limit_default N/A N/A request_limit limit_max N/A N/A N/A N/A endpoints ForbiddenException N/A QUERY_MAX_EXCEEDED_TEMPLATE N/A request_limit limit_max N/A query_options N/A start_cursor N/A query_info cursor N/A use_projection N/A N/A projection N/A value N/A value collection_fields N/A value N/A cls _properties N/A N/A query_options N/A projection projection N/A N/A items next_cursor more_results N/A N/A query fetch_page request_limit query_options N/A N/A more_results N/A N/A next_cursor None N/A N/A N/A cls ToMessageCollection items collection_fields collection_fields next_cursor next_cursor N/A N/A N/A functools wraps api_method N/A N/A apiserving_method_decorator QueryFromRequestMethod N/A N/A RequestToQueryDecorator N/A classmethod N/A N/A utils positional 1 N/A N/A BASE_MODEL_CLASS EndpointsModel