python-scraperlib icon indicating copy to clipboard operation
python-scraperlib copied to clipboard

Support à la carte dependencies

Open rgaudin opened this issue 11 months ago • 1 comments

scraperlib grew significantly over the years, with modules very useful even beyond pure scraper usages. The ZIM wrapper is very useful in itself to name only one.

We are also considering addition of the currently separate kiwixstorage module, or the Kiwix catalog reader.

To support this Kiwix Swiss-army knife layout, we'd need to be able to install only some of the dependencies.

Dependencies would thus be organized into extra groups (ZIM, image, video, etc) with an all group that installs everything of course.

In addition, we could maybe had a try block on imports in each module to print a user-actionable message when importing code for which dependencies are not installed.

rgaudin avatar Jan 14 '25 08:01 rgaudin

Agreed, especially if it allows to much clearly define system dependencies. Currently the documentation says that we need a bunch of system dependencies, but it should be clearer that these are not required in all extra. And usually they are in fact needed only for few methods. Would be cool if you could map this information somewhere in the documentation.

benoit74 avatar Jan 14 '25 12:01 benoit74