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

handle search results pagination with a generator #133

Open
sbrunato opened this issue Apr 30, 2020 · 2 comments · May be fixed by #787
Open

handle search results pagination with a generator #133

sbrunato opened this issue Apr 30, 2020 · 2 comments · May be fixed by #787
Assignees
Labels
enhancement New feature or request
Projects

Comments

@sbrunato
Copy link
Collaborator

Original report by me.


In python API, use a generator / yield to automate the query of paginated search results

@sbrunato sbrunato removed the major label Aug 4, 2020
@sbrunato sbrunato added enhancement New feature or request priority::2 and removed proposal labels Mar 15, 2021
@sbrunato
Copy link
Collaborator Author

sbrunato commented Mar 15, 2021

Make download_all() method auto increment over pages to download all found pages at once.

  • Add a parameter to download_all() to enable pages auto-iteration or not
  • On search, save search params in SearchResults object the same way it is done at EOProduct level
  • On crunch, save crunch params in SearchResults object, and apply it on next pages
  • we may add a generator to SearchResults for auto-iteration, like a .next_page() method

@sbrunato
Copy link
Collaborator Author

sbrunato commented Mar 29, 2021

When using download_all on a paginated SearchResult, page iterator should be automatically used to fetch next pages products:

prods, found_nb = dag.search(**query_args) # len(prods)=20, found_nb=300

paths = dag.download_all(prods, exhaust=True) # len(paths)=300
paths = dag.download_all(prods) # exhaust=False by defaut,  len(paths)=20

@sbrunato sbrunato moved this from High priority to Low Priority in eodag.* Apr 27, 2021
@sbrunato sbrunato moved this from priority::1 to To Do in eodag.* Aug 17, 2021
@sbrunato sbrunato moved this from To Do to In Progress in eodag.* Jul 28, 2023
@anesson-cs anesson-cs linked a pull request Aug 9, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
eodag.*
  
In Progress
Development

Successfully merging a pull request may close this issue.

2 participants