pitrou commented on a change in pull request #8065:
URL: https://github.com/apache/arrow/pull/8065#discussion_r481253760
##########
File path: docs/source/python/filesystems.rst
##########
@@ -34,21 +34,90 @@ underlying storage, are automatically dereferenced. Only
basic
:class:`metadata <FileInfo>` about file entries, such as the file size
and modification time, is made available.
-Types
+The core interface is represented by the base class :class:`FileSystem`.
+Concrete subclasses are available for various kinds of storage, such as local
+filesystem access (:class:`LocalFileSystem`), HDFS (:class:`HadoopFileSystem`)
+and Amazon S3-compatible storage (:class:`S3FileSystem`).
+
+
+Usage
-----
-The core interface is represented by the base class :class:`FileSystem`.
-Concrete subclasses are available for various kinds of storage:
-:class:`local filesystem access <LocalFileSystem>`,
-:class:`HDFS <HadoopFileSystem>` and
-:class:`Amazon S3-compatible storage <S3FileSystem>`.
+A FileSystem object can be created with one of the constuctors (and check the
+respective constructor for its options)::
+
+ >>> from pyarrow import fs
+ >>> local = fs.LocalFileSystem()
+
+or alternatively inferred from a URI::
+
+ >>> s3, path = fs.FileSystem.from_uri("s3://my-bucket")
+ >>> s3
+ <pyarrow._s3fs.S3FileSystem at 0x7f6760cbf4f0>
+ >>> path
+ 'my-bucket'
+
+
+Reading and writing files
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Several of the IO-related functions in PyArrow accept either a URI (and infer
+the filesystem) or an explicit ``filesystem`` argument to specify the
filesystem
+to read or write from. For example, the :meth:`pyarrow.parquet.read_table`
+function can be used in the following ways::
+
+ # using a URI -> filesystem is inferred
+ pq.read_table("s3://my-bucket")
Review comment:
I think the example may look strange, since I don't think a bucket can
be a file... Perhaps "s3://my-bucket/my-file" or something?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]