Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenience method for downloading assets via stac-asset #1490

Open
jsignell opened this issue Jan 10, 2025 · 0 comments
Open

Convenience method for downloading assets via stac-asset #1490

jsignell opened this issue Jan 10, 2025 · 0 comments

Comments

@jsignell
Copy link
Member

stac-asset implements patterns like:

import pystac
import stac_asset

href = "https://raw.githubusercontent.com/radiantearth/stac-spec/master/examples/simple-item.json"
item = pystac.read_file(href)
await stac_asset.download_item(item, ".")

Seems like there would be some ergonomics and discoverability wins in adding a download method to pystac.Item itself so you could do:

import pystac

href = "https://raw.githubusercontent.com/radiantearth/stac-spec/master/examples/simple-item.json"
item = pystac.read_file(href)
await item.download(".")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant