Skip to content

Commit

Permalink
ARROW-16093: [Python] Address docstrings in Filesystems (Python Imple…
Browse files Browse the repository at this point in the history
…mentations) (#13595)

Lead-authored-by: Alenka Frim <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
  • Loading branch information
AlenkaF authored Jul 19, 2022
1 parent cd0d094 commit 6e3f26a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions python/pyarrow/_fs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,23 @@ cdef class PyFileSystem(FileSystem):
----------
handler : FileSystemHandler
The handler object implementing custom filesystem behavior.
Examples
--------
Create an fsspec-based filesystem object for GitHub:
>>> from fsspec.implementations import github
>>> gfs = github.GithubFileSystem('apache', 'arrow', sha='ec51aec4d15035f4d9d6a1c4346d0a2b9a37fb75')
Get a PyArrow FileSystem object:
>>> from pyarrow.fs import PyFileSystem, FSSpecHandler
>>> pa_fs = PyFileSystem(FSSpecHandler(gfs))
Use :func:`~pyarrow.fs.FileSystem` functionality ``get_file_info()``:
>>> pa_fs.get_file_info('README.md')
<FileInfo for 'README.md': type=FileType.File, size=5302>
"""

def __init__(self, handler):
Expand Down

0 comments on commit 6e3f26a

Please sign in to comment.