feat: Allow some random access to OEIS sequence data #158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this PR, the only endpoints for obtaining sequence values were cumulative from the beginning of the sequence to some point. This PR adds "chunked" access to sequences, in which one can use the new
get_oeis_header
endpoint to obtain the chunk size for a given sequence, and then useget_oeis_chunk
to receive the Nth bundle of (at most) that many entries.Adds docs and tests for the new endpoints as well. Apparently required to complete numberscope/frontscope#420 (although it will be hard to be certain until frontscope is reconfigured to use this -- but presumably
we eventually need this, especially if/when we want to use the 100K-long entry a000040.txt for primes, for example.