Module Import alias Import alias Import alias Import alias Import alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore ListComp Call AttributeLoad Str attr NameLoad comprehension NameStore Call AttributeLoad NameLoad attr ListLoad Str Str ListLoad Str Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return BinOpMod Str TupleLoad SubscriptLoad NameLoad Slice Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Slice Call AttributeLoad NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Assert UnaryOpNot BoolOpAnd NameLoad NameLoad If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Assign NameStore Str If CompareIs NameLoad NameLoad body Assign NameStore ListComp NameLoad comprehension NameStore NameLoad Assert CompareEq Call NameLoad NameLoad Call NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body TryExcept body Expr SubscriptLoad AttributeLoad Call NameLoad NameLoad attr Index NameLoad handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Dict Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad Dict Str Str Str NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Call NameLoad Str Call AttributeLoad Str attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr CompareEq NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad If Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str body Expr Call AttributeLoad NameLoad attr CompareLt NameLoad SubscriptLoad NameLoad Index NameLoad orelse Expr Call AttributeLoad NameLoad attr CompareGt NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Return NameLoad If BoolOpOr UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr body Return ListLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body Return NameLoad orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareNotIn Str AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad BinOpMod Call NameLoad Str AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareNotIn Str AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad BinOpMod Call NameLoad Str AttributeLoad NameLoad attr If Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body Expr Str If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Call NameLoad Str Assign NameStore IfExp UnaryOpNot NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareIn Str NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Return Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot NameLoad body Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Return Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Pass decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad Str Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad Str Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults vararg body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword CompareGt Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr body Assign NameStore CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num Assign NameStore NameLoad AugAssignBitAnd NameStore CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore NameLoad body AugAssignBitAnd NameStore CompareEq SubscriptLoad AttributeLoad NameLoad attr Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad keyword SubscriptLoad NameLoad Index Num keyword NameLoad If NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad attr Dict Str Str Str Call NameLoad Str Call NameLoad Str Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad body Return Num If Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad body Return Str Raise Call AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad ListComp TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad For NameStore NameLoad body If CompareNotIn Str SubscriptLoad NameLoad Index Str body Continue Assign NameStore SubscriptLoad NameLoad Index Str If CompareIn NameLoad NameLoad body Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad keyword SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body If CompareEq AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Str NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Str Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareNotEq AttributeLoad NameLoad attr Str body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad Str NameLoad keyword Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpAdd NameLoad Str NameLoad BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str NameLoad Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body If CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body If CompareEq AttributeLoad NameLoad attr Str body Return Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Str Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareNotEq AttributeLoad NameLoad attr Str body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad NameLoad NameLoad body Return NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore TupleLoad Str Str Str Return Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad decorator_list Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpAdd NameLoad Str NameLoad BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore ListComp SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr keyword NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str body Expr Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Str body Assign NameStore Str orelse Assign NameStore Str Return BinOpMod NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str ImportFrom alias Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Str If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad Return CompareIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad ListComp Call NameLoad AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Break orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad Return Call AttributeLoad Call NameLoad attr NameLoad decorator_list NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Return TupleLoad BoolOpOr Call AttributeLoad NameLoad attr Num Str BoolOpOr Call AttributeLoad NameLoad attr Num Str decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore SubscriptLoad NameLoad Index Num Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Return AttributeLoad AttributeLoad NameLoad attr attr orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body If CompareNotIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Num Num FunctionDef arguments args defaults vararg kwarg body Return Call AttributeLoad NameLoad attr NameLoad Str NameLoad NameLoad decorator_list Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr Num Num If UnaryOpNot NameLoad body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return Call NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For NameStore TupleLoad NameLoad Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad For NameStore TupleLoad NameLoad Str body If CompareIn NameLoad NameLoad body Return SubscriptLoad NameLoad Index NameLoad orelse Raise Call NameLoad BinOpMod Str BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Lambda arguments args defaults Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareNotEq NameLoad Str body Assign NameStore TupleLoad NameLoad Str orelse Assign NameStore TupleLoad Str For NameStore TupleLoad NameLoad Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad For NameStore NameLoad body For NameStore SubscriptLoad NameLoad Index NameLoad body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad body If CompareIsNot Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad body Raise Call NameLoad Str decorator_list decorator_list Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults TupleLoad Str Str body Expr Str Assign NameStore Str Assign NameStore Dict If NameLoad body Assign NameStore Call NameLoad GeneratorExp TupleLoad BinOpMod Str NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr GeneratorExp BinOpAdd Str NameLoad comprehension NameStore NameLoad AugAssignAdd NameStore BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Yield NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Raise orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A collections N/A contextlib N/A itertools N/A logging N/A re oslo_utils timeutils N/A six N/A sqlalchemy sqlalchemy Boolean sqlalchemy CheckConstraint sqlalchemy Column sqlalchemy.engine Connectable sqlalchemy.engine reflection sqlalchemy.engine url sa_url sqlalchemy func sqlalchemy Index sqlalchemy inspect sqlalchemy Integer sqlalchemy MetaData sqlalchemy.sql.expression literal_column sqlalchemy.sql text sqlalchemy String sqlalchemy Table sqlalchemy.types NullType oslo_db exception oslo_db._i18n _ _LI _LW oslo_db.sqlalchemy models N/A InvalidSortKey N/A exception InvalidSortKey N/A ColumnError N/A exception ColumnError N/A LOG N/A N/A logging getLogger __name__ N/A _DBURL_REGEX N/A N/A re compile [^:]+://([^:]+):([^@]+)@.+ N/A _VALID_SORT_DIR N/A N/A N/A - join x N/A x N/A N/A itertools product N/A asc desc N/A nullsfirst nullslast sanitize_db_url N/A N/A url N/A N/A N/A match N/A N/A _DBURL_REGEX match url N/A match N/A N/A N/A %s****:****%s N/A N/A url N/A N/A N/A match start 1 N/A url N/A N/A N/A match end 2 N/A url N/A paginate_query N/A N/A query model limit sort_keys marker sort_dir sort_dirs N/A None None None N/A N/A Returns a query with sorting / pagination criteria added.

    Pagination works by requiring a unique sort_key, specified by sort_keys.
    (If sort_keys is not unique, then we risk looping through values.)
    We use the last row in the previous page as the 'marker' for pagination.
    So we must return values that follow the passed marker in the order.
    With a single-valued sort_key, this would be easy: sort_key > X.
    With a compound-values sort_key, (k1, k2, k3) we must do this to repeat
    the lexicographical ordering:
    (k1 > X1) or (k1 == X1 && k2 > X2) or (k1 == X1 && k2 == X2 && k3 > X3)

    We also have to cope with different sort_directions.

    Typically, the id of the last row is used as the client-facing pagination
    marker, then the actual marker object must be fetched from the db and
    passed in to us as marker.

    :param query: the query object to which we should add paging/sorting
    :param model: the ORM model class
    :param limit: maximum number of items to return
    :param sort_keys: array of attributes by which results should be sorted
    :param marker: the last item of the previous page; we returns the next
                    results after this value.
    :param sort_dir: direction in which results should be sorted (asc, desc)
                     suffix -nullsfirst, -nullslast can be added to defined
                     the ordering of null values
    :param sort_dirs: per-column array of sort_dirs, corresponding to sort_keys

    :rtype: sqlalchemy.orm.query.Query
    :return: The query with sorting/pagination added.
     N/A N/A id sort_keys N/A N/A N/A N/A LOG warning N/A _LW Id not in sort_keys; is sort_keys unique? N/A N/A N/A sort_dir sort_dirs N/A N/A N/A sort_dirs None N/A sort_dir None N/A N/A sort_dir asc N/A N/A sort_dirs None N/A N/A sort_dirs N/A sort_dir N/A _sort_key sort_keys N/A N/A N/A len sort_dirs N/A len sort_keys N/A N/A current_sort_key current_sort_dir N/A zip sort_keys sort_dirs N/A N/A N/A N/A N/A N/A N/A inspect model all_orm_descriptors N/A current_sort_key N/A N/A N/A KeyError N/A N/A N/A N/A exception InvalidSortKey current_sort_key N/A N/A sort_key_attr N/A getattr model current_sort_key N/A N/A N/A N/A main_sort_dir __ null_sort_dir N/A N/A current_sort_dir partition - N/A sort_dir_func N/A N/A asc desc N/A sqlalchemy asc N/A sqlalchemy desc N/A main_sort_dir N/A null_order_by_stmt N/A N/A nullsfirst nullslast None N/A N/A sort_key_attr is_ None N/A N/A sort_key_attr isnot None N/A null_sort_dir N/A N/A N/A KeyError N/A N/A N/A ValueError N/A N/A _ Unknown sort direction, must be one of: %s N/A N/A ,  join _VALID_SORT_DIR N/A N/A null_order_by_stmt None N/A N/A query N/A N/A query order_by N/A N/A sqlalchemy desc null_order_by_stmt N/A query N/A N/A query order_by N/A sort_dir_func sort_key_attr N/A N/A marker None N/A N/A marker_values N/A N/A sort_key sort_keys N/A N/A v N/A getattr marker sort_key N/A N/A N/A marker_values append v N/A criteria_list N/A N/A i N/A range N/A len sort_keys N/A N/A crit_attrs N/A N/A j N/A range i N/A N/A model_attr N/A getattr model N/A sort_keys N/A j N/A N/A N/A crit_attrs append N/A model_attr N/A marker_values N/A j N/A model_attr N/A getattr model N/A sort_keys N/A i N/A N/A N/A N/A sort_dirs N/A i startswith desc N/A N/A N/A N/A crit_attrs append N/A model_attr N/A marker_values N/A i N/A N/A N/A N/A crit_attrs append N/A model_attr N/A marker_values N/A i N/A criteria N/A N/A N/A sqlalchemy sql and_ crit_attrs N/A N/A N/A criteria_list append criteria N/A f N/A N/A N/A sqlalchemy sql or_ criteria_list N/A query N/A N/A query filter f N/A N/A limit None N/A N/A query N/A N/A query limit limit N/A query N/A to_list N/A N/A x default N/A None N/A N/A N/A x None N/A N/A default N/A N/A N/A N/A isinstance x N/A collections Iterable N/A isinstance x N/A six string_types N/A N/A N/A x N/A N/A N/A isinstance x list N/A N/A x N/A N/A N/A list x N/A _read_deleted_filter N/A N/A query db_model deleted N/A N/A N/A N/A deleted N/A N/A db_model __table__ columns N/A N/A N/A ValueError N/A N/A _ There is no `deleted` column in `%s` table. Project doesn't use soft-deleted feature. N/A db_model __name__ N/A default_deleted_value N/A N/A N/A N/A N/A db_model __table__ c deleted default arg N/A deleted N/A N/A query N/A N/A query filter N/A N/A db_model deleted default_deleted_value N/A N/A query N/A N/A query filter N/A N/A db_model deleted default_deleted_value N/A query N/A _project_filter N/A N/A query db_model project_id N/A N/A N/A N/A project_id N/A N/A db_model __table__ columns N/A N/A N/A ValueError N/A N/A _ There is no `project_id` column in `%s` table. N/A db_model __name__ N/A N/A isinstance project_id N/A list tuple set N/A N/A query N/A N/A query filter N/A N/A N/A db_model project_id in_ project_id N/A N/A query N/A N/A query filter N/A N/A db_model project_id project_id N/A query N/A model_query N/A N/A model session args N/A None kwargs N/A N/A Query helper for db.sqlalchemy api methods.

    This accounts for `deleted` and `project_id` fields.

    :param model:        Model to query. Must be a subclass of ModelBase.
    :type model:         models.ModelBase

    :param session:      The session to use.
    :type session:       sqlalchemy.orm.session.Session

    :param args:         Arguments to query. If None - model is used.
    :type args:          tuple

    Keyword arguments:

    :keyword project_id: If present, allows filtering by project_id(s).
                         Can be either a project_id value, or an iterable of
                         project_id values, or None. If an iterable is passed,
                         only rows whose project_id column value is on the
                         `project_id` list will be returned. If None is passed,
                         only rows which are not bound to any project, will be
                         returned.
    :type project_id:    iterable,
                         model.__table__.columns.project_id.type,
                         None type

    :keyword deleted:    If present, allows filtering by deleted field.
                         If True is passed, only deleted entries will be
                         returned, if False - only existing entries.
    :type deleted:       bool


    Usage:

    .. code-block:: python

      from oslo_db.sqlalchemy import utils


      def get_instance_by_uuid(uuid):
          session = get_session()
          with session.begin()
              return (utils.model_query(models.Instance, session=session)
                           .filter(models.Instance.uuid == uuid)
                           .first())

      def get_nodes_stat():
          data = (Node.id, Node.cpu, Node.ram, Node.hdd)

          session = get_session()
          with session.begin()
              return utils.model_query(Node, session=session, args=data).all()

    Also you can create your own helper, based on ``utils.model_query()``.
    For example, it can be useful if you plan to use ``project_id`` and
    ``deleted`` parameters from project's ``context``

    .. code-block:: python

      from oslo_db.sqlalchemy import utils


      def _model_query(context, model, session=None, args=None,
                       project_id=None, project_only=False,
                       read_deleted=None):

          # We suppose, that functions ``_get_project_id()`` and
          # ``_get_deleted()`` should handle passed parameters and
          # context object (for example, decide, if we need to restrict a user
          # to query his own entries by project_id or only allow admin to read
          # deleted entries). For return values, we expect to get
          # ``project_id`` and ``deleted``, which are suitable for the
          # ``model_query()`` signature.
          kwargs = {}
          if project_id is not None:
              kwargs['project_id'] = _get_project_id(context, project_id,
                                                     project_only)
          if read_deleted is not None:
              kwargs['deleted'] = _get_deleted_dict(context, read_deleted)
          session = session or get_session()

          with session.begin():
              return utils.model_query(model, session=session,
                                       args=args, **kwargs)

      def get_instance_by_uuid(context, uuid):
          return (_model_query(context, models.Instance, read_deleted='yes')
                        .filter(models.Instance.uuid == uuid)
                        .first())

      def get_nodes_data(context, project_id, project_only='allow_none'):
          data = (Node.id, Node.cpu, Node.ram, Node.hdd)

          return (_model_query(context, Node, args=data, project_id=project_id,
                               project_only=project_only)
                        .all())

     N/A N/A N/A issubclass model N/A models ModelBase N/A N/A N/A TypeError N/A _ model should be a subclass of ModelBase N/A query N/A N/A args N/A N/A session query model N/A N/A session query args N/A N/A deleted kwargs N/A N/A query N/A _read_deleted_filter query model N/A kwargs N/A deleted N/A N/A project_id kwargs N/A N/A query N/A _project_filter query model N/A kwargs N/A project_id N/A query N/A get_table N/A N/A engine name N/A N/A N/A Returns an sqlalchemy table dynamically from db.

    Needed because the models don't work for us in migrations
    as models will be far out of sync with the current data.

    .. warning::

       Do not use this method when creating ForeignKeys in database migrations
       because sqlalchemy needs the same MetaData object to hold information
       about the parent table and the reference table in the ForeignKey. This
       method uses a unique MetaData object per table object so it won't work
       with ForeignKey creation.
     N/A metadata N/A MetaData N/A N/A metadata bind engine N/A N/A Table name metadata autoload True N/A InsertFromSelect N/A object N/A N/A Form the base for `INSERT INTO table (SELECT ... )` statement.

    DEPRECATED: this class is deprecated and will be removed from oslo_db
    in a few releases. Use default SQLAlchemy insert from select implementation
    instead

    :param table: table to insert records
    :param select: select query
    :param cols: list of columns to specify in insert clause
    :return: SQLAlchemy :class:`Insert` object instance

    Usage:

    .. code-block:: python

      select = sql.select(table_from)
      insert = InsertFromSelect(table_to, select,
                                ['id', 'name', 'insert_date'])
      engine.execute(insert)

     __new__ N/A N/A cls table select cols N/A None N/A N/A N/A cols N/A N/A cols N/A N/A c name N/A c N/A table c N/A N/A N/A N/A N/A table insert inline True from_select cols select N/A __init__ N/A N/A self table select cols N/A None N/A N/A N/A N/A _get_not_supported_column N/A N/A col_name_col_instance column_name N/A N/A N/A N/A N/A column N/A col_name_col_instance N/A column_name N/A N/A N/A KeyError N/A N/A msg N/A _ Please specify column %s in col_name_col_instance param. It is required because column has unsupported type by SQLite. N/A N/A N/A exception ColumnError N/A msg column_name N/A N/A N/A isinstance column Column N/A N/A msg N/A _ col_name_col_instance param has wrong type of column instance for column %s It should be instance of sqlalchemy.Column. N/A N/A N/A exception ColumnError N/A msg column_name N/A column N/A drop_old_duplicate_entries_from_table N/A N/A migrate_engine table_name use_soft_delete N/A uc_column_names N/A N/A Drop all old rows having the same values for columns in uc_columns.

    This method drop (or mark ad `deleted` if use_soft_delete is True) old
    duplicate rows form table with name `table_name`.

    :param migrate_engine:  Sqlalchemy engine
    :param table_name:      Table with duplicates
    :param use_soft_delete: If True - values will be marked as `deleted`,
                            if False - values will be removed from table
    :param uc_column_names: Unique constraint columns
     N/A meta N/A MetaData N/A N/A meta bind migrate_engine N/A table N/A Table table_name meta autoload True N/A columns_for_group_by N/A N/A N/A table c N/A name N/A name uc_column_names N/A columns_for_select N/A N/A N/A func max N/A N/A table c id N/A N/A N/A columns_for_select extend columns_for_group_by N/A duplicated_rows_select N/A N/A N/A sqlalchemy sql select columns_for_select group_by columns_for_group_by having N/A N/A N/A func count N/A N/A table c id 1 N/A row N/A N/A N/A N/A migrate_engine execute duplicated_rows_select fetchall N/A N/A delete_condition N/A N/A N/A table c id N/A row N/A 0 N/A is_none None N/A delete_condition N/A N/A N/A table c deleted_at is_none N/A name uc_column_names N/A N/A delete_condition N/A N/A N/A table c N/A name N/A row N/A name N/A rows_to_delete_select N/A N/A N/A N/A N/A sqlalchemy sql select N/A N/A N/A table c id where delete_condition N/A row N/A N/A N/A N/A migrate_engine execute rows_to_delete_select fetchall N/A N/A N/A N/A LOG info N/A _LI Deleting duplicated row with id: %(id)s from table: %(table)s N/A dict id N/A row N/A 0 table table_name N/A use_soft_delete N/A N/A delete_statement N/A N/A N/A N/A N/A N/A table update where delete_condition values N/A deleted updated_at deleted_at N/A literal_column id N/A literal_column updated_at N/A N/A timeutils utcnow N/A N/A delete_statement N/A N/A N/A N/A table delete where delete_condition N/A N/A N/A migrate_engine execute delete_statement N/A _get_default_deleted_value N/A N/A table N/A N/A N/A N/A isinstance N/A N/A N/A table c id type Integer N/A N/A 0 N/A N/A isinstance N/A N/A N/A table c id type String N/A N/A N/A N/A N/A exception ColumnError N/A _ Unsupported id columns type N/A _restore_indexes_on_deleted_columns N/A N/A migrate_engine table_name indexes N/A N/A N/A table N/A get_table migrate_engine table_name N/A insp N/A N/A N/A reflection Inspector from_engine migrate_engine N/A real_indexes N/A N/A insp get_indexes table_name N/A existing_index_names N/A dict N/A N/A N/A index N/A name N/A index N/A column_names N/A index real_indexes N/A index indexes N/A N/A N/A deleted N/A index N/A column_names N/A N/A N/A name N/A index N/A name N/A N/A name existing_index_names N/A N/A column_names N/A N/A N/A table c N/A c N/A c N/A existing_index_names N/A name N/A old_index N/A Index name unique N/A index N/A unique column_names N/A N/A N/A old_index drop migrate_engine N/A column_names N/A N/A N/A table c N/A c N/A c N/A index N/A column_names N/A new_index N/A Index N/A index N/A name unique N/A index N/A unique column_names N/A N/A N/A new_index create migrate_engine N/A change_deleted_column_type_to_boolean N/A N/A migrate_engine table_name N/A col_name_col_instance N/A N/A N/A N/A migrate_engine name sqlite N/A N/A N/A _change_deleted_column_type_to_boolean_sqlite migrate_engine table_name col_name_col_instance N/A insp N/A N/A N/A reflection Inspector from_engine migrate_engine N/A indexes N/A N/A insp get_indexes table_name N/A table N/A get_table migrate_engine table_name N/A old_deleted N/A Column old_deleted Boolean default False N/A N/A N/A old_deleted create table populate_default False N/A N/A N/A N/A N/A N/A N/A N/A N/A table update where N/A N/A N/A table c deleted N/A N/A table c id values old_deleted True execute N/A N/A N/A N/A N/A table c deleted drop N/A N/A N/A N/A N/A table c old_deleted alter name deleted N/A N/A _restore_indexes_on_deleted_columns migrate_engine table_name indexes N/A _change_deleted_column_type_to_boolean_sqlite N/A N/A migrate_engine table_name N/A col_name_col_instance N/A N/A insp N/A N/A N/A reflection Inspector from_engine migrate_engine N/A table N/A get_table migrate_engine table_name N/A columns N/A N/A column N/A table columns N/A N/A column_copy None N/A N/A N/A column name deleted N/A N/A N/A isinstance N/A column type NullType N/A N/A column_copy N/A _get_not_supported_column col_name_col_instance N/A column name N/A N/A column_copy N/A N/A column copy N/A N/A column_copy N/A Column deleted Boolean default 0 N/A N/A N/A columns append column_copy N/A constraints N/A N/A N/A constraint copy N/A constraint N/A table constraints N/A meta N/A table metadata N/A new_table N/A Table N/A table_name __tmp__ meta N/A columns constraints N/A N/A N/A new_table create N/A indexes N/A N/A index N/A N/A insp get_indexes table_name N/A N/A column_names N/A N/A N/A new_table c N/A c N/A c N/A index N/A column_names N/A N/A N/A indexes append N/A Index N/A index N/A name unique N/A index N/A unique column_names N/A c_select N/A N/A c N/A table c N/A N/A N/A N/A c name deleted N/A N/A N/A N/A c_select append c N/A N/A N/A N/A c_select append N/A N/A N/A table c deleted N/A N/A table c id N/A ins N/A InsertFromSelect new_table N/A N/A N/A sqlalchemy sql select c_select N/A N/A N/A migrate_engine execute ins N/A N/A N/A table drop N/A index indexes N/A N/A N/A N/A index create migrate_engine N/A N/A N/A new_table rename table_name N/A N/A N/A N/A N/A N/A N/A N/A N/A new_table update where N/A N/A N/A new_table c deleted N/A N/A new_table c id values deleted True execute N/A change_deleted_column_type_to_id_type N/A N/A migrate_engine table_name N/A col_name_col_instance N/A N/A N/A N/A migrate_engine name sqlite N/A N/A N/A _change_deleted_column_type_to_id_type_sqlite migrate_engine table_name col_name_col_instance N/A insp N/A N/A N/A reflection Inspector from_engine migrate_engine N/A indexes N/A N/A insp get_indexes table_name N/A table N/A get_table migrate_engine table_name N/A new_deleted N/A Column new_deleted N/A N/A N/A table c id type default N/A _get_default_deleted_value table N/A N/A N/A new_deleted create table populate_default True N/A deleted True N/A N/A N/A N/A N/A N/A N/A N/A N/A table update where N/A N/A N/A table c deleted deleted values new_deleted N/A N/A table c id execute N/A N/A N/A N/A N/A table c deleted drop N/A N/A N/A N/A N/A table c new_deleted alter name deleted N/A N/A _restore_indexes_on_deleted_columns migrate_engine table_name indexes N/A _change_deleted_column_type_to_id_type_sqlite N/A N/A migrate_engine table_name N/A col_name_col_instance N/A N/A insp N/A N/A N/A reflection Inspector from_engine migrate_engine N/A meta N/A MetaData bind migrate_engine N/A table N/A Table table_name meta autoload True N/A default_deleted_value N/A _get_default_deleted_value table N/A columns N/A N/A column N/A table columns N/A N/A column_copy None N/A N/A N/A column name deleted N/A N/A N/A isinstance N/A column type NullType N/A N/A column_copy N/A _get_not_supported_column col_name_col_instance N/A column name N/A N/A column_copy N/A N/A column copy N/A N/A column_copy N/A Column deleted N/A N/A N/A table c id type default default_deleted_value N/A N/A N/A columns append column_copy is_deleted_column_constraint N/A N/A constraint N/A N/A N/A N/A N/A isinstance constraint CheckConstraint N/A N/A False N/A sqltext N/A str N/A constraint sqltext N/A constraint_markers N/A deleted in (0, 1) deleted IN (:deleted_1, :deleted_2) deleted IN (:param_1, :param_2) N/A N/A any N/A N/A N/A sqltext endswith marker N/A marker constraint_markers N/A N/A constraints N/A N/A constraint N/A table constraints N/A N/A N/A N/A is_deleted_column_constraint constraint N/A N/A N/A N/A constraints append N/A N/A constraint copy N/A new_table N/A Table N/A table_name __tmp__ meta N/A columns constraints N/A N/A N/A new_table create N/A indexes N/A N/A index N/A N/A insp get_indexes table_name N/A N/A column_names N/A N/A N/A new_table c N/A c N/A c N/A index N/A column_names N/A N/A N/A indexes append N/A Index N/A index N/A name unique N/A index N/A unique column_names N/A ins N/A InsertFromSelect new_table N/A N/A table select N/A N/A N/A migrate_engine execute ins N/A N/A N/A table drop N/A index indexes N/A N/A N/A N/A index create migrate_engine N/A N/A N/A new_table rename table_name N/A deleted True N/A N/A N/A N/A N/A N/A N/A N/A N/A new_table update where N/A N/A N/A new_table c deleted deleted values deleted N/A N/A new_table c id execute N/A deleted False N/A N/A N/A N/A N/A N/A N/A N/A N/A new_table update where N/A N/A N/A new_table c deleted deleted values deleted default_deleted_value execute N/A get_connect_string N/A N/A backend database user passwd host N/A None None localhost N/A N/A Get database connection

    Try to get a connection with a very specific set of values, if we get
    these then we'll run the tests, otherwise they are skipped

    DEPRECATED: this function is deprecated and will be removed from oslo_db
    in a few releases. Please use the provisioning system for dealing
    with URLs and database provisioning.

     N/A args N/A backend user passwd host database backend user passwd host database N/A N/A backend sqlite N/A N/A template %(backend)s:///%(database)s N/A N/A template %(backend)s://%(user)s:%(passwd)s@%(host)s/%(database)s N/A N/A template args N/A is_backend_avail N/A N/A backend database user passwd N/A None None N/A N/A Return True if the given backend is available.


    DEPRECATED: this function is deprecated and will be removed from oslo_db
    in a few releases. Please use the provisioning system to access
    databases based on backend availability.

     oslo_db.sqlalchemy provision N/A connect_uri N/A get_connect_string backend backend database database user user passwd passwd N/A N/A N/A eng N/A N/A N/A provision Backend _ensure_backend_available connect_uri N/A N/A N/A eng dispose N/A N/A N/A N/A exception BackendNotAvailable N/A N/A False N/A N/A True N/A get_db_connection_info N/A N/A conn_pieces N/A N/A N/A database N/A N/A N/A conn_pieces path strip / N/A loc_pieces N/A N/A N/A conn_pieces netloc split @ N/A host N/A loc_pieces N/A 1 N/A auth_pieces N/A N/A N/A loc_pieces N/A 0 split : N/A user N/A auth_pieces N/A 0 N/A password N/A N/A N/A len auth_pieces 1 N/A N/A password N/A N/A N/A auth_pieces N/A 1 strip N/A N/A user password database host N/A index_exists N/A N/A migrate_engine table_name index_name N/A N/A N/A Check if given index exists.

    :param migrate_engine: sqlalchemy engine
    :param table_name:     name of the table
    :param index_name:     name of the index
     N/A inspector N/A N/A N/A reflection Inspector from_engine migrate_engine N/A indexes N/A N/A inspector get_indexes table_name N/A index_names N/A N/A index N/A name N/A index indexes N/A N/A index_name index_names N/A add_index N/A N/A migrate_engine table_name index_name idx_columns N/A N/A N/A Create an index for given columns.

    :param migrate_engine: sqlalchemy engine
    :param table_name:     name of the table
    :param index_name:     name of the index
    :param idx_columns:    tuple with names of columns that will be indexed
     N/A table N/A get_table migrate_engine table_name N/A N/A N/A index_exists migrate_engine table_name index_name N/A N/A index N/A Index index_name N/A N/A getattr N/A table c col N/A col idx_columns N/A N/A N/A index create N/A N/A N/A ValueError N/A Index '%s' already exists! index_name N/A drop_index N/A N/A migrate_engine table_name index_name N/A N/A N/A Drop index with given name.

    :param migrate_engine: sqlalchemy engine
    :param table_name:     name of the table
    :param index_name:     name of the index
     N/A table N/A get_table migrate_engine table_name N/A index N/A table indexes N/A N/A N/A N/A index name index_name N/A N/A N/A N/A index drop N/A N/A N/A N/A ValueError N/A Index '%s' not found! index_name N/A change_index_columns N/A N/A migrate_engine table_name index_name new_columns N/A N/A N/A Change set of columns that are indexed by given index.

    :param migrate_engine: sqlalchemy engine
    :param table_name:     name of the table
    :param index_name:     name of the index
    :param new_columns:    tuple with names of columns that will be indexed
     N/A N/A drop_index migrate_engine table_name index_name N/A N/A add_index migrate_engine table_name index_name new_columns N/A column_exists N/A N/A engine table_name column N/A N/A N/A Check if table has given column.

    :param engine:         sqlalchemy engine
    :param table_name:     name of the table
    :param column:         name of the colmn
     N/A t N/A get_table engine table_name N/A N/A column N/A t c N/A DialectFunctionDispatcher N/A object N/A dispatch_for_dialect N/A N/A cls expr multiple N/A False N/A N/A Provide dialect-specific functionality within distinct functions.

        e.g.::

            @dispatch_for_dialect("*")
            def set_special_option(engine):
                pass

            @set_special_option.dispatch_for("sqlite")
            def set_sqlite_special_option(engine):
                return engine.execute("sqlite thing")

            @set_special_option.dispatch_for("mysql+mysqldb")
            def set_mysqldb_special_option(engine):
                return engine.execute("mysqldb thing")

        After the above registration, the ``set_special_option()`` function
        is now a dispatcher, given a SQLAlchemy ``Engine``, ``Connection``,
        URL string, or ``sqlalchemy.engine.URL`` object::

            eng = create_engine('...')
            result = set_special_option(eng)

        The filter system supports two modes, "multiple" and "single".
        The default is "single", and requires that one and only one function
        match for a given backend.    In this mode, the function may also
        have a return value, which will be returned by the top level
        call.

        "multiple" mode, on the other hand, does not support return
        arguments, but allows for any number of matching functions, where
        each function will be called::

            # the initial call sets this up as a "multiple" dispatcher
            @dispatch_for_dialect("*", multiple=True)
            def set_options(engine):
                # set options that apply to *all* engines

            @set_options.dispatch_for("postgresql")
            def set_postgresql_options(engine):
                # set options that apply to all Postgresql engines

            @set_options.dispatch_for("postgresql+psycopg2")
            def set_postgresql_psycopg2_options(engine):
                # set options that apply only to "postgresql+psycopg2"

            @set_options.dispatch_for("*+pyodbc")
            def set_pyodbc_options(engine):
                # set options that apply to all pyodbc backends

        Note that in both modes, any number of additional arguments can be
        accepted by member functions.  For example, to populate a dictionary of
        options, it may be passed in::

            @dispatch_for_dialect("*", multiple=True)
            def set_engine_options(url, opts):
                pass

            @set_engine_options.dispatch_for("mysql+mysqldb")
            def _mysql_set_default_charset_to_utf8(url, opts):
                opts.setdefault('charset', 'utf-8')

            @set_engine_options.dispatch_for("sqlite")
            def _set_sqlite_in_memory_check_same_thread(url, opts):
                if url.database in (None, 'memory'):
                    opts['check_same_thread'] = False

            opts = {}
            set_engine_options(url, opts)

        The driver specifiers are of the form:
        ``<database | *>[+<driver | *>]``.   That is, database name or "*",
        followed by an optional ``+`` sign with driver or "*".   Omitting
        the driver name implies all drivers for that database.

         N/A multiple N/A N/A cls DialectMultiFunctionDispatcher N/A N/A cls DialectSingleFunctionDispatcher N/A N/A N/A N/A cls dispatch_for expr N/A classmethod N/A _db_plus_driver_reg N/A N/A re compile ([^+]+?)(?:\+(.+))?$ dispatch_for N/A N/A self expr N/A N/A decorate N/A N/A fn N/A N/A N/A N/A dbname driver N/A N/A self _parse_dispatch expr N/A N/A fn self N/A N/A fn N/A fn _last N/A N/A self _last fn N/A N/A N/A self _register expr dbname driver fn N/A self N/A N/A decorate N/A _parse_dispatch N/A N/A self text N/A N/A N/A m N/A N/A N/A self _db_plus_driver_reg match text N/A N/A m N/A N/A N/A ValueError N/A Couldn't parse database[+driver]: %r text N/A N/A N/A N/A N/A m group 1 * N/A N/A N/A m group 2 * N/A __call__ N/A N/A self N/A arg kw N/A N/A target N/A arg N/A 0 N/A N/A N/A self _dispatch_on N/A N/A self _url_from_target target target arg kw N/A _url_from_target N/A N/A self target N/A N/A N/A N/A isinstance target Connectable N/A N/A N/A N/A target engine url N/A N/A N/A isinstance target N/A six string_types N/A N/A N/A :// target N/A N/A target_url N/A N/A sa_url make_url N/A %s:// target N/A N/A target_url N/A N/A sa_url make_url target N/A target_url N/A N/A N/A isinstance target N/A sa_url URL N/A N/A target N/A N/A N/A ValueError N/A Invalid target type: %r target N/A dispatch_on_drivername N/A N/A self drivername N/A N/A N/A Return a sub-dispatcher for the given drivername.

        This provides a means of calling a different function, such as the
        "*" function, for a given target object that normally refers
        to a sub-function.

         N/A N/A dbname driver N/A N/A N/A N/A N/A self _db_plus_driver_reg match drivername group 1 2 go N/A N/A N/A arg kw N/A N/A N/A N/A self _dispatch_on_db_driver dbname * arg kw N/A N/A go N/A _dispatch_on N/A N/A self url target arg kw N/A N/A N/A N/A dbname driver N/A N/A N/A N/A N/A self _db_plus_driver_reg match N/A url drivername group 1 2 N/A N/A driver N/A N/A driver N/A N/A N/A url get_dialect driver N/A N/A N/A self _dispatch_on_db_driver dbname driver arg kw N/A _invoke_fn N/A N/A self fn arg kw N/A N/A N/A N/A fn arg kw N/A N/A DialectSingleFunctionDispatcher N/A DialectFunctionDispatcher N/A __init__ N/A N/A self N/A N/A N/A N/A self reg N/A N/A collections defaultdict dict N/A _register N/A N/A self expr dbname driver fn N/A N/A N/A fn_dict N/A N/A self reg N/A dbname N/A N/A driver fn_dict N/A N/A N/A TypeError N/A Multiple functions for expression %r expr N/A N/A fn_dict N/A driver fn N/A _matches N/A N/A self dbname driver N/A N/A N/A db N/A dbname * N/A N/A subdict N/A N/A self reg N/A db N/A drv N/A driver * N/A N/A N/A drv subdict N/A N/A N/A subdict N/A drv N/A N/A N/A ValueError N/A No default function found for driver: %r N/A %s+%s N/A dbname driver N/A _dispatch_on_db_driver N/A N/A self dbname driver arg kw N/A N/A N/A fn N/A N/A self _matches dbname driver N/A N/A N/A self _invoke_fn fn arg kw N/A N/A DialectMultiFunctionDispatcher N/A DialectFunctionDispatcher N/A __init__ N/A N/A self N/A N/A N/A N/A self reg N/A N/A collections defaultdict N/A N/A N/A N/A N/A N/A collections defaultdict list N/A _register N/A N/A self expr dbname driver fn N/A N/A N/A N/A N/A N/A N/A N/A self reg N/A dbname N/A driver append fn N/A _matches N/A N/A self dbname driver N/A N/A N/A N/A driver * N/A N/A drivers N/A driver * N/A N/A drivers N/A * N/A db N/A dbname * N/A N/A subdict N/A N/A self reg N/A db N/A drv drivers N/A N/A fn N/A subdict N/A drv N/A N/A N/A fn N/A _dispatch_on_db_driver N/A N/A self dbname driver arg kw N/A N/A N/A fn N/A N/A self _matches dbname driver N/A N/A N/A N/A N/A self _invoke_fn fn arg kw None N/A N/A N/A TypeError Return value not allowed for multiple filtered function N/A N/A N/A dispatch_for_dialect N/A DialectFunctionDispatcher dispatch_for_dialect get_non_innodb_tables N/A N/A connectable skip_tables N/A N/A migrate_version alembic_version N/A N/A Get a list of tables which don't use InnoDB storage engine.

     :param connectable: a SQLAlchemy Engine or a Connection instance
     :param skip_tables: a list of tables which might have a different
                         storage engine
      N/A query_str 
        SELECT table_name
        FROM information_schema.tables
        WHERE table_schema = :database AND
              engine != 'InnoDB'
     N/A params N/A N/A skip_tables N/A N/A params N/A dict N/A N/A N/A skip_%s i table_name N/A N/A i table_name N/A enumerate skip_tables N/A placeholders N/A N/A ,  join N/A N/A : p N/A p params N/A query_str N/A  AND table_name NOT IN (%s) placeholders N/A N/A params N/A database N/A N/A N/A connectable engine url database N/A query N/A text query_str N/A noninnodb N/A N/A connectable execute query params N/A N/A N/A i N/A 0 N/A i noninnodb N/A NonCommittingConnectable N/A object N/A N/A A ``Connectable`` substitute which rolls all operations back.

    ``NonCommittingConnectable`` forms the basis of mock
    ``Engine`` and ``Connection`` objects within a test.   It provides
    only that part of the API that should reasonably be used within
    a single-connection test environment (e.g. no engine.dispose(),
    connection.invalidate(), etc. ).   The connection runs both within
    a transaction as well as a savepoint.   The transaction is there
    so that any operations upon the connection can be rolled back.
    If the test calls begin(), a "pseduo" transaction is returned that
    won't actually commit anything.   The subtransaction is there to allow
    a test to successfully call rollback(), however, where all operations
    to that point will be rolled back and the operations can continue,
    simulating a real rollback while still remaining within a transaction
    external to the test.

     __init__ N/A N/A self connection N/A N/A N/A N/A self connection connection N/A N/A self _trans N/A N/A connection begin N/A N/A N/A self _restart_nested N/A _restart_nested N/A N/A self N/A N/A N/A N/A self _nested_trans N/A N/A N/A self connection begin_nested N/A _dispose N/A N/A self N/A N/A N/A N/A N/A N/A self connection closed N/A N/A N/A N/A N/A self _nested_trans rollback N/A N/A N/A N/A self _trans rollback N/A N/A N/A N/A self connection close N/A execute N/A N/A self obj N/A multiparams params N/A N/A Executes the given construct and returns a :class:`.ResultProxy`. N/A N/A N/A N/A self connection execute obj multiparams params N/A scalar N/A N/A self obj N/A multiparams params N/A N/A Executes and returns the first column of the first row. N/A N/A N/A N/A self connection scalar obj multiparams params N/A N/A NonCommittingEngine N/A NonCommittingConnectable N/A N/A ``Engine`` -specific non committing connectbale. url N/A N/A self N/A N/A N/A N/A N/A N/A self connection engine url N/A property engine N/A N/A self N/A N/A N/A self N/A property connect N/A N/A self N/A N/A N/A N/A NonCommittingConnection N/A self connection N/A begin N/A N/A self N/A N/A N/A conn N/A N/A self connect N/A trans N/A N/A conn begin N/A N/A N/A N/A conn N/A N/A N/A Exception N/A N/A N/A N/A trans rollback N/A N/A N/A N/A trans commit N/A N/A contextlib contextmanager N/A NonCommittingConnection N/A NonCommittingConnectable N/A N/A ``Connection`` -specific non committing connectbale. close N/A N/A self N/A N/A N/A Close the 'Connection'.

        In this context, close() is a no-op.

         N/A N/A begin N/A N/A self N/A N/A N/A N/A NonCommittingTransaction self N/A N/A N/A self connection begin N/A __enter__ N/A N/A self N/A N/A N/A self N/A __exit__ N/A N/A self N/A arg N/A N/A N/A N/A NonCommittingTransaction N/A object N/A N/A A wrapper for ``Transaction``.

    This is to accommodate being able to guaranteed start a new
    SAVEPOINT when a transaction is rolled back.

     __init__ N/A N/A self provisioned transaction N/A N/A N/A N/A self provisioned provisioned N/A N/A self transaction transaction N/A __enter__ N/A N/A self N/A N/A N/A self N/A __exit__ N/A N/A self type value traceback N/A N/A N/A N/A type None N/A N/A N/A N/A N/A N/A self commit N/A N/A N/A Exception N/A N/A N/A N/A self rollback N/A N/A N/A N/A N/A self rollback N/A commit N/A N/A self N/A N/A N/A N/A N/A N/A self transaction commit N/A rollback N/A N/A self N/A N/A N/A N/A N/A N/A self transaction rollback N/A N/A N/A N/A self provisioned _restart_nested N/A N/A