def from_file(href): """Reads an ItemCollection from a file. Args: href (str): The HREF to read the item from. Returns: ItemCollection: ItemCollection that was read from the given file. """ d = json.loads(STAC_IO.read_text(href)) c = ItemCollection.from_dict(d) return c
def from_file(uri): """Reads an SingleFileSTAC from a file. Args: href (str): The HREF to read the item from. Returns: SingleFileSTAC: SingleFileSTAC that was read from the given file. """ d = json.loads(STAC_IO.read_text(uri)) c = SingleFileSTAC.from_dict(d) return c