Skip to content

Commit

Permalink
Merge pull request #459 from astronomy-commons/issue/451/anon-s3
Browse files Browse the repository at this point in the history
Add example for anonymous S3 catalog reads
  • Loading branch information
camposandro authored Feb 24, 2025
2 parents 5be6895 + 0a7331c commit a04f988
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hats/loaders/read_hats.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ def read_hats(catalog_path: str | Path | UPath) -> Dataset:
Args:
catalog_path (str): path to the root directory of the catalog
Returns:
The initialized catalog object
Examples:
To read a catalog from a public S3 bucket, call it as follows::
from upath import UPath
catalog = hats.read_hats(UPath(..., anon=True))
"""
catalog_path = file_io.get_upath(catalog_path)
try:
Expand Down

0 comments on commit a04f988

Please sign in to comment.