Module Import alias Import alias Import alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body ImportFrom alias If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Expr Str If BoolOpAnd CompareIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr CompareIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults kwarg body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body ImportFrom alias Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr ListLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num For NameStore NameLoad body AugAssignAdd NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpMult Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return SubscriptLoad Call NameLoad AttributeLoad NameLoad attr Index NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad NameLoad body Pass decorator_list ClassDef bases NameLoad NameLoad body Pass decorator_list ClassDef bases NameLoad NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad NameLoad body Expr Str Pass decorator_list
N/A N/A bisect N/A itertools N/A random balancer.mixins MasterSlaveMixin PinningMixin BasePoolRouter N/A object N/A N/A 
    A base class for routers that use a pool of databases defined by the
    DATABASE_POOL setting.
     __init__ N/A N/A self N/A N/A django.conf settings N/A N/A isinstance N/A settings DATABASE_POOL dict N/A N/A N/A self pool N/A N/A N/A settings DATABASE_POOL keys N/A N/A N/A self pool N/A list N/A settings DATABASE_POOL N/A allow_relation N/A N/A self obj1 obj2 N/A hints N/A N/A Allow any relation between two objects in the pool N/A N/A N/A N/A N/A obj1 _state db N/A self pool N/A N/A N/A obj2 _state db N/A self pool N/A N/A True N/A None N/A allow_syncdb N/A N/A self db model N/A N/A N/A Explicitly put all models on all databases N/A True N/A allow_migrate N/A N/A self db model N/A N/A N/A Explicitly put all models on all databases N/A True N/A N/A RandomRouter N/A BasePoolRouter N/A N/A A router that randomly selects from a pool of databases. db_for_read N/A N/A self model N/A hints N/A N/A N/A N/A self get_random_db N/A db_for_write N/A N/A self model N/A hints N/A N/A N/A N/A self get_random_db N/A get_random_db N/A N/A self N/A N/A N/A N/A N/A random choice N/A list N/A self pool N/A N/A WeightedRandomRouter N/A RandomRouter N/A N/A 
    A router that randomly selects from a weighted pool of databases, useful
    for replication configurations where all nodes act as masters.
     __init__ N/A N/A self N/A N/A django.conf settings N/A N/A self pool N/A N/A N/A settings DATABASE_POOL keys N/A N/A self totals N/A N/A weights N/A N/A N/A settings DATABASE_POOL values N/A running_total 0 N/A w weights N/A N/A running_total w N/A N/A N/A N/A self totals append running_total N/A get_random_db N/A N/A self N/A N/A N/A Use binary search to find the index of the database to use N/A rnd N/A N/A N/A random random N/A N/A self totals N/A -1 N/A pool_index N/A N/A bisect bisect_right N/A self totals rnd N/A N/A N/A list N/A self pool N/A pool_index N/A N/A RoundRobinRouter N/A BasePoolRouter N/A N/A 
    A router that cycles over a pool of databases in order, evenly distributing
    the load.
     __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super RoundRobinRouter self __init__ N/A N/A N/A random shuffle N/A list N/A self pool N/A N/A self pool_cycle N/A N/A itertools cycle N/A self pool N/A db_for_read N/A N/A self model N/A hints N/A N/A N/A N/A self get_next_db N/A db_for_write N/A N/A self model N/A hints N/A N/A N/A N/A self get_next_db N/A get_next_db N/A N/A self N/A N/A N/A N/A next N/A self pool_cycle N/A N/A WeightedMasterSlaveRouter N/A MasterSlaveMixin WeightedRandomRouter N/A N/A N/A RoundRobinMasterSlaveRouter N/A MasterSlaveMixin RoundRobinRouter N/A N/A N/A PinningWMSRouter N/A PinningMixin WeightedMasterSlaveRouter N/A N/A A weighted master/slave router that uses the pinning mixin. N/A N/A PinningRRMSRouter N/A PinningMixin RoundRobinMasterSlaveRouter N/A N/A A round-robin master/slave router that uses the pinning mixin. N/A N/A