Module Expr Str Import alias Import alias Import alias Import alias alias alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Import alias identifier TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str TupleLoad Str TupleLoad Str Str TupleLoad Str TupleLoad Str TupleLoad Str Str Str TupleLoad Str TupleLoad Str Str Str Str Str Str Str TupleLoad Str TupleLoad Str TupleLoad Str TupleLoad Str Str Str TupleLoad Str TupleLoad Str TupleLoad Str Str TupleLoad Str TupleLoad Str ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad If BoolOpAnd NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body If Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body Return Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore NameLoad Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Assign NameStore NameLoad orelse If Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Slice Num orelse If Call AttributeLoad NameLoad attr Str body Assign SubscriptStore NameLoad Index Str BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Slice Num If NameLoad body Return NameLoad orelse Return NameLoad decorator_list Assign NameStore NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index Str BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If Call NameLoad NameLoad TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore TupleLoad NameLoad Assign NameStore Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad If NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str orelse Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str If NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str orelse Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If CompareNotIn Str AttributeLoad NameLoad attr body Return TupleLoad NameLoad NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Str Return TupleLoad NameLoad NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Return SubscriptLoad NameLoad Slice Num Return NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad Str body Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Str Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad ListLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call NameLoad SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num decorator_list Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr ListComp Call NameLoad Call AttributeLoad NameLoad attr Num Num comprehension NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Assign NameStore NameLoad decorator_list Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore NameLoad TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index NameLoad keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad keyword Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr Str attr Assign NameStore NameLoad If BoolOpAnd CompareIsNot AttributeLoad AttributeLoad NameLoad attr attr NameLoad BoolOpOr BoolOpAnd CompareEq NameLoad Str CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Num BoolOpAnd CompareEq NameLoad Str CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpMod Str NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad keyword Str orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad keyword Str Assign NameStore Call AttributeLoad Str attr TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad body Import alias Import alias Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str orelse Assign NameStore BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str TryExcept body Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If Call NameLoad NameLoad Str body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse Return Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad body Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad Str body Return Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str Str NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore ListComp BinOpMod Str TupleLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Return BinOpMod Str Call AttributeLoad Str attr NameLoad decorator_list Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Str Str body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If NameLoad body Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index Str Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr ListComp Call NameLoad Call AttributeLoad NameLoad attr Num Num comprehension NameStore Call NameLoad Num Assign NameStore NameLoad If CompareEq NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad orelse If CompareEq NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad orelse Return NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad For NameStore Call AttributeLoad NameLoad attr Str body If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Slice Call NameLoad Str If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Slice Call NameLoad Str Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad If CompareIsNot NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Str Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad 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 NameLoad Return NameLoad decorator_list Assign NameStore NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num ClassDef bases NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr 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 NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Return Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr ListComp Call NameLoad Call AttributeLoad NameLoad attr Num Num comprehension NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr 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 NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr ListComp Call NameLoad Call AttributeLoad NameLoad attr Num Num comprehension NameStore Call NameLoad Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword Str keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index Str AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Assign NameStore NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index Str AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Assign NameStore NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr 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 NameLoad 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 Return Call NameLoad NameLoad Str NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign AttributeStore NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr keyword Call NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str Str Str kwarg body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore Dict Str Str Str Str Str NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num Assign SubscriptStore NameLoad Index Num Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot BoolOpOr Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad orelse Assign NameStore BinOpMod Str AttributeLoad NameLoad attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIn Str NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str handlers ExceptHandler body Pass Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Return NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad orelse Return NameLoad decorator_list Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults vararg body Expr Str Return Call AttributeLoad Str attr ListComp Call AttributeLoad AttributeLoad NameLoad attr attr BoolOpOr NameLoad Str comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListComp BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareEq SubscriptLoad NameLoad Index Num Str body Return Call NameLoad SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse Raise Call NameLoad BinOpMod Str SubscriptLoad NameLoad Index Num decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad If CompareIs NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Import alias Assign NameStore Call AttributeLoad Str attr TupleLoad Str NameLoad Return Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Call NameLoad NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Import alias Assign NameStore Call AttributeLoad Str attr TupleLoad Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If CompareIsNot NameLoad NameLoad body Return Call NameLoad NameLoad orelse Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Import alias Assign NameStore Call AttributeLoad Str attr TupleLoad Str NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad decorator_list Assign NameStore NameLoad
N/A N/A Provides auth related token classes and functions for Google Data APIs.

Token classes represent a user's authorization of this app to access their
data. Usually these are not created directly but by a GDClient object.

ClientLoginToken
AuthSubToken
SecureAuthSubToken
OAuthHmacToken
OAuthRsaToken
TwoLeggedOAuthHmacToken
TwoLeggedOAuthRsaToken

Functions which are often used in application code (as opposed to just within
the gdata-python-client library) are the following:

generate_auth_sub_url
authorize_request_token

The following are helper functions which are used to save and load auth token
objects in the App Engine datastore. These should only be used if you are using
this library within App Engine:

