# uproot.FSSpecSource

Defined in [uproot.source.fsspec](https://github.com/scikit-hep/uproot5/blob/db953cf9827349b3d24eb6742404158c1dfd5481/src/uproot/source/fsspec.py) on [line 39](https://github.com/scikit-hep/uproot5/blob/db953cf9827349b3d24eb6742404158c1dfd5481/src/uproot/source/fsspec.py#L39).

| **Inheritance order:**                                                       |
|------------------------------------------------------------------------------|
| 1. [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md) |

### *class* uproot.source.fsspec.FSSpecSource(file_path: str, coalesce_config: [CoalesceConfig](uproot.source.coalesce.CoalesceConfig.html.md#uproot.source.coalesce.CoalesceConfig) | None = None, \*\*options)

* **Parameters:**
  * **file_path** (*str*) – A URL for the file to open.
  * **coalesce_config** (*struct* *,* *optional*) – Configuration options for read coalescing
  * **\*\*kwargs** (*dict*) – any extra arguments to be forwarded to the particular
    FileSystem instance constructor. This might include S3 access keys,
    or HTTP headers, etc.

A [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md) that uses FSSpec’s cat_ranges feature
to get many chunks in one request.

<a id="uproot-source-fsspec-fsspecsource-async-impl"></a>

## async_impl

#### FSSpecSource.async_impl

True if using an async loop executor; False otherwise.

<a id="uproot-source-fsspec-fsspecsource-chunk"></a>

## chunk

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.chunk(start: int, stop: int) → [Chunk](uproot.source.chunk.Chunk.html.md#uproot.source.chunk.Chunk)

* **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).

Request a byte range of data from the file as a
[uproot.source.chunk.Chunk](uproot.source.chunk.Chunk.html.md).

<a id="uproot-source-fsspec-fsspecsource-chunks"></a>

## chunks

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.chunks(ranges: list[tuple[int, int]], notifications: Queue) → list[[Chunk](uproot.source.chunk.Chunk.html.md#uproot.source.chunk.Chunk)]

* **Parameters:**
  * **ranges** (*list* *of* *tuple* *[**int* *,* *int* *]* *2-tuples*) – Intervals to fetch
    as (start, stop) pairs in a single request, if possible.
  * **notifications** (`queue.Queue`) – Indicator of completed
    chunks. After each gets filled, it is `put` on the
    queue; a listener should `get` from this queue
    `len(ranges)` times.

Request a set of byte ranges from the file.

This method has two outputs:

* The method returns a list of unfilled
  [uproot.source.chunk.Chunk](uproot.source.chunk.Chunk.html.md) objects, which get filled
  in a background thread. If you try to read data from an
  unfilled chunk, it will wait until it is filled.
* The method also puts the same [uproot.source.chunk.Chunk](uproot.source.chunk.Chunk.html.md)
  objects onto the `notifications` queue as soon as they are
  filled.

Reading data from chunks on the queue can be more efficient than
reading them from the returned list. The total reading time is the
same, but work on the filled chunks can be better parallelized if
it is triggered by already-filled chunks, rather than waiting for
chunks to be filled.

<a id="uproot-source-fsspec-fsspecsource-file-path"></a>

## file_path

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.file_path

A path to the file (or URL).

<a id="uproot-source-fsspec-fsspecsource-num-bytes"></a>

## num_bytes

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.num_bytes

The number of bytes in the file.

<a id="uproot-source-fsspec-fsspecsource-num-requests"></a>

## num_requests

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.num_requests

The number of requests that have been made (performance counter).

<a id="uproot-source-fsspec-fsspecsource-num-requested-chunks"></a>

## num_requested_chunks

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.num_requested_chunks

The number of [uproot.source.chunk.Chunk](uproot.source.chunk.Chunk.html.md) objects that have been
requested (performance counter).

<a id="uproot-source-fsspec-fsspecsource-num-requested-bytes"></a>

## num_requested_bytes

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.num_requested_bytes

The number of bytes that have been requested (performance counter).

<a id="uproot-source-fsspec-fsspecsource-performance-counters"></a>

## performance_counters

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.performance_counters

<a id="uproot-source-fsspec-fsspecsource-close"></a>

## close

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.close()

Manually closes the file(s) and stops any running threads.

<a id="uproot-source-fsspec-fsspecsource-closed"></a>

## closed

Inherited from [uproot.source.chunk.Source](uproot.source.chunk.Source.html.md).

#### FSSpecSource.closed

True if the associated file/connection/thread pool is closed; False
otherwise.
