code: def put(self, namespace, key):
          
          args = request.json
  
          if not self.dbconfig.key_exists(namespace, key):
              return self.make_response('No such config entry: {}/{}'.format(namespace, key), HTTP.BAD_REQUEST)
  
          if (args['type'] == 'choice' and
                  not args['value']['min_items'] <= len(args['value']['enabled']) <= args['value']['max_items']):
              return self.make_response(
                  'You should select {} {}item{}'.format(
                      args['value']['min_items'],
                      '' if args['value']['min_items'] == args['value']['max_items'] else 'to {} '.format(
                          args['value']['max_items']
                      ),
                      's' if args['value']['max_items'] > 1 else ''
                  ),
                  HTTP.BAD_REQUEST
              )
  
          if args['type'] == 'choice' and not set(args['value']['enabled']).issubset(args['value']['available']):
              return self.make_response('Invalid item', HTTP.BAD_REQUEST)
  
          item = db.ConfigItem.find_one(
              ConfigItem.namespace_prefix == namespace, ConfigItem.key == key
          )
  
          if item.value != args['value']:
              item.value = args['value']
  
          if item.type != args['type']:
              item.type = args['type']
  
          if item.description != args['description']:
              item.description = args['description']
  
          self.dbconfig.set(namespace, key, _to_dbc_class(args))
          auditlog(event='configItem.update', actor=session['user'].username, data=args)
  
          return self.make_response('Config entry updated')
docs: Update a single configuration item