fastgen
fastgen copied to clipboard
A CLI for your next FastAPI project
FastGen
A CLI for your next FastAPI Project
👀 Take A Look
this is a glanc of the project structure you will have once you use FastGen

Navigate Quickly
installation
commands
- info
- new
- g
✨ Installation
Using pip :
$ python -m pip install fastgen
Using Poetry :
$ poetry add fastgen
🧭 Commands
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:
infonew
fastgen info
Usage:
$ fastgen info [OPTIONS]
Options:
--help: Show this message and exit.
fastgen new
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.
fastgen g
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
🪲 Encountered A Problem !
feel free to open an issue discussing the problem you faced
🤝🏻 Contributing
please refer to Contribution Guide