text: from flask import abort, jsonify
  from flask_restful import Resource
  
  from python_template_usage.models import Product
  
  
  class ProductResource(Resource):
      def get(self):
          products = Product.query.all() or abort(204)
          return jsonify(
              {"products": [product.to_dict() for product in products]}
          )
  
  
  class ProductItemResource(Resource):
      def get(self, product_id):
          product = Product.query.filter_by(id=product_id).first() or abort(404)
          return jsonify(product.to_dict())
  