Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Dict AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Call NameLoad ListLoad Str Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return BinOpMod Str NameLoad If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad NameLoad body Return BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return BinOpMod Str NameLoad Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return CompareIs Call NameLoad NameLoad Str NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Raise Call NameLoad NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad GeneratorExp CompareLt Call NameLoad NameLoad Num comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Return Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad NameLoad body Return Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Return Str If UnaryOpNot Call NameLoad NameLoad body Return Str If CompareNotIn Call AttributeLoad NameLoad attr NameLoad body Return BinOpMod Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return TupleLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd CompareEq Call NameLoad NameLoad Num Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Assign NameStore TupleLoad NameLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Expr Yield NameLoad orelse Expr Yield Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Return NameLoad orelse If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr kwarg body Expr Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr kwarg body Expr Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq NameLoad Num body Assign NameStore Str orelse Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr If CompareIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr Str Return Str handlers ExceptHandler type NameLoad body Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Call NameLoad Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Str keyword Call NameLoad Call AttributeLoad NameLoad attr If CompareEq Call NameLoad NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str If UnaryOpNot NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr GeneratorExp Call AttributeLoad NameLoad attr BoolOpOr NameLoad Str Str comprehension TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad If CompareEq Call NameLoad NameLoad Num body Return Call NameLoad SubscriptLoad NameLoad Index Num orelse Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body TryExcept body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults vararg kwarg body If CompareGt Call NameLoad NameLoad NameLoad body Assign NameStore Str If CompareNotEq NameLoad Num body Assign NameStore Str Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Call NameLoad Num FunctionDef arguments args NameParam NameParam defaults body Assign NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If UnaryOpNot Call NameLoad NameLoad Str body Return NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Assign NameStore BinOpAdd NameLoad TupleLoad NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Assign NameStore NameLoad orelse Return NameLoad Return CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad Call NameLoad Call NameLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareIn NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr CompareNotIn Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str Str body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Raise Call NameLoad BinOpMod Str NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareNotEq Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Str body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Raise Call NameLoad BinOpMod Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return BoolOpAnd CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpMod Str Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpMod Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignAdd NameStore BinOpMod Str AttributeLoad NameLoad attr Return BinOpAdd NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad ListLoad Str Str Str Str Str Str Assign NameStore Call NameLoad ListLoad Str Str Expr Call AttributeLoad NameLoad attr TupleLoad Str Str Str FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str If NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad 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 kwarg body Expr Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Assign NameStore NameLoad TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Assign NameStore NameLoad TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Assign NameStore NameLoad If Call NameLoad NameLoad Str body For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr If Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Str If Call NameLoad NameLoad Str body Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If Call NameLoad NameLoad Str body Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad If Call NameLoad NameLoad Str body For NameStore Call NameLoad AttributeLoad NameLoad attr body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Call NameLoad Str AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareIn AttributeLoad NameLoad attr NameLoad body Raise Call SubscriptLoad NameLoad Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot BoolOpOr Call NameLoad AttributeLoad NameLoad attr NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr Str body If CompareIn NameLoad ListLoad Str Str body Expr Call NameLoad NameLoad NameLoad If BoolOpAnd UnaryOpNot NameLoad UnaryOpNot CompareIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str NameLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str NameLoad If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body If CompareEq Call AttributeLoad NameLoad attr Str body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Str keyword Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad BoolOpOr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad keyword SubscriptLoad NameLoad Index Str orelse Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr ListLoad NameLoad orelse If Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Assign AttributeStore NameLoad attr ListLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str keyword Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If BoolOpOr UnaryOpNot NameLoad CompareEq NameLoad Str CompareEq NameLoad Str body TryExcept body Expr Yield TupleLoad Str AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass If BoolOpOr UnaryOpNot NameLoad CompareEq NameLoad Str CompareEq NameLoad Str body TryExcept body Expr Yield TupleLoad Str AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Call NameLoad BinOpBitOr AttributeLoad NameLoad attr Call NameLoad TupleLoad Str FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd UnaryOpNot Call NameLoad NameLoad Str UnaryOpNot Call NameLoad NameLoad Str UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr For TupleStore NameStore NameStore TupleLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr body If Call NameLoad NameLoad NameLoad body For NameStore Call NameLoad Call NameLoad NameLoad NameLoad body Expr Call NameLoad Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad Call NameLoad NameLoad Str Dict attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIn NameLoad ListLoad Str Str Str body If Call NameLoad NameLoad NameLoad body If BoolOpAnd CompareEq NameLoad Str Call NameLoad NameLoad Str NameLoad body Return Expr Call NameLoad NameLoad NameLoad orelse For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Expr Call NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Call NameLoad TupleLoad Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Assign NameStore Call NameLoad BinOpBitOr BinOpBitOr AttributeLoad NameLoad attr Call NameLoad TupleLoad Str Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore SubscriptLoad NameLoad Index NameLoad If NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If BoolOpOr BoolOpAnd CompareEq NameLoad Str UnaryOpNot Call NameLoad NameLoad Str BoolOpAnd CompareEq NameLoad Str UnaryOpNot Call NameLoad NameLoad Str body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad orelse TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore AttributeStore NameLoad attr ListLoad TupleLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad For TupleStore NameStore NameStore NameLoad body Expr Yield TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad BoolOpAnd NameLoad CompareLt Call AttributeLoad NameLoad attr Str Num TryExcept body For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If NameLoad body If NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num orelse Assign NameStore NameLoad Assign NameStore CompareEq NameLoad NameLoad orelse Assign NameStore NameLoad If NameLoad body Expr Yield TupleLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass Return NameLoad decorator_list decorator_list Expr AttributeLoad NameLoad attr
N/A N/A Sends email on behalf of application.

