Implementations
¶
Universal Pathlib provides specialized UPath subclasses for different filesystem protocols. Each implementation is optimized for its respective filesystem and may provide additional protocol-specific functionality.
upath.implementations.cloud¶
S3Path
¶
S3Path(
*args: JoinablePathLike,
protocol: Literal["s3", "s3a"] | None = None,
chain_parser: FSSpecChainParser = DEFAULT_CHAIN_PARSER,
**storage_options: Unpack[S3StorageOptions],
)
Bases: CloudPath
Source code in upath/implementations/cloud.py
143 144 145 146 147 148 149 150 151 152 153 154 | |
Protocols: s3://, s3a://
Amazon S3 compatible object storage implementation.
GCSPath
¶
GCSPath(
*args: JoinablePathLike,
protocol: Literal["gcs", "gs"] | None = None,
chain_parser: FSSpecChainParser = DEFAULT_CHAIN_PARSER,
**storage_options: Unpack[GCSStorageOptions],
)
Bases: CloudPath
Source code in upath/implementations/cloud.py
110 111 112 113 114 115 116 117 118 119 120 121 | |
Protocols: gs://, gcs://
Google Cloud Storage implementation.
AzurePath
¶
AzurePath(
*args: JoinablePathLike,
protocol: Literal["abfs", "abfss", "adl", "az"]
| None = None,
chain_parser: FSSpecChainParser = DEFAULT_CHAIN_PARSER,
**storage_options: Unpack[AzureStorageOptions],
)
Bases: CloudPath
Source code in upath/implementations/cloud.py
184 185 186 187 188 189 190 191 192 193 194 195 | |
Protocols: abfs://, abfss://, adl://, az://
Azure Blob Storage and Azure Data Lake implementation.
HfPath
¶
HfPath(
*args: JoinablePathLike,
protocol: Literal["hf"] | None = None,
chain_parser: FSSpecChainParser = DEFAULT_CHAIN_PARSER,
**storage_options: Unpack[HfStorageOptions],
)
Bases: CloudPath
Source code in upath/implementations/cloud.py
201 202 203 204 205 206 207 208 209 210 | |
Protocols: hf://
Hugging Face Hub implementation for accessing models, datasets, and spaces.
upath.implementations.local¶
PosixUPath
¶
PosixUPath(
*args,
protocol: str | None = None,
chain_parser: FSSpecChainParser = DEFAULT_CHAIN_PARSER,
**storage_options: Any,
)
Bases: LocalPath, PosixPath
Source code in upath/implementations/local.py
195 196 197 198 199 200 201 202 203 204 205 | |
POSIX-style local filesystem paths (Linux, macOS, Unix).
WindowsUPath
¶
WindowsUPath(
*args,
protocol: str | None = None,
chain_parser: FSSpecChainParser = DEFAULT_CHAIN_PARSER,
**storage_options: Any,
)
Bases: LocalPath, WindowsPath
Source code in upath/implementations/local.py
195 196 197 198 199 200 201 202 203 204 205 | |
Windows-style local filesystem paths.
FilePath
¶
FilePath(
*args: JoinablePathLike,
protocol: Literal["file", "local"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[FileStorageOptions],
)
Bases: UPath
Source code in upath/implementations/local.py
796 797 798 799 800 801 802 | |
Protocols: file://, local://
File URI implementation for local filesystem.
upath.implementations.http¶
HTTPPath
¶
HTTPPath(
*args: JoinablePathLike,
protocol: Literal["http", "https"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[HTTPStorageOptions],
)
Bases: UPath
Source code in upath/implementations/http.py
40 41 42 43 44 45 46 | |
Protocols: http://, https://
HTTP/HTTPS read-only filesystem implementation.
upath.implementations.sftp¶
SFTPPath
¶
SFTPPath(
*args: JoinablePathLike,
protocol: Literal["sftp"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[SFTPStorageOptions],
)
Bases: UPath
Source code in upath/implementations/sftp.py
28 29 30 31 32 33 34 | |
Protocols: sftp://, ssh://
SFTP (SSH File Transfer Protocol) implementation.
upath.implementations.smb¶
SMBPath
¶
SMBPath(
*args: JoinablePathLike,
protocol: Literal["smb"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[SMBStorageOptions],
)
Bases: UPath
Source code in upath/implementations/smb.py
32 33 34 35 36 37 38 | |
Protocol: smb://
SMB/CIFS network filesystem implementation.
upath.implementations.webdav¶
WebdavPath
¶
WebdavPath(
*args: JoinablePathLike,
protocol: Literal["webdav+http", "webdav+https"]
| None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[WebdavStorageOptions],
)
Bases: UPath
Source code in upath/implementations/webdav.py
41 42 43 44 45 46 47 | |
Protocols: webdav://, webdav+http://, webdav+https://
WebDAV protocol implementation.
upath.implementations.hdfs¶
HDFSPath
¶
HDFSPath(
*args: JoinablePathLike,
protocol: Literal["hdfs"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[HDFSStorageOptions],
)
Bases: UPath
Source code in upath/implementations/hdfs.py
28 29 30 31 32 33 34 | |
Protocol: hdfs://
Hadoop Distributed File System implementation.
upath.implementations.github¶
GitHubPath
¶
GitHubPath(
*args: JoinablePathLike,
protocol: Literal["github"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[GitHubStorageOptions],
)
Bases: UPath
GitHubPath supporting the fsspec.GitHubFileSystem
Source code in upath/implementations/github.py
38 39 40 41 42 43 44 | |
Protocol: github://
GitHub repository file access implementation.
upath.implementations.zip¶
ZipPath
¶
ZipPath(
*args: JoinablePathLike,
protocol: Literal["zip"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[ZipStorageOptions],
)
Bases: UPath
Source code in upath/implementations/zip.py
30 31 32 33 34 35 36 | |
Protocol: zip://
ZIP archive filesystem implementation.
upath.implementations.tar¶
TarPath
¶
TarPath(
*args: JoinablePathLike,
protocol: Literal["zip"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[TarStorageOptions],
)
Bases: UPath
Source code in upath/implementations/tar.py
37 38 39 40 41 42 43 | |
Protocol: tar://
TAR archive filesystem implementation.
upath.implementations.memory¶
MemoryPath
¶
MemoryPath(
*args: JoinablePathLike,
protocol: Literal["memory"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[MemoryStorageOptions],
)
Bases: UPath
Source code in upath/implementations/memory.py
28 29 30 31 32 33 34 | |
Protocol: memory://
In-memory filesystem implementation for testing and temporary storage.
upath.implementations.data¶
DataPath
¶
DataPath(
*args: JoinablePathLike,
protocol: Literal["data"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[DataStorageOptions],
)
Bases: UPath
Source code in upath/implementations/data.py
35 36 37 38 39 40 41 | |
Protocol: data://
Data URL scheme implementation for embedded data.
upath.implementations.ftp¶
FTPPath
¶
FTPPath(
*args: JoinablePathLike,
protocol: Literal["ftp"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[FTPStorageOptions],
)
Bases: UPath
Source code in upath/implementations/ftp.py
34 35 36 37 38 39 40 | |
Protocol: ftp://
FTP (File Transfer Protocol) implementation.
upath.implementations.cached¶
SimpleCachePath
¶
SimpleCachePath(
*args: JoinablePathLike,
protocol: Literal["simplecache"] | None = ...,
chain_parser: FSSpecChainParser = ...,
**storage_options: Unpack[SimpleCacheStorageOptions],
)
Bases: UPath
Source code in upath/implementations/cached.py
34 35 36 37 38 39 40 | |
Protocol: simplecache://
Local caching wrapper for remote filesystems.
See Also
¶
- UPath - Main UPath class documentation
- Registry - Implementation registry
- Extensions - Extending UPath functionality