Skip to content

Commit

Permalink
Update FileSelector with remote section
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored and philippjfr committed Jun 11, 2024
1 parent c26be1a commit f7c9134
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions examples/reference/widgets/FileSelector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,38 @@
"source": [
"files.value"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Remote filesystem\n",
"\n",
"By using the power of [`fsspec`](https://filesystem-spec.readthedocs.io/en/latest/) we can connect to remote filesystems. In the example below we use the `s3fs` package to connect to a remote S3 server"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import s3fs\n",
"\n",
"fs = s3fs.S3FileSystem(anon=True)\n",
"\n",
"s3_files = pn.widgets.FileSelector(directory=\"s3://datasets.holoviz.org\", fs=fs)\n",

This comment has been minimized.

Copy link
@Coderambling

Coderambling Aug 25, 2024

Contributor

The second parameter at the end of the code line says: fs=fs. But the parameter "fs" is not mentioned anywhere in the list of core parameters earlier in the document. Should it be:
"file_pattern=fs"? Or
"value=fs"?

s3_files = pn.widgets.FileSelector(directory="s3://datasets.holoviz.org", fs=fs)
"s3_files"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"s3_files.value"
]
}
],
"metadata": {
Expand Down

0 comments on commit f7c9134

Please sign in to comment.