parameters: (self, source_bytes, resource_path=None)
docstring: Add a single file to be packed with the job at runtime.
  
          Args:
            source_bytes (str):  the source binaries
            resource_path (str):  path of file at runtime
            executable (bool): if True, the file can be executed
  
          Raises:
            ValueError:  If invalid arguments are given
docstring_summary: Add a single file to be packed with the job at runtime.
docstring_tokens: Add a single file to be packed with the job at runtime .
function: def add_file_from_bytes(self, source_bytes, resource_path=None):
          """
          Add a single file to be packed with the job at runtime.
  
          Args:
            source_bytes (str):  the source binaries
            resource_path (str):  path of file at runtime
            executable (bool): if True, the file can be executed
  
          Raises:
            ValueError:  If invalid arguments are given
          """
          if not isinstance(source_bytes, str) or not isinstance(resource_path, str):
              raise ValueError("Invalid source bytes: must be str")
  
          if resource_path in self.__file_targets:
              logger.warn("add [%s] duplicated" % resource_path)
              return
  
          self.__binary_files.append((resource_path, source_bytes))
          self.__file_targets.add(resource_path)
function_tokens: def add_file_from_bytes ( self , source_bytes , resource_path = None ) : if not isinstance ( source_bytes , str ) or not isinstance ( resource_path , str ) : raise ValueError ( "Invalid source bytes: must be str" ) if resource_path in self . __file_targets : logger . warn ( "add [%s] duplicated" % resource_path ) return self . __binary_files . append ( ( resource_path , source_bytes ) ) self . __file_targets . add ( resource_path )