1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
|
API Reference
=============
.. currentmodule:: fsspec
User Functions
--------------
.. autosummary::
available_compressions
available_protocols
filesystem
fuse.run
generic.rsync
get_filesystem_class
get_mapper
gui.FileSelector
open
open_files
open_local
.. autofunction:: fsspec.available_compressions
.. autofunction:: fsspec.available_protocols
.. autofunction:: fsspec.filesystem
.. autofunction:: fsspec.fuse.run
.. autofunction:: fsspec.generic.rsync
.. autofunction:: fsspec.get_filesystem_class
.. autofunction:: fsspec.get_mapper
.. autoclass:: fsspec.gui.FileSelector
:members:
.. autofunction:: fsspec.open
.. autofunction:: fsspec.open_files
.. autofunction:: fsspec.open_local
Base Classes
------------
.. autosummary::
archive.AbstractArchiveFileSystem
asyn.AsyncFileSystem
callbacks.Callback
callbacks.DotPrinterCallback
callbacks.NoOpCallback
callbacks.TqdmCallback
core.BaseCache
core.OpenFile
core.OpenFiles
core.get_fs_token_paths
core.url_to_fs
dircache.DirCache
FSMap
generic.GenericFileSystem
registry.register_implementation
spec.AbstractBufferedFile
spec.AbstractFileSystem
spec.Transaction
.. autoclass:: fsspec.archive.AbstractArchiveFileSystem
:members:
.. autoclass:: fsspec.callbacks.Callback
:members:
.. autoclass:: fsspec.callbacks.DotPrinterCallback
:members:
.. autoclass:: fsspec.callbacks.NoOpCallback
:members:
.. autoclass:: fsspec.callbacks.TqdmCallback
:members:
.. autoclass:: fsspec.core.BaseCache
:members:
.. autoclass:: fsspec.core.OpenFile
:members:
.. autoclass:: fsspec.core.OpenFiles
.. autofunction:: fsspec.core.get_fs_token_paths
.. autofunction:: fsspec.core.url_to_fs
.. autoclass:: fsspec.dircache.DirCache
:members: __init__
.. autoclass:: fsspec.FSMap
:members:
.. autoclass:: fsspec.generic.GenericFileSystem
.. autofunction:: fsspec.registry.register_implementation
.. autoclass:: fsspec.spec.AbstractBufferedFile
:members:
.. autoclass:: fsspec.spec.AbstractFileSystem
:members:
.. autoclass:: fsspec.spec.Transaction
:members:
.. _implementations:
Built-in Implementations
------------------------
.. autosummary::
implementations.arrow.ArrowFSWrapper
implementations.arrow.HadoopFileSystem
implementations.cached.CachingFileSystem
implementations.cached.SimpleCacheFileSystem
implementations.cached.WholeFileCacheFileSystem
implementations.dask.DaskWorkerFileSystem
implementations.data.DataFileSystem
implementations.dbfs.DatabricksFileSystem
implementations.dirfs.DirFileSystem
implementations.ftp.FTPFileSystem
implementations.gist.GistFileSystem
implementations.git.GitFileSystem
implementations.github.GithubFileSystem
implementations.http.HTTPFileSystem
implementations.jupyter.JupyterFileSystem
implementations.libarchive.LibArchiveFileSystem
implementations.local.LocalFileSystem
implementations.memory.MemoryFileSystem
implementations.reference.ReferenceFileSystem
implementations.reference.LazyReferenceMapper
implementations.sftp.SFTPFileSystem
implementations.smb.SMBFileSystem
implementations.tar.TarFileSystem
implementations.webhdfs.WebHDFS
implementations.zip.ZipFileSystem
.. autoclass:: fsspec.implementations.arrow.ArrowFSWrapper
:members: __init__
.. autoclass:: fsspec.implementations.arrow.HadoopFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.cached.CachingFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.cached.SimpleCacheFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.cached.WholeFileCacheFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.dask.DaskWorkerFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.data.DataFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.dbfs.DatabricksFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.dirfs.DirFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.ftp.FTPFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.gist.GistFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.git.GitFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.github.GithubFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.http.HTTPFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.jupyter.JupyterFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.libarchive.LibArchiveFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.local.LocalFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.memory.MemoryFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.reference.ReferenceFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.reference.LazyReferenceMapper
:members: __init__
.. autoclass:: fsspec.implementations.sftp.SFTPFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.smb.SMBFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.tar.TarFileSystem
:members: __init__
.. autoclass:: fsspec.implementations.webhdfs.WebHDFS
:members: __init__
.. autoclass:: fsspec.implementations.zip.ZipFileSystem
:members: __init__
.. _external_implementations:
Other Known Implementations
---------------------------
Note that most of these projects are hosted outside of the `fsspec` organisation. Please read their
documentation carefully before using any particular package.
- `abfs`_ for Azure Blob service, with protocol "abfs://"
- `adl`_ for Azure DataLake storage, with protocol "adl://"
- `alluxiofs`_ to access fsspec implemented filesystem with Alluxio distributed cache
- `boxfs`_ for access to Box file storage, with protocol "box://"
- `csvbase`_ for access to csvbase.com hosted CSV files, with protocol "csvbase://"
- `dropbox`_ for access to dropbox shares, with protocol "dropbox://"
- `dvc`_ to access DVC/Git repository as a filesystem
- `fsspec-encrypted`_ for transparent encryption on top of other fsspec filesystems.
- `gcsfs`_ for Google Cloud Storage, with protocol "gs://" or "gcs://"
- `gdrive`_ to access Google Drive and shares (experimental)
- `git`_ to access Git repositories
- `huggingface_hub`_ to access the Hugging Face Hub filesystem, with protocol "hf://"
- `hdfs-native`_ to access Hadoop filesystem, with protocol "hdfs://"
- `httpfs-sync`_ to access HTTP(s) files in a synchronous manner to offer an alternative to the aiohttp-based implementation.
- `ipfsspec`_ for the InterPlanetary File System (IPFS), with protocol "ipfs://"
- `irods`_ for access to iRODS servers, with protocol "irods://"
- `lakefs`_ for lakeFS data lakes, with protocol "lakefs://"
- `morefs`_ for `OverlayFileSystem`, `DictFileSystem`, and others
- `obstore`_: zero-dependency access to Amazon S3, Google Cloud Storage, and Azure Blob Storage using the underlying Rust `object_store`_ library, with protocols "s3://", "gs://", and "abfs://".
- `ocifs`_ for access to Oracle Cloud Object Storage, with protocol "oci://"
- `ocilake`_ for OCI Data Lake storage
- `ossfs`_ for Alibaba Cloud (Aliyun) Object Storage System (OSS)
- `p9fs`_ for 9P (Plan 9 Filesystem Protocol) servers
- `PyAthena`_ for S3 access to Amazon Athena, with protocol "s3://" or "s3a://"
- `PyDrive2`_ for Google Drive access
- `fsspec-proxy`_ for "pyscript:" URLs via a proxy server
- `s3fs`_ for Amazon S3 and other compatible stores, with protocol "s3://"
- `sshfs`_ for access to SSH servers, with protocol "ssh://" or "sftp://"
- `swiftspec`_ for OpenStack SWIFT, with protocol "swift://"
- `tosfs`_ for ByteDance volcano engine Tinder Object Storage (TOS)
- `wandbfs`_ to access Wandb run data (experimental)
- `wandbfsspec`_ to access Weights & Biases (experimental)
- `webdav4`_ for WebDAV, with protocol "webdav://" or "dav://"
- `xrootd`_ for xrootd, with protocol "root://"
- `msgraphfs`_ for Microsoft storage (ie Sharepoint) using the drive API through Microsoft Graph, with protocol "msgd://"
.. _abfs: https://github.com/dask/adlfs
.. _adl: https://github.com/dask/adlfs
.. _alluxiofs: https://github.com/fsspec/alluxiofs
.. _boxfs: https://github.com/IBM/boxfs
.. _csvbase: https://github.com/calpaterson/csvbase-client
.. _dropbox: https://github.com/fsspec/dropboxdrivefs
.. _dvc: https://github.com/iterative/dvc
.. _fsspec-encrypted: https://github.com/thevgergroup/fsspec-encrypted
.. _fsspec-proxy: https://github.com/fsspec/fsspec-proxy
.. _gcsfs: https://gcsfs.readthedocs.io/en/latest/
.. _gdrive: https://github.com/fsspec/gdrivefs
.. _git: https://github.com/iterative/scmrepo
.. _hdfs-native: https://github.com/Kimahriman/hdfs-native/blob/master/python/hdfs_native/fsspec.py
.. _httpfs-sync: https://github.com/moradology/httpfs-sync
.. _huggingface_hub: https://huggingface.co/docs/huggingface_hub/main/en/guides/hf_file_system
.. _ipfsspec: https://github.com/fsspec/ipfsspec
.. _irods: https://github.com/xwcl/irods_fsspec
.. _lakefs: https://github.com/aai-institute/lakefs-spec
.. _morefs: https://github.com/iterative/morefs
.. _object_store: https://docs.rs/object_store/latest/object_store/
.. _obstore: https://developmentseed.org/obstore/latest/
.. _ocifs: https://ocifs.readthedocs.io/en/latest/
.. _ocilake: https://github.com/oracle/ocifs
.. _ossfs: https://github.com/fsspec/ossfs
.. _p9fs: https://github.com/pbchekin/p9fs-py
.. _PyAthena: https://github.com/laughingman7743/PyAthena
.. _PyDrive2: https://github.com/iterative/PyDrive2
.. _s3fs: https://s3fs.readthedocs.io/en/latest/
.. _sshfs: https://github.com/fsspec/sshfs
.. _swiftspec: https://github.com/fsspec/swiftspec
.. _tosfs: https://tosfs.readthedocs.io/en/latest/
.. _wandbfs: https://github.com/jkulhanek/wandbfs
.. _wandbfsspec: https://github.com/alvarobartt/wandbfsspec
.. _webdav4: https://github.com/skshetry/webdav4
.. _xrootd: https://github.com/CoffeaTeam/fsspec-xrootd
.. _msgraphfs: https://github.com/acsone/msgraphfs
.. _readbuffering:
Read Buffering
--------------
.. autosummary::
caching.BlockCache
caching.BytesCache
caching.MMapCache
caching.ReadAheadCache
caching.FirstChunkCache
caching.BackgroundBlockCache
.. autoclass:: fsspec.caching.BlockCache
:members:
.. autoclass:: fsspec.caching.BytesCache
:members:
.. autoclass:: fsspec.caching.MMapCache
:members:
.. autoclass:: fsspec.caching.ReadAheadCache
:members:
.. autoclass:: fsspec.caching.FirstChunkCache
:members:
.. autoclass:: fsspec.caching.BackgroundBlockCache
:members:
Utilities
---------
.. autosummary::
utils.read_block
.. autofunction:: fsspec.utils.read_block
|