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)
  """
  This script creates a basic RESTful API using Flask and Flask-RESTful, with JWT-based authentication. The API includes two endpoints: one for fetching or adding individual items and another for listing all items.
  Example usage:
  - GET /item/pen: returns the item 'pen' if it exists, otherwise returns a 404 error.
  - POST /item/pen: creates a new item 'pen' with a default price of 12.00 and returns the created item.
  - GET /items: returns a list of all items.
  >>> response = app.test_client().get('/item/pen')
  >>> response.status_code
  401  # Authentication required
  >>> response = app.test_client().post('/item/pen')
  >>> response.json
  {'name': 'pen', 'price': 12.00}
  >>> response = app.test_client().get('/items')
  >>> response.json
  {'items': [{'name': 'pen', 'price': 12.00}]}
  """
  
output:     
   @jwt_required()
   def delete(self, name):
   global items
   items = list(filter(lambda x: x['name'] != name, items))
   return {'message': 'Item deleted'}
  
   @jwt_required()
   def put(self, name):
   data = request.get_json()
   item = next(filter(lambda x: x['name'] == name, items), None)
   if item is None:
   item = {'name': name, 'price': data['price']}
   items.append(item)
   else:
   item.update(data)
   return item
  