File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ![ python version] ( https://img.shields.io/pypi/pyversions/fastapi_template?style=flat-square ) ![ Build status] ( https://img.shields.io/github/workflow/status/s3rius/FastAPI-template/Release%20python%20package?style=flat-square ) [ ![ version] ( https://img.shields.io/pypi/v/fastapi_template?style=flat-square )] ( https://pypi.org/project/fastapi-template/ )
2-
1+ ![ python version] ( https://img.shields.io/pypi/pyversions/fastapi_template?style=for-the-badge ) ![ Build status] ( https://img.shields.io/github/workflow/status/s3rius/FastAPI-template/Release%20python%20package?style=for-the-badge ) [ ![ version] ( https://img.shields.io/pypi/v/fastapi_template?style=for-the-badge )] ( https://pypi.org/project/fastapi-template/ )
2+ [ ![ ] ( https://img.shields.io/pypi/dm/fastapi_template?style=for-the-badge )] ( https://pypi.org/project/fastapi-template/ )
33<div align =" center " >
44<img src =" https://raw.githubusercontent.com/s3rius/FastAPI-template/master/images/logo.png " width =700 >
55<div ><i >Flexible and Lightweight general-purpose template for FastAPI.</i ></div >
@@ -71,6 +71,7 @@ usage: FastAPI template [-h] [--version] [--name PROJECT_NAME]
7171 [--orm {ormar,sqlalchemy,tortoise}]
7272 [--ci {none,gitlab,github}] [--redis] [--migrations]
7373 [--kube] [--dummy] [--routers] [--swagger] [--force]
74+ [--quite]
7475
7576optional arguments:
7677 -h, --help show this help message and exit
@@ -92,4 +93,5 @@ optional arguments:
9293 --routers Add exmaple routers
9394 --swagger Eanble self-hosted swagger
9495 --force Owerrite directory if it exists
96+ --quite Do not ask for feature during generation
9597` ` `
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ def parse_args():
118118 default = False ,
119119 dest = "force" ,
120120 )
121+ parser .add_argument (
122+ "--quite" ,
123+ help = "Do not ask for feature during generation" ,
124+ action = "store_true" ,
125+ default = False ,
126+ dest = "quite" ,
127+ )
121128
122129 return parser .parse_args ()
123130
@@ -155,7 +162,7 @@ def ask_features(current_context: BuilderContext) -> BuilderContext:
155162 if feature ["value" ] is None :
156163 setattr (current_context , feature ["name" ], False )
157164 checkbox_values .append ((feature ["name" ], feature_name ))
158- if checkbox_values :
165+ if checkbox_values and not current_context . quite :
159166 results = checkboxlist_dialog (
160167 title = "Features" ,
161168 text = "What features do you wanna add?" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class DatabaseType(enum.Enum):
1515@enum .unique
1616class CIType (enum .Enum ):
1717 none = "none"
18- gitlab_ci = "gitlab "
18+ gitlab_ci = "gitlab_ci "
1919 github = "github"
2020
2121@enum .unique
@@ -87,6 +87,7 @@ class BuilderContext(BaseModel):
8787 add_dummy : Optional [bool ] = False
8888 self_hosted_swagger : Optional [bool ]
8989 force : bool = False
90+ quite : bool = False
9091
9192 class Config :
9293 orm_mode = True
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " fastapi_template"
3- version = " 3.2.2 "
3+ version = " 3.3.0 "
44description = " Feature-rich robust FastAPI template"
55authors = [" Pavel Kirilin <win10@list.ru>" ]
66packages = [{ include = " fastapi_template" }]
You can’t perform that action at this time.
0 commit comments