feat: project skeleton with health endpoint

This commit is contained in:
Joseph Doherty
2026-04-26 11:23:38 -04:00
parent f0594c24d2
commit 4a60171035
7 changed files with 47 additions and 0 deletions
+6
View File
@@ -2,3 +2,9 @@
# v1 runtime data (DB, backups, snapshots, exports, config with secrets)
data/
# Python
.venv/
__pycache__/
*.pyc
.pytest_cache/
+1
View File
@@ -0,0 +1 @@
3.12
View File
+8
View File
@@ -0,0 +1,8 @@
from fastapi import FastAPI
app = FastAPI(title="chat")
@app.get("/health")
def health():
return {"status": "ok"}
+23
View File
@@ -0,0 +1,23 @@
[project]
name = "chat"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.110",
"uvicorn[standard]>=0.30",
"httpx>=0.27",
"pydantic>=2.6",
"pydantic-settings>=2.2",
"openai>=1.30",
"instructor>=1.3",
"tiktoken>=0.7",
"jinja2>=3.1",
"aiosqlite>=0.20",
]
[project.optional-dependencies]
dev = ["pytest>=8", "pytest-asyncio>=0.23", "freezegun>=1.4"]
[tool.pytest.ini_options]
pythonpath = ["."]
asyncio_mode = "auto"
View File
+9
View File
@@ -0,0 +1,9 @@
from fastapi.testclient import TestClient
from chat.app import app
def test_health_endpoint_returns_ok():
client = TestClient(app)
response = client.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "ok"}