https://prefect.io logo
f

Farhood Etaati

07/29/2023, 8:16 AM
I'm sorry but this issue is rather pressing for us, is there anyway to find the requirements exclusive to the prefect cli functionalities? I was thinking of using
pip-reqs
and creating a pull request for it.
Using
pigar
the generated requirements is something like this:
Copy code
anyio==3.7.1
click==8.1.6
dateparser==1.1.8
docker==6.1.3
fastapi==0.100.1
httpx==0.24.1
pandas-tutor==2.0.3
pendulum==2.1.2
prefect==2.82
pydantic==2.1.1
readchar==4.0.5
typer==0.9.0
uvicorn==0.23.1
watchfiles==0.19.0

WARNING(pigar): some manual fixes are required since pigar has found duplicate requirements for the same import name.
# WARNING(pigar): the following duplicate requirements are for import name: yaml
cronyo==0.4.5
nhflow==0.1.4
PyYAML==6.0.1
Do not know why uvicorn, fastapi are needed for the cli. Probably a misjudge because of the automation. There's also the
nhflow
section which I could not find what the package is.
Using
pipreqs
:
Copy code
anyio
click
dateparser
docker_py
fastapi
httpx
pendulum
prefect.egg
prefect_docker
pydantic
PyYAML
PyYAML
readchar
rich
typer
typing_extensions
uvicorn
watchfiles
I want to use ansible in an environment that only has the cli to setup my blocks in a prefect remote. Do not need any further functionality.
r

Ryan Peden

07/29/2023, 5:49 PM
Prefect itself uses FastAPI (which in turn uses Uvicorn). Since the CLI is part of the
prefect
module I'm not sure you can really use it separately from Prefect and all its dependencies. If you want to avoid installing all the dependencies, maybe you could just install requests or httpx and create your blocks via the REST API?
f

Farhood Etaati

07/29/2023, 6:11 PM
Yeah I think I should create an independent cli myself. It would have been great if the dependencies for subpackages were loosely coupled though.