Skip to content

Commit b0ee0e1

Browse files
committed
initialize fastAPI codebase
1 parent ad32bf6 commit b0ee0e1

23 files changed

+53
-0
lines changed

.dockerignore

Whitespace-only changes.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.venv
2+
.env
3+
test_supabase.py

Dockerfile

Whitespace-only changes.

app/__init__.py

Whitespace-only changes.

app/api/__init__.py

Whitespace-only changes.

app/api/endpoints/__init__.py

Whitespace-only changes.

app/api/endpoints/users.py

Whitespace-only changes.

app/core/__init__.py

Whitespace-only changes.

app/core/config.py

Whitespace-only changes.

app/crud/__init__.py

Whitespace-only changes.

app/crud/user.py

Whitespace-only changes.

app/db/__init__.py

Whitespace-only changes.

app/db/base.py

Whitespace-only changes.

app/db/session.py

Whitespace-only changes.

app/main.py

Whitespace-only changes.

app/models/__init__.py

Whitespace-only changes.

app/models/user.py

Whitespace-only changes.

app/schemas/__init__.py

Whitespace-only changes.

app/schemas/user.py

Whitespace-only changes.

app/utils/__init__.py

Whitespace-only changes.

app/utils/hashing.py

Whitespace-only changes.

requirements.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fastapi
2+
python-multipart
3+
uvicorn
4+
python-dotenv
5+
itsdangerous
6+
SQLAlchemy
7+
jinja2
8+
python-jose
9+
supabase

template.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import os
2+
from pathlib import Path
3+
4+
project_name = "fastAPI_template"
5+
6+
list_of_files = [
7+
"app/__init__.py",
8+
"app/main.py",
9+
"app/api/__init__.py",
10+
"app/api/endpoints/__init__.py",
11+
"app/api/endpoints/users.py",
12+
"app/core/__init__.py",
13+
"app/core/config.py",
14+
"app/models/__init__.py",
15+
"app/models/user.py",
16+
"app/schemas/__init__.py",
17+
"app/schemas/user.py",
18+
"app/utils/__init__.py",
19+
"app/utils/hashing.py",
20+
"app/crud/__init__.py",
21+
"app/crud/user.py",
22+
"app/db/__init__.py",
23+
"app/db/base.py",
24+
"app/db/session.py",
25+
".env",
26+
".gitignore",
27+
"requirements.txt",
28+
"Dockerfile",
29+
"README.md",
30+
".dockerignore",
31+
]
32+
33+
for filepath in list_of_files:
34+
filepath = Path(filepath)
35+
filedir, filename = os.path.split(filepath)
36+
37+
if filedir != "":
38+
os.makedirs(filedir, exist_ok=True)
39+
40+
if(not os.path.exists(filepath)) or (os.path.getsize(filepath) == 0):
41+
with open(filepath, "w") as f:
42+
pass

0 commit comments

Comments
 (0)