:tocdepth: 3 :py:mod:`gws.base.action.manager` ================================= .. py:module:: gws.base.action.manager **Source code:** :source:`gws.base.action.manager` Module Contents --------------- .. py:function:: get_action_for_cli(root: gws.Root, action_name: str, project_uid: Optional[str] = None) -> Optional[gws.Action] Get an action object by its name and optional project UID. If no project UID is provided, it searches for the action in the global scope and then in all projects. .. py:class:: Object Bases: :py:obj:`gws.ActionManager` Action manager. .. py:method:: actions_for_project(project, user) Get a list of actions for a project, to which a user has access to. :param project: The project requiring actions. :param user: The user for whom the actions are retrieved. :returns: A list of accessible actions. .. py:method:: find_action(project, ext_type, user) Locate an Action object. :param project: If provided, find the action for that project; otherwise, search globally. :param ext_type: The extension type to search for. :param user: Locate actions only for this user. :returns: The located action object, or None if no match is found. .. py:method:: prepare_action(command_category, command_name, params, user, read_options=None) Prepare an action to be executed based on the provided parameters. :param command_category: The category of the command to execute. :param command_name: The name of the command to execute. :param params: Additional parameters required for the action. :param user: The user initiating the action. :param read_options: Read options for parsing parameters. :returns: A tuple containing the callable to execute and the associated request object. .. py:function:: parse_cli_request(root: gws.Root, command_category: gws.CommandCategory, command_name: str, params: dict, read_options=None) Parse a CLI request and return the action handler and request object.