Skip to content

Commit 574e49e

Browse files
committed
Merge tag '3.3.0' into develop
3.3.0
2 parents edcd2fe + 5b35b04 commit 574e49e

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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

7576
optional 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
```

fastapi_template/cli.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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?",

fastapi_template/input_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class DatabaseType(enum.Enum):
1515
@enum.unique
1616
class 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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fastapi_template"
3-
version = "3.2.2"
3+
version = "3.3.0"
44
description = "Feature-rich robust FastAPI template"
55
authors = ["Pavel Kirilin <win10@list.ru>"]
66
packages = [{ include = "fastapi_template" }]

0 commit comments

Comments
 (0)