chore: update .gitignore and add httpx dependency in pyproject.toml and uv.lock

This commit is contained in:
2026-06-15 20:24:16 +08:00
parent 34af8bc54d
commit 35dd69006c
5 changed files with 28 additions and 9 deletions
+1
View File
@@ -101,3 +101,4 @@ logs/
Thumbs.db
# Project specific
backend/models_cache/
+4 -6
View File
@@ -1,10 +1,8 @@
"""API router aggregation."""
from fastapi import APIRouter
from app.api.routes.v1 import v1_router
api_router = APIRouter()
# API v1 routes (prefix is set in main.py via settings.API_V1_STR)
api_router.include_router(v1_router)
# Direct alias — avoids FastAPI 0.135+ validation that rejects routes with
# empty raw paths (e.g. @router.get("")) when include_router has no prefix.
# The prefix (settings.API_V1_STR) is applied in main.py.
api_router = v1_router
+7 -3
View File
@@ -9,10 +9,14 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
def find_env_file() -> Path | None:
"""Find .env file in current or parent directories."""
"""Find .env file in current, parent, or backend/ subdirectory."""
current = Path.cwd()
for path in [current, current.parent]:
env_file = path / ".env"
for candidate in [
current,
current.parent,
current / "backend",
]:
env_file = candidate / ".env"
if env_file.exists():
return env_file
return None
+6
View File
@@ -60,6 +60,7 @@ dependencies = [
# Cross-encoder reranking for RAG
"sentence-transformers>=3.0.0",
"torch>=2.0.0",
"httpx>=0.28.1",
]
[project.optional-dependencies]
@@ -192,3 +193,8 @@ exclude_lines = [
[tool.fastapi-fullstack]
generator_version = "0.2.11"
generated_at = "2026-06-15T06:18:30.904341+00:00"
[dependency-groups]
dev = [
"httpx>=0.28.1",
]
+10
View File
@@ -21,6 +21,7 @@ dependencies = [
{ name = "fastapi-cache2" },
{ name = "fastapi-pagination" },
{ name = "greenlet" },
{ name = "httpx" },
{ name = "jinja2" },
{ name = "langchain-text-splitters" },
{ name = "logfire", extra = ["asyncpg", "fastapi", "redis"] },
@@ -62,6 +63,11 @@ dev = [
{ name = "ty" },
]
[package.dev-dependencies]
dev = [
{ name = "httpx" },
]
[package.metadata]
requires-dist = [
{ name = "alembic", specifier = ">=1.18.0" },
@@ -73,6 +79,7 @@ requires-dist = [
{ name = "fastapi-cache2", specifier = ">=0.2.2" },
{ name = "fastapi-pagination", specifier = ">=0.12.31" },
{ name = "greenlet", specifier = ">=3.2.0" },
{ name = "httpx", specifier = ">=0.28.1" },
{ name = "httpx", marker = "extra == 'dev'", specifier = ">=0.28.0" },
{ name = "jinja2", specifier = ">=3.1.0" },
{ name = "langchain-text-splitters", specifier = ">=0.4.0" },
@@ -111,6 +118,9 @@ requires-dist = [
]
provides-extras = ["dev"]
[package.metadata.requires-dev]
dev = [{ name = "httpx", specifier = ">=0.28.1" }]
[[package]]
name = "aiofile"
version = "3.11.1"