parkerhancock / patent_client

A collection of ORM-style clients to public patent data
Other
92 stars 35 forks source link

Option to avoid loading national codes #136

Closed recurvelabs closed 6 months ago

recurvelabs commented 10 months ago

On initialization, patent client downloads a spreadsheet to build a local database for these. This is maybe okay as a once off but I'm using this on a cloud run instance (serverless) which doesn't have a disk plus it has to do this each time the server starts which delays startup causing health failures and probably annoys whoever is hosting the spreadsheet.

parkerhancock commented 10 months ago

Hi @recurvelabs!

That sounds like a good enhancement! Happy to review a PR to implement this.

I'm thinking the easier approach here would be to defer loading national codes until the Inpadoc legal endpoint is called. And that would be a very useful improvement!

Thanks!

parkerhancock commented 6 months ago

This has been implemented in v5. If you try to access the legal codes attribute on an EPO doc, it will build the DB. If you leave that feature alone - no DB!