input: 
  from flask import Flask, request
  from flask_restful import Resource, Api
  from flask_jwt import JWT, jwt_required
  
  app = Flask(__name__)
  api = Api(app)
  
  # Setup JWT authentication
  app.secret_key = 'super-secret-key'
  jwt = JWT(app, authenticate, identity)
  
  items = []
  
  class Item(Resource):
   @jwt_required()
   def get(self, name):
   for item in items:
   if item['name'] == name:
   return item
   return {'item': None}, 404
  
   def post(self, name):
   new_item = {'name': name, 'price': 12.00}
   items.append(new_item)
   return new_item, 201
  
  
  class ItemList(Resource):
   def get(self):
   return {'items': items}
  
  
  api.add_resource(Item, '/item/<string:name>')
  api.add_resource(ItemList, '/items')
  
  if __name__ == '__main__':
   app.run(port=5000, debug=True)
  
  # Test case 1:
  # Input: Create a new item with name 'apple'
  # Output: {'name': 'apple', 'price': 12.00}
  
  # Test case 2:
  # Input: Fetch item with name 'apple'
  # Output: {'name': 'apple', 'price': 12.00}
  
  # Test case 3:
  # Input: Fetch non-existent item with name 'banana'
  # Output: {'item': None}
  
output:     
   @jwt_required()
   def delete(self, name):
   for item in items:
   if item['name'] == name:
   items.remove(item)
   return {'message': 'Item deleted'}
   return {'message': 'Item not found'}, 404
  
   def put(self, name):
   data = request.get_json()
   for item in items:
   if item['name'] == name:
   item.update(data)
   return item
   new_item = {'name': name, 'price': data['price']}
   items.append(new_item)
   return new_item, 201
  