Skip to main content

Pathlib API extended to use fsspec backends

Project description

Universal Pathlib

Universal Pathlib is a python library that aims to extend Python's built-in pathlib.Path api to use a variety of backend filesystems using fsspec

Installation

Pypi

pip install universal_pathlib

conda

conda install -c conda-forge universal_pathlib

Basic Usage

>>> from upath import UPath

>>> path = UPath("file:/some/filepath.py")
>>> path.name
filepath.py
>>> path.stem
filepath
>>> path.suffix
.py
>>> path.exists()
True

Some backends may require other dependencies. For example to work with S3 paths, s3fs is required.

For more examples, see the example notebook here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

universal_pathlib-0.0.18.tar.gz (16.7 kB view hashes)

Uploaded Source

Built Distribution

universal_pathlib-0.0.18-py3-none-any.whl (19.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page