:py:mod:`routers.projects` ========================== .. py:module:: routers.projects .. autoapi-nested-parse:: Module for the methods regarding projects Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: routers.projects.get_projects routers.projects.create_project routers.projects.get_project_by_name routers.projects.delete_project_by_name routers.projects.add_project_permissions routers.projects.delete_project_permissions routers.projects.get_project_permissions Attributes ~~~~~~~~~~ .. autoapisummary:: routers.projects.router .. py:data:: router .. py:function:: get_projects(session = Depends(get_session), user = Depends(get_current_active_user)) Returns a list of all projects that the user has access to :param session: session from dependencies :param user: current user from dependencies :return: list of project names .. py:function:: create_project(user = Depends(get_current_active_user), project_body = Depends(get_request_body), session = Depends(get_session)) :async: Creates a new project with the data in the body Requires the authenticated user to have the permission to create projects :param user: current user from dependencies :param project_body: project data from body :param session: session from dependencies :return: created project .. py:function:: get_project_by_name(session = Depends(get_session), user = Depends(get_current_active_user), db_project = Depends(get_project)) Get project by name Requires the authenticated user to have the permission to view the project :param session: session from dependencies :param user: current user from dependencies :param db_project: project of path from dependencies :return: project .. py:function:: delete_project_by_name(session = Depends(get_session), db_project = Depends(get_project)) Delete project by name Requires the authenticated user to have the permission to delete the project :param session: session from dependencies :param db_project: project of path from dependencies :return: 200 OK if project was deleted, else the corresponding error .. py:function:: add_project_permissions(proj_permissions, session = Depends(get_session), db_project = Depends(get_project)) Add user permissions to project Requires the authenticated user to have the permission to edit permissions :param proj_permissions: permissions to add :param session: session from dependencies :param db_project: project of path from dependencies :return: current project permissions of user .. py:function:: delete_project_permissions(proj_permissions, session = Depends(get_session), db_project = Depends(get_project)) Delete user permissions from project Requires the authenticated user to have the permission to edit permissions :param proj_permissions: permissions to delete :param session: session from dependencies :param db_project: project of path from dependencies :return: current project permissions of user .. py:function:: get_project_permissions(user_name, session = Depends(get_session), db_project = Depends(get_project)) Get permissions of specified user in project Requires the authenticated user to have the permission to edit permissions :param user_name: user to get permissions for :param session: session from dependencies :param db_project: project of path from dependencies :return: permissions of user in project