Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias alias alias alias ImportFrom alias alias alias ImportFrom alias Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad Dict Call NameLoad Str Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num Assign NameStore Call NameLoad Dict Call NameLoad Str Call NameLoad Str Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num Call NameLoad TupleLoad Str ListLoad NameLoad Call NameLoad keyword Num keyword Num FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If NameLoad body Assign NameStore Call NameLoad Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse Print Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIsNot NameLoad NameLoad body For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad Dict Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str NameLoad NameLoad keyword SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call NameLoad NameLoad Dict Str NameLoad Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If CompareIs NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad NameLoad Expr Call NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return CompareLtLt Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list
N/A N/A  Module for utilities such as emailing, password reset, etc  N/A smtplib N/A bcrypt email.mime.multipart MIMEMultipart email.mime.text MIMEText email.utils formataddr N/A api api.common check validate safe_fail WebException voluptuous Required Length Schema datetime datetime N/A enable_email False N/A smtp_url N/A email_username N/A email_password N/A from_addr N/A from_name N/A password_reset_request_schema N/A Schema N/A N/A Required username N/A check N/A Usernames must be between 3 and 20 characters. N/A str N/A Length min 3 max 20 N/A password_reset_schema N/A Schema N/A N/A Required token N/A Required password N/A check N/A This does not look like a valid token. N/A str N/A Length max 100 N/A check N/A Passwords must be between 3 and 20 characters. N/A str N/A Length min 3 max 20 send_email N/A N/A recipient subject body N/A N/A N/A 
    Send an email with the given body text and subject to the given recipient.

    Generates a MIMEMultipart message, connects to an smtp server using the credentials loaded from the configuration
    file, then sends the email.

    Args:
        recipient: the recipient of the email
        subject: the subject of the email
        body: the body of the email
     N/A enable_email N/A N/A msg N/A MIMEMultipart alternative N/A N/A msg N/A Subject subject N/A N/A msg N/A From N/A formataddr N/A from_name from_addr N/A N/A msg N/A To recipient N/A part1 N/A MIMEText body plain N/A N/A N/A msg attach part1 N/A s N/A N/A smtplib SMTP_SSL smtp_url N/A N/A N/A s login email_username email_password N/A N/A N/A s sendmail from_addr recipient N/A N/A msg as_string N/A N/A N/A s quit N/A N/A Emailing is disabled, not sending. N/A send_email_to_list N/A N/A recipients subject body N/A N/A N/A 
    Sends an email to a list of recipients.

    If a list of recipients is passed we iterate over them and call send_email for each recipient.
     N/A N/A recipients None N/A N/A recipient recipients N/A N/A N/A send_email recipient subject body N/A reset_password N/A N/A token password confirm_password N/A N/A N/A 
    Perform the password update operation.

    Gets a token and new password from a submitted form, if the token is found in a team object in the database
    the new password is hashed and set, the token is then removed and an appropriate response is returned.

    Args:
        token: the password reset token
        password: the password to set
        confirm_password: the same password again
     N/A N/A validate password_reset_schema N/A token password token password N/A user N/A N/A N/A api user find_user_by_reset_token token N/A N/A N/A N/A api user update_password_request N/A new-password new-password-confirmation password confirm_password uid N/A user N/A uid N/A N/A N/A N/A api user delete_password_reset_token N/A user N/A uid N/A request_password_reset N/A N/A username N/A N/A N/A 
    Emails a user a link to reset their password.

    Checks that a username was submitted to the function and grabs the relevant team info from the db.
    Generates a secure token and inserts it into the team's document as 'password_reset_token'.
    A link is emailed to the registered email address with the random token in the url.  The user can go to this
    link to submit a new password, if the token submitted with the new password matches the db token the password
    is hashed and updated in the db.

    Args:
        username: the username of the account
     N/A N/A validate password_reset_request_schema N/A username username N/A user N/A safe_fail N/A N/A api user get_user name username N/A N/A user None N/A N/A N/A WebException N/A N/A No registration found for '{}'. format username N/A token N/A N/A N/A api common token N/A N/A N/A N/A api user set_password_reset_token N/A user N/A uid token N/A msgBody N/A N/A We recently received a request to reset the password for the following {0} account:

	{2}

Our records show that this is the email address used to register the above account.  If you did not request to reset the password for the above account then you need not take any further steps.  If you did request the password reset please follow the link below to set your new password. 

 {1}/reset#{3} 

 Best of luck! 

 ~The {0} Team
     format N/A N/A api config competition_name N/A N/A N/A api config competition_urls N/A 0 username token N/A N/A send_email N/A user N/A email N/A N/A {} Password Reset format N/A N/A api config competition_name msgBody N/A check_competition_active N/A N/A N/A N/A N/A 
    Is the competition currently running
     N/A N/A N/A N/A N/A N/A api config start_time timestamp N/A N/A N/A N/A datetime utcnow timestamp N/A N/A N/A N/A api config end_time timestamp N/A