.. _l-methods: Methods ======= .. contents:: :local: :depth: 1 Summary +++++++ +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | method | class parent | truncated documentation | +==========================================================================================+=====================+================================================================================================+ | :py:meth:`__init__ ` | LightMLBoard | Constructor. See `wep.py `_. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | Competition | | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | Database | | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | DatabaseCompetition | | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | CompetitionHandler | Constructor. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | LoginHandler | Expected additional parameters: | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | LogoutHandler | Expected additional parameters: | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | MainHandler | Constructor. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | SubmitForm | Constructor. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | UploadData | Constructor. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | _BaseRequestHandler | Constructor. See `web.py `_. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | _TemplateHandler | Constructor. See `web.py `_. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_check_connection ` | Database | Check the SQL connection. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_init ` | DatabaseCompetition | Creates the tables if not present. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_is_memory ` | Database | Tells if the database takes place in memory (``:memory:``). | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_load_values ` | Competition | Converts values into a list of list of values, one per metrics. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_process_kwargs ` | CompetitionHandler | Separates attributes templates / tornado. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_process_kwargs ` | LoginHandler | Separates attributes templates / tornado. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_process_kwargs ` | LogoutHandler | Separates attributes templates / tornado. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_process_kwargs ` | MainHandler | Separates attributes templates / tornado. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_process_kwargs ` | SubmitForm | Separates attributes templates / tornado. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_process_kwargs ` | UploadData | Separates attributes templates / tornado. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :py:meth:`_process_kwargs ` | _TemplateHandler | Separates attributes templates / tornado. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`close ` | Database | Close the database. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`commit ` | Database | Call this function after any insert request. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`connect ` | Database | Opens a connection to the database. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`create_table ` | Database | Creates a table. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`evaluate ` | Competition | Evaluates received values. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`evaluate_metric ` | Competition | Evaluates a metric. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`execute ` | Database | Open a cursor with a query and return it to the user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get ` | CompetitionHandler | Returns the content page. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get ` | LogoutHandler | Page. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get ` | MainHandler | Returns the content page. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get ` | SubmitForm | Returns the content page. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get ` | UploadData | Returns the content page. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get ` | _TemplateHandler | Returns the content page. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_competition ` | DatabaseCompetition | Retrieves a competition. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_competitions ` | DatabaseCompetition | Returns the list of competitions as list of ``(cpt_id, cpt_name)``. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_cpt_id ` | DatabaseCompetition | Returns the list of competation id. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | CompetitionHandler | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | LoginHandler | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | LogoutHandler | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | MainHandler | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | SubmitForm | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | UploadData | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | _BaseRequestHandler | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_current_user ` | _TemplateHandler | Returns the current user. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_file ` | Database | Returns the file name. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_player_id ` | DatabaseCompetition | Returns the list of competation id. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_results ` | DatabaseCompetition | Retrieves the results of a competition. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`get_table_list ` | Database | Returns the list of tables. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`has_rows ` | Database | Tells if a table has rows. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | CompetitionHandler | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | LoginHandler | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | LogoutHandler | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | MainHandler | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | SubmitForm | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | UploadData | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | _BaseRequestHandler | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`info ` | _TemplateHandler | Log information. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`init_from_options ` | DatabaseCompetition | Initializes the database. It skips a table if it exists. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`set_current_user ` | LoginHandler | Sets the current user or clear the cookie if None. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`submit ` | DatabaseCompetition | Adds a submission to the database. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`to_df ` | DatabaseCompetition | Returns the content of a table as a dataframe. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+ | :meth:`to_dict ` | Competition | Convert a competition into a dictionary. | +------------------------------------------------------------------------------------------+---------------------+------------------------------------------------------------------------------------------------+