ae_load
ae_save
 N/A datetime N/A time N/A random N/A urllib.request urllib.parse urllib.error N/A urllib.parse N/A atom.http_core N/A N/A N/A simplejson N/A N/A N/A ImportError N/A N/A N/A django.utils simplejson N/A N/A N/A ImportError N/A N/A json simplejson N/A N/A urllib.parse parse_qsl N/A N/A N/A ImportError N/A cgi parse_qsl N/A __author__ j.s@google.com (Jeff Scudder) N/A PROGRAMMATIC_AUTH_LABEL GoogleLogin auth= N/A AUTHSUB_AUTH_LABEL AuthSub token= N/A OAUTH2_AUTH_LABEL OAuth  N/A AUTH_SCOPES N/A cl gbase blogger codesearch cp finance health writely lh2 apps weaver wise sitemaps youtube books analytics jotspot local code N/A https://www.google.com/calendar/feeds/ http://www.google.com/calendar/feeds/ N/A http://base.google.com/base/feeds/ http://www.google.com/base/feeds/ N/A http://www.blogger.com/feeds/ N/A http://www.google.com/codesearch/feeds/ N/A https://www.google.com/m8/feeds/ http://www.google.com/m8/feeds/ N/A http://finance.google.com/finance/feeds/ N/A https://www.google.com/health/feeds/ N/A https://docs.google.com/feeds/ https://spreadsheets.google.com/feeds/ https://docs.googleusercontent.com/ N/A http://picasaweb.google.com/data/ N/A https://apps-apis.google.com/a/feeds/user/ https://apps-apis.google.com/a/feeds/policies/ https://apps-apis.google.com/a/feeds/alias/ https://apps-apis.google.com/a/feeds/groups/ https://apps-apis.google.com/a/feeds/compliance/audit/ https://apps-apis.google.com/a/feeds/migration/ https://apps-apis.google.com/a/feeds/emailsettings/2.0/ N/A https://www.google.com/h9/feeds/ N/A https://spreadsheets.google.com/feeds/ N/A https://www.google.com/webmasters/tools/feeds/ N/A http://gdata.youtube.com/feeds/api/ http://uploads.gdata.youtube.com/feeds/api http://gdata.youtube.com/action/GetUploadToken N/A http://www.google.com/books/feeds/ N/A https://www.google.com/analytics/feeds/ N/A http://sites.google.com/feeds/ https://sites.google.com/feeds/ N/A http://maps.google.com/maps/feeds/ N/A http://code.google.com/feeds/issues Error N/A Exception N/A N/A N/A UnsupportedTokenType N/A Error N/A N/A Raised when token to or from blob is unable to convert the token. N/A N/A OAuth2AccessTokenError N/A Error N/A N/A Raised when an OAuth2 error occurs. __init__ N/A N/A self error_message N/A N/A N/A N/A self error_message error_message N/A N/A generate_client_login_request_body N/A N/A email password service source account_type captcha_token captcha_response N/A HOSTED_OR_GOOGLE None None N/A N/A Creates the body of the autentication request

  See http://code.google.com/apis/accounts/AuthForInstalledApps.html#Request
  for more details.

  Args:
    email: str
    password: str
    service: str
    source: str
    account_type: str (optional) Defaul is 'HOSTED_OR_GOOGLE', other valid
        values are 'GOOGLE' and 'HOSTED'
    captcha_token: str (optional)
    captcha_response: str (optional)

  Returns:
    The HTTP body to send in a request for a client login token.
   N/A request_fields N/A Email Passwd accountType service source email password account_type service source N/A N/A captcha_token captcha_response N/A N/A N/A request_fields N/A logintoken captcha_token N/A N/A request_fields N/A logincaptcha captcha_response N/A N/A N/A N/A urllib parse urlencode request_fields N/A N/A GenerateClientLoginRequestBody generate_client_login_request_body get_client_login_token_string N/A N/A http_body N/A N/A N/A Returns the token value for a ClientLoginToken.

  Reads the token from the server's response to a Client Login request and
  creates the token value string to use in requests.

  Args:
    http_body: str The body of the server's HTTP response to a Client Login
        request

  Returns:
    The token value string for a ClientLoginToken.
   N/A response_line N/A N/A http_body splitlines N/A N/A N/A N/A N/A N/A response_line decode startswith Auth= N/A N/A N/A N/A N/A response_line N/A 5 decode ascii N/A None N/A N/A GetClientLoginTokenString get_client_login_token_string get_captcha_challenge N/A N/A http_body captcha_base_url N/A http://www.google.com/accounts/ N/A N/A Returns the URL and token for a CAPTCHA challenge issued by the server.

  Args:
    http_body: str The body of the HTTP response from the server which
        contains the CAPTCHA challenge.
    captcha_base_url: str This function returns a full URL for viewing the
        challenge image which is built from the server's response. This
        base_url is used as the beginning of the URL because the server
        only provides the end of the URL. For example the server provides
        'Captcha?ctoken=Hi...N' and the URL for the image is
        'http://www.google.com/accounts/Captcha?ctoken=Hi...N'

  Returns:
    A dictionary containing the information needed to repond to the CAPTCHA
    challenge, the image URL and the ID token of the challenge. The
    dictionary is in the form:
    {'token': string identifying the CAPTCHA image,
     'url': string containing the URL of the image}
    Returns None if there was no CAPTCHA challenge in the response.
   N/A contains_captcha_challenge False N/A captcha_parameters N/A N/A response_line N/A N/A http_body splitlines N/A N/A N/A N/A response_line startswith Error=CaptchaRequired N/A N/A contains_captcha_challenge True N/A N/A N/A N/A response_line startswith CaptchaToken= N/A N/A N/A captcha_parameters N/A token N/A response_line N/A 13 N/A N/A N/A N/A response_line startswith CaptchaUrl= N/A N/A N/A captcha_parameters N/A url N/A %s%s N/A captcha_base_url N/A response_line N/A 11 N/A contains_captcha_challenge N/A N/A captcha_parameters N/A N/A None N/A N/A GetCaptchaChallenge get_captcha_challenge ClientLoginToken N/A object N/A __init__ N/A N/A self token_string N/A N/A N/A N/A isinstance token_string str N/A N/A N/A self token_string token_string N/A N/A N/A self token_string N/A N/A token_string decode N/A modify_request N/A N/A self http_request N/A N/A N/A N/A N/A http_request headers N/A Authorization N/A %s%s N/A PROGRAMMATIC_AUTH_LABEL N/A self token_string N/A N/A ModifyRequest modify_request N/A _to_uri N/A N/A str_or_uri N/A N/A N/A N/A isinstance str_or_uri str N/A N/A N/A N/A N/A N/A atom http_core Uri parse_uri str_or_uri N/A str_or_uri N/A generate_auth_sub_url N/A N/A next scopes secure session request_url domain scopes_param_prefix N/A False True N/A N/A N/A atom http_core parse_uri https://www.google.com/accounts/AuthSubRequest default auth_sub_scopes N/A N/A Constructs a URI for requesting a multiscope AuthSub token.

  The generated token will contain a URL parameter to pass along the
  requested scopes to the next URL. When the Google Accounts page
  redirects the broswser to the 'next' URL, it appends the single use
  AuthSub token value to the URL as a URL parameter with the key 'token'.
  However, the information about which scopes were requested is not
  included by Google Accounts. This method adds the scopes to the next
  URL before making the request so that the redirect will be sent to
  a page, and both the token value and the list of scopes for which the token
  was requested.

  Args:
    next: atom.http_core.Uri or string The URL user will be sent to after
          authorizing this web application to access their data.
    scopes: list containint strings or atom.http_core.Uri objects. The URLs
            of the services to be accessed. Could also be a single string
            or single atom.http_core.Uri for requesting just one scope.
    secure: boolean (optional) Determines whether or not the issued token
            is a secure token.
    session: boolean (optional) Determines whether or not the issued token
             can be upgraded to a session token.
    request_url: atom.http_core.Uri or str The beginning of the request URL.
                 This is normally
                 'http://www.google.com/accounts/AuthSubRequest' or
                 '/accounts/AuthSubRequest'
    domain: The domain which the account is part of. This is used for Google
            Apps accounts, the default value is 'default' which means that
            the requested account is a Google Account (@gmail.com for
            example)
    scopes_param_prefix: str (optional) The requested scopes are added as a
                         URL parameter to the next URL so that the page at
                         the 'next' URL can extract the token value and the
                         valid scopes from the URL. The key for the URL
                         parameter defaults to 'auth_sub_scopes'

  Returns:
    An atom.http_core.Uri which the user's browser should be directed to in
    order to authorize this application to access their information.
   N/A N/A isinstance next str N/A N/A next N/A N/A N/A N/A atom http_core Uri parse_uri next N/A N/A isinstance scopes N/A str N/A N/A atom http_core Uri N/A N/A scopes N/A scopes N/A scopes_string N/A N/A join N/A N/A str scope N/A scope scopes N/A N/A N/A next query N/A scopes_param_prefix scopes_string N/A N/A isinstance request_url str N/A N/A request_url N/A N/A N/A N/A atom http_core Uri parse_uri request_url N/A N/A N/A request_url query N/A next N/A str next N/A N/A N/A request_url query N/A scope scopes_string N/A session N/A N/A N/A N/A request_url query N/A session 1 N/A N/A N/A N/A request_url query N/A session 0 N/A secure N/A N/A N/A N/A request_url query N/A secure 1 N/A N/A N/A N/A request_url query N/A secure 0 N/A N/A N/A request_url query N/A hd domain N/A request_url N/A auth_sub_string_from_url N/A N/A url scopes_param_prefix N/A auth_sub_scopes N/A N/A Finds the token string (and scopes) after the browser is redirected.

  After the Google Accounts AuthSub pages redirect the user's broswer back to
  the web application (using the 'next' URL from the request) the web app must
  extract the token from the current page's URL. The token is provided as a
  URL parameter named 'token' and if generate_auth_sub_url was used to create
  the request, the token's valid scopes are included in a URL parameter whose
  name is specified in scopes_param_prefix.

  Args:
    url: atom.url.Url or str representing the current URL. The token value
         and valid scopes should be included as URL parameters.
    scopes_param_prefix: str (optional) The URL parameter key which maps to
                         the list of valid scopes for the token.

  Returns:
    A tuple containing the token value as a string, and a tuple of scopes
    (as atom.http_core.Uri objects) which are URL prefixes under which this
    token grants permission to read and write user data.
    (token_string, (scope_uri, scope_uri, scope_uri, ...))
    If no scopes were included in the URL, the second value in the tuple is
    None. If there was no token param in the url, the tuple returned is
    (None, None)
   N/A N/A isinstance url str N/A N/A url N/A N/A N/A N/A atom http_core Uri parse_uri url N/A N/A token N/A url query N/A N/A N/A None None N/A token N/A N/A url query N/A token N/A scopes None N/A N/A scopes_param_prefix N/A url query N/A N/A scopes N/A tuple N/A N/A N/A N/A url query N/A scopes_param_prefix split N/A N/A token scopes N/A N/A AuthSubStringFromUrl auth_sub_string_from_url auth_sub_string_from_body N/A N/A http_body N/A N/A N/A Extracts the AuthSub token from an HTTP body string.

  Used to find the new session token after making a request to upgrade a
  single use AuthSub token.

  Args:
    http_body: str The repsonse from the server which contains the AuthSub
        key. For example, this function would find the new session token
        from the server's response to an upgrade token request.

  Returns:
    The raw token value string to use in an AuthSubToken object.
   N/A response_line N/A N/A http_body splitlines N/A N/A N/A N/A response_line startswith Token= N/A N/A N/A response_line N/A 6 N/A None N/A AuthSubToken N/A object N/A __init__ N/A N/A self token_string scopes N/A None N/A N/A N/A self token_string token_string N/A N/A self scopes N/A scopes N/A N/A modify_request N/A N/A self http_request N/A N/A N/A Sets Authorization header, allows app to act on the user's behalf. N/A N/A N/A http_request headers N/A Authorization N/A %s%s N/A AUTHSUB_AUTH_LABEL N/A self token_string N/A N/A ModifyRequest modify_request from_url N/A N/A str_or_uri N/A N/A N/A Creates a new AuthSubToken using information in the URL.

    Uses auth_sub_string_from_url.

    Args:
      str_or_uri: The current page's URL (as a str or atom.http_core.Uri)
                  which should contain a token query parameter since the
                  Google auth server redirected the user's browser to this
                  URL.
     N/A token_and_scopes N/A auth_sub_string_from_url str_or_uri N/A N/A AuthSubToken N/A token_and_scopes N/A 0 N/A token_and_scopes N/A 1 N/A N/A from_url N/A staticmethod from_url N/A FromUrl from_url _upgrade_token N/A N/A self http_body N/A N/A N/A Replaces the token value with a session token from the auth server.

    Uses the response of a token upgrade request to modify this token. Uses
    auth_sub_string_from_body.
     N/A N/A self token_string N/A auth_sub_string_from_body http_body N/A N/A build_auth_sub_data N/A N/A http_request timestamp nonce N/A N/A N/A Creates the data string which must be RSA-signed in secure requests.

  For more details see the documenation on secure AuthSub requests:
  http://code.google.com/apis/accounts/docs/AuthSub.html#signingrequests

  Args:
    http_request: The request being made to the server. The Request's URL
        must be complete before this signature is calculated as any changes
        to the URL will invalidate the signature.
    nonce: str Random 64-bit, unsigned number encoded as an ASCII string in
        decimal format. The nonce/timestamp pair should always be unique to
        prevent replay attacks.
    timestamp: Integer representing the time the request is sent. The
        timestamp should be expressed in number of seconds after January 1,
        1970 00:00:00 GMT.
   N/A N/A %s %s %s %s N/A N/A http_request method N/A str N/A http_request uri N/A str timestamp nonce N/A generate_signature N/A N/A data rsa_key N/A N/A N/A Signs the data string for a secure AuthSub request. N/A base64 N/A N/A tlslite.utils keyfactory N/A N/A N/A ImportError N/A N/A N/A gdata.tlslite.utils keyfactory N/A N/A N/A ImportError N/A tlslite.tlslite.utils keyfactory N/A private_key N/A N/A keyfactory parsePrivateKey rsa_key N/A signed N/A N/A private_key hashAndSign data N/A N/A hasattr base64 b64encode N/A N/A N/A N/A base64 b64encode signed N/A N/A N/A N/A N/A N/A base64 encodestring signed replace N/A SecureAuthSubToken N/A AuthSubToken N/A __init__ N/A N/A self token_string rsa_private_key scopes N/A None N/A N/A N/A self token_string token_string N/A N/A self scopes N/A scopes N/A N/A N/A self rsa_private_key rsa_private_key N/A from_url N/A N/A str_or_uri rsa_private_key N/A N/A N/A Creates a new SecureAuthSubToken using information in the URL.

    Uses auth_sub_string_from_url.

    Args:
      str_or_uri: The current page's URL (as a str or atom.http_core.Uri)
          which should contain a token query parameter since the Google auth
          server redirected the user's browser to this URL.
      rsa_private_key: str the private RSA key cert used to sign all requests
          made with this token.
     N/A token_and_scopes N/A auth_sub_string_from_url str_or_uri N/A N/A SecureAuthSubToken N/A token_and_scopes N/A 0 rsa_private_key N/A token_and_scopes N/A 1 N/A N/A from_url N/A staticmethod from_url N/A FromUrl from_url modify_request N/A N/A self http_request N/A N/A N/A Sets the Authorization header and includes a digital signature.

    Calculates a digital signature using the private RSA key, a timestamp
    (uses now at the time this method is called) and a random nonce.

    Args:
      http_request: The atom.http_core.HttpRequest which contains all of the
          information needed to send a request to the remote server. The
          URL and the method of the request must be already set and cannot be
          changed after this token signs the request, or the signature will
          not be valid.
     N/A timestamp N/A str N/A int N/A N/A time time N/A nonce N/A N/A join N/A N/A str N/A N/A random randint 0 9 N/A i N/A range 15 N/A data N/A build_auth_sub_data http_request timestamp nonce N/A signature N/A generate_signature data N/A self rsa_private_key N/A N/A N/A http_request headers N/A Authorization N/A %s%s sigalg="rsa-sha1" data="%s" sig="%s" N/A AUTHSUB_AUTH_LABEL N/A self token_string data signature N/A N/A ModifyRequest modify_request N/A N/A RSA_SHA1 RSA-SHA1 N/A HMAC_SHA1 HMAC-SHA1 build_oauth_base_string N/A N/A http_request consumer_key nonce signaure_type timestamp version next token verifier N/A oob None None N/A N/A Generates the base string to be signed in the OAuth request.

  Args:
    http_request: The request being made to the server. The Request's URL
        must be complete before this signature is calculated as any changes
        to the URL will invalidate the signature.
    consumer_key: Domain identifying the third-party web application. This is
        the domain used when registering the application with Google. It
        identifies who is making the request on behalf of the user.
    nonce: Random 64-bit, unsigned number encoded as an ASCII string in decimal
        format. The nonce/timestamp pair should always be unique to prevent
        replay attacks.
    signaure_type: either RSA_SHA1 or HMAC_SHA1
    timestamp: Integer representing the time the request is sent. The
        timestamp should be expressed in number of seconds after January 1,
        1970 00:00:00 GMT.
    version: The OAuth version used by the requesting web application. This
        value must be '1.0' or '1.0a'. If not provided, Google assumes version
        1.0 is in use.
    next: The URL the user should be redirected to after granting access
        to a Google service(s). It can include url-encoded query parameters.
        The default value is 'oob'. (This is the oauth_callback.)
    token: The string for the OAuth request token or OAuth access token.
    verifier: str Sent as the oauth_verifier and required when upgrading a
        request token to an access token.
   N/A params N/A N/A N/A N/A http_request uri query copy N/A N/A params N/A oauth_consumer_key consumer_key N/A N/A params N/A oauth_nonce nonce N/A N/A params N/A oauth_signature_method signaure_type N/A N/A params N/A oauth_timestamp N/A str timestamp N/A N/A next None N/A N/A N/A params N/A oauth_callback N/A str next N/A N/A token None N/A N/A N/A params N/A oauth_token token N/A N/A version None N/A N/A N/A params N/A oauth_version version N/A N/A verifier None N/A N/A N/A params N/A oauth_verifier verifier N/A sorted_keys None N/A N/A N/A sorted_keys N/A sorted N/A N/A params keys N/A N/A N/A NameError N/A N/A sorted_keys N/A list N/A N/A params keys N/A N/A N/A sorted_keys sort N/A pairs N/A N/A key sorted_keys N/A N/A N/A N/A pairs append N/A %s=%s N/A N/A N/A N/A urllib parse quote key safe ~ N/A N/A N/A urllib parse quote N/A params N/A key safe ~ N/A all_parameters N/A N/A N/A urllib parse quote N/A N/A & join pairs safe ~ N/A normailzed_host N/A N/A N/A N/A http_request uri host lower N/A normalized_scheme N/A N/A N/A N/A N/A http_request uri scheme http lower N/A non_default_port None N/A N/A N/A N/A N/A http_request uri port None N/A N/A N/A normalized_scheme https N/A N/A N/A http_request uri port 443 N/A N/A normalized_scheme http N/A N/A N/A http_request uri port 80 N/A N/A non_default_port N/A N/A http_request uri port N/A path N/A N/A N/A http_request uri path / N/A request_path None N/A N/A N/A N/A path startswith / N/A N/A path N/A /%s path N/A N/A non_default_port None N/A N/A request_path N/A N/A N/A urllib parse quote N/A %s://%s:%s%s N/A normalized_scheme normailzed_host non_default_port path safe ~ N/A N/A request_path N/A N/A N/A urllib parse quote N/A %s://%s%s N/A normalized_scheme normailzed_host path safe ~ N/A base_string N/A N/A & join N/A N/A N/A N/A http_request method upper request_path all_parameters N/A base_string N/A generate_hmac_signature N/A N/A http_request consumer_key consumer_secret timestamp nonce version next token token_secret verifier N/A oob None None None N/A N/A hmac N/A base64 N/A base_string N/A build_oauth_base_string http_request consumer_key nonce HMAC_SHA1 timestamp version next token verifier verifier N/A hash_key None N/A hashed None N/A N/A token_secret None N/A N/A hash_key N/A %s&%s N/A N/A N/A N/A urllib parse quote consumer_secret safe ~ N/A N/A N/A urllib parse quote token_secret safe ~ N/A N/A hash_key N/A %s& N/A N/A N/A urllib parse quote consumer_secret safe ~ N/A N/A N/A hashlib N/A hashed N/A N/A hmac new hash_key base_string N/A hashlib sha1 N/A N/A N/A ImportError N/A N/A sha N/A hashed N/A N/A hmac new hash_key base_string sha N/A N/A hasattr base64 b64encode N/A N/A N/A N/A base64 b64encode N/A N/A hashed digest N/A N/A N/A N/A N/A N/A base64 encodestring N/A N/A hashed digest replace N/A generate_rsa_signature N/A N/A http_request consumer_key rsa_key timestamp nonce version next token token_secret verifier N/A oob None None None N/A N/A base64 N/A N/A tlslite.utils keyfactory N/A N/A N/A ImportError N/A N/A N/A gdata.tlslite.utils keyfactory N/A N/A N/A ImportError N/A tlslite.tlslite.utils keyfactory N/A base_string N/A build_oauth_base_string http_request consumer_key nonce RSA_SHA1 timestamp version next token verifier verifier N/A private_key N/A N/A keyfactory parsePrivateKey rsa_key N/A signed N/A N/A private_key hashAndSign base_string N/A N/A hasattr base64 b64encode N/A N/A N/A N/A base64 b64encode signed N/A N/A N/A N/A N/A N/A base64 encodestring signed replace N/A generate_auth_header N/A N/A consumer_key timestamp nonce signature_type signature version next token verifier N/A 1.0 None None None N/A N/A Builds the Authorization header to be sent in the request.

  Args:
    consumer_key: Identifies the application making the request (str).
    timestamp:
    nonce:
    signature_type: One of either HMAC_SHA1 or RSA_SHA1
    signature: The HMAC or RSA signature for the request as a base64
        encoded string.
    version: The version of the OAuth protocol that this request is using.
        Default is '1.0'
    next: The URL of the page that the user's browser should be sent to
        after they authorize the token. (Optional)
    token: str The OAuth token value to be used in the oauth_token parameter
        of the header.
    verifier: str The OAuth verifier which must be included when you are
        upgrading a request token to an access token.
   N/A params N/A oauth_consumer_key oauth_version oauth_nonce oauth_timestamp oauth_signature_method oauth_signature consumer_key version nonce N/A str timestamp signature_type signature N/A N/A next None N/A N/A N/A params N/A oauth_callback N/A str next N/A N/A token None N/A N/A N/A params N/A oauth_token token N/A N/A verifier None N/A N/A N/A params N/A oauth_verifier verifier N/A pairs N/A N/A %s="%s" N/A k N/A N/A N/A urllib parse quote v safe ~ N/A N/A k v N/A N/A params items N/A N/A OAuth %s N/A N/A ,  join pairs N/A N/A REQUEST_TOKEN_URL https://www.google.com/accounts/OAuthGetRequestToken N/A ACCESS_TOKEN_URL https://www.google.com/accounts/OAuthGetAccessToken generate_request_for_request_token N/A N/A consumer_key signature_type scopes rsa_key consumer_secret auth_server_url next version N/A None None REQUEST_TOKEN_URL oob 1.0 N/A N/A Creates request to be sent to auth server to get an OAuth request token.

  Args:
    consumer_key:
    signature_type: either RSA_SHA1 or HMAC_SHA1. The rsa_key must be
        provided if the signature type is RSA but if the signature method
        is HMAC, the consumer_secret must be used.
    scopes: List of URL prefixes for the data which we want to access. For
        example, to request access to the user's Blogger and Google Calendar
        data, we would request
        ['http://www.blogger.com/feeds/',
         'https://www.google.com/calendar/feeds/',
         'http://www.google.com/calendar/feeds/']
    rsa_key: Only used if the signature method is RSA_SHA1.
    consumer_secret: Only used if the signature method is HMAC_SHA1.
    auth_server_url: The URL to which the token request should be directed.
        Defaults to 'https://www.google.com/accounts/OAuthGetRequestToken'.
    next: The URL of the page that the user's browser should be sent to
        after they authorize the token. (Optional)
    version: The OAuth version used by the requesting web application.
        Defaults to '1.0a'

  Returns:
    An atom.http_core.HttpRequest object with the URL, Authorization header
    and body filled in.
   N/A request N/A N/A N/A atom http_core HttpRequest auth_server_url POST N/A scopes N/A N/A N/A N/A N/A request uri query N/A scope N/A N/A join scopes N/A timestamp N/A str N/A int N/A N/A time time N/A nonce N/A N/A join N/A N/A str N/A N/A random randint 0 9 N/A i N/A range 15 N/A signature None N/A N/A signature_type HMAC_SHA1 N/A N/A signature N/A generate_hmac_signature request consumer_key consumer_secret timestamp nonce version next next N/A N/A N/A signature_type RSA_SHA1 N/A N/A signature N/A generate_rsa_signature request consumer_key rsa_key timestamp nonce version next next N/A N/A None N/A N/A N/A request headers N/A Authorization N/A generate_auth_header consumer_key timestamp nonce signature_type signature version next N/A N/A N/A request headers N/A Content-Length 0 N/A request N/A generate_request_for_access_token N/A N/A request_token auth_server_url N/A ACCESS_TOKEN_URL N/A N/A Creates a request to ask the OAuth server for an access token.

  Requires a request token which the user has authorized. See the
  documentation on OAuth with Google Data for more details:
  http://code.google.com/apis/accounts/docs/OAuth.html#AccessToken

  Args:
    request_token: An OAuthHmacToken or OAuthRsaToken which the user has
        approved using their browser.
    auth_server_url: (optional) The URL at which the OAuth access token is
        requested. Defaults to
        https://www.google.com/accounts/OAuthGetAccessToken

  Returns:
    A new HttpRequest object which can be sent to the OAuth server to
    request an OAuth Access Token.
   N/A http_request N/A N/A N/A atom http_core HttpRequest auth_server_url POST N/A N/A N/A http_request headers N/A Content-Length 0 N/A N/A N/A request_token modify_request http_request N/A oauth_token_info_from_body N/A N/A http_body N/A N/A N/A Exracts an OAuth request token from the server's response.

  Returns:
    A tuple of strings containing the OAuth token and token secret. If
    neither of these are present in the body, returns (None, None)
   N/A token None N/A token_secret None N/A pair N/A N/A http_body split & N/A N/A N/A N/A pair startswith oauth_token= N/A N/A token N/A N/A N/A urllib parse unquote N/A pair N/A N/A len oauth_token= N/A N/A N/A pair startswith oauth_token_secret= N/A N/A token_secret N/A N/A N/A urllib parse unquote N/A pair N/A N/A len oauth_token_secret= N/A N/A token token_secret N/A hmac_token_from_body N/A N/A http_body consumer_key consumer_secret auth_state N/A N/A N/A N/A token_value token_secret N/A oauth_token_info_from_body http_body N/A token N/A OAuthHmacToken consumer_key consumer_secret token_value token_secret auth_state N/A token N/A rsa_token_from_body N/A N/A http_body consumer_key rsa_private_key auth_state N/A N/A N/A N/A token_value token_secret N/A oauth_token_info_from_body http_body N/A token N/A OAuthRsaToken consumer_key rsa_private_key token_value token_secret auth_state N/A token N/A N/A DEFAULT_DOMAIN default N/A OAUTH_AUTHORIZE_URL https://www.google.com/accounts/OAuthAuthorizeToken generate_oauth_authorization_url N/A N/A token next hd hl btmpl auth_server N/A None DEFAULT_DOMAIN None None OAUTH_AUTHORIZE_URL N/A N/A Creates a URL for the page where the request token can be authorized.

  Args:
    token: str The request token from the OAuth server.
    next: str (optional) URL the user should be redirected to after granting
        access to a Google service(s). It can include url-encoded query
        parameters.
    hd: str (optional) Identifies a particular hosted domain account to be
        accessed (for example, 'mycollege.edu'). Uses 'default' to specify a
        regular Google account ('username@gmail.com').
    hl: str (optional) An ISO 639 country code identifying what language the
        approval page should be translated in (for example, 'hl=en' for
        English). The default is the user's selected language.
    btmpl: str (optional) Forces a mobile version of the approval page. The
        only accepted value is 'mobile'.
    auth_server: str (optional) The start of the token authorization web
        page. Defaults to
        'https://www.google.com/accounts/OAuthAuthorizeToken'

  Returns:
    An atom.http_core.Uri pointing to the token authorization page where the
    user may allow or deny this app to access their Google data.
   N/A uri N/A N/A N/A N/A atom http_core Uri parse_uri auth_server N/A N/A N/A uri query N/A oauth_token token N/A N/A N/A uri query N/A hd hd N/A N/A next None N/A N/A N/A N/A uri query N/A oauth_callback N/A str next N/A N/A hl None N/A N/A N/A N/A uri query N/A hl hl N/A N/A btmpl None N/A N/A N/A N/A uri query N/A btmpl btmpl N/A uri N/A oauth_token_info_from_url N/A N/A url N/A N/A N/A Exracts an OAuth access token from the redirected page's URL.

  Returns:
    A tuple of strings containing the OAuth token and the OAuth verifier which
    need to sent when upgrading a request token to an access token.
   N/A N/A isinstance url str N/A N/A url N/A N/A N/A N/A atom http_core Uri parse_uri url N/A token None N/A verifier None N/A N/A oauth_token N/A url query N/A N/A token N/A N/A N/A urllib parse unquote N/A N/A url query N/A oauth_token N/A N/A oauth_verifier N/A url query N/A N/A verifier N/A N/A N/A urllib parse unquote N/A N/A url query N/A oauth_verifier N/A N/A token verifier N/A authorize_request_token N/A N/A request_token url N/A N/A N/A Adds information to request token to allow it to become an access token.

  Modifies the request_token object passed in by setting and unsetting the
  necessary fields to allow this token to form a valid upgrade request.

  Args:
    request_token: The OAuth request token which has been authorized by the
        user. In order for this token to be upgraded to an access token,
        certain fields must be extracted from the URL and added to the token
        so that they can be passed in an upgrade-token request.
    url: The URL of the current page which the user's browser was redirected
        to after they authorized access for the app. This function extracts
        information from the URL which is needed to upgraded the token from
        a request token to an access token.

  Returns:
    The same token object which was passed in.
   N/A N/A token verifier N/A oauth_token_info_from_url url N/A N/A request_token token token N/A N/A request_token verifier verifier N/A N/A request_token auth_state AUTHORIZED_REQUEST_TOKEN N/A request_token N/A N/A AuthorizeRequestToken authorize_request_token upgrade_to_access_token N/A N/A request_token server_response_body N/A N/A N/A Extracts access token information from response to an upgrade request.

  Once the server has responded with the new token info for the OAuth
  access token, this method modifies the request_token to set and unset
  necessary fields to create valid OAuth authorization headers for requests.

  Args:
    request_token: An OAuth token which this function modifies to allow it
        to be used as an access token.
    server_response_body: str The server's response to an OAuthAuthorizeToken
        request. This should contain the new token and token_secret which
        are used to generate the signature and parameters of the Authorization
        header in subsequent requests to Google Data APIs.

  Returns:
    The same token object which was passed in.
   N/A N/A token token_secret N/A oauth_token_info_from_body server_response_body N/A N/A request_token token token N/A N/A request_token token_secret token_secret N/A N/A request_token auth_state ACCESS_TOKEN N/A N/A request_token next None N/A N/A request_token verifier None N/A request_token N/A N/A UpgradeToAccessToken upgrade_to_access_token N/A REQUEST_TOKEN 1 N/A AUTHORIZED_REQUEST_TOKEN 2 N/A ACCESS_TOKEN 3 OAuthHmacToken N/A object N/A N/A SIGNATURE_METHOD HMAC_SHA1 __init__ N/A N/A self consumer_key consumer_secret token token_secret auth_state next verifier N/A None None N/A N/A N/A self consumer_key consumer_key N/A N/A self consumer_secret consumer_secret N/A N/A self token token N/A N/A self token_secret token_secret N/A N/A self auth_state auth_state N/A N/A self next next N/A N/A self verifier verifier N/A generate_authorization_url N/A N/A self google_apps_domain language btmpl auth_server N/A DEFAULT_DOMAIN None None OAUTH_AUTHORIZE_URL N/A N/A Creates the URL at which the user can authorize this app to access.

    Args:
      google_apps_domain: str (optional) If the user should be signing in
          using an account under a known Google Apps domain, provide the
          domain name ('example.com') here. If not provided, 'default'
          will be used, and the user will be prompted to select an account
          if they are signed in with a Google Account and Google Apps
          accounts.
      language: str (optional) An ISO 639 country code identifying what
          language the approval page should be translated in (for example,
          'en' for English). The default is the user's selected language.
      btmpl: str (optional) Forces a mobile version of the approval page. The
        only accepted value is 'mobile'.
      auth_server: str (optional) The start of the token authorization web
        page. Defaults to
        'https://www.google.com/accounts/OAuthAuthorizeToken'
     N/A N/A generate_oauth_authorization_url N/A self token hd google_apps_domain hl language btmpl btmpl auth_server auth_server N/A N/A GenerateAuthorizationUrl generate_authorization_url modify_request N/A N/A self http_request N/A N/A N/A Sets the Authorization header in the HTTP request using the token.

    Calculates an HMAC signature using the information in the token to
    indicate that the request came from this application and that this
    application has permission to access a particular user's data.

    Returns:
      The same HTTP request object which was passed in.
     N/A timestamp N/A str N/A int N/A N/A time time N/A nonce N/A N/A join N/A N/A str N/A N/A random randint 0 9 N/A i N/A range 15 N/A signature N/A generate_hmac_signature http_request N/A self consumer_key N/A self consumer_secret timestamp nonce version 1.0 next N/A self __next__ token N/A self token token_secret N/A self token_secret verifier N/A self verifier N/A N/A N/A http_request headers N/A Authorization N/A generate_auth_header N/A self consumer_key timestamp nonce HMAC_SHA1 signature version 1.0 next N/A self __next__ token N/A self token verifier N/A self verifier N/A http_request N/A N/A ModifyRequest modify_request N/A OAuthRsaToken N/A OAuthHmacToken N/A N/A SIGNATURE_METHOD RSA_SHA1 __init__ N/A N/A self consumer_key rsa_private_key token token_secret auth_state next verifier N/A None None N/A N/A N/A self consumer_key consumer_key N/A N/A self rsa_private_key rsa_private_key N/A N/A self token token N/A N/A self token_secret token_secret N/A N/A self auth_state auth_state N/A N/A self next next N/A N/A self verifier verifier N/A modify_request N/A N/A self http_request N/A N/A N/A Sets the Authorization header in the HTTP request using the token.

    Calculates an RSA signature using the information in the token to
    indicate that the request came from this application and that this
    application has permission to access a particular user's data.

    Returns:
      The same HTTP request object which was passed in.
     N/A timestamp N/A str N/A int N/A N/A time time N/A nonce N/A N/A join N/A N/A str N/A N/A random randint 0 9 N/A i N/A range 15 N/A signature N/A generate_rsa_signature http_request N/A self consumer_key N/A self rsa_private_key timestamp nonce version 1.0 next N/A self __next__ token N/A self token token_secret N/A self token_secret verifier N/A self verifier N/A N/A N/A http_request headers N/A Authorization N/A generate_auth_header N/A self consumer_key timestamp nonce RSA_SHA1 signature version 1.0 next N/A self __next__ token N/A self token verifier N/A self verifier N/A http_request N/A N/A ModifyRequest modify_request N/A TwoLeggedOAuthHmacToken N/A OAuthHmacToken N/A __init__ N/A N/A self consumer_key consumer_secret requestor_id N/A N/A N/A N/A self requestor_id requestor_id N/A N/A N/A OAuthHmacToken __init__ self consumer_key consumer_secret None None ACCESS_TOKEN next None verifier None N/A modify_request N/A N/A self http_request N/A N/A N/A Sets the Authorization header in the HTTP request using the token.

    Calculates an HMAC signature using the information in the token to
    indicate that the request came from this application and that this
    application has permission to access a particular user's data using 2LO.

    Returns:
      The same HTTP request object which was passed in.
     N/A N/A N/A N/A http_request uri query N/A xoauth_requestor_id N/A self requestor_id N/A N/A N/A OAuthHmacToken modify_request self http_request N/A N/A ModifyRequest modify_request N/A TwoLeggedOAuthRsaToken N/A OAuthRsaToken N/A __init__ N/A N/A self consumer_key rsa_private_key requestor_id N/A N/A N/A N/A self requestor_id requestor_id N/A N/A N/A OAuthRsaToken __init__ self consumer_key rsa_private_key None None ACCESS_TOKEN next None verifier None N/A modify_request N/A N/A self http_request N/A N/A N/A Sets the Authorization header in the HTTP request using the token.

    Calculates an RSA signature using the information in the token to
    indicate that the request came from this application and that this
    application has permission to access a particular user's data using 2LO.

    Returns:
      The same HTTP request object which was passed in.
     N/A N/A N/A N/A http_request uri query N/A xoauth_requestor_id N/A self requestor_id N/A N/A N/A OAuthRsaToken modify_request self http_request N/A N/A ModifyRequest modify_request N/A OAuth2Token N/A object N/A N/A Token object for OAuth 2.0 as described on
  <http://code.google.com/apis/accounts/docs/OAuth2.html>.

  Token can be applied to a gdata.client.GDClient object using the authorize()
  method, which then signs each request from that object with the OAuth 2.0
  access token.
  This class supports 3 flows of OAuth 2.0:
    Client-side web flow: call generate_authorize_url with `response_type='token''
      and the registered `redirect_uri'.
    Server-side web flow: call generate_authorize_url with the registered
      `redirect_url'.
    Native applications flow: call generate_authorize_url as it is. You will have
      to ask the user to go to the generated url and pass in the authorization
      code to your application.
   __init__ N/A N/A self client_id client_secret scope user_agent auth_uri token_uri access_token refresh_token N/A https://accounts.google.com/o/oauth2/auth https://accounts.google.com/o/oauth2/token None None N/A N/A Create an instance of OAuth2Token

    This constructor is not usually called by the user, instead
    OAuth2Credentials objects are instantiated by the OAuth2WebServerFlow.

    Args:
      client_id: string, client identifier.
      client_secret: string client secret.
      scope: string, scope of the credentials being requested.
      user_agent: string, HTTP User-Agent to provide for this application.
      auth_uri: string, URI for authorization endpoint. For convenience
        defaults to Google's endpoints but any OAuth 2.0 provider can be used.
      token_uri: string, URI for token endpoint. For convenience
        defaults to Google's endpoints but any OAuth 2.0 provider can be used.
      access_token: string, access token.
      refresh_token: string, refresh token.
     N/A N/A self client_id client_id N/A N/A self client_secret client_secret N/A N/A self scope scope N/A N/A self user_agent user_agent N/A N/A self auth_uri auth_uri N/A N/A self token_uri token_uri N/A N/A self access_token access_token N/A N/A self refresh_token refresh_token N/A N/A self _invalid False N/A invalid N/A N/A self N/A N/A N/A True if the credentials are invalid, such as being revoked. N/A N/A getattr self _invalid False N/A property _refresh N/A N/A self request N/A N/A N/A Refresh the access_token using the refresh_token.

    Args:
       http: An instance of httplib2.Http.request
           or something that acts like it.
     N/A body N/A N/A N/A urllib parse urlencode N/A grant_type client_id client_secret refresh_token refresh_token N/A self client_id N/A self client_secret N/A self refresh_token N/A headers N/A user-agent N/A self user_agent N/A http_request N/A N/A N/A atom http_core HttpRequest uri N/A self token_uri method POST headers headers N/A N/A N/A http_request add_body_part body mime_type application/x-www-form-urlencoded N/A response N/A request http_request N/A body N/A N/A response read N/A N/A N/A response status 200 N/A N/A N/A N/A self _extract_tokens body N/A N/A N/A self _invalid True N/A response N/A _extract_tokens N/A N/A self body N/A N/A N/A d N/A N/A simplejson loads body N/A N/A self access_token N/A d N/A access_token N/A N/A self refresh_token N/A N/A d get refresh_token N/A self refresh_token N/A N/A expires_in d N/A N/A N/A self token_expiry N/A N/A N/A datetime timedelta seconds N/A int N/A d N/A expires_in N/A N/A N/A datetime datetime now N/A N/A N/A self token_expiry None N/A generate_authorize_url N/A N/A self redirect_uri response_type access_type N/A oob code offline kwargs N/A N/A Returns a URI to redirect to the provider.

    Args:
      redirect_uri: Either the string 'oob' for a non-web-based application, or
                    a URI that handles the callback from the authorization
                    server.
      response_type: Either the string 'code' for server-side or native
                     application, or the string 'token' for client-side
                     application.
      access_type: Either the string 'offline' to request a refresh token or
                   'online'.

    If redirect_uri is 'oob' then pass in the
    generated verification code to get_access_token,
    otherwise pass in the query parameters received
    at the callback uri to get_access_token.
    If the response_type is 'token', no need to call
    get_access_token as the API will return it within
    the query parameters received at the callback:
      oauth2_token.access_token = YOUR_ACCESS_TOKEN
     N/A N/A self redirect_uri redirect_uri N/A query N/A response_type client_id redirect_uri scope access_type response_type N/A self client_id redirect_uri N/A self scope access_type N/A N/A N/A query update kwargs N/A parts N/A list N/A N/A N/A urllib parse urlparse N/A self auth_uri N/A N/A N/A query update N/A dict N/A parse_qsl N/A parts N/A 4 N/A N/A parts N/A 4 N/A N/A N/A urllib parse urlencode query N/A N/A N/A N/A urllib parse urlunparse parts N/A get_access_token N/A N/A self code N/A N/A N/A Exhanges a code for an access token.

    Args:
      code: string or dict, either the code as a string, or a dictionary
        of the query parameters to the redirect_uri, which contains
        the code.
     N/A N/A N/A N/A isinstance code str N/A isinstance code str N/A N/A code N/A code N/A code N/A body N/A N/A N/A urllib parse urlencode N/A grant_type client_id client_secret code redirect_uri scope authorization_code N/A self client_id N/A self client_secret code N/A self redirect_uri N/A self scope N/A headers N/A user-agent N/A self user_agent N/A http_client N/A N/A N/A atom http_core HttpClient N/A http_request N/A N/A N/A atom http_core HttpRequest uri N/A self token_uri method POST headers headers N/A N/A N/A http_request add_body_part data body mime_type application/x-www-form-urlencoded N/A response N/A N/A http_client request http_request N/A body N/A N/A response read N/A N/A N/A response status 200 N/A N/A N/A N/A self _extract_tokens body N/A self N/A N/A error_msg N/A Invalid response %s. N/A response status N/A N/A N/A d N/A N/A simplejson loads body N/A N/A error d N/A N/A error_msg N/A d N/A error N/A N/A N/A N/A N/A N/A OAuth2AccessTokenError error_msg N/A authorize N/A N/A self client N/A N/A N/A Authorize a gdata.client.GDClient instance with these credentials.

    Args:
       client: An instance of gdata.client.GDClient
           or something that acts like it.

    Returns:
       A modified instance of client that was passed in.

    Example:

      c = gdata.client.GDClient(source='user-agent')
      c = token.authorize(c)
     N/A N/A client auth_token self N/A request_orig N/A N/A client http_client request new_request N/A N/A http_request N/A N/A N/A response N/A request_orig http_request N/A N/A N/A response status 401 N/A N/A refresh_response N/A N/A self _refresh request_orig N/A N/A self _invalid N/A N/A refresh_response N/A N/A N/A N/A self modify_request http_request N/A N/A request_orig http_request N/A N/A response N/A N/A N/A N/A client http_client request new_request N/A client N/A modify_request N/A N/A self http_request N/A N/A N/A Sets the Authorization header in the HTTP request using the token.

    Returns:
      The same HTTP request object which was passed in.
     N/A N/A N/A http_request headers N/A Authorization N/A %s%s N/A OAUTH2_AUTH_LABEL N/A self access_token N/A http_request N/A N/A ModifyRequest modify_request N/A _join_token_parts N/A N/A N/A args N/A N/A "Escapes and combines all strings passed in.

  Used to convert a token object's members into a string instead of
  using pickle.

  Note: A None value will be converted to an empty string.

  Returns:
    A string in the form 1x|member1|member2|member3...
   N/A N/A N/A | join N/A N/A N/A N/A urllib parse quote_plus N/A a N/A a args N/A _split_token_parts N/A N/A blob N/A N/A N/A Extracts and unescapes fields from the provided binary string.

  Reverses the packing performed by _join_token_parts. Used to extract
  the members of a token object.

  Note: An empty string from the blob will be interpreted as None.

  Args:
    blob: str A string of the form 1x|member1|member2|member3 as created
        by _join_token_parts

  Returns:
    A list of unescaped strings.
   N/A N/A N/A N/A N/A N/A urllib parse unquote_plus part None N/A part N/A N/A blob split | N/A token_to_blob N/A N/A token N/A N/A N/A Serializes the token data as a string for storage in a datastore.

  Supported token classes: ClientLoginToken, AuthSubToken, SecureAuthSubToken,
  OAuthRsaToken, and OAuthHmacToken, TwoLeggedOAuthRsaToken,
  TwoLeggedOAuthHmacToken and OAuth2Token.

  Args:
    token: A token object which must be of one of the supported token classes.

  Raises:
    UnsupportedTokenType if the token is not one of the supported token
    classes listed above.

  Returns:
    A string represenging this token. The string can be converted back into
    an equivalent token object using token_from_blob. Note that any members
    which are set to '' will be set to None when the token is deserialized
    by token_from_blob.
   N/A N/A isinstance token ClientLoginToken N/A N/A N/A _join_token_parts 1c N/A token token_string N/A N/A N/A isinstance token SecureAuthSubToken N/A N/A N/A _join_token_parts 1s N/A token token_string N/A token rsa_private_key N/A token scopes N/A N/A N/A isinstance token AuthSubToken N/A N/A N/A _join_token_parts 1a N/A token token_string N/A token scopes N/A N/A N/A isinstance token TwoLeggedOAuthRsaToken N/A N/A N/A _join_token_parts 1rtl N/A token consumer_key N/A token rsa_private_key N/A token requestor_id N/A N/A N/A isinstance token TwoLeggedOAuthHmacToken N/A N/A N/A _join_token_parts 1htl N/A token consumer_key N/A token consumer_secret N/A token requestor_id N/A N/A N/A isinstance token OAuthRsaToken N/A N/A N/A _join_token_parts 1r N/A token consumer_key N/A token rsa_private_key N/A token token N/A token token_secret N/A str N/A token auth_state N/A token __next__ N/A token verifier N/A N/A N/A isinstance token OAuthHmacToken N/A N/A N/A _join_token_parts 1h N/A token consumer_key N/A token consumer_secret N/A token token N/A token token_secret N/A str N/A token auth_state N/A token __next__ N/A token verifier N/A N/A N/A isinstance token OAuth2Token N/A N/A N/A _join_token_parts 2o N/A token client_id N/A token client_secret N/A token scope N/A token user_agent N/A token auth_uri N/A token token_uri N/A token access_token N/A token refresh_token N/A N/A N/A UnsupportedTokenType N/A Unable to serialize token of type %s N/A type token N/A N/A TokenToBlob token_to_blob token_from_blob N/A N/A blob N/A N/A N/A Deserializes a token string from the datastore back into a token object.

  Supported token classes: ClientLoginToken, AuthSubToken, SecureAuthSubToken,
  OAuthRsaToken, and OAuthHmacToken, TwoLeggedOAuthRsaToken,
  TwoLeggedOAuthHmacToken and OAuth2Token.

  Args:
    blob: string created by token_to_blob.

  Raises:
    UnsupportedTokenType if the token is not one of the supported token
    classes listed above.

  Returns:
    A new token object with members set to the values serialized in the
    blob string. Note that any members which were set to '' in the original
    token will now be None.
   N/A parts N/A _split_token_parts blob N/A N/A N/A parts N/A 0 1c N/A N/A N/A ClientLoginToken N/A parts N/A 1 N/A N/A N/A N/A parts N/A 0 1a N/A N/A N/A AuthSubToken N/A parts N/A 1 N/A parts N/A 2 N/A N/A N/A N/A parts N/A 0 1s N/A N/A N/A SecureAuthSubToken N/A parts N/A 1 N/A parts N/A 2 N/A parts N/A 3 N/A N/A N/A N/A parts N/A 0 1rtl N/A N/A N/A TwoLeggedOAuthRsaToken N/A parts N/A 1 N/A parts N/A 2 N/A parts N/A 3 N/A N/A N/A N/A parts N/A 0 1htl N/A N/A N/A TwoLeggedOAuthHmacToken N/A parts N/A 1 N/A parts N/A 2 N/A parts N/A 3 N/A N/A N/A N/A parts N/A 0 1r N/A N/A auth_state N/A int N/A parts N/A 5 N/A N/A OAuthRsaToken N/A parts N/A 1 N/A parts N/A 2 N/A parts N/A 3 N/A parts N/A 4 auth_state N/A parts N/A 6 N/A parts N/A 7 N/A N/A N/A N/A parts N/A 0 1h N/A N/A auth_state N/A int N/A parts N/A 5 N/A N/A OAuthHmacToken N/A parts N/A 1 N/A parts N/A 2 N/A parts N/A 3 N/A parts N/A 4 auth_state N/A parts N/A 6 N/A parts N/A 7 N/A N/A N/A N/A parts N/A 0 2o N/A N/A N/A OAuth2Token N/A parts N/A 1 N/A parts N/A 2 N/A parts N/A 3 N/A parts N/A 4 N/A parts N/A 5 N/A parts N/A 6 N/A parts N/A 7 N/A parts N/A 8 N/A N/A N/A UnsupportedTokenType N/A Unable to deserialize token with type marker of %s N/A parts N/A 0 N/A N/A TokenFromBlob token_from_blob dump_tokens N/A N/A tokens N/A N/A N/A N/A N/A , join N/A N/A token_to_blob t N/A t tokens N/A load_tokens N/A N/A blob N/A N/A N/A N/A N/A token_from_blob s N/A s N/A N/A blob split , N/A find_scopes_for_services N/A N/A service_names N/A None N/A N/A Creates a combined list of scope URLs for the desired services.

  This method searches the AUTH_SCOPES dictionary.

  Args:
    service_names: list of strings (optional) Each name must be a key in the
                   AUTH_SCOPES dictionary. If no list is provided (None) then
                   the resulting list will contain all scope URLs in the
                   AUTH_SCOPES dict.

  Returns:
    A list of URL strings which are the scopes needed to access these services
    when requesting a token using AuthSub or OAuth.
   N/A result_scopes N/A N/A N/A service_names None N/A N/A N/A service_name scopes N/A N/A AUTH_SCOPES items N/A N/A N/A N/A result_scopes extend scopes N/A N/A service_name service_names N/A N/A N/A N/A result_scopes extend N/A AUTH_SCOPES N/A service_name N/A result_scopes N/A N/A FindScopesForServices find_scopes_for_services ae_save N/A N/A token token_key N/A N/A N/A Stores an auth token in the App Engine datastore.

  This is a convenience method for using the library with App Engine.
  Recommended usage is to associate the auth token with the current_user.
  If a user is signed in to the app using the App Engine users API, you
  can use
  gdata.gauth.ae_save(some_token, users.get_current_user().user_id())
  If you are not using the Users API you are free to choose whatever
  string you would like for a token_string.

  Args:
    token: an auth token object. Must be one of ClientLoginToken,
           AuthSubToken, SecureAuthSubToken, OAuthRsaToken, or OAuthHmacToken
           (see token_to_blob).
    token_key: str A unique identified to be used when you want to retrieve
               the token. If the user is signed in to App Engine using the
               users API, I recommend using the user ID for the token_key:
               users.get_current_user().user_id()
   N/A gdata.alt.app_engine N/A key_name N/A N/A join N/A gd_auth_token token_key N/A N/A N/A N/A N/A gdata alt app_engine set_token key_name N/A token_to_blob token N/A N/A AeSave ae_save ae_load N/A N/A token_key N/A N/A N/A Retrieves a token object from the App Engine datastore.

  This is a convenience method for using the library with App Engine.
  See also ae_save.

  Args:
    token_key: str The unique key associated with the desired token when it
               was saved using ae_save.

  Returns:
    A token object if there was a token associated with the token_key or None
    if the key could not be found.
   N/A gdata.alt.app_engine N/A key_name N/A N/A join N/A gd_auth_token token_key N/A token_string N/A N/A N/A N/A gdata alt app_engine get_token key_name N/A N/A token_string None N/A N/A N/A token_from_blob token_string N/A N/A None N/A N/A AeLoad ae_load ae_delete N/A N/A token_key N/A N/A N/A Removes the token object from the App Engine datastore. N/A gdata.alt.app_engine N/A key_name N/A N/A join N/A gd_auth_token token_key N/A N/A N/A N/A N/A gdata alt app_engine delete_token key_name N/A N/A AeDelete ae_delete