Skip to content

Commit d75e26b

Browse files
authored
Added AWS_S3_HOST environment variable workaround to user_guide for i… (#54279)
* Added AWS_S3_HOST environment variable workaround to user_guide for issue #26195 * Updated wording for issue #26195
1 parent 6a40f3b commit d75e26b

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

doc/source/user_guide/io.rst

+15-3
Original file line numberDiff line numberDiff line change
@@ -1712,9 +1712,21 @@ at `fsimpl1`_ for implementations built into ``fsspec`` and `fsimpl2`_
17121712
for those not included in the main ``fsspec``
17131713
distribution.
17141714

1715-
You can also pass parameters directly to the backend driver. For example,
1716-
if you do *not* have S3 credentials, you can still access public data by
1717-
specifying an anonymous connection, such as
1715+
You can also pass parameters directly to the backend driver. Since ``fsspec`` does not
1716+
utilize the ``AWS_S3_HOST`` environment variable, we can directly define a
1717+
dictionary containing the endpoint_url and pass the object into the storage
1718+
option parameter:
1719+
1720+
.. code-block:: python
1721+
1722+
storage_options = {"client_kwargs": {"endpoint_url": "http://127.0.0.1:5555"}}}
1723+
df = pd.read_json("s3://pandas-test/test-1", storage_options=storage_options)
1724+
1725+
More sample configurations and documentation can be found at `S3Fs documentation
1726+
<https://s3fs.readthedocs.io/en/latest/index.html?highlight=host#s3-compatible-storage>`__.
1727+
1728+
If you do *not* have S3 credentials, you can still access public
1729+
data by specifying an anonymous connection, such as
17181730

17191731
.. versionadded:: 1.2.0
17201732

0 commit comments

Comments
 (0)