def create_index():
 for (k, v) in INDEX.items():
  for (key, kwargs) in v.items():
   client[DATABASE_NAME][k].ensure_index((list(key) if (type(key) == types.TupleType) else key), **kwargs)

def create_index ( ) : for ( k , v ) in INDEX . items ( ) : for ( key , kwargs ) in v . items ( ) : client [ DATABASE_NAME ] [ k ] . ensure_index ( ( list ( key ) if ( type ( key ) == types . TupleType ) else key ) , ** kwargs )
create an index for a single column .