def api_get_users(): total = User.count_all() page = Page(total, _get_page_index()) users = User.find_by(order='created_at desc', offset=page.offset, limit=page.limit) for u in users: u.password = '******' return dict(users=users, page=page)