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

Add return to CLI script #561

Closed
SlowMo24 opened this issue Apr 19, 2022 · 1 comment
Closed

Add return to CLI script #561

SlowMo24 opened this issue Apr 19, 2022 · 1 comment

Comments

@SlowMo24
Copy link

When building a tool on sentinelsat, it would be great to be able to reuse the provided CLI. Currently one has to implement their own CLI that will then query the Python-API but of course there will be much duplication to https://github.com/sentinelsat/sentinelsat/blob/main/sentinelsat/scripts/cli.py .

I'm not sure if this a valid use case or feasible (considering that different options return different data).

For example if

footprints_geojson = api.to_geojson(products)
,
downloaded_quicklooks, failed_quicklooks = api.download_all_quicklooks(products, path)
,
downloaded, triggered, failed_downloads = api.download_all(
and
for product_id, props in products.items():
would return their result instead of printing, or duping it, it could be used in other workflows e.g. to further process the downloaded data.

@valgur
Copy link
Member

valgur commented Apr 20, 2022

Ok, that would be a fine addition by me. Feel free to create a PR.

@j08lue j08lue closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2024
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

4 participants