openaddresses / pyesridump

Scrapes an ESRI MapServer REST endpoint to spit out more generally-usable geodata.
MIT License
322 stars 68 forks source link

add state management to the dumper to ease resumption #91

Open ramSeraph opened 1 year ago

ramSeraph commented 1 year ago

state can be serialised to disk and used to skip already handled features

Submitting the PR, to see if there is interest in this feature, given the amount of code changes, I wouldn't mind maintaining it separately if it is too much of a review burden.

TODO:

ramSeraph commented 1 year ago

Existing tests pass, and state management for all modes except the query by geographical extent were used and known to work.

ramSeraph commented 1 year ago

An example of usage is here: https://github.com/ramSeraph/esriscraper/blob/main/esriscraper/scrape.py#L14

iandees commented 1 year ago

Thanks for submitting this. I'm still thinking about if this is something I want to support in the library directly.

ramSeraph commented 1 year ago

I too think a lot of it can be outside the library, but some encapsulation of params for different modes might need to be in the library to support something similar to the cli "start_with" for all modes.

Your call, also not urgent at all :)