sdkagent

universal_pathlib API reference

72 public APIs from universal_pathlib (fsspec/universal_pathlib) — 24 classes, 2 functions, 46 methods. Signatures extracted by static analysis of the actual source.

Repository: fsspec/universal_pathlib

KindCount
Classes24
Functions2
Methods46

API list

classupath._chain.Chain
holds current chain segments
methodupath._chain.Chain.nest() -> ChainSegment
return a nested target_* structure
classupath._chain.FSSpecChainParser
parse an fsspec chained urlpath
methodupath._chain.FSSpecChainParser.chain(segments:Sequence[ChainSegment]) -> tuple[str, dict[str, Any]]
returns a chained urlpath from the segments
classupath._flavour.LazyFlavourDescriptor
descriptor to lazily get the flavour for a given protocol
classupath._flavour_sources.FileSystemFlavourBase
base class for the fsspec flavours
classupath._info.UPathInfo
Path info for UPath objects.
funcupath._protocol.compatible_protocol(protocol:str, *args:JoinablePathLike) -> bool
check if UPath protocols are compatible
funcupath._protocol.get_upath_protocol(pth:JoinablePathLike, *protocol:str | None=None, *storage_options:dict[str, Any] | None=None) -> str
return the filesystem spec protocol
classupath._stat.UPathStatResult
A stat_result compatible class wrapping fsspec info dicts.
methodupath._stat.UPathStatResult.as_info() -> Mapping[str, Any]
Return the fsspec info dict.
methodupath._stat.UPathStatResult.count(value:int) -> int
the sequence interface count method.
methodupath._stat.UPathStatResult.from_info(info:Mapping[str, Any]) -> UPathStatResult
Create a UPathStatResult from a fsspec info dict.
methodupath._stat.UPathStatResult.index(value:int, start:int=0, stop:int | None=None) -> int
the sequence interface index method.
methodupath._stat.UPathStatResult.st_atime() -> int | float
time of last access
methodupath._stat.UPathStatResult.st_atime_ns() -> int
time of last access in nanoseconds
methodupath._stat.UPathStatResult.st_birthtime() -> int | float
time of creation
methodupath._stat.UPathStatResult.st_ctime() -> int | float
time of last change
methodupath._stat.UPathStatResult.st_ctime_ns() -> int
time of last change in nanoseconds
methodupath._stat.UPathStatResult.st_dev() -> int
device
methodupath._stat.UPathStatResult.st_gid() -> int
group ID of owner
methodupath._stat.UPathStatResult.st_ino() -> int
inode
methodupath._stat.UPathStatResult.st_mode() -> int
protection bits
methodupath._stat.UPathStatResult.st_mtime() -> int | float
time of last modification
methodupath._stat.UPathStatResult.st_mtime_ns() -> int
time of last modification in nanoseconds
methodupath._stat.UPathStatResult.st_nlink() -> int
number of hard links
methodupath._stat.UPathStatResult.st_size() -> int
total size, in bytes
methodupath._stat.UPathStatResult.st_uid() -> int
user ID of owner
classupath.core.UPath
Base class for pathlike paths backed by an fsspec filesystem.
methodupath.core.UPath.anchor() -> str
The concatenation of the drive and root or an empty string.
methodupath.core.UPath.as_uri() -> str
Return the string representation of the path as a URI.
methodupath.core.UPath.drive() -> str
The drive prefix (letter or UNC path), if any.
methodupath.core.UPath.exists(*follow_symlinks:bool=True) -> bool
Whether this path exists.
methodupath.core.UPath.expanduser() -> Self
Return a new path with expanded `~` constructs.
methodupath.core.UPath.full_match(pattern:str | SupportsPathLike, *case_sensitive:bool | None=None) -> bool
Match this path against the provided glob-style pattern.
methodupath.core.UPath.is_block_device() -> bool
Whether this path is a block device.
methodupath.core.UPath.is_char_device() -> bool
Whether this path is a character device.
methodupath.core.UPath.is_dir(*follow_symlinks:bool=True) -> bool
Whether this path is a directory.
methodupath.core.UPath.is_fifo() -> bool
Whether this path is a FIFO (named pipe).
methodupath.core.UPath.is_file(*follow_symlinks:bool=True) -> bool
Whether this path is a regular file.
methodupath.core.UPath.is_junction() -> bool
Whether this path is a junction.
methodupath.core.UPath.is_relative_to(other:Self | str, *_deprecated:Any) -> bool
Return True if the path is relative to another path identified.
methodupath.core.UPath.is_reserved() -> bool
Whether this path is reserved under Windows.
methodupath.core.UPath.is_socket() -> bool
Whether this path is a socket.
methodupath.core.UPath.is_symlink() -> bool
Whether this path is a symbolic link.
methodupath.core.UPath.iterdir() -> Iterator[Self]
Yield path objects of the directory contents.
methodupath.core.UPath.mkdir(mode:int=511, parents:bool=False, exist_ok:bool=False) -> None
Create a new directory at this given path.
methodupath.core.UPath.parent() -> Self
The logical parent of the path.
methodupath.core.UPath.rename(target:WritablePathLike, *recursive:bool=UNSET_DEFAULT, *maxdepth:int | None=UNSET_DEFAULT, **kwargs:Any) -> Self
Rename this file or directory to the given target.
methodupath.core.UPath.rmdir(recursive:bool=True) -> None
Remove this directory.
methodupath.core.UPath.root() -> str
The root of the path, if any.
methodupath.core.UPath.touch(mode:int=438, exist_ok:bool=True) -> None
Create this file with the given access mode, if it doesn't exist.
methodupath.core.UPath.unlink(missing_ok:bool=False) -> None
Remove this file or link.
methodupath.core.UPath.with_name(name:str) -> Self
Return a new path with the file name changed.
methodupath.core.UPath.with_segments(*pathsegments:JoinablePathLike) -> Self
Construct a new path object from any number of path-like objects.
classupath.implementations.github.GitHubPath
GitHubPath supporting the fsspec.GitHubFileSystem
classupath.types.StatResultType
duck-type for os.stat_result
classupath.types.UPathParser
duck-type for upath.core.UPathParser
classupath.types.storage_options.DataStorageOptions
Storage options for Data URIs filesystem
classupath.types.storage_options.FTPStorageOptions
Storage options for FTP filesystem
classupath.types.storage_options.GCSStorageOptions
Storage options for Google Cloud Storage
classupath.types.storage_options.GitHubStorageOptions
Storage options for GitHub repository filesystem
classupath.types.storage_options.HTTPStorageOptions
Storage options for HTTP(S) filesystem
classupath.types.storage_options.HfStorageOptions
Storage options for Hugging face filesystem
classupath.types.storage_options.MemoryStorageOptions
Storage options for memory filesystem
classupath.types.storage_options.S3StorageOptions
Storage options for AWS S3 and S3-compatible services
classupath.types.storage_options.SFTPStorageOptions
Storage options for SFTP/SSH filesystem
classupath.types.storage_options.SMBStorageOptions
Storage options for SMB/Windows/Samba network shares
classupath.types.storage_options.SimpleCacheStorageOptions
Storage options for SimpleCache
classupath.types.storage_options.TarStorageOptions
Storage options for TAR archive filesystem (read-only)
classupath.types.storage_options.WebdavStorageOptions
Storage options for WebDAV filesystem
classupath.types.storage_options.ZipStorageOptions
Storage options for ZIP archive filesystem

About this data

These signatures were extracted from the public source of fsspec/universal_pathlib using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries