arrow icon indicating copy to clipboard operation
arrow copied to clipboard

[Docs][Python] Document that `source` parameter to IPC readers can be a file path

Open ianmcook opened this issue 6 months ago • 2 comments

Describe the enhancement requested

The functions pyarrow.ipc.open_file and pyarrow.ipc.open_stream and the constructors pyarrow.ipc.RecordBatchFileReader and pyarrow.ipc.RecordBatchStreamReader can all take a file path for the source parameter, but this is not documented:

  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.open_file.html
  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.open_stream.html
  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchFileReader.html
  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchStreamReader.html

For comparison, notice that it is documented that the functions pyarrow.ipc.new_file and pyarrow.ipc.new_stream and the constructors pyarrow.ipc.RecordBatchFileWriter and pyarrow.ipc.RecordBatchStreamWriter can take a file path for the sink parameter:

  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.new_file.html
  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.new_stream.html
  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchFileWriter.html
  • https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchStreamWriter.html

Adding this should be a simple addition in python/pyarrow/ipc.py.

Component(s)

Documentation, Python

ianmcook avatar Jun 27 '25 18:06 ianmcook

take

skarhade22 avatar Jul 03 '25 07:07 skarhade22

Hi, I’d like to work on this issue as my first contribution to Apache Arrow. I plan to update the IPC reader docstrings to document file path support for the source parameter.

krupakargurije avatar Dec 14 '25 16:12 krupakargurije