Provides functions for application developers to provide email services
for their applications.  Also provides a few utility methods.
 N/A email email MIMEBase email MIMEMultipart email MIMEText email Parser N/A email.header N/A logging google.appengine.api api_base_pb google.appengine.api apiproxy_stub_map google.appengine.api mail_service_pb google.appengine.api users google.appengine.api.mail_errors * google.appengine.runtime apiproxy_errors N/A ERROR_MAP N/A N/A N/A mail_service_pb MailServiceError BAD_REQUEST N/A N/A mail_service_pb MailServiceError UNAUTHORIZED_SENDER N/A N/A mail_service_pb MailServiceError INVALID_ATTACHMENT_TYPE N/A N/A mail_service_pb MailServiceError INVALID_HEADER_NAME BadRequestError InvalidSenderError InvalidAttachmentTypeError InvalidHeaderNameError N/A EXTENSION_MIME_MAP N/A aif aifc aiff asc au avi bmp css csv doc docx diff flac gif gzip htm html ics jpe jpeg jpg kml kmz m4a mid mov mp3 mp4 mpe mpeg mpg odp ods odt oga ogg ogv pdf png pot pps ppt pptx qt rmi rss snd sxc sxw text tif tiff txt vcf wav wbmp webm webp xls xlsx zip audio/x-aiff audio/x-aiff audio/x-aiff text/plain audio/basic video/x-msvideo image/x-ms-bmp text/css text/csv application/msword application/msword text/plain audio/flac image/gif application/x-gzip text/html text/html text/calendar image/jpeg image/jpeg image/jpeg application/vnd.google-earth.kml+xml application/vnd.google-earth.kmz audio/mp4 audio/mid video/quicktime audio/mpeg video/mp4 video/mpeg video/mpeg video/mpeg application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg audio/ogg video/ogg application/pdf image/png text/plain application/vnd.ms-powerpoint application/vnd.ms-powerpoint application/vnd.ms-powerpoint video/quicktime audio/mid text/rss+xml audio/basic application/vnd.sun.xml.calc application/vnd.sun.xml.writer text/plain image/tiff image/tiff text/plain text/directory audio/x-wav image/vnd.wap.wbmp video/webm image/webp application/vnd.ms-excel application/vnd.ms-excel application/zip N/A EXTENSION_BLACKLIST N/A ade adp bat chm cmd com cpl exe hta ins isp jse lib mde msc msp mst pif scr sct shb sys vb vbe vbs vxd wsc wsf wsh N/A HEADER_WHITELIST N/A frozenset N/A Auto-Submitted In-Reply-To List-Id List-Unsubscribe On-Behalf-Of References Resent-Date Resent-From Resent-To invalid_email_reason N/A N/A email_address field N/A N/A N/A Determine reason why email is invalid.

  Args:
    email_address: Email to check.
    field: Field that is invalid.

  Returns:
    String indicating invalid email reason if there is one,
    else None.
   N/A N/A email_address None N/A N/A N/A None email address for %s. field N/A N/A isinstance email_address N/A users User N/A N/A email_address N/A N/A email_address email N/A N/A N/A isinstance email_address basestring N/A N/A N/A Invalid email address type for %s. field N/A stripped_address N/A N/A email_address strip N/A N/A stripped_address N/A N/A N/A Empty email address for %s. field N/A None N/A N/A InvalidEmailReason invalid_email_reason is_email_valid N/A N/A email_address N/A N/A N/A Determine if email is invalid.

  Args:
    email_address: Email to check.

  Returns:
    True if email is valid, else False.
   N/A N/A N/A invalid_email_reason email_address None N/A N/A IsEmailValid is_email_valid check_email_valid N/A N/A email_address field N/A N/A N/A Check that email is valid.

  Args:
    email_address: Email to check.
    field: Field to check.

  Raises:
    InvalidEmailError if email_address is invalid.
   N/A reason N/A invalid_email_reason email_address field N/A N/A reason None N/A N/A N/A InvalidEmailError reason N/A N/A CheckEmailValid check_email_valid is_ascii N/A N/A string N/A N/A N/A Return whether a string is in ascii. N/A N/A all N/A N/A N/A ord c 128 N/A c string N/A invalid_headers_reason N/A N/A headers N/A N/A N/A Determine reason why headers is invalid.

  Args:
    headers: headers value to check.

  Returns:
    String indicating invalid headers reason if there is one,
    else None.
   N/A N/A headers None N/A N/A Headers dictionary was None. N/A N/A N/A isinstance headers dict N/A N/A Invalid type for headers. Should be a dictionary. N/A N/A k v N/A N/A headers iteritems N/A N/A N/A N/A isinstance k basestring N/A N/A Header names should be strings. N/A N/A N/A isinstance v basestring N/A N/A Header values should be strings. N/A N/A N/A is_ascii k N/A N/A Header name should be an ASCII string. N/A N/A N/A N/A k strip HEADER_WHITELIST N/A N/A N/A Header "%s" is not allowed. N/A N/A k strip N/A check_headers_valid N/A N/A headers N/A N/A N/A Check that headers is a valid dictionary for headers.

  Args:
    headers: the value to check for the headers.

  Raises:
    InvalidEmailError if headers is invalid.
   N/A reason N/A invalid_headers_reason headers N/A N/A reason None N/A N/A N/A InvalidEmailError reason N/A _email_sequence N/A N/A emails N/A N/A N/A Forces email to be sequenceable type.

  Iterable values are returned as is.  This function really just wraps the case
  where there is a single email string.

  Args:
    emails: Emails (or email) to coerce to sequence.

  Returns:
    Single tuple with email in it if only one email string provided,
    else returns emails as is.
   N/A N/A isinstance emails basestring N/A N/A N/A emails N/A emails N/A _attachment_sequence N/A N/A attachments N/A N/A N/A Forces attachments to be sequenceable type.

  Iterable values are returned as is.  This function really just wraps the case
  where there is a single attachment.

  Args:
    attachments: Attachments (or attachment) to coerce to sequence.

  Returns:
    Single tuple with attachment tuple in it if only one attachment provided,
    else returns attachments as is.
   N/A N/A N/A N/A len attachments 2 N/A isinstance N/A attachments N/A 0 basestring N/A N/A attachments N/A attachments N/A attachment attachments N/A N/A N/A isinstance attachment Attachment N/A N/A N/A attachment N/A N/A N/A N/A Attachment attachment N/A _parse_mime_message N/A N/A mime_message N/A N/A N/A Helper function converts a mime_message in to email.Message.Message.

  Args:
    mime_message: MIME Message, string or file containing mime message.

  Returns:
    Instance of email.Message.Message.  Will return mime_message if already
    an instance.
   N/A N/A isinstance mime_message N/A N/A email Message Message N/A N/A mime_message N/A N/A N/A isinstance mime_message basestring N/A N/A N/A N/A email message_from_string mime_message N/A N/A N/A N/A email message_from_file mime_message N/A send_mail N/A N/A sender to subject body make_sync_call N/A N/A apiproxy_stub_map MakeSyncCall kw N/A N/A Sends mail on behalf of application.

  Args:
    sender: Sender email address as appears in the 'from' email line.
    to: List of 'to' addresses or a single address.
    subject: Message subject string.
    body: Body of type text/plain.
    make_sync_call: Function used to make sync call to API proxy.
    kw: Keyword arguments compatible with EmailMessage keyword based
      constructor.

  Raises:
    InvalidEmailError when invalid email address provided.
   N/A N/A kw N/A sender sender N/A N/A kw N/A to to N/A N/A kw N/A subject subject N/A N/A kw N/A body body N/A message N/A EmailMessage kw N/A N/A N/A message send make_sync_call make_sync_call N/A N/A SendMail send_mail send_mail_to_admins N/A N/A sender subject body make_sync_call N/A N/A apiproxy_stub_map MakeSyncCall kw N/A N/A Sends mail to admins on behalf of application.

  Args:
    sender: Sender email address as appears in the 'from' email line.
    subject: Message subject string.
    body: Body of type text/plain.
    make_sync_call: Function used to make sync call to API proxy.
    kw: Keyword arguments compatible with EmailMessage keyword based
      constructor.

  Raises:
    InvalidEmailError when invalid email address provided.
   N/A N/A kw N/A sender sender N/A N/A kw N/A subject subject N/A N/A kw N/A body body N/A message N/A AdminEmailMessage kw N/A N/A N/A message send make_sync_call make_sync_call N/A N/A SendMailToAdmins send_mail_to_admins _GetMimeType N/A N/A file_name N/A N/A N/A Determine mime-type from file name.

  Parses file name and determines mime-type based on extension map.

  This method is not part of the public API and should not be used by
  applications.

  Args:
    file_name: File to determine extension for.

  Returns:
    Mime-type associated with file extension.

  Raises:
    InvalidAttachmentTypeError when the file name of an attachment.
   N/A extension_index N/A N/A file_name rfind . N/A N/A extension_index -1 N/A N/A extension N/A N/A extension N/A N/A N/A file_name N/A N/A extension_index 1 lower N/A N/A extension EXTENSION_BLACKLIST N/A N/A N/A InvalidAttachmentTypeError N/A Extension %s is not supported. extension N/A mime_type N/A N/A EXTENSION_MIME_MAP get extension None N/A N/A mime_type None N/A N/A mime_type application/octet-stream N/A mime_type N/A _GuessCharset N/A N/A text N/A N/A N/A Guess the charset of a text.

  Args:
    text: a string (str) that is either a us-ascii string or a unicode that was
        encoded in utf-8.
  Returns:
    Charset needed by the string, either 'us-ascii' or 'utf-8'.
   N/A N/A N/A N/A N/A text decode us-ascii N/A us-ascii N/A N/A N/A UnicodeDecodeError N/A N/A utf-8 N/A _I18nHeader N/A N/A text N/A N/A N/A Creates a header properly encoded even with unicode content.

  Args:
    text: a string (str) that is either a us-ascii string or a unicode that was
        encoded in utf-8.
  Returns:
    email.header.Header
   N/A charset N/A _GuessCharset text N/A N/A N/A N/A email header Header text charset maxlinelen inf N/A mail_message_to_mime_message N/A N/A protocol_message N/A N/A N/A Generate a MIMEMultitype message from protocol buffer.

  Generates a complete MIME multi-part email object from a MailMessage
  protocol buffer.  The body fields are sent as individual alternatives
  if they are both present, otherwise, only one body part is sent.

  Multiple entry email fields such as 'To', 'Cc' and 'Bcc' are converted
  to a list of comma separated email addresses.

  Args:
    protocol_message: Message PB to convert to MIMEMultitype.

  Returns:
    MIMEMultitype representing the provided MailMessage.

  Raises:
    InvalidAttachmentTypeError when the file name of an attachment
   N/A parts N/A N/A N/A N/A protocol_message has_textbody N/A N/A N/A N/A parts append N/A N/A MIMEText MIMEText N/A N/A protocol_message textbody _charset N/A _GuessCharset N/A N/A protocol_message textbody N/A N/A N/A protocol_message has_htmlbody N/A N/A N/A N/A parts append N/A N/A MIMEText MIMEText N/A N/A protocol_message htmlbody _subtype html _charset N/A _GuessCharset N/A N/A protocol_message htmlbody N/A N/A N/A len parts 1 N/A N/A payload parts N/A N/A payload N/A N/A N/A MIMEMultipart MIMEMultipart alternative _subparts parts N/A result N/A N/A MIMEMultipart MIMEMultipart _subparts payload N/A attachment N/A N/A protocol_message attachment_list N/A N/A file_name N/A N/A attachment filename N/A mime_type N/A _GetMimeType file_name N/A N/A maintype subtype N/A N/A mime_type split / N/A mime_attachment N/A N/A MIMEBase MIMEBase maintype subtype N/A N/A N/A mime_attachment add_header Content-Disposition attachment filename N/A N/A attachment filename N/A N/A N/A mime_attachment set_payload N/A N/A attachment data N/A N/A N/A attachment has_contentid N/A N/A N/A mime_attachment N/A content-id N/A N/A attachment contentid N/A N/A N/A result attach mime_attachment N/A N/A N/A protocol_message to_size N/A N/A N/A result N/A To N/A _I18nHeader N/A N/A ,  join N/A N/A protocol_message to_list N/A N/A N/A protocol_message cc_size N/A N/A N/A result N/A Cc N/A _I18nHeader N/A N/A ,  join N/A N/A protocol_message cc_list N/A N/A N/A protocol_message bcc_size N/A N/A N/A result N/A Bcc N/A _I18nHeader N/A N/A ,  join N/A N/A protocol_message bcc_list N/A N/A result N/A From N/A _I18nHeader N/A N/A protocol_message sender N/A N/A result N/A Reply-To N/A _I18nHeader N/A N/A protocol_message replyto N/A N/A result N/A Subject N/A _I18nHeader N/A N/A protocol_message subject N/A header N/A N/A protocol_message header_list N/A N/A N/A result N/A N/A N/A header name N/A _I18nHeader N/A N/A header value N/A result N/A N/A MailMessageToMIMEMessage mail_message_to_mime_message _to_str N/A N/A value N/A N/A N/A Helper function to make sure unicode values converted to utf-8.

  Args:
    value: str or unicode to convert to utf-8.

  Returns:
    UTF-8 encoded str of value, otherwise value unchanged.
   N/A N/A isinstance value unicode N/A N/A N/A N/A value encode utf-8 N/A value N/A _decode_and_join_header N/A N/A header separator N/A N/A N/A Helper function to decode RFC2047 encoded headers.

  Args:
    header: RFC2047 encoded str (or just a plain old str) to convert to unicode.
    separator: The separator to use when joining separately encoded pieces of
        the header.

  Returns:
    unicode of decoded header or just header if it was None or ''.
   N/A N/A header N/A N/A header N/A N/A N/A separator join N/A N/A N/A s decode N/A charset us-ascii replace N/A N/A s charset N/A N/A N/A email header decode_header header N/A _decode_address_list_field N/A N/A address_list N/A N/A N/A Helper function to decode (potentially RFC2047 encoded) address lists.

  Args:
    address_list: a single str header, or list of str headers.

  Returns:
    unicode of decoded header or list of str headers.
   N/A N/A address_list N/A N/A None N/A N/A N/A len address_list 1 N/A N/A N/A _decode_and_join_header N/A address_list N/A 0 N/A N/A N/A map _decode_and_join_header address_list N/A wrapping N/A N/A wrapped N/A N/A wrapping_wrapper N/A N/A wrapper N/A N/A N/A N/A N/A N/A wrapper __wrapped__ wrapped N/A N/A wrapper __name__ N/A wrapped __name__ N/A N/A wrapper __doc__ N/A wrapped __doc__ N/A N/A N/A N/A wrapper __dict__ update N/A wrapped __dict__ N/A N/A N/A Exception N/A N/A N/A wrapper N/A N/A wrapping_wrapper N/A _positional N/A N/A max_pos_args N/A N/A N/A A decorator to declare that only the first N arguments may be positional.

  Note that for methods, n includes 'self'.
   positional_decorator N/A N/A wrapped N/A N/A positional_wrapper N/A N/A N/A args kwds N/A N/A N/A N/A len args max_pos_args N/A N/A plural_s N/A N/A max_pos_args 1 N/A N/A plural_s s N/A N/A TypeError N/A %s() takes at most %d positional argument%s (%d given) N/A N/A wrapped __name__ max_pos_args plural_s N/A len args N/A N/A wrapped args kwds N/A N/A wrapping wrapped N/A positional_wrapper N/A N/A positional_decorator N/A Attachment N/A object N/A N/A Attachment object.

  An Attachment object is largely interchangeable with a (filename, payload)
  tuple.

  Note that the behavior is a bit asymmetric with respect to unpacking and
  equality comparison. An Attachment object without a content ID will be
  equivalent to a (filename, payload) tuple. An Attachment with a content ID
  will unpack to a (filename, payload) tuple, but will compare unequally to
  that tuple.

  Thus, the following comparison will succeed:

      attachment = mail.Attachment('foo.jpg', 'data')
      filename, payload = attachment
      attachment == filename, payload

  ...while the following will fail:

      attachment = mail.Attachment('foo.jpg', 'data', content_id='<foo>')
      filename, payload = attachment
      attachment == filename, payload

   The following comparison will pass though:

      attachment = mail.Attachment('foo.jpg', 'data', content_id='<foo>')
      attachment == (attachment.filename,
                     attachment.payload,
                     attachment.content_id)

  Attributes:
    filename: The name of the attachment.
    payload: The attachment data.
    content_id: Optional. The content-id for this attachment. Keyword-only.
   __init__ N/A N/A self filename payload content_id N/A None N/A N/A Constructor.

    Arguments:
      filename: The name of the attachment
      payload: The attachment data.
      content_id: Optional. The content-id for this attachment.
     N/A N/A self filename filename N/A N/A self payload payload N/A N/A self content_id content_id N/A N/A _positional 3 __eq__ N/A N/A self other N/A N/A N/A self_tuple N/A N/A self filename N/A self payload N/A self content_id N/A N/A isinstance other Attachment N/A N/A other_tuple N/A N/A other filename N/A other payload N/A other content_id N/A N/A N/A N/A hasattr other __len__ N/A N/A NotImplemented N/A N/A N/A N/A len other 2 N/A N/A other_tuple N/A other N/A None N/A N/A N/A N/A len other 3 N/A N/A other_tuple other N/A N/A NotImplemented N/A N/A self_tuple other_tuple N/A __hash__ N/A N/A self N/A N/A N/A N/A self content_id N/A N/A N/A hash N/A N/A self filename N/A self payload N/A self content_id N/A N/A N/A hash N/A N/A self filename N/A self payload N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A self other N/A __iter__ N/A N/A self N/A N/A N/A N/A iter N/A N/A self filename N/A self payload N/A __getitem__ N/A N/A self i N/A N/A N/A N/A N/A tuple N/A iter self N/A i N/A __contains__ N/A N/A self val N/A N/A N/A N/A val N/A N/A self filename N/A self payload N/A __len__ N/A N/A self N/A N/A N/A 2 N/A N/A EncodedPayload N/A object N/A N/A Wrapper for a payload that contains encoding information.

  When an email is received, it is usually encoded using a certain
  character set, and then possibly further encoded using a transfer
  encoding in that character set.  Most of the times, it is possible
  to decode the encoded payload as is, however, in the case where it
  is not, the encoded payload and the original encoding information
  must be preserved.

  Attributes:
    payload: The original encoded payload.
    charset: The character set of the encoded payload.  None means use
      default character set.
    encoding: The transfer encoding of the encoded payload.  None means
      content not encoded.
   __init__ N/A N/A self payload charset encoding N/A None None N/A N/A Constructor.

    Args:
      payload: Maps to attribute of the same name.
      charset: Maps to attribute of the same name.
      encoding: Maps to attribute of the same name.
     N/A N/A self payload payload N/A N/A self charset charset N/A N/A self encoding encoding N/A decode N/A N/A self N/A N/A N/A Attempt to decode the encoded data.

    Attempt to use pythons codec library to decode the payload.  All
    exceptions are passed back to the caller.

    Returns:
      Binary or unicode version of payload content.
     N/A payload N/A self payload N/A N/A N/A self encoding N/A N/A N/A N/A self encoding lower N/A 7bit 8bit N/A N/A N/A N/A payload N/A N/A payload decode N/A self encoding N/A N/A N/A LookupError N/A N/A N/A UnknownEncodingError N/A Unknown decoding %s. N/A self encoding N/A N/A N/A Exception Error N/A e N/A N/A N/A PayloadEncodingError N/A Could not decode payload: %s e N/A N/A N/A self charset N/A N/A N/A N/A str N/A self charset lower 7bit N/A N/A N/A N/A payload N/A N/A payload decode N/A str N/A self charset N/A N/A N/A LookupError N/A N/A N/A UnknownCharsetError N/A Unknown charset %s. N/A self charset N/A N/A N/A Exception Error N/A e N/A N/A N/A PayloadEncodingError N/A Could read characters: %s e N/A payload N/A __eq__ N/A N/A self other N/A N/A N/A Equality operator.

    Args:
      other: The other EncodedPayload object to compare with.  Comparison
        with other object types are not implemented.

    Returns:
      True of payload and encodings are equal, else false.
     N/A N/A isinstance other EncodedPayload N/A N/A N/A N/A N/A self payload N/A other payload N/A N/A self charset N/A other charset N/A N/A self encoding N/A other encoding N/A N/A NotImplemented N/A __hash__ N/A N/A self N/A N/A N/A Hash an EncodedPayload. N/A N/A hash N/A N/A self payload N/A self charset N/A self encoding N/A copy_to N/A N/A self mime_message N/A N/A N/A Copy contents to MIME message payload.

    If no content transfer encoding is specified, and the character set does
    not equal the over-all message encoding, the payload will be base64
    encoded.

    Args:
      mime_message: Message instance to receive new payload.
     N/A N/A self encoding N/A N/A N/A mime_message N/A content-transfer-encoding N/A self encoding N/A N/A N/A mime_message set_payload N/A self payload N/A self charset N/A to_mime_message N/A N/A self N/A N/A N/A Convert to MIME message.

    Returns:
      MIME message instance of payload.
     N/A mime_message N/A N/A N/A email Message Message N/A N/A N/A self copy_to mime_message N/A mime_message N/A __str__ N/A N/A self N/A N/A N/A String representation of encoded message.

    Returns:
      MIME encoded representation of encoded payload as an independent message.
     N/A N/A str N/A N/A self to_mime_message N/A __repr__ N/A N/A self N/A N/A N/A Basic representation of encoded payload.

    Returns:
      Payload itself is represented by its hash value.
     N/A result N/A <EncodedPayload payload=#%d N/A hash N/A self payload N/A N/A self charset N/A N/A result N/A  charset=%s N/A self charset N/A N/A self encoding N/A N/A result N/A  encoding=%s N/A self encoding N/A N/A result > N/A N/A _EmailMessageBase N/A object N/A N/A Base class for email API service objects.

  Subclasses must define a class variable called _API_CALL with the name
  of its underlying mail sending API call.
   N/A PROPERTIES N/A set N/A sender reply_to subject body html attachments N/A ALLOWED_EMPTY_PROPERTIES N/A set N/A subject body N/A N/A N/A PROPERTIES update N/A to cc bcc __init__ N/A N/A self mime_message N/A None kw N/A N/A Initialize Email message.

    Creates new MailMessage protocol buffer and initializes it with any
    keyword arguments.

    Args:
      mime_message: MIME message to initialize from.  If instance of
        email.Message.Message will take ownership as original message.
      kw: List of keyword properties as defined by PROPERTIES.
     N/A mime_message N/A N/A mime_message N/A _parse_mime_message mime_message N/A N/A N/A self update_from_mime_message mime_message N/A N/A self __original mime_message N/A N/A N/A self initialize kw N/A original N/A N/A self N/A N/A N/A Get original MIME message from which values were set. N/A N/A self __original N/A property initialize N/A N/A self N/A kw N/A N/A Keyword initialization.

    Used to set all fields of the email message using keyword arguments.

    Args:
      kw: List of keyword properties as defined by PROPERTIES.
     N/A N/A name value N/A N/A kw iteritems N/A N/A N/A setattr self name value N/A Initialize N/A N/A self N/A kw N/A N/A N/A N/A self initialize kw N/A check_initialized N/A N/A self N/A N/A N/A Check if EmailMessage is properly initialized.

    Test used to determine if EmailMessage meets basic requirements
    for being used with the mail API.  This means that the following
    fields must be set or have at least one value in the case of
    multi value fields:

      - Subject must be set.
      - A recipient must be specified.
      - Must contain a body.
      - All bodies and attachments must decode properly.

    This check does not include determining if the sender is actually
    authorized to send email for the application.

    Raises:
      Appropriate exception for initialization failure.

        InvalidAttachmentTypeError: Use of incorrect attachment type.
        MissingRecipientsError:     No recipients specified in to, cc or bcc.
        MissingSenderError:         No sender specified.
        MissingSubjectError:        Subject is not specified.
        MissingBodyError:           No body specified.
        PayloadEncodingError:       Payload is not properly encoded.
        UnknownEncodingError:       Payload has unknown encoding.
        UnknownCharsetError:        Payload has unknown character set.
     N/A N/A N/A hasattr self sender N/A N/A N/A MissingSenderError N/A found_body False N/A N/A N/A body N/A self body N/A N/A N/A AttributeError N/A N/A N/A N/A N/A isinstance body EncodedPayload N/A N/A N/A N/A body decode N/A found_body True N/A N/A N/A html N/A self html N/A N/A N/A AttributeError N/A N/A N/A N/A N/A isinstance html EncodedPayload N/A N/A N/A N/A html decode N/A found_body True N/A N/A hasattr self attachments N/A N/A attachment N/A _attachment_sequence N/A self attachments N/A N/A N/A _GetMimeType N/A attachment filename N/A N/A isinstance N/A attachment payload EncodedPayload N/A N/A N/A N/A N/A attachment payload decode N/A CheckInitialized N/A N/A self N/A N/A N/A N/A N/A self check_initialized N/A is_initialized N/A N/A self N/A N/A N/A Determine if EmailMessage is properly initialized.

    Returns:
      True if message is properly initializes, otherwise False.
     N/A N/A N/A N/A N/A self check_initialized N/A True N/A N/A N/A Error N/A N/A False N/A IsInitialized N/A N/A self N/A N/A N/A N/A N/A self is_initialized N/A ToProto N/A N/A self N/A N/A N/A Convert mail message to protocol message.

    Unicode strings are converted to UTF-8 for all fields.

    This method is overriden by EmailMessage to support the sender fields.

    Returns:
      MailMessage protocol version of mail message.

    Raises:
      Passes through decoding errors that occur when using when decoding
      EncodedPayload objects.
     N/A N/A N/A self check_initialized N/A message N/A N/A mail_service_pb MailMessage N/A N/A N/A message set_sender N/A _to_str N/A self sender N/A N/A hasattr self reply_to N/A N/A N/A N/A message set_replyto N/A _to_str N/A self reply_to N/A N/A hasattr self subject N/A N/A N/A N/A message set_subject N/A _to_str N/A self subject N/A N/A N/A N/A message set_subject N/A N/A hasattr self body N/A N/A body N/A self body N/A N/A isinstance body EncodedPayload N/A N/A body N/A N/A body decode N/A N/A N/A message set_textbody N/A _to_str body N/A N/A hasattr self html N/A N/A html N/A self html N/A N/A isinstance html EncodedPayload N/A N/A html N/A N/A html decode N/A N/A N/A message set_htmlbody N/A _to_str html N/A N/A hasattr self attachments N/A N/A attachment N/A _attachment_sequence N/A self attachments N/A N/A N/A isinstance N/A attachment payload EncodedPayload N/A N/A N/A attachment payload N/A N/A N/A attachment payload decode N/A protoattachment N/A N/A message add_attachment N/A N/A N/A protoattachment set_filename N/A _to_str N/A attachment filename N/A N/A N/A protoattachment set_data N/A _to_str N/A attachment payload N/A N/A attachment content_id N/A N/A N/A N/A protoattachment set_contentid N/A attachment content_id N/A message N/A to_mime_message N/A N/A self N/A N/A N/A Generate a MIMEMultitype message from EmailMessage.

    Calls MailMessageToMessage after converting self to protocol
    buffer.  Protocol buffer is better at handing corner cases
    than EmailMessage class.

    Returns:
      MIMEMultitype representing the provided MailMessage.

    Raises:
      Appropriate exception for initialization failure.

      InvalidAttachmentTypeError: Use of incorrect attachment type.
      MissingSenderError:         No sender specified.
      MissingSubjectError:        Subject is not specified.
      MissingBodyError:           No body specified.
     N/A N/A mail_message_to_mime_message N/A N/A self ToProto N/A ToMIMEMessage N/A N/A self N/A N/A N/A N/A N/A self to_mime_message N/A send N/A N/A self make_sync_call N/A N/A apiproxy_stub_map MakeSyncCall N/A N/A Send email message.

    Send properly initialized email message via email API.

    Args:
      make_sync_call: Method which will make synchronous call to api proxy.

    Raises:
      Errors defined in this file above.
     N/A message N/A N/A self ToProto N/A response N/A N/A api_base_pb VoidProto N/A N/A N/A N/A make_sync_call mail N/A self _API_CALL message response N/A N/A N/A N/A apiproxy_errors ApplicationError N/A e N/A N/A N/A N/A e application_error ERROR_MAP N/A N/A N/A N/A ERROR_MAP N/A N/A e application_error N/A e error_detail N/A e N/A Send N/A N/A self N/A args kwds N/A N/A N/A N/A self send args kwds N/A _check_attachment N/A N/A self attachment N/A N/A N/A N/A N/A N/A isinstance N/A attachment filename basestring N/A isinstance N/A attachment payload basestring N/A N/A N/A TypeError N/A _check_attachments N/A N/A self attachments N/A N/A N/A Checks values going to attachment field.

    Mainly used to check type safety of the values.  Each value of the list
    must be a pair of the form (file_name, data), and both values a string
    type.

    Args:
      attachments: Collection of attachment tuples.

    Raises:
      TypeError if values are not string type.
     N/A attachments N/A _attachment_sequence attachments N/A attachment attachments N/A N/A N/A N/A self _check_attachment attachment N/A __setattr__ N/A N/A self attr value N/A N/A N/A Property setting access control.

    Controls write access to email fields.

    Args:
      attr: Attribute to access.
      value: New value for field.

    Raises:
      ValueError: If provided with an empty field.
      AttributeError: If not an allowed assignment field.
     N/A N/A N/A N/A attr startswith _EmailMessageBase N/A N/A N/A attr N/A sender reply_to N/A N/A N/A check_email_valid value attr N/A N/A N/A value N/A N/A attr N/A self ALLOWED_EMPTY_PROPERTIES N/A N/A N/A ValueError N/A May not set empty value for '%s' attr N/A N/A attr N/A self PROPERTIES N/A N/A N/A AttributeError N/A 'EmailMessage' has no attribute '%s' attr N/A N/A attr attachments N/A N/A N/A N/A self _check_attachments value N/A N/A N/A N/A super _EmailMessageBase self __setattr__ attr value N/A _add_body N/A N/A self content_type payload N/A N/A N/A Add body to email from payload.

    Will overwrite any existing default plain or html body.

    Args:
      content_type: Content-type of body.
      payload: Payload to store body as.
     N/A N/A content_type text/plain N/A N/A N/A self body payload N/A N/A N/A content_type text/html N/A N/A N/A self html payload N/A _update_payload N/A N/A self mime_message N/A N/A N/A Update payload of mail message from mime_message.

    This function works recusively when it receives a multipart body.
    If it receives a non-multi mime object, it will determine whether or
    not it is an attachment by whether it has a filename or not.  Attachments
    and bodies are then wrapped in EncodedPayload with the correct charsets and
    encodings.

    Args:
      mime_message: A Message MIME email object.
     N/A payload N/A N/A mime_message get_payload N/A payload N/A N/A N/A N/A N/A mime_message get_content_maintype multipart N/A N/A alternative payload N/A N/A N/A N/A self _update_payload alternative N/A N/A filename N/A N/A mime_message get_param filename header content-disposition N/A filename N/A N/A filename N/A N/A N/A email utils collapse_rfc2231_value filename N/A N/A filename N/A N/A filename N/A N/A mime_message get_param name N/A payload N/A EncodedPayload payload N/A N/A N/A mime_message get_content_charset N/A N/A mime_message get_charset N/A mime_message N/A content-transfer-encoding N/A N/A content-id mime_message N/A N/A attachment N/A Attachment filename payload content_id N/A mime_message N/A content-id N/A N/A attachment N/A Attachment filename payload N/A filename N/A N/A N/A N/A attachments N/A self attachments N/A N/A N/A AttributeError N/A N/A N/A self attachments N/A attachment N/A N/A N/A isinstance N/A attachments N/A 0 basestring N/A N/A N/A self attachments N/A attachments N/A attachments N/A self attachments N/A N/A N/A attachments append attachment N/A N/A N/A N/A self _add_body N/A N/A mime_message get_content_type payload N/A update_from_mime_message N/A N/A self mime_message N/A N/A N/A Copy information from a mime message.

    Set information of instance to values of mime message.  This method
    will only copy values that it finds.  Any missing values will not
    be copied, nor will they overwrite old values with blank values.

    This object is not guaranteed to be initialized after this call.

    Args:
      mime_message: email.Message instance to copy information from.

    Returns:
      MIME Message instance of mime_message argument.
     N/A mime_message N/A _parse_mime_message mime_message N/A sender N/A _decode_and_join_header N/A mime_message N/A from N/A sender N/A N/A N/A self sender sender N/A reply_to N/A _decode_and_join_header N/A mime_message N/A reply-to N/A reply_to N/A N/A N/A self reply_to reply_to N/A subject N/A _decode_and_join_header N/A mime_message N/A subject separator N/A subject N/A N/A N/A self subject subject N/A N/A N/A self _update_payload mime_message N/A bodies N/A N/A self content_type N/A None N/A N/A Iterate over all bodies.

    Yields:
      Tuple (content_type, payload) for html and body in that order.
     N/A N/A N/A content_type N/A content_type text N/A content_type text/html N/A N/A N/A N/A N/A N/A text/html N/A self html N/A N/A N/A AttributeError N/A N/A N/A N/A N/A content_type N/A content_type text N/A content_type text/plain N/A N/A N/A N/A N/A N/A text/plain N/A self body N/A N/A N/A AttributeError N/A N/A N/A N/A EmailMessage N/A _EmailMessageBase N/A N/A Main interface to email API service.

  This class is used to programmatically build an email message to send via
  the Mail API.  The usage is to construct an instance, populate its fields
  and call Send().

  Example Usage:
    An EmailMessage can be built completely by the constructor.

      EmailMessage(sender='sender@nowhere.com',
                   to='recipient@nowhere.com',
                   subject='a subject',
                   body='This is an email to you').Send()

    It might be desirable for an application to build an email in different
    places throughout the code.  For this, EmailMessage is mutable.

      message = EmailMessage()
      message.sender = 'sender@nowhere.com'
      message.to = ['recipient1@nowhere.com', 'recipient2@nowhere.com']
      message.subject = 'a subject'
      message.body = 'This is an email to you')
      message.check_initialized()
      message.send()
   N/A _API_CALL Send N/A PROPERTIES N/A set N/A N/A _EmailMessageBase PROPERTIES N/A set N/A headers check_initialized N/A N/A self N/A N/A N/A Provide additional checks to ensure recipients have been specified.

    Raises:
      MissingRecipientError when no recipients specified in to, cc or bcc.
     N/A N/A N/A N/A hasattr self to N/A N/A hasattr self cc N/A N/A hasattr self bcc N/A N/A N/A MissingRecipientsError N/A N/A N/A N/A super EmailMessage self check_initialized N/A CheckInitialized N/A N/A self N/A N/A N/A N/A N/A self check_initialized N/A ToProto N/A N/A self N/A N/A N/A Does addition conversion of recipient fields to protocol buffer.

    Returns:
      MailMessage protocol version of mail message including sender fields.
     N/A message N/A N/A N/A super EmailMessage self ToProto N/A N/A attribute adder N/A N/A to N/A message add_to N/A cc N/A message add_cc N/A bcc N/A message add_bcc N/A N/A N/A hasattr self attribute N/A N/A address N/A _email_sequence N/A getattr self attribute N/A N/A N/A adder N/A _to_str address N/A N/A name value N/A N/A N/A getattr self headers N/A iteritems N/A N/A header N/A N/A message add_header N/A N/A N/A header set_name name N/A N/A N/A header set_value N/A _to_str value N/A message N/A __setattr__ N/A N/A self attr value N/A N/A N/A Provides additional checks on recipient fields. N/A N/A attr N/A to cc bcc N/A N/A N/A isinstance value basestring N/A N/A N/A N/A value N/A getattr self ALLOW_BLANK_EMAIL False N/A N/A N/A N/A check_email_valid value attr N/A N/A address value N/A N/A N/A check_email_valid address attr N/A N/A N/A attr headers N/A N/A N/A check_headers_valid value N/A N/A N/A N/A super EmailMessage self __setattr__ attr value N/A update_from_mime_message N/A N/A self mime_message N/A N/A N/A Copy information from a mime message.

    Update fields for recipients.

    Args:
      mime_message: email.Message instance to copy information from.
     N/A mime_message N/A _parse_mime_message mime_message N/A N/A N/A N/A super EmailMessage self update_from_mime_message mime_message N/A to N/A _decode_address_list_field N/A N/A mime_message get_all to N/A to N/A N/A N/A self to to N/A cc N/A _decode_address_list_field N/A N/A mime_message get_all cc N/A cc N/A N/A N/A self cc cc N/A bcc N/A _decode_address_list_field N/A N/A mime_message get_all bcc N/A bcc N/A N/A N/A self bcc bcc N/A N/A AdminEmailMessage N/A _EmailMessageBase N/A N/A Interface to sending email messages to all admins via the mail API.

  This class is used to programmatically build an admin email message to send
  via the Mail API.  The usage is to construct an instance, populate its fields
  and call Send().

  Unlike the normal email message, addresses in the recipient fields are
  ignored and not used for sending.

  Example Usage:
    An AdminEmailMessage can be built completely by the constructor.

      AdminEmailMessage(sender='sender@nowhere.com',
                        subject='a subject',
                        body='This is an email to you').Send()

    It might be desirable for an application to build an admin email in
    different places throughout the code.  For this, AdminEmailMessage is
    mutable.

      message = AdminEmailMessage()
      message.sender = 'sender@nowhere.com'
      message.subject = 'a subject'
      message.body = 'This is an email to you')
      message.check_initialized()
      message.send()
   N/A _API_CALL SendToAdmins N/A __UNUSED_PROPERTIES N/A set N/A to cc bcc __setattr__ N/A N/A self attr value N/A N/A N/A N/A attr N/A self __UNUSED_PROPERTIES N/A N/A N/A N/A logging warning '%s' is not a valid property to set for AdminEmailMessage.  It is unused. attr N/A N/A N/A N/A super AdminEmailMessage self __setattr__ attr value N/A N/A InboundEmailMessage N/A EmailMessage N/A N/A Parsed email object as recevied from external source.

  Has a date field and can store any number of additional bodies.  These
  additional attributes make the email more flexible as required for
  incoming mail, where the developer has less control over the content.

  Example Usage:

    # Read mail message from CGI input.
    message = InboundEmailMessage(sys.stdin.read())
    logging.info('Received email message from %s at %s',
                 message.sender,
                 message.date)
    enriched_body = list(message.bodies('text/enriched'))[0]
    ... Do something with body ...
   N/A __HEADER_PROPERTIES N/A date message_id date message-id N/A PROPERTIES N/A frozenset N/A N/A N/A _EmailMessageBase PROPERTIES N/A set N/A alternate_bodies N/A set N/A N/A __HEADER_PROPERTIES iterkeys N/A ALLOW_BLANK_EMAIL True update_from_mime_message N/A N/A self mime_message N/A N/A N/A Update values from MIME message.

    Copies over date values.

    Args:
      mime_message: email.Message instance to copy information from.
     N/A mime_message N/A _parse_mime_message mime_message N/A N/A N/A N/A super InboundEmailMessage self update_from_mime_message mime_message N/A N/A property header N/A N/A N/A InboundEmailMessage __HEADER_PROPERTIES iteritems N/A N/A value N/A mime_message N/A header N/A value N/A N/A N/A setattr self property value N/A _add_body N/A N/A self content_type payload N/A N/A N/A Add body to inbound message.

    Method is overidden to handle incoming messages that have more than one
    plain or html bodies or has any unidentified bodies.

    This method will not overwrite existing html and body values.  This means
    that when updating, the text and html bodies that are first in the MIME
    document order are assigned to the body and html properties.

    Args:
      content_type: Content-type of additional body.
      payload: Content of additional body.
     N/A N/A N/A N/A content_type text/plain N/A N/A hasattr self body N/A N/A content_type text/html N/A N/A hasattr self html N/A N/A N/A N/A N/A super InboundEmailMessage self _add_body content_type payload N/A N/A N/A N/A alternate_bodies N/A self alternate_bodies N/A N/A N/A AttributeError N/A N/A alternate_bodies N/A self alternate_bodies N/A N/A content_type payload N/A N/A N/A N/A alternate_bodies append N/A content_type payload N/A bodies N/A N/A self content_type N/A None N/A N/A Iterate over all bodies.

    Args:
      content_type: Content type to filter on.  Allows selection of only
        specific types of content.  Can be just the base type of the content
        type.  For example:
          content_type = 'text/html'  # Matches only HTML content.
          content_type = 'text'       # Matches text of any kind.

    Yields:
      Tuple (content_type, payload) for all bodies of message, including body,
      html and all alternate_bodies in that order.
     N/A main_bodies N/A N/A N/A super InboundEmailMessage self bodies content_type N/A N/A payload_type payload main_bodies N/A N/A N/A N/A payload_type payload N/A partial_type N/A bool N/A content_type N/A N/A N/A content_type find / 0 N/A N/A N/A N/A payload_type payload N/A self alternate_bodies N/A N/A content_type N/A N/A partial_type N/A N/A match_type N/A N/A N/A payload_type split / N/A 0 N/A N/A match_type payload_type N/A match N/A match_type content_type N/A N/A match True N/A match N/A N/A N/A N/A payload_type payload N/A N/A N/A AttributeError N/A N/A N/A to_mime_message N/A N/A self N/A N/A N/A Convert to MIME message.

    Adds additional headers from inbound email.

    Returns:
      MIME message instance of payload.
     N/A mime_message N/A N/A N/A super InboundEmailMessage self to_mime_message N/A N/A property header N/A N/A N/A InboundEmailMessage __HEADER_PROPERTIES iteritems N/A N/A N/A N/A N/A mime_message N/A header N/A getattr self property N/A N/A N/A AttributeError N/A N/A N/A mime_message N/A N/A N/A N/A Parser Parser