Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CLI optional? #51

Closed
bollwyvl opened this issue Jan 2, 2023 · 3 comments
Closed

Make CLI optional? #51

bollwyvl opened this issue Jan 2, 2023 · 3 comments

Comments

@bollwyvl
Copy link
Contributor

bollwyvl commented Jan 2, 2023

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.

@ghandic
Copy link
Owner

ghandic commented Jan 7, 2023

See #52

@ghandic ghandic closed this as completed Jan 7, 2023
@bollwyvl
Copy link
Contributor Author

bollwyvl commented Jan 8, 2023

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

@bollwyvl
Copy link
Contributor Author

bollwyvl commented Jan 8, 2023

Ah, i see it's coming along with smart_requests[http].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants