ghandic / jsf

Creates fake JSON files from a JSON schema

Home Page:https://ghandic.github.io/jsf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make CLI optional?

bollwyvl opened this issue · comments

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.

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

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