Skip to content

Commit f7c9134

Browse files
hoxbrophilippjfr
authored andcommitted
Update FileSelector with remote section
1 parent c26be1a commit f7c9134

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

examples/reference/widgets/FileSelector.ipynb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,38 @@
8181
"source": [
8282
"files.value"
8383
]
84+
},
85+
{
86+
"cell_type": "markdown",
87+
"metadata": {},
88+
"source": [
89+
"## Remote filesystem\n",
90+
"\n",
91+
"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"
92+
]
93+
},
94+
{
95+
"cell_type": "code",
96+
"execution_count": null,
97+
"metadata": {},
98+
"outputs": [],
99+
"source": [
100+
"import s3fs\n",
101+
"\n",
102+
"fs = s3fs.S3FileSystem(anon=True)\n",
103+
"\n",
104+
"s3_files = pn.widgets.FileSelector(directory=\"s3://datasets.holoviz.org\", fs=fs)\n",
105+
"s3_files"
106+
]
107+
},
108+
{
109+
"cell_type": "code",
110+
"execution_count": null,
111+
"metadata": {},
112+
"outputs": [],
113+
"source": [
114+
"s3_files.value"
115+
]
84116
}
85117
],
86118
"metadata": {

0 commit comments

Comments
 (0)