uproot.update

Defined in uproot.writing.writable on line 156.

uproot.writing.writable.update(file_path: str | Path | IO, **options)
Parameters:
  • file_path (str, pathlib.Path or file-like object) – The filesystem path of the file to open or an open file.

  • options – See below.

Opens a local file for writing. Like ROOT’s "UPDATE" option, this function expects a file to already exist at file_path and opens it so that new data can be added to it or individual objects may be deleted from it.

Returns a uproot.WritableDirectory.

Options (type; default):

  • initial_directory_bytes (int; 256): The number of bytes to allocate for new directories so that TKeys can be added to them without needing immediate rewriting of the block.

  • uuid_function (callable; uuid.uuid1): Function to create the file’s UUID and/or any directory’s UUID.

See uproot.WritableFile for details on these options.

Additional options are passed as storage_options to the fsspec filesystem