uproot.source.file.FileResource

Defined in uproot.source.file on line 27.

Inheritance order:

  1. uproot.source.chunk.Resource

class uproot.source.file.FileResource(file_path: str)
Parameters:

file_path (str) – The filesystem path of the file to open.

A uproot.source.chunk.Resource for a simple file handle.

file

FileResource.file

The Python file handle.

closed

FileResource.closed

get

FileResource.get(start: int, stop: int) bytes
Parameters:
  • start (int) – Seek position of the first byte to include.

  • stop (int) – Seek position of the first byte to exclude (one greater than the last byte to include).

Returns a Python buffer of data between start and stop.

future

static FileResource.future(source: Source, start: int, stop: int)
Parameters:
  • source (uproot.MultithreadedFileSource) – The data source.

  • start (int) – Seek position of the first byte to include.

  • stop (int) – Seek position of the first byte to exclude (one greater than the last byte to include).

Returns a uproot.source.futures.ResourceFuture that calls get with start and stop.

file_path

Inherited from uproot.source.chunk.Resource.

FileResource.file_path

A path to the file (or URL).