code: async def update_api(request: web.Request) -> web.Response:
      
      log.debug('Update request received')
      data = await request.post()
      try:
          res0 = await install_py(
              data['whl'], request.loop)
          reslist = [res0]
          if 'serverlib' in data.keys():
              res1 = await install_py(
                  data['serverlib'], request.loop)
              reslist.append(res1)
          if 'fw' in data.keys():
              res2 = await install_smoothie_firmware(
                  data['fw'], request.loop)
              reslist.append(res2)
          res: Dict[str, Any] = {
              'message': [r['message'] for r in reslist],
              'filename': [r['filename'] for r in reslist]
          }
          status = 200
      except Exception as e:
          res = {'message': 'Exception {} raised by update of {}: {}'.format(
                  type(e), data, e.__traceback__)}
          status = 500
      return web.json_response(res, status=status)
docs: This handler accepts a POST request with Content-Type: multipart/form-data
      and file fields in the body named "whl", "serverlib", and "fw". The "whl"
      and "serverlib" files should be valid Python wheels to be installed ("whl"
      is expected generally to be the API server wheel, and "serverlib" is
      expected to be the ot2serverlib wheel. The "fw" file is expected to be a
      Smoothie firmware hex file. The Python files are install using pip, and the
      firmware file is flashed to the Smoothie board, then the files are deleted
      and a success code is returned.