Accessing remote data#

If you’re accessing HATS catalogs on a local file system, a typical path string like "/path/to/catalogs" will be sufficient. This tutorial will help you get started if you need to access data over HTTP/S, cloud storage, or have some additional parameters for connecting to your data.

We use fsspec and universal_pathlib to create connections to remote data sources. Please refer to their documentation for a list of supported filesystems and any filesystem-specific parameters.

If you’re using PyPI/pip for package management, you can install ALL of the fsspec implementations, as well as some other nice-to-have dependencies with pip install 'lsdb[full]'.

Below, we provide some a basic workflow for accessing remote data, as well as filesystem-specific hints.

1. HTTP / HTTPS#

Firstly, make sure to install the fsspec http package:

pip install aiohttp

OR

conda install aiohttp
[1]:
from upath import UPath

test_path = UPath("https://data.lsdb.io/hats/gaia_dr3/gaia/")
test_path.exists()
[1]:
True
[2]:
import lsdb

cat = lsdb.open_catalog("https://data.lsdb.io/hats/gaia_dr3/gaia/")
cat
[2]:
lsdb Catalog gaia:
source_id ra dec parallax parallax_error pmra pmdec phot_g_mean_mag phot_bp_mean_mag phot_rp_mean_mag bp_rp ruwe radial_velocity
npartitions=2016
Order: 2, Pixel: 0 int64[pyarrow] double[pyarrow] double[pyarrow] double[pyarrow] float[pyarrow] double[pyarrow] double[pyarrow] float[pyarrow] float[pyarrow] float[pyarrow] float[pyarrow] float[pyarrow] float[pyarrow]
... ... ... ... ... ... ... ... ... ... ... ... ... ...
Order: 3, Pixel: 766 ... ... ... ... ... ... ... ... ... ... ... ... ...
Order: 3, Pixel: 767 ... ... ... ... ... ... ... ... ... ... ... ... ...
13 out of 152 available columns in the catalog have been loaded lazily, meaning no data has been read, only the catalog schema
This catalog has an estimated size of 152.2 GB

1.1 SSL Certificates problems with HTTPS (FileNotFoundError)#

Occasionally, with HTTPS data, you may see issues with missing certificates. If you encounter a FileNotFoundError, but you’re pretty sure the file should be found:

  1. Check your network and server availability

  2. On Linux, be sure that openSSL and ca-certificates are in place

  3. On Mac, run /Applications/Python\ 3.*/Install\ Certificates.command

If none of the above helps, please try running the following code snippet to check if the certificate is the issue. The error message should be more informative:

import aiohttp, asyncio

async def fetch():
    async with aiohttp.ClientSession() as session:
        async with session.get("https://readthedocs.org") as resp:
            return await resp.text()
asyncio.run(fetch())

Some environments are known to have issues with SSL certificates, for example, Red Hat Linux 8 with uv package manager. Please try using different type of environment, e.g., conda.

2. AWS#

Cloud storage often requires additional configuration, particularly if you need to authenticate to access the data.

The authentication is typically passed via storage_options, and a connection to AWS S3 might look something like the following:

s3_path = UPath("s3://bucket_name",
                protocol="s3",
                client_kwargs = {"endpoint_url": "http://0.0.0.0:8000/"},
                anon=False)

About#

Authors: Melissa DeLucchi, Konstantin Malanchev

Last updated on: April 13, 2026

If you use lsdb for published research, please cite following instructions.