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

feat: support returning and resuming partial results #17

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Aug 14, 2024

  1. feat: support returning and resuming partial results

    Add a parameter `keep_failed` to `Dials.list_all()`,
    specifying whether to return the paginated partial results
    when an HTTP request fails.
    
    Add a parameter `resume_from` to `Dials.list_all()`
    to accept paginated partial results and resume the fetching.
    
    Add a field `exception` to `PaginatedBaseModel`
    to record the exception that causes the request to fail.
    
    If applied, users would be able to write something like:
    ```python
    data = None
    data = dials.h1d.list_all(<filter>, keep_failed=True, resume_from=data)
    ```
    and resume by <Up><Enter> from the terminal.
    ShamrockLee committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    3abbb79 View commit details
    Browse the repository at this point in the history