async def METHOD_NAME(self, project_id: uuid.UUID, environment_details: bool = False) -> model.Project:
    project = await data.Project.get_by_id(project_id)
    if project is None:
        raise NotFound("The project with given id does not exist.")
    project_model = project.to_dto()
    project_model.environments = [
        e.to_dto() for e in await data.Environment.get_list(project=project.id, details=environment_details)
    ]
    return project_model