FastGen
A CLI for your next FastAPI Project
this is a glanc of the project structure you will have once you use FastGen
Using pip :
$ python -m pip install fastgen
Using Poetry :
$ poetry add fastgen
Usage:
$ fastgen [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion
: Install completion for the current shell.--show-completion
: Show completion for the current shell, to copy it or customize the installation.--help
: Show this message and exit.
Commands:
info
new
Usage:
$ fastgen info [OPTIONS]
Options:
--help
: Show this message and exit.
Usage:
$ fastgen new [OPTIONS] ⭐ Project Name
Arguments:
⭐ Project Name
: required
Options:
--dir 📁 Directory Path
--package-manager 📦 Package Manager
: [default: pip] ( Options are pip , poetry )--migrations / --no-migrations
: [default: False]--docker / --no-docker
: [default: False]--testing / --no-testing
: [default: False]--database 📅 Database
: [default: postgresql] ( Options are postgresql,mysql,sqlite )--orm ⚙️ ORM
: [default: False]--help
: Show this message and exit.
Usage:
$ fastgen g [OPTIONS] <component> <component_name>
Available Components
Component | Action |
---|---|
router | generates new rotuer at app/api/routers |
model | generates new sqlmodel or sqlalchemy mode at app/database/models |
schema | generates new pydantic schema at app/api/schemas |
Options
-
--model-type
: available only for model components , optional values are ( sqlmodel , sqlalchemy ) -
--path
: specifiy where to create the component RELATIVE TO THE CURRENT WORKING DIRECOTRY if not in default path -
Note : the naming is preferred to be in lower case so it can be resolved correctly
Arguments
feel free to open an issue discussing the problem you faced
please refer to Contribution Guide