Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad Str If CompareIsNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr While CompareIsNot Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad body AugAssignAdd NameStore Num Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return Call NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num keyword TupleLoad Str Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A json N/A hashlib N/A os markwiki.exceptions UserStorageError markwiki.models.user User markwiki.storage.user UserStorage FileUserStorage N/A UserStorage N/A N/A A file system based user storage __init__ N/A N/A self config N/A N/A N/A N/A self _path N/A N/A N/A os path join N/A config N/A MARKWIKI_HOME users N/A N/A self _id_index_file N/A N/A N/A os path join N/A self _path id.index N/A N/A self _id_index N/A N/A N/A self _email_index_file N/A N/A N/A os path join N/A self _path email.index N/A N/A self _email_index N/A N/A initialize N/A N/A self N/A N/A N/A N/A N/A N/A N/A os path exists N/A self _path N/A N/A N/A N/A os mkdir N/A self _path N/A N/A N/A self _write_json N/A self _id_index N/A self _id_index_file N/A N/A N/A self _write_json N/A self _email_index N/A self _email_index_file N/A N/A N/A N/A self _read_indices N/A create N/A N/A self user N/A N/A N/A Create a new user by storing it as JSON on the file system. N/A user_file N/A N/A self _get_user_file N/A user name N/A N/A N/A N/A os path exists user_file N/A N/A N/A UserStorageError A user with that name already exists. N/A N/A N/A N/A self find_by_email N/A user email None N/A N/A N/A UserStorageError A user with that email already exists. N/A N/A user user_id N/A N/A self _generate_user_id N/A N/A N/A self _write_json N/A user __dict__ user_file N/A N/A N/A self _update_indices user user_file N/A find_by_email N/A N/A self email N/A N/A N/A Find a user by their email or return ``None``. N/A user_file N/A N/A N/A self _email_index get email N/A N/A user_file None N/A N/A None N/A N/A N/A self _load_user user_file N/A find_by_id N/A N/A self user_id N/A N/A N/A Find a user by their ID or return ``None``. N/A user_file N/A N/A N/A self _id_index get user_id N/A N/A user_file None N/A N/A None N/A N/A N/A self _load_user user_file N/A find_by_name N/A N/A self name N/A N/A N/A Find a user by their name or return ``None``. N/A user_file N/A N/A self _get_user_file name N/A N/A N/A self _load_user user_file N/A update N/A N/A self user N/A N/A N/A Update an existing user. N/A user_file N/A N/A self _get_user_file N/A user name N/A N/A N/A self _write_json N/A user __dict__ user_file N/A _generate_user_id N/A N/A self N/A N/A N/A Generate a unique user ID. N/A N/A N/A self _read_indices N/A user_id N/A len N/A self _id_index N/A N/A N/A N/A self find_by_id N/A N/A {0} format user_id None N/A N/A user_id 1 N/A N/A N/A {0} format user_id N/A _get_user_file N/A N/A self name N/A N/A N/A Get the file path where the user's data will be stored. N/A m N/A N/A hashlib md5 N/A N/A N/A m update N/A N/A name encode utf-8 N/A N/A N/A N/A os path join N/A self _path N/A N/A m hexdigest N/A _load_user N/A N/A self user_file N/A N/A N/A Load a user from a file. N/A N/A N/A N/A N/A os path exists user_file N/A N/A None N/A N/A open user_file r f N/A N/A data N/A N/A json loads N/A N/A f read N/A N/A User N/A data N/A name N/A data N/A email N/A data N/A login_type N/A data N/A password_digest N/A data N/A user_id N/A _read_indices N/A N/A self N/A N/A N/A Read the file indices into memory. N/A N/A open N/A self _id_index_file r f N/A N/A N/A self _id_index N/A N/A json loads N/A N/A f read N/A N/A open N/A self _email_index_file r f N/A N/A N/A self _email_index N/A N/A json loads N/A N/A f read N/A _update_indices N/A N/A self user user_file N/A N/A N/A Update the file indices with the provided user information. N/A N/A N/A self _id_index N/A N/A user user_id user_file N/A N/A N/A self _write_json N/A self _id_index N/A self _id_index_file N/A N/A user email N/A N/A N/A N/A self _email_index N/A N/A user email user_file N/A N/A N/A self _write_json N/A self _email_index N/A self _email_index_file N/A _write_json N/A N/A self data out N/A N/A N/A Write out JSON with common settings. N/A json_data N/A N/A json dumps data sort_keys True indent 2 separators N/A , :  N/A N/A open out w f N/A N/A N/A N/A f write json_data N/A N/A