Skip to content

Commit 9638d79

Browse files
committed
[ADD] add inspector module call option
1 parent 061ddab commit 9638d79

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<a href="https://pypi.org/project/fastapi-fastkit" target="_blank">
99
<img src="https://img.shields.io/pypi/v/fastapi-fastkit" alt="PyPI - Version">
1010
</a>
11-
<a href="https://img.shields.io/github/v/release/bnbong/FastAPI-fastkit" target="_blank">
11+
<a href="https://github.com/bnbong/FastAPI-fastkit/releases" target="_blank">
1212
<img src="https://img.shields.io/github/v/release/bnbong/FastAPI-fastkit" alt="GitHub Release">
1313
</a>
1414
</p>
@@ -100,7 +100,7 @@ Installing dependencies...
100100
╭───────────────────────────────────────────────────────────────────── Info ─────────────────────────────────────────────────────────────────────╮
101101
│ ℹ To activate the virtual environment, run: │
102102
│ │
103-
│ source /<new-venv-path>/venv/bin/activate │
103+
│ source /<new-venv-path>/venv/bin/activate
104104
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
105105
```
106106

@@ -137,7 +137,7 @@ FastAPI template project will deploy at '<your-project-path>'
137137

138138
╭─────────────────────────────────────────────────────────────────── Success ────────────────────────────────────────────────────────────────────╮
139139
│ ✨ FastAPI project '<your-project-name>' from 'fastapi-default' has been created and saved to │
140-
│ <your-project-path>! │
140+
│ <your-project-path>!
141141
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
142142
```
143143

src/fastapi_fastkit/utils/inspector.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# @author bnbong
88
# --------------------------------------------------------------------------
99
import subprocess
10+
import sys
1011
from pathlib import Path
1112
from typing import Any, Dict, List
1213

@@ -114,3 +115,13 @@ def inspect_template(template_path: str) -> Dict[str, Any | List[str]]:
114115
"errors": inspector.errors,
115116
"warnings": inspector.warnings,
116117
}
118+
119+
120+
if __name__ == "__main__":
121+
if len(sys.argv) != 2:
122+
print("Usage: python inspector.py <template_dir>")
123+
sys.exit(1)
124+
125+
template_dir = sys.argv[1]
126+
result = inspect_template(template_dir)
127+
print(result)

0 commit comments

Comments
 (0)