Make CLI optional?
bollwyvl opened this issue · comments
Nicholas Bollweg commented
typer
brings along rather a lot of dependencies. Might it be possible to make that dependency optional for using this as a library? One way would be a [cli]
extra, or a whole separate package for jsf-cli
.
Andy Challis commented
See #52
Nicholas Bollweg commented
In this same vein, 0.7.0
added requests
as an undeclared, but still hard dependency (import jsf
fails without).
Perhaps import requests
could be moved inside those specific functions, which might not always get used, and a [requests]
extra added.
Alternately:
- use the stdlib
urllib.request.urlopen
- offer a "driver" pattern that allowed for selecting from e.g. a collection of local images
- allow the http implementation to be handed in as a configuration object
Nicholas Bollweg commented
Ah, i see it's coming along with smart_requests[http]
.