def categories() -> Dict[str, List[Dict[str, str]]]: return Categories.to_json(dict(Categories.get_categories()))
def get_category(id: int) -> Dict[str, List[Dict[str, str]]]: category = Categories.query.get_or_404(id) return Categories.to_json( dict([[category.category_id, category.category_name]]))