Skip to content

Commit 6f23554

Browse files
committed
Merge branch 'release/4.1.1'
2 parents 3145317 + f7ead66 commit 6f23554

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Generator features:
6666
- Optional Sentry integration;
6767
- Optional Loguru logger;
6868
- Optional Opentelemetry integration.
69+
- Optional taskiq integration.
6970

7071

7172
This project can handle arguments passed through command line.
@@ -88,6 +89,7 @@ Options:
8889
--ci [none|gitlab_ci|github] Select a CI for your app
8990
--redis Add redis support
9091
--rabbit Add RabbitMQ support
92+
--taskiq Add Taskiq support
9193
--migrations Add Migrations
9294
--kube Add kubernetes configs
9395
--dummy Add dummy model

fastapi_template/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
from pathlib import Path
32

43
from cookiecutter.exceptions import FailedHookException, OutputDirExistsException

fastapi_template/cli.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import shutil
12
from fastapi_template.input_model import (
23
BuilderContext,
34
MenuEntry,
@@ -585,4 +586,18 @@ def run_command(callback: Callable[[BuilderContext], None]) -> None:
585586
)
586587
for menu in menus:
587588
cmd.params.extend(menu.get_cli_options())
589+
required_commands = {
590+
"poetry": "https://python-poetry.org/docs/#installation",
591+
"git": "https://git-scm.com/",
592+
}
593+
for prog, link in required_commands.items():
594+
if shutil.which(prog) is None:
595+
print(
596+
"Please install {prog} before generating project. Link: {link}".format(
597+
prog=colored(prog, "green"),
598+
link=colored(link, "cyan"),
599+
),
600+
)
601+
return
602+
588603
cmd.main()

fastapi_template/template/{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@ src_folder = "./{{cookiecutter.project_name}}"
218218
{%- endif %}
219219
{%- endif %}
220220

221+
[fastapi-template.options]
222+
{%- for key, value in cookiecutter.items() %}
223+
{%- if not key.startswith("_") and not key == "db_info" %}
224+
{{key}} = "{{value}}"
225+
{%- endif %}
226+
{%- endfor %}
227+
221228
[build-system]
222229
requires = ["poetry-core>=1.0.0"]
223230
build-backend = "poetry.core.masonry.api"

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 = "4.1.0"
3+
version = "4.1.1"
44
description = "Feature-rich robust FastAPI template"
55
authors = ["Pavel Kirilin <[email protected]>"]
66
packages = [{ include = "fastapi_template" }]

0 commit comments

Comments
 (0)