Skip to main content

An abstraction layer for reading and writing from URI file resources.

Project description

lsst.resources

pypi codecov

This package provides a simple interface to local or remote files using URIs.

from lsst.resources import ResourcePath

file_uri = ResourcePath("/data/file.txt")
contents = file_uri.read()

s3_uri = ResourcePath("s3://bucket/data/file.txt")
contents = s3_uri.read()

The package currently understands file, s3, gs, http[s], and resource (Python package resource) URI schemes as well as a scheme-less URI (relative local file path).

The package provides the main file abstraction layer in the Rubin Observatory Data Butler datastore.

PyPI: lsst-resources

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

lsst_resources-27.2024.4000.tar.gz (106.5 kB view hashes)

Uploaded Source

Built Distribution

lsst_resources-27.2024.4000-py3-none-any.whl (96.5 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